[asterisk-users] [1.4] Asterisk doesn't hang up?

John Kosmas batch40 at optusnet.com.au
Wed Mar 16 06:45:35 CDT 2011


Hi There,

i have the same problem but it doesnt always happen tho from the same
caller. 

im using Asterisk 1.4 - maybe newer version updates have
had bug fixes. maybe this could rectify it. 

Regards,




On Tue, 2011-03-15 at 14:54 +0100, Gilles wrote:
> Hello
> 
> 	I'm trying to use ChanIsAvail() to check when the landline is back
> to idle after a call, but for some reason, Asterisk doesn't detect
> that the callee has hung up after listening to MoH for a few seconds:
> 
> ========== extensions.conf
> ;Play MoH for a few seconds, hang up, and
> ;check ChanIsAvail() able to detect when line idle again
> exten => 8888,1,Answer()
> exten => 8888,n,Playback(/var/tmp/manolo_camp-morning_coffee)
> exten => 8888,n,Hangup
> 
> ========== CLI
> ;keep line engaged for a few seconds, and hang up from remote end
> 
> originate Zap/1/5551234 extension 8888 at internal
> 
> ========== extensions.conf
> ;call from XLite to check line status
> 
> ;Loop until Zap/1 is available
> exten => 1111,1,Set(INDEX=0)
> exten => 1111,n,While(1)
> exten => 1111,n,ChanIsAvail(Zap/1)
> exten => 1111,n,GotoIf($["${AVAILORIGCHAN}" != "" | ${INDEX} >
> 10]?exit)
> exten => 1111,n,Wait(5)
> exten => 1111,n,Set(INDEX=$[${INDEX} + 1])
> exten => 1111,n,EndWhile()
> 
> ;how did we exit loop?
> exten => 1111,n(exit),GotoIf($["${AVAILORIGCHAN}" = ""]?na:ok)
> exten => 1111,n(na),NoOp(Channel still N.A.)
> exten => 1111,n,Goto(end)
> exten => 1111,n(ok),NoOp(Channel OK)
> exten => 1111,n(end),Hangup
> ========== 
> 
> Even after callee at 5551234 hangs up, Asterisk keeps looping in
> extension 1111, and only runs 8888's Hangup after 1111 runs Hangup.
> 
> I also tried calling out through a callfile, same result.
> 
> Is there another instruction I should use in 8888 to have
> Asterisk/Zaptel close the channel after the remote end has hung up?
> 
> Thank you.
> 
> 
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>                http://www.asterisk.org/hello
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users





More information about the asterisk-users mailing list