'Re-invite to non-existing call leg error' using Sendrpid

Our Setup

[ul]Asterisk 1.8 with a PRI to the PSTN.
90 Internal Yealink Phones + 20 Analog devices.[/ul]

The Symptoms

[ul]SIP calls stop working after about four days. You can’t dial to or from SIP phones and I have to reboot the server.
Bunches of the following error:[/ul]

[Jun 22 13:24:23] WARNING[2058] chan_sip.c: Re-invite to non-existing call leg on other UA. SIP dialog '59b958be1e8a89441f2d26d56829a52a@10.0.0.10:5060'. Giving up. [Jun 22 13:32:30] WARNING[2058] chan_sip.c: Re-invite to non-existing call leg on other UA. SIP dialog '23060a753194ad3c2f1d85a40bb5f082@10.0.0.10:5060'. Giving up

If you reboot, eveything works. As a temp fix, I set up a cron job to reboot the server at midnight. This weekend I started trial and error experimenting. The source of the error seems to come from the setting:

; in /etc/asterisk/sip.conf for the yealink sets
sendrpid=pai

I was using this option because on the Yealink sets it will show you the callerid name of the person you are dialing when placing a call from one internal extension to another.

What I discovered was that when a call comes in from the PRI, dials a SIP extension, and then transitions to another step of the dialplan (voicemail, playback, hangup, etc) I get the ‘re-invite to non-existing call leg’ error. It looks like the SIP phone is trying to send a SIP message to the DAHDI channel for the PRI.

I did a ‘ship show channels’ and see the following (which came from some test calls the day before):

Peer User/ANR Call ID Format Hold Last Message Expiry Peer 10.0.0.69 4351 23060a753194ad3 0x0 (nothing) No Tx: ACK 4351 10.0.0.69 4351 59b958be1e8a894 0x0 (nothing) No Tx: ACK 4351

I think I’m clogging up the server with these hung SIP channels which is why it locks up after a few days. With Sendrpid set to no, I’m not getting the errors (or the dialed extension name for the dial-ee). I’ve disabled the reboot cron job to see if this fixed the lock up issue.

Do I have something set wrong that is causing the Yealink phones to send a PID to the incoming DAHDI calls?

Thanks!

It’s physically impossible to send a re-invite to DAHDI, as there is no way of specifying a DAHDI channel in SIP, so I think that analysis of the problem is wrong.

Your error message is due to a response code, so it is the result of something that Asterisk initiated, towards a SIP device, not the result of the SIP device initiating anything.

It will need a lot of leaked SIP channels to bring Asterisk down, so you probably have a deadlock as well, which means you need to build with thread debugging and no-optimisation, and use “core show locks” and then get a core dump and all threads backtrace, when it gets into difficulty.

Going back to the re-invites, you need to follow the full SIP bug protocol, which is debug level 5, verbose level 5, sip set debug on (with the full log enabled, to capture the output).

Darn, I was hoping it was an obvious fix. Not having the SENDRPID broke the caller ID display for transferred calls. It’s definitely causing some issue with zombie SIP channels. The two I mentioned above are still present from Saturday.

OK, I did a SIP debug.

Here I have sendrpid=pai in sip.conf. I called from my cellphone to my desk phone, let it ring once, and hung up. You’ll note the ‘Re-invite to non-existing call leg on other UA’ error at the end. I can also confirm the sip channel 4b26ecc20727f05 zombified.

[code]INVITE sip:MY_EXTENSION_NUMBER@10.10.2.99:5062 SIP/2.0
Via: SIP/2.0/UDP 10.10.2.10:5060;branch=z9hG4bK2f0fa1b3;rport
Max-Forwards: 70
From: “WIRELESS CALLER” sip:MY_CELLPHONE_NUMBER@10.10.2.10;tag=as7226299d
To: sip:MY_EXTENSION_NUMBER@10.10.2.99:5062
Contact: sip:MY_CELLPHONE_NUMBER@10.10.2.10:5060
Call-ID: 4b26ecc20727f05252c6a5ad08aac7c3@10.10.2.10:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.8.20.1
Date: Sat, 29 Jun 2013 23:42:43 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
P-Asserted-Identity: “WIRELESS CALLER” sip:MY_CELLPHONE_NUMBER@10.10.2.10
Content-Type: application/sdp
Content-Length: 232

v=0
o=root 2089016247 2089016247 IN IP4 10.10.2.10
s=Asterisk PBX 1.8.20.1
c=IN IP4 10.10.2.10
t=0 0
m=audio 8122 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv


[Jun 29 19:42:43] – Called SIP/MY_EXTENSION_NUMBER
[Jun 29 19:42:43] == Extension Changed MY_EXTENSION_NUMBER[internal] new state Ringing for Notify User 4354
[Jun 29 19:42:43] == Extension Changed MY_EXTENSION_NUMBER[internal] new state Ringing for Notify User 4238
[Jun 29 19:42:43] == Extension Changed MY_EXTENSION_NUMBER[internal] new state Ringing for Notify User 4263
[Jun 29 19:42:43]
<— SIP read from UDP:10.10.2.99:5062 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.10.2.10:5060;branch=z9hG4bK2f0fa1b3;rport
From: “WIRELESS CALLER” sip:MY_CELLPHONE_NUMBER@10.10.2.10;tag=as7226299d
To: sip:MY_EXTENSION_NUMBER@10.10.2.99:5062
Call-ID: 4b26ecc20727f05252c6a5ad08aac7c3@10.10.2.10:5060
CSeq: 102 INVITE
User-Agent: Yealink SIP-T28P 2.70.0.130
Content-Length: 0

<------------->
[Jun 29 19:42:43] — (8 headers 0 lines) —
[Jun 29 19:42:43]
<— SIP read from UDP:10.10.2.99:5062 —>
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 10.10.2.10:5060;branch=z9hG4bK2f0fa1b3;rport
From: “WIRELESS CALLER” sip:MY_CELLPHONE_NUMBER@10.10.2.10;tag=as7226299d
To: sip:MY_EXTENSION_NUMBER@10.10.2.99:5062;tag=1598030047
Call-ID: 4b26ecc20727f05252c6a5ad08aac7c3@10.10.2.10:5060
CSeq: 102 INVITE
Contact: sip:MY_EXTENSION_NUMBER@10.10.2.99:5062
Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE
User-Agent: Yealink SIP-T28P 2.70.0.130
Allow-Events: talk,hold,conference,refer,check-sync
Content-Length: 0

<------------->
[Jun 29 19:42:43] — (11 headers 0 lines) —
[Jun 29 19:42:43] list_route: hop: sip:MY_EXTENSION_NUMBER@10.10.2.99:5062
[Jun 29 19:42:43] – SIP/MY_EXTENSION_NUMBER-0000001f is ringing
[Jun 29 19:42:44] – Span 1: Channel 0/1 got hangup request, cause 16
[Jun 29 19:42:44] Scheduling destruction of SIP dialog ‘4b26ecc20727f05252c6a5ad08aac7c3@10.10.2.10:5060’ in 32000 ms (Method: INVITE)
[Jun 29 19:42:44] Reliably Transmitting (NAT) to 10.10.2.99:5062:
CANCEL sip:MY_EXTENSION_NUMBER@10.10.2.99:5062 SIP/2.0
Via: SIP/2.0/UDP 10.10.2.10:5060;branch=z9hG4bK2f0fa1b3;rport
Max-Forwards: 70
From: “WIRELESS CALLER” sip:MY_CELLPHONE_NUMBER@10.10.2.10;tag=as7226299d
To: sip:MY_EXTENSION_NUMBER@10.10.2.99:5062
Call-ID: 4b26ecc20727f05252c6a5ad08aac7c3@10.10.2.10:5060
CSeq: 102 CANCEL
User-Agent: Asterisk PBX 1.8.20.1
Content-Length: 0


[Jun 29 19:42:44] Scheduling destruction of SIP dialog ‘4b26ecc20727f05252c6a5ad08aac7c3@10.10.2.10:5060’ in 32000 ms (Method: INVITE)
[Jun 29 19:42:44] == Spawn extension (sip_ring_then_vm, MY_EXTENSION_NUMBER, 3) exited non-zero on ‘DAHDI/i1/MY_CELLPHONE_NUMBER-21’
[Jun 29 19:42:44] == Extension Changed MY_EXTENSION_NUMBER[internal] new state Idle for Notify User 4354
[Jun 29 19:42:44] == Extension Changed MY_EXTENSION_NUMBER[internal] new state Idle for Notify User 4238
[Jun 29 19:42:44] == Extension Changed MY_EXTENSION_NUMBER[internal] new state Idle for Notify User 4263
[Jun 29 19:42:44] – Hungup ‘DAHDI/i1/MY_CELLPHONE_NUMBER-21’
[Jun 29 19:42:44]
<— SIP read from UDP:10.10.2.99:5062 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.10.2.10:5060;branch=z9hG4bK2f0fa1b3;rport
From: “WIRELESS CALLER” sip:MY_CELLPHONE_NUMBER@10.10.2.10;tag=as7226299d
To: sip:MY_EXTENSION_NUMBER@10.10.2.99:5062;tag=1598030047
Call-ID: 4b26ecc20727f05252c6a5ad08aac7c3@10.10.2.10:5060
CSeq: 102 CANCEL
User-Agent: Yealink SIP-T28P 2.70.0.130
Content-Length: 0

<------------->
[Jun 29 19:42:44] — (8 headers 0 lines) —
[Jun 29 19:42:44]
<— SIP read from UDP:10.10.2.99:5062 —>
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 10.10.2.10:5060;branch=z9hG4bK2f0fa1b3;rport
From: “WIRELESS CALLER” sip:MY_CELLPHONE_NUMBER@10.10.2.10;tag=as7226299d
To: sip:MY_EXTENSION_NUMBER@10.10.2.99:5062;tag=1598030047
Call-ID: 4b26ecc20727f05252c6a5ad08aac7c3@10.10.2.10:5060
CSeq: 102 INVITE
User-Agent: Yealink SIP-T28P 2.70.0.130
Content-Length: 0

<------------->
[Jun 29 19:42:44] — (8 headers 0 lines) —
[Jun 29 19:42:44] Transmitting (NAT) to 10.10.2.99:5062:
ACK sip:MY_EXTENSION_NUMBER@10.10.2.99:5062 SIP/2.0
Via: SIP/2.0/UDP 10.10.2.10:5060;branch=z9hG4bK2f0fa1b3;rport
Max-Forwards: 70
From: “WIRELESS CALLER” sip:MY_CELLPHONE_NUMBER@10.10.2.10;tag=as7226299d
To: sip:MY_EXTENSION_NUMBER@10.10.2.99:5062;tag=1598030047
Contact: sip:MY_CELLPHONE_NUMBER@10.10.2.10:5060
Call-ID: 4b26ecc20727f05252c6a5ad08aac7c3@10.10.2.10:5060
CSeq: 102 ACK
User-Agent: Asterisk PBX 1.8.20.1
Content-Length: 0


[Jun 29 19:42:44] set_destination: Parsing sip:MY_EXTENSION_NUMBER@10.10.2.99:5062 for address/port to send to
[Jun 29 19:42:44] set_destination: set destination to 10.10.2.99:5062
[Jun 29 19:42:44] Audio is at 8122
[Jun 29 19:42:44] Adding codec 0x4 (ulaw) to SDP
[Jun 29 19:42:44] Adding non-codec 0x1 (telephone-event) to SDP
[Jun 29 19:42:44] Reliably Transmitting (NAT) to 10.10.2.99:5062:
INVITE sip:MY_EXTENSION_NUMBER@10.10.2.99:5062 SIP/2.0
Via: SIP/2.0/UDP 10.10.2.10:5060;branch=z9hG4bK5a62e13b;rport
Max-Forwards: 70
From: “WIRELESS CALLER” sip:MY_CELLPHONE_NUMBER@10.10.2.10;tag=as7226299d
To: sip:MY_EXTENSION_NUMBER@10.10.2.99:5062;tag=1598030047
Contact: sip:MY_CELLPHONE_NUMBER@10.10.2.10:5060
Call-ID: 4b26ecc20727f05252c6a5ad08aac7c3@10.10.2.10:5060
CSeq: 103 INVITE
User-Agent: Asterisk PBX 1.8.20.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
X-asterisk-Info: SIP re-invite (External RTP bridge)
Content-Type: application/sdp
Content-Length: 259

v=0
o=root 2089016247 2089016248 IN IP4 10.10.2.10
s=Asterisk PBX 1.8.20.1
c=IN IP4 10.10.2.10
t=0 0
m=audio 8122 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


[Jun 29 19:42:44] Scheduling destruction of SIP dialog ‘4b26ecc20727f05252c6a5ad08aac7c3@10.10.2.10:5060’ in 32000 ms (Method: INVITE)
[Jun 29 19:42:45]
<— SIP read from UDP:10.10.2.99:5062 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.10.2.10:5060;branch=z9hG4bK5a62e13b;rport
From: “WIRELESS CALLER” sip:MY_CELLPHONE_NUMBER@10.10.2.10;tag=as7226299d
To: sip:MY_EXTENSION_NUMBER@10.10.2.99:5062;tag=1598030047
Call-ID: 4b26ecc20727f05252c6a5ad08aac7c3@10.10.2.10:5060
CSeq: 103 INVITE
User-Agent: Yealink SIP-T28P 2.70.0.130
Content-Length: 0

<------------->
[Jun 29 19:42:45] — (8 headers 0 lines) —
[Jun 29 19:42:45]
<— SIP read from UDP:10.10.2.99:5062 —>
SIP/2.0 481 Call Leg/Transaction Does Not Exist
Via: SIP/2.0/UDP 10.10.2.10:5060;branch=z9hG4bK5a62e13b;rport
From: “WIRELESS CALLER” sip:MY_CELLPHONE_NUMBER@10.10.2.10;tag=as7226299d
To: sip:MY_EXTENSION_NUMBER@10.10.2.99:5062;tag=1598030047
Call-ID: 4b26ecc20727f05252c6a5ad08aac7c3@10.10.2.10:5060
CSeq: 103 INVITE
User-Agent: Yealink SIP-T28P 2.70.0.130
Content-Length: 0

<------------->
[Jun 29 19:42:45] — (8 headers 0 lines) —
[Jun 29 19:42:45] WARNING[2067]: chan_sip.c:20897 handle_response_invite: Re-invite to non-existing call leg on other UA. SIP dialog ‘4b26ecc20727f05252c6a5ad08aac7c3@10.10.2.10:5060’. Giving up.
[Jun 29 19:42:45] set_destination: Parsing sip:MY_EXTENSION_NUMBER@10.10.2.99:5062 for address/port to send to
[Jun 29 19:42:45] set_destination: set destination to 10.10.2.99:5062
[Jun 29 19:42:45] Transmitting (NAT) to 10.10.2.99:5062:
ACK sip:MY_EXTENSION_NUMBER@10.10.2.99:5062 SIP/2.0
Via: SIP/2.0/UDP 10.10.2.10:5060;branch=z9hG4bK5a62e13b;rport
Max-Forwards: 70
From: “WIRELESS CALLER” sip:MY_CELLPHONE_NUMBER@10.10.2.10;tag=as7226299d
To: sip:MY_EXTENSION_NUMBER@10.10.2.99:5062;tag=1598030047
Contact: sip:MY_CELLPHONE_NUMBER@10.10.2.10:5060
Call-ID: 4b26ecc20727f05252c6a5ad08aac7c3@10.10.2.10:5060
CSeq: 103 ACK
User-Agent: Asterisk PBX 1.8.20.1
Content-Length: 0
[/code]

Here I changed sendrpid=no in sip.conf and did a ‘sip reload’. I called from my cellphone to my desk phone, let it ring once, and hung up. No warnings and the sip channel cleared correctly.

INVITE sip:MY_EXTENSION_NUMBER@10.10.2.99:5062 SIP/2.0
Via: SIP/2.0/UDP 10.10.2.10:5060;branch=z9hG4bK03fe3278;rport
Max-Forwards: 70
From: "WIRELESS CALLER" <sip:MY_CELLPHONE_NUMBER@10.10.2.10>;tag=as363f2367
To: <sip:MY_EXTENSION_NUMBER@10.10.2.99:5062>
Contact: <sip:MY_CELLPHONE_NUMBER@10.10.2.10:5060>
Call-ID: 79856971108952b35ffe696719be4c80@10.10.2.10:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.8.20.1
Date: Sat, 29 Jun 2013 23:59:31 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 231

v=0
o=root 693409678 693409678 IN IP4 10.10.2.10
s=Asterisk PBX 1.8.20.1
c=IN IP4 10.10.2.10
t=0 0
m=audio 26252 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

---
[Jun 29 19:59:31]     -- Called SIP/MY_EXTENSION_NUMBER
[Jun 29 19:59:31]   == Extension Changed MY_EXTENSION_NUMBER[internal] new state Ringing for Notify User 4354
[Jun 29 19:59:31]   == Extension Changed MY_EXTENSION_NUMBER[internal] new state Ringing for Notify User 4238
[Jun 29 19:59:31]   == Extension Changed MY_EXTENSION_NUMBER[internal] new state Ringing for Notify User 4263
[Jun 29 19:59:31]
<--- SIP read from UDP:10.10.2.99:5062 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.10.2.10:5060;branch=z9hG4bK03fe3278;rport
From: "WIRELESS CALLER" <sip:MY_CELLPHONE_NUMBER@10.10.2.10>;tag=as363f2367
To: <sip:MY_EXTENSION_NUMBER@10.10.2.99:5062>
Call-ID: 79856971108952b35ffe696719be4c80@10.10.2.10:5060
CSeq: 102 INVITE
User-Agent: Yealink SIP-T28P 2.70.0.130
Content-Length: 0

<------------->
[Jun 29 19:59:31] --- (8 headers 0 lines) ---
[Jun 29 19:59:31]
<--- SIP read from UDP:10.10.2.99:5062 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 10.10.2.10:5060;branch=z9hG4bK03fe3278;rport
From: "WIRELESS CALLER" <sip:MY_CELLPHONE_NUMBER@10.10.2.10>;tag=as363f2367
To: <sip:MY_EXTENSION_NUMBER@10.10.2.99:5062>;tag=1750395920
Call-ID: 79856971108952b35ffe696719be4c80@10.10.2.10:5060
CSeq: 102 INVITE
Contact: <sip:MY_EXTENSION_NUMBER@10.10.2.99:5062>
Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE
User-Agent: Yealink SIP-T28P 2.70.0.130
Allow-Events: talk,hold,conference,refer,check-sync
Content-Length: 0

<------------->
[Jun 29 19:59:31] --- (11 headers 0 lines) ---
[Jun 29 19:59:31] list_route: hop: <sip:MY_EXTENSION_NUMBER@10.10.2.99:5062>
[Jun 29 19:59:31]     -- SIP/MY_EXTENSION_NUMBER-00000020 is ringing
[Jun 29 19:59:33]     -- Span 1: Channel 0/1 got hangup request, cause 16
[Jun 29 19:59:33] Scheduling destruction of SIP dialog '79856971108952b35ffe696719be4c80@10.10.2.10:5060' in 32000 ms (Method: INVITE)
[Jun 29 19:59:33] Reliably Transmitting (NAT) to 10.10.2.99:5062:
CANCEL sip:MY_EXTENSION_NUMBER@10.10.2.99:5062 SIP/2.0
Via: SIP/2.0/UDP 10.10.2.10:5060;branch=z9hG4bK03fe3278;rport
Max-Forwards: 70
From: "WIRELESS CALLER" <sip:MY_CELLPHONE_NUMBER@10.10.2.10>;tag=as363f2367
To: <sip:MY_EXTENSION_NUMBER@10.10.2.99:5062>
Call-ID: 79856971108952b35ffe696719be4c80@10.10.2.10:5060
CSeq: 102 CANCEL
User-Agent: Asterisk PBX 1.8.20.1
Content-Length: 0


---
[Jun 29 19:59:33] Scheduling destruction of SIP dialog '79856971108952b35ffe696719be4c80@10.10.2.10:5060' in 32000 ms (Method: INVITE)
[Jun 29 19:59:33]   == Spawn extension (sip_ring_then_vm, MY_EXTENSION_NUMBER, 3) exited non-zero on 'DAHDI/i1/MY_CELLPHONE_NUMBER-22'
[Jun 29 19:59:33]   == Extension Changed MY_EXTENSION_NUMBER[internal] new state Idle for Notify User 4354
[Jun 29 19:59:33]   == Extension Changed MY_EXTENSION_NUMBER[internal] new state Idle for Notify User 4238
[Jun 29 19:59:33]   == Extension Changed MY_EXTENSION_NUMBER[internal] new state Idle for Notify User 4263
[Jun 29 19:59:33]     -- Hungup 'DAHDI/i1/MY_CELLPHONE_NUMBER-22'
[Jun 29 19:59:33]
<--- SIP read from UDP:10.10.2.99:5062 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.10.2.10:5060;branch=z9hG4bK03fe3278;rport
From: "WIRELESS CALLER" <sip:MY_CELLPHONE_NUMBER@10.10.2.10>;tag=as363f2367
To: <sip:MY_EXTENSION_NUMBER@10.10.2.99:5062>;tag=1750395920
Call-ID: 79856971108952b35ffe696719be4c80@10.10.2.10:5060
CSeq: 102 CANCEL
User-Agent: Yealink SIP-T28P 2.70.0.130
Content-Length: 0

<------------->
[Jun 29 19:59:33] --- (8 headers 0 lines) ---
[Jun 29 19:59:33]
<--- SIP read from UDP:10.10.2.99:5062 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 10.10.2.10:5060;branch=z9hG4bK03fe3278;rport
From: "WIRELESS CALLER" <sip:MY_CELLPHONE_NUMBER@10.10.2.10>;tag=as363f2367
To: <sip:MY_EXTENSION_NUMBER@10.10.2.99:5062>;tag=1750395920
Call-ID: 79856971108952b35ffe696719be4c80@10.10.2.10:5060
CSeq: 102 INVITE
User-Agent: Yealink SIP-T28P 2.70.0.130
Content-Length: 0

<------------->
[Jun 29 19:59:33] --- (8 headers 0 lines) ---
[Jun 29 19:59:33] Transmitting (NAT) to 10.10.2.99:5062:
ACK sip:MY_EXTENSION_NUMBER@10.10.2.99:5062 SIP/2.0
Via: SIP/2.0/UDP 10.10.2.10:5060;branch=z9hG4bK03fe3278;rport
Max-Forwards: 70
From: "WIRELESS CALLER" <sip:MY_CELLPHONE_NUMBER@10.10.2.10>;tag=as363f2367
To: <sip:MY_EXTENSION_NUMBER@10.10.2.99:5062>;tag=1750395920
Contact: <sip:MY_CELLPHONE_NUMBER@10.10.2.10:5060>
Call-ID: 79856971108952b35ffe696719be4c80@10.10.2.10:5060
CSeq: 102 ACK
User-Agent: Asterisk PBX 1.8.20.1
Content-Length: 0

Thanks for looking!

The first trace shows an invalid response from the phone.

The second one shows the circuit switched side terminated the call.

It’s very possible I’m reading it wrong, but it looks like in the first call Asterisk is sending a re-invite after the request termination is acknowledged;

INVITE sip:MY_EXTENSION_NUMBER@10.10.2.99:5062 SIP/2.0
Via: SIP/2.0/UDP 10.10.2.10:5060;branch=z9hG4bK5a62e13b;rport
Max-Forwards: 70
From: "WIRELESS CALLER" <sip:MY_CELLPHONE_NUMBER@10.10.2.10>;tag=as7226299d
To: <sip:MY_EXTENSION_NUMBER@10.10.2.99:5062>;tag=1598030047
Contact: <sip:MY_CELLPHONE_NUMBER@10.10.2.10:5060>
Call-ID: 4b26ecc20727f05252c6a5ad08aac7c3@10.10.2.10:5060
CSeq: 103 INVITE
User-Agent: Asterisk PBX 1.8.20.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
X-asterisk-Info: SIP re-invite (External RTP bridge)
Content-Type: application/sdp
Content-Length: 259

I tried the upgrading to latest versions of 1.8 LTS Cert then just 1.8 LTS yesterday but no luck.

I think you may be right!

This issue is driving me insane. I’ve built a whole new server and upgraded to 11. Tried various firmwares and every SIP.CONF setting I can find.

Maybe walking through the symptoms again will help

sendrpid=no
sip -> sip = ok
sip -> pstn = ok
pstn -> sip = ok

sendrpid=[anything else]
sip -> sip = ok
sip -> pstn = ok
pstn -> sip = re-invite error plus a zombie sip channel*

*at the end of the first leg of the call, the actual call works fine

I thought maybe something was buggy with the Yealinks so I tried a Polycom instead.

[Poly321] type=friend host=dynamic context=internal disallow=all allow=g722 allow=ulaw secret=*************** sendrpid=yes trustrpid=yes

And I still get this for calls from the PRI:

I dunno, maybe I have something fundamentally wrong in my dialplan. Is there a more active forum for Asterisk issues?

I did say that your analysis appeared to be right. On that basis, if you can reproduce it on a recent version of 1.8, you should raise a bug report.

I believe the Asterisk user mailing list is quite active.

Short followup in case someone runs across this thread;

If I add the following option to my SIP.CONF for the Yealink phones;

Then I get the following error instead;

The good news is the sip channels no longer zombify.

Please replace “canreinvite” with “directmedia”. The former is a deprecated name on the version you are using, and may have been removed entirely, since.