AGI vs DEADAGI

hello everybody,
i’ve a problem calling an agi script.
in particular i cannot understand when to use AGI (when the calleD hangups) od DEADAGI (when calleR hangups)

any idea? hint? something?

i tried to use h and H extensions but no difference.

thanks,
bye

I believe that the difference is that DeadAGI will continue the script even if either party hangs up the call. Where as AGI will terminate the script if either party hangs up the call.

Perhaps be more specific as to what you are trying to do and what problem you are having with the AGI exaction.

Also note the CLI output of the command “debug agi” can be very useful in figuring out what is failing.

hi all,
thanks for reply to my post!

to be more precise:
when a call ends i want to write a row in a database.
before it was done by the native asterisk MYSQL extension (add-on), but it seems to me that it leaves a lot of open connections and it did not works very fine.
so i write some perl scripts.

now i understand (reading asterisk log) that when the person who hangs up the call is the calleR, you will need to call DEADAGI.
if it is the calleD you will need to call AGI (the channel is still active).

now how can i distingue between these two situations?

thanks a lot.
bye.

so can anybody help me?
or how do you call an external script at the end of a call?

thanks.
bye.

To call an agi script at the end of a call I use only and ever DeadAGI().

Cheers.

Marco Bruni

me too.
but what about the console message : “WARNING running DEADAGI in an active channel will cause problem” ??!!
it’s a scaring message :smile:

Francesco.

That seems to show something gone wrong when the call ended, what type of channels are you using ?

Cheers.

Marco Bruni

my scenario is:
SNOM <=sip=> ASTERISK <=iax2=> GATEWAY -> NETWORK

i notice that the problem will still persist even if the call is between two snom phones connected with the asterisk server.
and the message is displayed when the calledD hangups before the calleR.

When the calledD hangups before the calleR, immediatly after the hangup, what “core show channels” says ? If all goes right shouldn’t remain any active channels.
I just tried, on our asterisk 1.4.21.2, a call between two Grandstream sip phones and immediatly after one of the parties hangup “core show channels” shows nothing as it should be, even when the calleD hangups first, is the same for you ?

Cheers.

Marco Bruni

Also, DeadAGI is deprecated in Asterisk 1.6, so it is always better to use normal AGI.

This bug report should be useful to you: issues.asterisk.org/view.php?id=14811 .

Cheers.

Marco Bruni