On Wednesday 23 July 2003 05:04 pm, Dan Fernandez wrote:
 I would like to run an agi script (to calculate the cost of a long
 distance or international call) right after I execute a Dial app.
 Can this be configured in extensions.conf? It seems the entries

It cannot. If the Dial app succeeds in getting a connected channel, it will ALWAYS return -1, which signals a hangup to Asterisk. The only time Dial will ever return control to the dialplan is if either the channel is not available or if the channel does not get connected.

Hmm... I'm not so sure about what the question was, and if perhaps there is some confusion about what is desired here. In my example configs, I use the "h" extension to clean up call recording after Dial has terminated. Seems to work for me, but perhaps it's not supposed to work. :)


Dan - try putting your routines in an extension called "h". This may get executed after Dial terminates normally or abnormally.

JT


> right after a Dial app get executed only if the Dial app was
 executed unsucessfully. Would I have to execute the dial app from
 the agi script?

No, again, the Dial app won't return control to the AGI script until after the call is complete. You're pretty much going to have to do whatever you want to do prior to executing Dial or after the call is complete. Of course, you could create a separate thread which runs parallel to the channel thread and does various monitoring tasks, but that would require some C programming skills.

-Tilghman

_______________________________________________
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users

_______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to