Article View: ahn.tech.linux
Article #182Asterisk AGI script: calling card script.
From: Dallas (Linux Admin)
Date: Mon, 23 Aug 2004 18:43
Date: Mon, 23 Aug 2004 18:43
34 lines
2973 bytes
2973 bytes
Hello,
I know perl and work with AGI in asterisk. I built a Calling Card System
that has all the features but one. When the AGI uses the Dial app, we want
to stream a file or playback a sound file to the customers while they are
talking (to tell them they are running out of time). When the customer has
120 seconds remaining we want to stream a sound file in the conversation(on
the same channel) saying that they have 2 minutes remaining. We could
implement a *while* statement to check the seconds as they are talking. I
can do that part but I dont know how to send sound while they are talking.
We will pay you for your help. Could you please quote me on the price of
adding that feature?
Section of script where it needs to be edited:
# Calling the max timeout
$AGI->exec('AbsoluteTimeout',$timeout);
# Call the number for the customer
$AGI->exec('Dial',"SIP/alvoice.deskmedia.com/$target");
# Start the call timeer
$starttime = time();
# To make sure that we dont execut another command until they hunge up
$AGI->exec('Congestion');
# End the call timer
$endtime = time();
# Find out the time used
$totaltimeused = $endtime - $starttime;
chomp($totaltimeused);
--
Dallas Weitzel
Work: 1(507)379-0159
1143 South Broadway
Technical Details
Message-ID:
<A5Kdncwffccjp7fcRVn-pg@deskmedia.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.deskmedia.com!news.deskmedia.com.POSTED!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 11033e,1b67756c7529fe7b,start X-Google-Thread: fe70d,1b67756c7529fe7b,start X-Google-Thread: fff8d,1b67756c7529fe7b,start X-Google-Thread: 100c5f,1b67756c7529fe7b,start X-Google-Thread: 1055b9,1b67756c7529fe7b,start X-Google-Thread: faa64,1b67756c7529fe7b,start X-Google-Thread: 1327c9,1b67756c7529fe7b,start X-Google-Attributes: gid11033e,gidfe70d,gidfff8d,gid100c5f,gid1055b9,gidfaa64,gid1327c9,public X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.deskmedia.com!news.deskmedia.com.POSTED!not-for-mail NNTP-Posting-Date: Mon, 23 Aug 2004 13:43:10 -0500 From: "Dallas \(Linux Admin\)" <dallas@linuxsrv.net> Newsgroups: ahn.tech.linux,ak.os.linux,alt.comp.linux.isp,alt.comp.os.linux,alt.linux,alt.linux.redhat,alt.os.linux,alt.pl.comp.os.linux.redhat Subject: Asterisk AGI script: calling card script. Date: Mon, 23 Aug 2004 13:43:53 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Message-ID: <A5Kdncwffccjp7fcRVn-pg@deskmedia.com> Lines: 36 NNTP-Posting-Host: 199.199.151.38 X-Trace: sv3-l04dJD8S9/ETWx7bnN/tpg8aoJbyfXyfT65lX2iWoklSdxWpiKXZRolTn/7HCc0/e6YXtOgMY/xoymj!AMrkQvY4h/AtGqaie58p+OQ2Jak7/FOxDiuNTG/E/g9GvMw+zTtjvE/kQXBx2UDfR4uST74xQ2aj!vyRJZw== X-Complaints-To: abuse@deskmedia.com X-DMCA-Complaints-To: abuse@deskmedia.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.13