[Asterisk-Users] executing an agi script after a successful Dial
Dan Fernandez
danfernandez00 at hotmail.com
Fri Jul 25 16:28:38 MST 2003
John
Thanks for the response. This seems to be what I am looking. However, I
have discovered a problem with a simple perl script triggered from the h
extension.
I am using perl-Asterisk and if I call the script from any extension in
works fine. However, if I call the same script from h the get_variable and
verbose functions don´t work anymore.
Rgds
Dan
----- Original Message -----
From: "John Todd" <jtodd at loligo.com>
To: <asterisk-users at lists.digium.com>
Sent: Wednesday, July 23, 2003 8:20 PM
Subject: Re: [Asterisk-Users] executing an agi script after a successful
Dial
> >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
> >Asterisk-Users at lists.digium.com
> >http://lists.digium.com/mailman/listinfo/asterisk-users
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
More information about the asterisk-users
mailing list