[asterisk-users] channel not hungup (zombie?) so call limit not reset to zero

Rizwan Hisham rizwanhasham at gmail.com
Fri Aug 24 11:02:44 CDT 2007


finally found a solution for stuck channels. Im sharing this for anyone who
may face this problem in future. It seems a bug as i can repeat this
behaviour both ways as many times as i want. i will start an issue for this
on digium bug site but first i have to test it on the latest version of
asterisk.

Asterisk loses binding with peers somehow if qualify=no is set in sip.conf.
when asterisk loses binding it does not know that the peer is now
UNREACHABLE becoz it does not monitor it all the time due to qualify=no. So
when a call comes for that (UNREACHABLE) user asterisk tries to send sip
packet for that user which the user does not recieve. Asterisk has no
problem with that, it only throws call to voicemail or whatever is defined
in dialplan. But after hangup channel get stuck.

If we set qualify=yes, then asterisk keeps track of users whether they are
REACHABLE or not. So if any user is UNREACHABLE it knows about that user and
does not bother to send sip packets to that user anymore. This way channel
is not even initialesed if sip invite is recieved for that channel (and goes
directly to voicemail) and uninitailised channels cannot get stuck.

On 8/24/07, Rizwan Hisham <rizwanhasham at gmail.com> wrote:
>
> here is the sip debug for the channel. Before reading the sip debug i want
> ot tell you that user is using "Telco Systems AC-211 v4.50.27" adapter.
> sip sdebug shows that asterisk is trying to send the initial invite but
> there is no response from the user (after registration, user dies, no single
> response). So maybe there is some kind of network issue (NAT) or there is
> something wrong with the Telco Systems adapter. The stuck channels are still
> there:
>
> IP     crunch      260bca1e59e  00102/00000  unkn  No       Init: INVITE
> IP     crunch      350d1a6e2b1  00102/00000  unkn  No       Init: INVITE
>
> and "core show channels" show 0 active calls
>
> *CLI> core show channels
> Channel              Location             State   Application(Data)
> 0 active channels
> 0 active calls
>
>
> SIP DEBUG
> Audio is at 64.182.161.2 port 10678
> Adding codec 0x4 (ulaw) to SDP
> Adding codec 0x8 (alaw) to SDP
> Adding codec 0x100 (g729) to SDP
> Adding codec 0x2 (gsm) to SDP
> Adding non-codec 0x1 (telephone-event) to SDP
> Reliably Transmitting (NAT) to 72.73.66.175:50069:
> INVITE sip:crunch at 192.168.1.41 :9060 SIP/2.0
> Via: SIP/2.0/UDP 64.182.161.2:9060;branch=z9hG4bK473eaef8;rport
> From: "adf xyz" <sip:12129339038 at 64.182.161.2:9060>;tag=as22ac8da7
> To: <sip:crunch at 192.168.1.41 :9060>
> Contact: <sip:12129339038 at 64.182.161.2:9060>
> Call-ID: 2a02e3804ba80e6f603bc427274193d7 at 64.182.161.2
> CSeq: 102 INVITE
> User-Agent: Asterisk PBX
> Max-Forwards: 70
> Date: Fri, 24 Aug 2007 09:54:46 GMT
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
> Supported: replaces
> Content-Type: application/sdp
> Content-Length: 334
>
> v=0
> o=root 28236 28236 IN IP4 64.182.161.2
> s=session
> c=IN IP4 64.182.161.2
> t=0 0
> m=audio 10678 RTP/AVP 0 8 18 3 101
> a=rtpmap:0 PCMU/8000
> a=rtpmap:8 PCMA/8000
> a=rtpmap:18 G729/8000
> a=fmtp:18 annexb=no
> a=rtpmap:3 GSM/8000
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-16
> a=silenceSupp:off - - - -
> a=ptime:20
> a=sendrecv
>
> ---
> Retransmitting #1 (NAT) to 72.73.66.175:50069:
> INVITE sip:crunch at 192.168.1.41:9060 SIP/2.0
> Via: SIP/2.0/UDP 64.182.161.2:9060;branch=z9hG4bK473eaef8;rport
> From: "adf xyz" < sip:12129339038 at 64.182.161.2:9060>;tag=as22ac8da7
> To: <sip:crunch at 192.168.1.41:9060>
> Contact: <sip:12129339038 at 64.182.161.2:9060>
> Call-ID: 2a02e3804ba80e6f603bc427274193d7 at 64.182.161.2
> CSeq: 102 INVITE
> User-Agent: Asterisk PBX
> Max-Forwards: 70
> Date: Fri, 24 Aug 2007 09:54:46 GMT
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
> Supported: replaces
> Content-Type: application/sdp
> Content-Length: 334
>
> v=0
> o=root 28236 28236 IN IP4 64.182.161.2
> s=session
> c=IN IP4 64.182.161.2
> t=0 0
> m=audio 10678 RTP/AVP 0 8 18 3 101
> a=rtpmap:0 PCMU/8000
> a=rtpmap:8 PCMA/8000
> a=rtpmap:18 G729/8000
> a=fmtp:18 annexb=no
> a=rtpmap:3 GSM/8000
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-16
> a=silenceSupp:off - - - -
> a=ptime:20
> a=sendrecv
>
> ---
> Retransmitting #2 (NAT) to 72.73.66.175:50069:
> INVITE sip:crunch at 192.168.1.41:9060 SIP/2.0
> Via: SIP/2.0/UDP 64.182.161.2:9060 ;branch=z9hG4bK473eaef8;rport
> From: "adf xyz" <sip:12129339038 at 64.182.161.2:9060>;tag=as22ac8da7
> To: <sip:crunch at 192.168.1.41:9060>
> Contact: <sip:12129339038 at 64.182.161.2:9060>
> Call-ID: 2a02e3804ba80e6f603bc427274193d7 at 64.182.161.2
> CSeq: 102 INVITE
> User-Agent: Asterisk PBX
> Max-Forwards: 70
> Date: Fri, 24 Aug 2007 09:54:46 GMT
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
> Supported: replaces
> Content-Type: application/sdp
> Content-Length: 334
>
> v=0
> o=root 28236 28236 IN IP4 64.182.161.2
> s=session
> c=IN IP4 64.182.161.2
> t=0 0
> m=audio 10678 RTP/AVP 0 8 18 3 101
> a=rtpmap:0 PCMU/8000
> a=rtpmap:8 PCMA/8000
> a=rtpmap:18 G729/8000
> a=fmtp:18 annexb=no
> a=rtpmap:3 GSM/8000
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-16
> a=silenceSupp:off - - - -
> a=ptime:20
> a=sendrecv
>
> ---
> Retransmitting #3 (NAT) to 72.73.66.175:50069:
> INVITE sip:crunch at 192.168.1.41:9060 SIP/2.0
> Via: SIP/2.0/UDP 64.182.161.2:9060;branch=z9hG4bK473eaef8;rport
> From: "adf xyz" < sip:12129339038 at 64.182.161.2:9060>;tag=as22ac8da7
> To: <sip:crunch at 192.168.1.41:9060>
> Contact: <sip:12129339038 at 64.182.161.2:9060>
> Call-ID: 2a02e3804ba80e6f603bc427274193d7 at 64.182.161.2
> CSeq: 102 INVITE
> User-Agent: Asterisk PBX
> Max-Forwards: 70
> Date: Fri, 24 Aug 2007 09:54:46 GMT
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
> Supported: replaces
> Content-Type: application/sdp
> Content-Length: 334
>
> v=0
> o=root 28236 28236 IN IP4 64.182.161.2
> s=session
> c=IN IP4 64.182.161.2
> t=0 0
> m=audio 10678 RTP/AVP 0 8 18 3 101
> a=rtpmap:0 PCMU/8000
> a=rtpmap:8 PCMA/8000
> a=rtpmap:18 G729/8000
> a=fmtp:18 annexb=no
> a=rtpmap:3 GSM/8000
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-16
> a=silenceSupp:off - - - -
> a=ptime:20
> a=sendrecv
>
> ---
> Retransmitting #4 (NAT) to 72.73.66.175:50069:
> INVITE sip:crunch at 192.168.1.41:9060 SIP/2.0
> Via: SIP/2.0/UDP 64.182.161.2:9060 ;branch=z9hG4bK473eaef8;rport
> From: "adf xyz" <sip:12129339038 at 64.182.161.2:9060>;tag=as22ac8da7
> To: <sip:crunch at 192.168.1.41:9060>
> Contact: <sip:12129339038 at 64.182.161.2:9060>
> Call-ID: 2a02e3804ba80e6f603bc427274193d7 at 64.182.161.2
> CSeq: 102 INVITE
> User-Agent: Asterisk PBX
> Max-Forwards: 70
> Date: Fri, 24 Aug 2007 09:54:46 GMT
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
> Supported: replaces
> Content-Type: application/sdp
> Content-Length: 334
>
> v=0
> o=root 28236 28236 IN IP4 64.182.161.2
> s=session
> c=IN IP4 64.182.161.2
> t=0 0
> m=audio 10678 RTP/AVP 0 8 18 3 101
> a=rtpmap:0 PCMU/8000
> a=rtpmap:8 PCMA/8000
> a=rtpmap:18 G729/8000
> a=fmtp:18 annexb=no
> a=rtpmap:3 GSM/8000
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-16
> a=silenceSupp:off - - - -
> a=ptime:20
> a=sendrecv
>
> ---
> Retransmitting #5 (NAT) to 72.73.66.175:50069:
> INVITE sip:crunch at 192.168.1.41:9060 SIP/2.0
> Via: SIP/2.0/UDP 64.182.161.2:9060;branch=z9hG4bK473eaef8;rport
> From: "adf xyz" < sip:12129339038 at 64.182.161.2:9060>;tag=as22ac8da7
> To: <sip:crunch at 192.168.1.41:9060>
> Contact: <sip:12129339038 at 64.182.161.2:9060>
> Call-ID: 2a02e3804ba80e6f603bc427274193d7 at 64.182.161.2
> CSeq: 102 INVITE
> User-Agent: Asterisk PBX
> Max-Forwards: 70
> Date: Fri, 24 Aug 2007 09:54:46 GMT
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
> Supported: replaces
> Content-Type: application/sdp
> Content-Length: 334
>
> v=0
> o=root 28236 28236 IN IP4 64.182.161.2
> s=session
> c=IN IP4 64.182.161.2
> t=0 0
> m=audio 10678 RTP/AVP 0 8 18 3 101
> a=rtpmap:0 PCMU/8000
> a=rtpmap:8 PCMA/8000
> a=rtpmap:18 G729/8000
> a=fmtp:18 annexb=no
> a=rtpmap:3 GSM/8000
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-16
> a=silenceSupp:off - - - -
> a=ptime:20
> a=sendrecv
>
> ---
>
>
> On 8/23/07, Rizwan Hisham <rizwanhasham at gmail.com> wrote:
> >
> > im having a strange problem related to call-limit for peers. well im not
> > sure if its related to call-limmit or not. Bottom line is:
> >
> > I call a user A, from user B. user B hears silence, untill it goes to
> > voicemail. when user B hangsup. user B's call limit is reset to 0 but user
> > A's call limit is not reset.strange thing is user A's status on cli is
> > shown as NOANSWER, while user B did not even hear ringing. when i use "sip
> > show channels" command, it shows me a channel for user A like below:
> >
> > crunch      30d926c1055  00102/00000  unkn  No       Init: INVITE
> >
> > It stays in INVITE state unless i restart my asterisk server. when i
> > restart the channel is clear (ofcorse)
> >
> > So my guess is, its a zombiee channel which asterisk forgot to hangup.
> > WHY? i dont know, maybe there is a problem in sip signalling due to which
> > asterisk didnt recieve the bye signal in the first place or maybe its
> > asterisk fault totally.
> >
> > So because it is not hungup by asterisk thats why its call limit is not
> > reset to zero. I dont have sip debug for this problem yet, i'll post it
> > later when i have it. meanwhile if somebody has experienced a similar
> > problem and has successfully fixed it, then plz share my burden and help me.
> >
> > --
> > Best Regards
> > Rizwan Hisham
> > Software Engineer
> > Axvoice Inc.
> > www.axvoice.com
>
>
>
>
> --
> Best Regards
> Rizwan Hisham
> Software Engineer
> Axvoice Inc.
> www.axvoice.com
>



-- 
Best Regards
Rizwan Hisham
Software Engineer
Axvoice Inc.
www.axvoice.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070824/1178f615/attachment.htm 


More information about the asterisk-users mailing list