[Asterisk-Users] PHP/AGI Problem

Jon Farmer viperdude_uk at yahoo.co.uk
Wed May 25 02:39:52 MST 2005


Hi

I am currently developing a IVR application using
PHP/AGI. I am using the PHPAGI class at
http://phpagi.sourceforge.net/ to handle the
commuication with my *. 

The application basically asks a caller to enter in
some information which is then processed and a answer
is read back out to them. I want the application to
loop back to the beginning after giving the answer so
they can try another query. When they have finished
they enter 00# and the application ends and * hangs up
the call. All of this works fine.

The problem is as follows. If the caller hangs up at
any time during the application the following happens.

1. Asterisk console reports the call hung up. As
follows

== Spawn extension (default, 502, 3) exited non-zero
on 'SIP/3753684-fabd'

2. However when I look in the server process list the
PHP app is still running. 

ps -ax
...
 8029 ?        S      0:00 /usr/bin/php -q
/usr/share/asterisk/agi-bin/test.php

They only way to get rid of it is to killall -9 it. 

Any ideas how I can get asterisk to kill the script if
the caller hangs up?

Regards

Jon Farmer



		
___________________________________________________________ 
How much free photo storage do you get? Store your holiday 
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com



More information about the asterisk-users mailing list