Asterisk AGI script: calling card script.
From: Dallas \(Linux Admin\) (dallas_at_linuxsrv.net)
Date: 08/23/04
- Next message: Andy Fraser: "Re: Why Linux will never win against windows"
- Previous message: J.O. Aho: "Re: Kernel module for Scanners that works with 2.6.4+"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 23 Aug 2004 13:43:53 -0500
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
- Next message: Andy Fraser: "Re: Why Linux will never win against windows"
- Previous message: J.O. Aho: "Re: Kernel module for Scanners that works with 2.6.4+"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]