Hi,
I've got a setup whereby calls come into the asterisk server (1.2.7.1)
over a IAX2 trunk and into a dialplan that launches a php AGI script:
[live-full]
exten => _X.,1,Set(TIMEOUT(absolute)=0)
exten => _X.,2,NoOp(${EXTEN})
exten => _X.,3,DEADAGI(live-full.php)
exten => _X.,4,Wait,2
exten => _X.,5,Hangup
The script is using phpagi-2 from http://phpagi.sourceforge.net/ and
works flawlessly in all but one aspect which I believe is related to
asterisk rather than the script itself.
As the script is launched using DEADAGI I expect it to carry on after
the channel has been hungup (to save the results of the user input in
this case) which works unless the users are leaving a voice message at
the time. The script uses "record_file" and records ok if the user
ends
the call with a keypress (#) but if the user hangs up once they have
finished leaving their message the script exits immediately rather than
carrying on:
Nov 2 11:45:57 VERBOSE[24262] logger.c: AGI Rx << RECORD FILE
/ivr/recordedtemp/1162467957 wav "#" 120000 0 BEEP s=5 Nov 2 11:45:57
DEBUG[24262] channel.c: Set channel IAX2/AQL IAX-1 to read format slin
Nov 2 11:45:57 DEBUG[24262] channel.c: Set channel IAX2/AQL IAX-1 to
write format ulaw
Nov 2 11:45:57 VERBOSE[24262] logger.c: -- Playing 'beep' (language
'en')
Nov 2 11:45:58 DEBUG[24262] channel.c: Set channel IAX2/AQL IAX-1 to
write format ulaw Nov 2 11:46:01 DEBUG[3658] chan_iax2.c: Immediately
destroying 1, having received hangup Nov 2 11:46:01 VERBOSE[24262]
logger.c: AGI Tx >> 200 result=0 (hangup) endpos=22560 Nov 2 11:46:01
DEBUG[24262] pbx.c: Spawn extension (live-full,700000,3) exited non-zero
on 'IAX2/AQL IAX-1'
Does anyone know why the channel is closing down immediately rather than
waiting for the script to exit?
Thanks
Jordan