Asterisk does not end call from android client

I am facing another strange situation whenever i establish outgoing call from my android client , the called client (android,xlite or zoiper) rings, but if i ends call from android, the called client (xlite/zoiper) still rings…This situation is mostly occurred when i end call on first bell…
On the other hand when i make calls from xlite/zoiper to xlite/zoiper there is no such problem…
Can anyone guide me to solve this problem…

First we need more debugs.

Go into Asterisk console (asterisk -r on Asterisk server), type in “sip set debug on” and copy/paste the command output.

Thanks for reply…here is debug trace

[code]H
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="0a0e961b"
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘30b1b41675479624b3acd18828256b42@10.16.3.63’ in 6400 ms (Method: INVITE)

<— SIP read from UDP:10.16.3.63:37988 —>
ACK sip:211@10.16.3.153 SIP/2.0
Call-ID: 30b1b41675479624b3acd18828256b42@10.16.3.63
Max-Forwards: 70
From: “215” sip:215@10.16.3.153;tag=492903596
To: sip:211@10.16.3.153;tag=as0e14001b
Via: SIP/2.0/UDP 10.16.3.63:37988;branch=z9hG4bKca3af6e134cb5049b31dcab06b15a075353134;rport
CSeq: 8142 ACK
Content-Length: 0

<------------->
— (8 headers 0 lines) —

<— SIP read from UDP:10.16.3.63:37988 —>
INVITE sip:211@10.16.3.153:5060 SIP/2.0
Call-ID: 30b1b41675479624b3acd18828256b42@10.16.3.63
CSeq: 8143 INVITE
From: “215” sip:215@10.16.3.153;tag=492903596
To: sip:211@10.16.3.153
Via: SIP/2.0/UDP 10.16.3.63:37988;branch=z9hG4bK2158dc8be21d83c868f13ec23d6d65c8353134;rport
Max-Forwards: 70
Contact: “215” sip:215@10.16.3.63:37988;transport=udp
Content-Type: application/sdp
Authorization: Digest username=“215”,realm=“asterisk”,nonce=“0a0e961b”,uri=“sip:211@10.16.3.153:5060”,response=“c2bcc08c4c15a742ae8c34cd2d82e2d2”,algorithm=MD5
Content-Length: 293

v=0
o=- 1358347208836 1358347208838 IN IP4 10.16.3.63
s=-
c=IN IP4 10.16.3.63
t=0 0
m=audio 50558 RTP/AVP 96 97 3 0 8 127
a=rtpmap:96 GSM-EFR/8000
a=rtpmap:97 AMR/8000
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:127 telephone-event/8000
a=fmtp:127 0-15
<------------->
— (11 headers 13 lines) —
Sending to 10.16.3.63:37988 (NAT)
Using INVITE request as basis request - 30b1b41675479624b3acd18828256b42@10.16.3.63
Found peer ‘215’ for ‘215’ from 10.16.3.63:37988

<— Reliably Transmitting (no NAT) to 10.16.3.63:37988 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.16.3.63:37988;branch=z9hG4bK2158dc8be21d83c868f13ec23d6d65c8353134;received=10.16.3.63;rport=37988
From: “215” sip:215@10.16.3.153;tag=492903596
To: sip:211@10.16.3.153;tag=as23dd66c2
Call-ID: 30b1b41675479624b3acd18828256b42@10.16.3.63
CSeq: 8143 INVITE
Server: Asterisk PBX 1.8.11.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="371ea4b9"
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘30b1b41675479624b3acd18828256b42@10.16.3.63’ in 6400 ms (Method: INVITE)

<— SIP read from UDP:10.16.3.63:37988 —>
ACK sip:211@10.16.3.153:5060 SIP/2.0
Call-ID: 30b1b41675479624b3acd18828256b42@10.16.3.63
Max-Forwards: 70
From: “215” sip:215@10.16.3.153;tag=492903596
To: sip:211@10.16.3.153;tag=as23dd66c2
Via: SIP/2.0/UDP 10.16.3.63:37988;branch=z9hG4bK2158dc8be21d83c868f13ec23d6d65c8353134;rport
CSeq: 8143 ACK
Content-Length: 0

<------------->
— (8 headers 0 lines) —

<— SIP read from UDP:10.16.3.63:37988 —>
INVITE sip:211@10.16.3.153:5060 SIP/2.0
Call-ID: 30b1b41675479624b3acd18828256b42@10.16.3.63
CSeq: 8144 INVITE
From: “215” sip:215@10.16.3.153;tag=492903596
To: sip:211@10.16.3.153
Via: SIP/2.0/UDP 10.16.3.63:37988;branch=z9hG4bK3627e74ee6a1705b50001f0996358e00353134;rport
Max-Forwards: 70
Contact: “215” sip:215@10.16.3.63:37988;transport=udp
Content-Type: application/sdp
Authorization: Digest username=“215”,realm=“asterisk”,nonce=“371ea4b9”,uri=“sip:211@10.16.3.153:5060”,response=“ec97181c65f9e3199b4fd378c7767890”,algorithm=MD5
Content-Length: 293

v=0
o=- 1358347208836 1358347208838 IN IP4 10.16.3.63
s=-
c=IN IP4 10.16.3.63
t=0 0
m=audio 50558 RTP/AVP 96 97 3 0 8 127
a=rtpmap:96 GSM-EFR/8000
a=rtpmap:97 AMR/8000
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:127 telephone-event/8000
a=fmtp:127 0-15
<------------->
— (11 headers 13 lines) —
Sending to 10.16.3.63:37988 (no NAT)
Using INVITE request as basis request - 30b1b41675479624b3acd18828256b42@10.16.3.63
Found peer ‘215’ for ‘215’ from 10.16.3.63:37988
== Using SIP RTP CoS mark 5
Found RTP audio format 96
Found RTP audio format 97
Found RTP audio format 3
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 127
Found unknown media description format GSM-EFR for ID 96
Found unknown media description format AMR for ID 97
Found audio description format GSM for ID 3
Found audio description format PCMU for ID 0
Found audio description format PCMA for ID 8
Found audio description format telephone-event for ID 127
Capabilities: us - 0x4 (ulaw), peer - audio=0xe (gsm|ulaw|alaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x4 (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 10.16.3.63:50558
Looking for 211 in incoming-calls-wildcard (domain 10.16.3.153)
list_route: hop: sip:215@10.16.3.63:37988;transport=udp

<— Transmitting (no NAT) to 10.16.3.63:37988 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.16.3.63:37988;branch=z9hG4bK3627e74ee6a1705b50001f0996358e00353134;received=10.16.3.63;rport=37988
From: “215” sip:215@10.16.3.153;tag=492903596
To: sip:211@10.16.3.153
Call-ID: 30b1b41675479624b3acd18828256b42@10.16.3.63
CSeq: 8144 INVITE
Server: Asterisk PBX 1.8.11.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Contact: sip:211@10.16.3.153:5060
Content-Length: 0

<------------>
– Executing [211@incoming-calls-wildcard:1] Dial(“SIP/215-0000000a”, “SIP/211,120”) in new stack
== Using SIP RTP CoS mark 5
Audio is at 11358
Adding codec 0x4 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 10.16.3.195:21780:
INVITE sip:211@10.16.3.195:21780;rinstance=fbe7788666a445c5 SIP/2.0
Via: SIP/2.0/UDP 10.16.3.153:5060;branch=z9hG4bK0fadf66f
Max-Forwards: 70
From: “215” sip:215@10.16.3.153;tag=as1cc4e5e7
To: sip:211@10.16.3.195:21780;rinstance=fbe7788666a445c5
Contact: sip:215@10.16.3.153:5060
Call-ID: 7a32836f69dc3f4c28137b0a5d6427c2@10.16.3.153:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.8.11.0
Date: Wed, 16 Jan 2013 14:40:43 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 262

v=0
o=root 1909798328 1909798328 IN IP4 10.16.3.153
s=Asterisk PBX 1.8.11.0
c=IN IP4 10.16.3.153
t=0 0
m=audio 11358 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv


-- Called SIP/211

<— SIP read from UDP:10.16.3.195:21780 —>
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 10.16.3.153:5060;branch=z9hG4bK0fadf66f
Contact: sip:211@10.16.3.195:21780;rinstance=fbe7788666a445c5
To: sip:211@10.16.3.195:21780;rinstance=fbe7788666a445c5;tag=5a7d7f74
From: "215"sip:215@10.16.3.153;tag=as1cc4e5e7
Call-ID: 7a32836f69dc3f4c28137b0a5d6427c2@10.16.3.153:5060
CSeq: 102 INVITE
User-Agent: X-Lite release 1003l stamp 30942
Content-Length: 0

<------------->
— (9 headers 0 lines) —
list_route: hop: sip:211@10.16.3.195:21780;rinstance=fbe7788666a445c5
– SIP/211-0000000b is ringing

<— Transmitting (no NAT) to 10.16.3.63:37988 —>
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 10.16.3.63:37988;branch=z9hG4bK3627e74ee6a1705b50001f0996358e00353134;received=10.16.3.63;rport=37988
From: “215” sip:215@10.16.3.153;tag=492903596
To: sip:211@10.16.3.153;tag=as6912fdb5
Call-ID: 30b1b41675479624b3acd18828256b42@10.16.3.63
CSeq: 8144 INVITE
Server: Asterisk PBX 1.8.11.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Contact: sip:211@10.16.3.153:5060
Content-Length: 0

<------------>

<— SIP read from UDP:10.16.3.63:37988 —>
CANCEL sip:211@10.16.3.153:5060 SIP/2.0
Call-ID: 30b1b41675479624b3acd18828256b42@10.16.3.63
To: sip:211@10.16.3.153
CSeq: 8144 CANCEL
From: “215” sip:215@10.16.3.153;tag=492903596
Via: SIP/2.0/UDP 10.16.3.63:37988;branch=z9hG4bK3627e74ee6a1705b50001f0996358e00353134;rport
Max-Forwards: 70
Content-Length: 0

<------------->
— (8 headers 0 lines) —

<— Transmitting (no NAT) to 10.16.3.63:37988 —>
SIP/2.0 481 Call/Transaction Does Not Exist
Via: SIP/2.0/UDP 10.16.3.63:37988;branch=z9hG4bK3627e74ee6a1705b50001f0996358e00353134;received=10.16.3.63;rport=37988
From: “215” sip:215@10.16.3.153;tag=492903596
To: sip:211@10.16.3.153;tag=as0e14001b
Call-ID: 30b1b41675479624b3acd18828256b42@10.16.3.63
CSeq: 8144 CANCEL
Server: Asterisk PBX 1.8.11.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0

<------------>
Reliably Transmitting (no NAT) to 10.16.3.195:21780:
OPTIONS sip:211@10.16.3.195:21780;rinstance=fbe7788666a445c5 SIP/2.0
Via: SIP/2.0/UDP 10.16.3.153:5060;branch=z9hG4bK3b8ca6c4
Max-Forwards: 70
From: “asterisk” sip:asterisk@10.16.3.153;tag=as44238dba
To: sip:211@10.16.3.195:21780;rinstance=fbe7788666a445c5
Contact: sip:asterisk@10.16.3.153:5060
Call-ID: 20fe971f520518280781eabf1ef0f97b@10.16.3.153:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.8.11.0
Date: Wed, 16 Jan 2013 14:40:47 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


<— SIP read from UDP:10.16.3.195:21780 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.16.3.153:5060;branch=z9hG4bK3b8ca6c4
Contact: sip:10.16.3.195:21780
To: sip:211@10.16.3.195:21780;rinstance=fbe7788666a445c5;tag=0e6acb41
From: "asterisk"sip:asterisk@10.16.3.153;tag=as44238dba
Call-ID: 20fe971f520518280781eabf1ef0f97b@10.16.3.153:5060
CSeq: 102 OPTIONS
Accept: application/sdp
Accept-Language: en
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
User-Agent: X-Lite release 1003l stamp 30942
Content-Length: 0

<------------->
— (12 headers 0 lines) —
Really destroying SIP dialog ‘20fe971f520518280781eabf1ef0f97b@10.16.3.153:5060’ Method: OPTIONS

<— SIP read from UDP:10.16.3.195:21780 —>

<------------->

<— SIP read from UDP:10.16.3.63:37988 —>
OPTIONS sip:10.16.3.153 SIP/2.0
Call-ID: 6d69eaf8e6f454211beb7eade9771b17@10.16.3.63
CSeq: 4684 OPTIONS
From: “215” sip:215@10.16.3.153;tag=993710749
To: “215” sip:215@10.16.3.153
Via: SIP/2.0/UDP 10.16.3.63:37988;branch=z9hG4bK7b2b5e1a549af835059e929f844b0d15353134;rport
Max-Forwards: 70
User-Agent: SIPAUA/0.1.001
Content-Length: 0

<------------->
— (9 headers 0 lines) —
Looking for s in incoming-calls-wildcard (domain 10.16.3.153)

<— Transmitting (NAT) to 10.16.3.63:37988 —>
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 10.16.3.63:37988;branch=z9hG4bK7b2b5e1a549af835059e929f844b0d15353134;received=10.16.3.63;rport=37988
From: “215” sip:215@10.16.3.153;tag=993710749
To: “215” sip:215@10.16.3.153;tag=as33aea6a7
Call-ID: 6d69eaf8e6f454211beb7eade9771b17@10.16.3.63
CSeq: 4684 OPTIONS
Server: Asterisk PBX 1.8.11.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Accept: application/sdp
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘6d69eaf8e6f454211beb7eade9771b17@10.16.3.63’ in 32000 ms (Method: OPTIONS)
Really destroying SIP dialog ‘30b1b41675479624b3acd18828256b42@10.16.3.63’ Method: CANCEL
Really destroying SIP dialog ‘d0f6f66088e8813f3c11d913aa747fe6@10.16.3.63’ Method: OPTIONS

<— SIP read from UDP:10.16.3.195:21780 —>
SIP/2.0 480 Temporarily Unavailable
Via: SIP/2.0/UDP 10.16.3.153:5060;branch=z9hG4bK0fadf66f
To: sip:211@10.16.3.195:21780;rinstance=fbe7788666a445c5;tag=5a7d7f74
From: "215"sip:215@10.16.3.153;tag=as1cc4e5e7
Call-ID: 7a32836f69dc3f4c28137b0a5d6427c2@10.16.3.153:5060
CSeq: 102 INVITE
User-Agent: X-Lite release 1003l stamp 30942
Content-Length: 0

<------------->
— (8 headers 0 lines) —
– Got SIP response 480 “Temporarily Unavailable” back from 10.16.3.195:21780
set_destination: Parsing sip:211@10.16.3.195:21780;rinstance=fbe7788666a445c5 for address/port to send to
set_destination: set destination to 10.16.3.195:21780
Transmitting (no NAT) to 10.16.3.195:21780:
ACK sip:211@10.16.3.195:21780;rinstance=fbe7788666a445c5 SIP/2.0
Via: SIP/2.0/UDP 10.16.3.153:5060;branch=z9hG4bK0fadf66f
Max-Forwards: 70
From: “215” sip:215@10.16.3.153;tag=as1cc4e5e7
To: sip:211@10.16.3.195:21780;rinstance=fbe7788666a445c5;tag=5a7d7f74
Contact: sip:215@10.16.3.153:5060
Call-ID: 7a32836f69dc3f4c28137b0a5d6427c2@10.16.3.153:5060
CSeq: 102 ACK
User-Agent: Asterisk PBX 1.8.11.0
Content-Length: 0


-- SIP/211-0000000b is circuit-busy

== Everyone is busy/congested at this time (1:0/1/0)
– Executing [211@incoming-calls-wildcard:2] Hangup(“SIP/215-0000000a”, “”) in new stack
== Spawn extension (incoming-calls-wildcard, 211, 2) exited non-zero on 'SIP/215-0000000a’
Scheduling destruction of SIP dialog ‘30b1b41675479624b3acd18828256b42@10.16.3.63’ in 6400 ms (Method: INVITE)

<— Reliably Transmitting (no NAT) to 10.16.3.63:37988 —>
SIP/2.0 480 Temporarily unavailable
Via: SIP/2.0/UDP 10.16.3.63:37988;branch=z9hG4bK3627e74ee6a1705b50001f0996358e00353134;received=10.16.3.63;rport=37988
From: “215” sip:215@10.16.3.153;tag=492903596
To: sip:211@10.16.3.153;tag=as6912fdb5
Call-ID: 30b1b41675479624b3acd18828256b42@10.16.3.63
CSeq: 8144 INVITE
Server: Asterisk PBX 1.8.11.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0

<------------>
Really destroying SIP dialog ‘7a32836f69dc3f4c28137b0a5d6427c2@10.16.3.153:5060’ Method: INVITE
Retransmitting #1 (no NAT) to 10.16.3.63:37988:
SIP/2.0 480 Temporarily unavailable
Via: SIP/2.0/UDP 10.16.3.63:37988;branch=z9hG4bK3627e74ee6a1705b50001f0996358e00353134;received=10.16.3.63;rport=37988
From: “215” sip:215@10.16.3.153;tag=492903596
To: sip:211@10.16.3.153;tag=as6912fdb5
Call-ID: 30b1b41675479624b3acd18828256b42@10.16.3.63
CSeq: 8144 INVITE
Server: Asterisk PBX 1.8.11.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


Retransmitting #2 (no NAT) to 10.16.3.63:37988:
SIP/2.0 480 Temporarily unavailable
Via: SIP/2.0/UDP 10.16.3.63:37988;branch=z9hG4bK3627e74ee6a1705b50001f0996358e00353134;received=10.16.3.63;rport=37988
From: “215” sip:215@10.16.3.153;tag=492903596
To: sip:211@10.16.3.153;tag=as6912fdb5
Call-ID: 30b1b41675479624b3acd18828256b42@10.16.3.63
CSeq: 8144 INVITE
Server: Asterisk PBX 1.8.11.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


Retransmitting #3 (no NAT) to 10.16.3.63:37988:
SIP/2.0 480 Temporarily unavailable
Via: SIP/2.0/UDP 10.16.3.63:37988;branch=z9hG4bK3627e74ee6a1705b50001f0996358e00353134;received=10.16.3.63;rport=37988
From: “215” sip:215@10.16.3.153;tag=492903596
To: sip:211@10.16.3.153;tag=as6912fdb5
Call-ID: 30b1b41675479624b3acd18828256b42@10.16.3.63
CSeq: 8144 INVITE
Server: Asterisk PBX 1.8.11.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


Retransmitting #4 (no NAT) to 10.16.3.63:37988:
SIP/2.0 480 Temporarily unavailable
Via: SIP/2.0/UDP 10.16.3.63:37988;branch=z9hG4bK3627e74ee6a1705b50001f0996358e00353134;received=10.16.3.63;rport=37988
From: “215” sip:215@10.16.3.153;tag=492903596
To: sip:211@10.16.3.153;tag=as6912fdb5
Call-ID: 30b1b41675479624b3acd18828256b42@10.16.3.63
CSeq: 8144 INVITE
Server: Asterisk PBX 1.8.11.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


Retransmitting #5 (no NAT) to 10.16.3.63:37988:
SIP/2.0 480 Temporarily unavailable
Via: SIP/2.0/UDP 10.16.3.63:37988;branch=z9hG4bK3627e74ee6a1705b50001f0996358e00353134;received=10.16.3.63;rport=37988
From: “215” sip:215@10.16.3.153;tag=492903596
To: sip:211@10.16.3.153;tag=as6912fdb5
Call-ID: 30b1b41675479624b3acd18828256b42@10.16.3.63
CSeq: 8144 INVITE
Server: Asterisk PBX 1.8.11.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0

—[/code]

Same issue is addressed on StackOverflow forum with wire shark traces.
http://stackoverflow.com/questions/10697282/cancel-request-from-android-sip-demo-ignored-by-asterisk-1-8

The Android is failing to set the From tag on the CANCEL.

As a work round, try setting pedantic=no in the general section of sip.conf.

Well David ur awesome…Great its working , problem solved…
Thanks for every one specially for David… :smile: