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 <http://asterisk-backports.org/wiki/index.php/User_talk:KNK>) 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 <[EMAIL PROTECTED]> 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
[EMAIL PROTECTED]
Bureau of Economic and Business Research
University of Florida
(352) 392-0171 Ext. 221


 ------------------------------
*From:* [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED] *On Behalf Of *Adi Simon
*Sent:* Thursday, May 31, 2007 5:54 AM
*To:* [email protected]
*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 <http://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

Reply via email to