[asterisk-users] Passing call duration to an AGI Script
Luis Morales
lmorales at sigmadental.net
Thu May 31 17:25:20 MST 2007
Hi Adi,
My be better if you send us the code about how did you do to catch and
retrive the data from asterisk.
Regards,
Luis Morales
On Fri, 2007-06-01 at 01:21 +0300, Adi Simon wrote:
> Hi Martin,
>
> Thanks for your reply. Maybe I wasn't clear enough. I am already
> running AGI periodically
> inside a call and it runs just fine. I'm using a patch for asterisk
> (can be found here) to do so. In short i'm using it for a prepaid
> system that needs to allow more than one prepaid call to run
> simultaneously.
>
> Anyway, I solved my problem by changing the code a bit. I added an AGI
> variable that holds the timestamp of the call answer time, thus
> allowing me to use it as an anchor for knowing how much time passed
> since the beginning of the call.
>
> Thanks again,
>
> Adi.
>
>
>
> On 5/31/07, Martin Smith <martins at bebr.ufl.edu> wrote:
> Hi Adi,
>
> AGI is probably best viewed like any other dialplan
> application (and with DeadAGI something that happens after,
> but anyway) -- in my opinion. I've seen people do some pretty
> wild stuff with it, but in the end, when I wonder if the
> Manager interface or AGI interface is most appropriate for a
> given task, I ask questions like "Would I want to do this with
> another application? Is this even possible with another
> application?".
>
> In your case, I'd say you probably couldn't say...
> periodically execute a dialplan application that runs in the
> middle of a call without interrupting the call (with AGI,
> anyway). I'd recommend using the Manager interface and polling
> for call durations / listening for events and acting on the
> information you get back (I'd assume the answered duration is
> one of those values you could poll for).
>
> Hope this helps -- others, please jump in if I'm way wrong :)
>
> Martin Smith, Systems Developer
> martins at bebr.ufl.edu
> Bureau of Economic and Business Research
> University of Florida
> (352) 392-0171 Ext. 221
>
>
>
>
> ______________________________________________________
> From: asterisk-users-bounces at lists.digium.com [mailto:
> asterisk-users-bounces at lists.digium.com] On Behalf Of
> Adi Simon
> Sent: Thursday, May 31, 2007 5:54 AM
> To: asterisk-users at lists.digium.com
> Subject: [asterisk-users] Passing call duration to an
> AGI Script
>
>
>
> Hi,
>
> I'm trying to find a way of passing the actual call
> duration (something like ANSWEREDTIME) to an AGI
> script that runs periodically during a call. Any
> ideas?
>
> Thanks,
>
> Adi.
>
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
--
.-.-.-.-.-.-.-.-.-.-.-.-.--.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
Sigma Dental Plan
Jefe de Soporte y Sistemas
Telf. Oficina : +58(212)2646811
Cel. : +58(416)4242091
Caracas, Venezuela
.-.-.-.-.-.-.-.-.-.-.-.-.--.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
More information about the asterisk-users
mailing list