deadagi on v1.4.xx

Home » Asterisk Users » deadagi on v1.4.xx
Asterisk Users No Comments

Hello all,
I have a perl script that updates a M$ SQL DB based on an ivr that is
run on asterisk.
When it runs as a normal agi, it works great.

when run as a DeadAGI it does not work.

When i execute the script from h channel withDeadAGI and agi debug on i get:

[2010-12-20 01:08:54] — Launched AGI Script
[2010-12-20 01:08:54] AGI Tx >> agi_request:
[2010-12-20 01:08:54] AGI Tx >> agi_channel: SIP/xxxxxxxxxxxx
[2010-12-20 01:08:54] AGI Tx >> agi_language: en
[2010-12-20 01:08:54] AGI Tx >> agi_type: SIP
[2010-12-20 01:08:54] AGI Tx >> agi_uniqueid: 1292825277.243
[2010-12-20 01:08:54] AGI Tx >> agi_callerid:
[2010-12-20 01:08:54] AGI Tx >> agi_calleridname:
[2010-12-20 01:08:54] AGI Tx >> agi_callingpres: 0
[2010-12-20 01:08:54] AGI Tx >> agi_callingani2: 0
[2010-12-20 01:08:54] AGI Tx >> agi_callington: 0
[2010-12-20 01:08:54] AGI Tx >> agi_callingtns: 0
[2010-12-20 01:08:54] AGI Tx >> agi_dnid: unknown
[2010-12-20 01:08:54] AGI Tx >> agi_rdnis: unknown
[2010-12-20 01:08:54] AGI Tx >> agi_context:
[2010-12-20 01:08:54] AGI Tx >> agi_extension: h
[2010-12-20 01:08:54] AGI Tx >> agi_priority: 3
[2010-12-20 01:08:54] AGI Tx >> agi_enhanced: 0.0
[2010-12-20 01:08:54] AGI Tx >> agi_accountcode: in call file>
[2010-12-20 01:08:54] AGI Tx >>
[2010-12-20 01:08:54] — AGI Script completed,
returning 0

Which is identical to the debug output when it work from the live
channel AGI

but I do not get the data in the db as it does when run by hand.
I am very tired, frustrated and have been googleing my butt of, no luck.

I know the script is getting the vars in as I had mistakenly left a
print statement in, which of course caused the script to bail but it
showed the correct info before it failed.

Could it be that even though it is running DeadAGI that there is a
sighup killing the script? if any suggestions on what to do about it?
I did see that in 1.2 even on a deadagi I might have to catch the sighup
and it said

Your script will have to block SIGHUP signals, which you can do like so:


I tried this and now at least I get a status after the DeadAGI returns,
which it did not get with out it. Although the status is FAILURE.

Any suggestions?