[Asterisk-Users] AGI problem (crash)

Ívar Ragnarsson ivar at grunnur.is
Thu Oct 16 02:48:05 MST 2003


Hi

Every time I hangup on my AGI script Asterisk crashes if it is not running
in console mode. 
(happens when using python and perl AGI scripts)

I'm desparatly trying to get my employer to let me use Asterisk.  So I must
get this to work.  
I've posted about this before, I'm sorry, but I'm desperate.

	I'm running RedHat 9.0 (kernel 2.4.20-8 everything else updated)
	I'm using Netmeeting to test
	I use H.323 only.  I've tried using chan_h323 and chan_oh323.
(Output is from oh323)
	Newest zaptel libpri asterisk from CVS


Has anyone had this problem?
Can anyone confirm this failure on a similar system? (that is running the
script and hanging up while the number is beeing read.)
Can anyone test this on RedHat 8 please?
Are there any log files that could give clues to what is happening?
Should I post this on the dev mailing list?


Following are outputs from the console, a sample script and my config files.

++++++++++++++++++++++++++++++++++++++++++++++++++
output from "asterisk -vvv 
++++++++++++++++++++++++++++++++++++++++++++++++++
[chan_oh323.so] => (OpenH323 Channel Driver)
  == Parsing '/etc/asterisk/rtp.conf': Found
  == Parsing '/etc/asterisk/oh323.conf': Found
  0:00.007             OpenH323 Wrapper OpenH323 Wrapper        Version
0.0alpha0 by inAccess Networks (www.inaccessnetworks.com) on Unix Linux
(2.4.20-8-i686) at 2003/10/15 15:34:17.735
WrapH323EndPoint::WrapH323EndPoint: Compile-time libraries OpenH323 v1.12.0,
PWlib v1.5.0
  == Registered channel type 'OH323' (OpenH323 Channel Driver)
  == OpenH323 Channel Ready (v0.5.5)
  == Parsing '/etc/asterisk/enum.conf': Found
Asterisk Ready.
WrapH323Connection::WrapH323Connection: WrapH323Connection created.
    -- Executing Answer("H323:25128", "") in new stack
PAsteriskAudioDelay::PAsteriskAudioDelay: Object initialized.
PAsteriskAudioDelay::PAsteriskAudioDelay: Object initialized.
PAsteriskSoundChannel::PAsteriskSoundChannel: Object initialized.
PAsteriskAudioDelay::PAsteriskAudioDelay: Object initialized.
PAsteriskAudioDelay::PAsteriskAudioDelay: Object initialized.
PAsteriskSoundChannel::PAsteriskSoundChannel: Object initialized.
    -- Executing AGI("H323:25128", "agi-pytest2.py") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/agi-pytest2.py
    -- Playing 'digits/1'
    -- Playing 'digits/hundred'
PAsteriskSoundChannel::PAsteriskSoundChannel: Object deleted.
PAsteriskAudioDelay::PAsteriskAudioDelay: Object deleted.
PAsteriskAudioDelay::PAsteriskAudioDelay: Object deleted.
PAsteriskSoundChannel::PAsteriskSoundChannel: Object deleted.
PAsteriskAudioDelay::PAsteriskAudioDelay: Object deleted.
PAsteriskAudioDelay::PAsteriskAudioDelay: Object deleted.
  0:05.269                 H323 Cleaner H323    Connection
ip$192.168.0.100:1712/25128 terminated.
  == Spawn extension (default, 147, 2) exited non-zero on 'H323:25128'
    -- Hungup 'H323:25128'
Received 200 result=-1


++++++++++++++++++++++++++++++++++++++++++++++++++
output from "asterisk -vvvc 
++++++++++++++++++++++++++++++++++++++++++++++++++
 [chan_oh323.so] => (OpenH323 Channel Driver)
  == Parsing '/etc/asterisk/rtp.conf': Found
  == Parsing '/etc/asterisk/oh323.conf': Found
  0:00.008             OpenH323 Wrapper OpenH323 Wrapper        Version
0.0alpha0 by inAccess Networks (www.inaccessnetworks.com) on Unix Linux
(2.4.20-8-i686) at 2003/10/15 15:35:11.096
WrapH323EndPoint::WrapH323EndPoint: Compile-time libraries OpenH323 v1.12.0,
PWlib v1.5.0
  == Registered channel type 'OH323' (OpenH323 Channel Driver)
  == OpenH323 Channel Ready (v0.5.5)
  == Parsing '/etc/asterisk/enum.conf': Found
Asterisk Ready.
*CLI> WrapH323Connection::WrapH323Connection: WrapH323Connection created.
    -- Executing Answer("H323:25129", "") in new stack
PAsteriskAudioDelay::PAsteriskAudioDelay: Object initialized.
PAsteriskAudioDelay::PAsteriskAudioDelay: Object initialized.
PAsteriskSoundChannel::PAsteriskSoundChannel: Object initialized.
PAsteriskAudioDelay::PAsteriskAudioDelay: Object initialized.
PAsteriskAudioDelay::PAsteriskAudioDelay: Object initialized.
PAsteriskSoundChannel::PAsteriskSoundChannel: Object initialized.
    -- Executing AGI("H323:25129", "agi-pytest2.py") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/agi-pytest2.py
    -- Playing 'digits/1'
    -- Playing 'digits/hundred'
PAsteriskSoundChannel::PAsteriskSoundChannel: Object deleted.
PAsteriskAudioDelay::PAsteriskAudioDelay: Object deleted.
PAsteriskAudioDelay::PAsteriskAudioDelay: Object deleted.
PAsteriskSoundChannel::PAsteriskSoundChannel: Object deleted.
PAsteriskAudioDelay::PAsteriskAudioDelay: Object deleted.
PAsteriskAudioDelay::PAsteriskAudioDelay: Object deleted.
  1:31.418                 H323 Cleaner H323    Connection
ip$192.168.0.100:1721/25129 terminated.
  == Spawn extension (default, 147, 2) exited non-zero on 'H323:25129'
    -- Hungup 'H323:25129'
Received 200 result=-1

WrapH323Connection::WrapH323Connection: WrapH323Connection deleted.



++++++++++++++++++++++++++++++++++++++++++++++++++
relevant lines from extensions.conf
++++++++++++++++++++++++++++++++++++++++++++++++++
exten => 147,1,Answer
exten => 147,2,AGI(agi-pytest2.agi)
exten => 147,3,Hangup

++++++++++++++++++++++++++++++++++++++++++++++++++
agi-pytest2.agi
++++++++++++++++++++++++++++++++++++++++++++++++++
#!/usr/bin/python
# Import module required.
import sys
# Read and ignore AGI environment (read until blank line)
env = ""
while(env != "\n"):
  env = sys.stdin.readline()
# Send Asterisk a command
sys.stdout.write('SAY NUMBER 123456 "*#"\n')
# *must* flush the data or Asterisk won't get it
sys.stdout.flush()
# Read response from Asterisk
res = sys.stdin.readline()
# Show the response received on the Asterisk console
sys.stderr.write("Received %s\n"%res)
# And the obligatory flush
sys.stderr.flush()




++++++++++++++++++++++++++++++++++++++++++++++++++
oh323.conf
++++++++++++++++++++++++++++++++++++++++++++++++++
[general]
listenAddress=0.0.0.0
listenPort=1720
connectPort=1720
tcpStart=10000
tcpEnd=20000
udpStart=10000
udpEnd=20000
fastStart=no
h245Tunnelling=no
h245inSetup=no
inBandDTMF=yes
silenceSuppression=no
jitterMin=20
jitterMax=100
ipTos=none
outboundMax=10
inboundMax=10
bandwidthLimit=1024
wrapLibTraceLevel=1
libTraceLevel=1
libTraceFile=stdout
gatekeeper=DISABLE
gatekeeperTTL=600
userInputMode=TONE
amaFlags=default
accountCode=H323
context=default
[codecs]
codec=G711A
frames=20





Best regards,
		Ivar Ragnarsson






More information about the asterisk-users mailing list