Problem with phone sending CANCEL after SDP

So I have turned my attention to Asterisk since I have seen this happen on at least two different phones. One is a GrandStream GP2000 The other is a Bria softphone.

I have SIP captures (see link below) That shows the phones sending a CANCEL in response to the 183 with SDP. I have to say I’m stumped at what the phone does not like about this. I tried setting both phone as the Asterisk SIP peer to only allow g711u and still the same result. There must be something in the SDP that non of these phones like. I just can not see it.

pastebin.ca/2313108 I’m happy to provide any other debugging info. The pastebin is the full expanded SIP transaction.

I think it would be much easier for us if you would copy/paste the output of the “sip set debug on” command.

Sorry for the delay. I was not in a place I could test again until now. Below see the output of sip set debug peer 160 (The softphone)

Thoughts?

Thanks!!

[code]<— SIP read from UDP:SOFTPHONEIP:64565 —>
INVITE sip:PHONENUMBERCALLED@ASTERISKIP SIP/2.0
Via: SIP/2.0/UDP SOFTPHONEIP:64565;rport;branch=z9hG4bKPj9yvPfixvpCPC.doIy6uyDNpO1kqd4zGZ
Max-Forwards: 70
From: “160” sip:160@ASTERISKIP;tag=o-cQ17eT6w4dG0G1unVYDc51EK80qFAX
To: sip:PHONENUMBERCALLED@ASTERISKIP
Contact: “160” sip:160@SOFTPHONEIP:64565;ob
Call-ID: q9WvspA96orNIOvKTcJP1e9rUvs4bgS3
CSeq: 29660 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: Bria iOS 2.3.4
Content-Type: application/sdp
Content-Length: 433

v=0
o=- 3569700912 3569700912 IN IP4 SOFTPHONEIP
s=cpc_med
c=IN IP4 SOFTPHONEIP
t=0 0
m=audio 4016 RTP/AVP 110 107 0 8 102 3 101
a=sendrecv
a=rtpmap:110 SILK/24000
a=fmtp:110 useinbandfec=1;usedtx=0
a=rtpmap:107 SILK/8000
a=fmtp:107 useinbandfec=1;usedtx=0
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:102 iLBC/8000
a=fmtp:102 mode=30
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
<------------->
— (15 headers 18 lines) —
Sending to SOFTPHONEIP:64565 (NAT)
Using INVITE request as basis request - q9WvspA96orNIOvKTcJP1e9rUvs4bgS3
Found peer ‘160’ for ‘160’ from SOFTPHONEIP:64565
== Using SIP RTP CoS mark 5
Found RTP audio format 110
Found RTP audio format 107
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 102
Found RTP audio format 3
Found RTP audio format 101
Found unknown media description format SILK for ID 110
Found unknown media description format SILK for ID 107
Found audio description format PCMU for ID 0
Found audio description format PCMA for ID 8
Found audio description format iLBC for ID 102
Found audio description format GSM for ID 3
Found audio description format telephone-event for ID 101
Capabilities: us - 0x80030c7fffff (g723|gsm|ulaw|alaw|g726|adpcm|slin|lpc10|g729|speex|speex16|ilbc|g726aal2|g722|slin16|jpeg|png|h261|h263|h263p|h264|mpeg4|red|t140|siren7|siren14|testlaw|g719), peer - audio=0x40e (gsm|ulaw|alaw|ilbc)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x40e (gsm|ulaw|alaw|ilbc)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port SOFTPHONEIP:4016
Looking for PHONENUMBERCALLED in phones-delta (domain ASTERISKIP)
list_route: hop: sip:160@SOFTPHONEIP:64565;ob

<— Transmitting (NAT) to SOFTPHONEIP:64565 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP SOFTPHONEIP:64565;branch=z9hG4bKPj9yvPfixvpCPC.doIy6uyDNpO1kqd4zGZ;received=SOFTPHONEIP;rport=64565
From: “160” sip:160@ASTERISKIP;tag=o-cQ17eT6w4dG0G1unVYDc51EK80qFAX
To: sip:PHONENUMBERCALLED@ASTERISKIP
Call-ID: q9WvspA96orNIOvKTcJP1e9rUvs4bgS3
CSeq: 29660 INVITE
Server: Asterisk PBX 1.8.15-cert1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: sip:PHONENUMBERCALLED@ASTERISKIP:5060
Content-Length: 0

<------------>
– Executing [PHONENUMBERCALLED@phones-delta:1] Set(“SIP/160-0000d44c”, “CALLERID(num)=CALLERID”) in new stack
– Executing [PHONENUMBERCALLED@phones-delta:2] Dial(“SIP/160-0000d44c”, “SIP/1970PHONENUMBERCALLED@SIPPROVIDER”) in new stack
== Using SIP RTP CoS mark 5
– Called SIP/1970PHONENUMBERCALLED@SIPPROVIDER
li167-89CLI>
li167-89
CLI>
li167-89*CLI>
– SIP/SIPPROVIDER-0000d44d is making progress passing it to SIP/160-0000d44c
Audio is at 17194
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x8 (alaw) to SDP
Adding codec 0x2 (gsm) to SDP
Adding codec 0x400 (ilbc) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<— Transmitting (NAT) to SOFTPHONEIP:64565 —>
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP SOFTPHONEIP:64565;branch=z9hG4bKPj9yvPfixvpCPC.doIy6uyDNpO1kqd4zGZ;received=SOFTPHONEIP;rport=64565
From: “160” sip:160@ASTERISKIP;tag=o-cQ17eT6w4dG0G1unVYDc51EK80qFAX
To: sip:PHONENUMBERCALLED@ASTERISKIP;tag=as64081515
Call-ID: q9WvspA96orNIOvKTcJP1e9rUvs4bgS3
CSeq: 29660 INVITE
Server: Asterisk PBX 1.8.15-cert1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: sip:PHONENUMBERCALLED@ASTERISKIP:5060
Content-Type: application/sdp
Content-Length: 367

v=0
o=root 2115561020 2115561020 IN IP4 ASTERISKIP
s=Asterisk PBX 1.8.15-cert1
c=IN IP4 ASTERISKIP
t=0 0
m=audio 17194 RTP/AVP 0 8 3 102 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:102 iLBC/8000
a=fmtp:102 mode=30
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

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

<— SIP read from UDP:SOFTPHONEIP:64565 —>
CANCEL sip:PHONENUMBERCALLED@ASTERISKIP SIP/2.0
Via: SIP/2.0/UDP SOFTPHONEIP:64565;rport;branch=z9hG4bKPj9yvPfixvpCPC.doIy6uyDNpO1kqd4zGZ
Max-Forwards: 70
From: “160” sip:160@ASTERISKIP;tag=o-cQ17eT6w4dG0G1unVYDc51EK80qFAX
To: sip:PHONENUMBERCALLED@ASTERISKIP
Call-ID: q9WvspA96orNIOvKTcJP1e9rUvs4bgS3
CSeq: 29660 CANCEL
User-Agent: Bria iOS 2.3.4
Content-Length: 0

<------------->
— (9 headers 0 lines) —
Sending to SOFTPHONEIP:64565 (NAT)

<— Reliably Transmitting (NAT) to SOFTPHONEIP:64565 —>
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP SOFTPHONEIP:64565;branch=z9hG4bKPj9yvPfixvpCPC.doIy6uyDNpO1kqd4zGZ;received=SOFTPHONEIP;rport=64565
From: “160” sip:160@ASTERISKIP;tag=o-cQ17eT6w4dG0G1unVYDc51EK80qFAX
To: sip:PHONENUMBERCALLED@ASTERISKIP;tag=as64081515
Call-ID: q9WvspA96orNIOvKTcJP1e9rUvs4bgS3
CSeq: 29660 INVITE
Server: Asterisk PBX 1.8.15-cert1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0

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

<— Transmitting (NAT) to SOFTPHONEIP:64565 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP SOFTPHONEIP:64565;branch=z9hG4bKPj9yvPfixvpCPC.doIy6uyDNpO1kqd4zGZ;received=SOFTPHONEIP;rport=64565
From: “160” sip:160@ASTERISKIP;tag=o-cQ17eT6w4dG0G1unVYDc51EK80qFAX
To: sip:PHONENUMBERCALLED@ASTERISKIP;tag=as64081515
Call-ID: q9WvspA96orNIOvKTcJP1e9rUvs4bgS3
CSeq: 29660 CANCEL
Server: Asterisk PBX 1.8.15-cert1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0

<------------>
== Spawn extension (phones-delta, PHONENUMBERCALLED, 2) exited non-zero on ‘SIP/160-0000d44c’

<— SIP read from UDP:SOFTPHONEIP:64565 —>
ACK sip:PHONENUMBERCALLED@ASTERISKIP SIP/2.0
Via: SIP/2.0/UDP SOFTPHONEIP:64565;rport;branch=z9hG4bKPj9yvPfixvpCPC.doIy6uyDNpO1kqd4zGZ
Max-Forwards: 70
From: “160” sip:160@ASTERISKIP;tag=o-cQ17eT6w4dG0G1unVYDc51EK80qFAX
To: sip:PHONENUMBERCALLED@ASTERISKIP;tag=as64081515
Call-ID: q9WvspA96orNIOvKTcJP1e9rUvs4bgS3
CSeq: 29660 ACK
Content-Length: 0

<------------->
— (8 headers 0 lines) —
Really destroying SIP dialog ‘q9WvspA96orNIOvKTcJP1e9rUvs4bgS3’ Method: ACK
[/code]