[Asterisk-Users] AGI problem (crash)

Nicolas Gudino nicolas at house.com.ar
Thu Oct 16 11:17:37 MST 2003


Hi,

I have the same problem, Im also running RH 9. But Im using SIP only
with Cisco ATAs. There are reports of asterisk not doing well with
RedHat because of the new threads handling in RH kernel. Maybe compiling
a fresh rpm from kernel.org will solve the problem.

Testing my AGI script (writen in perl) I had a dial command (not
background), and I could cause asterisk to crash when hanging up when
inside the script. But now I moved the dial command to the extensions
file (setting a variable inside the script to pass to the dial command
in the extension file) and the problem went away. Maybe it is because
its difficult to hang up exactly during the execution of the script that
runs and exits really fast now that it is not doing the dial.

I will try to compile a fresh kernel and see if the problem persists,
and post my results here. Regards,


On Thu, 2003-10-16 at 06:48, Ívar Ragnarsson wrote:
> 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
> 
> 
> 
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> 




More information about the asterisk-users mailing list