[OpenSIPS-Users] 3.4 dlg_send_sequential Cseq bug
M S
medeanwz at gmail.com
Fri Sep 26 17:10:51 UTC 2025
There is a bug in 3.4's dialog or tm module:
A ------- B (opensips) ------------ C
Call from A to B and then proxied to C.
C accepts and answers and acknowledges.
10 seconds later C sends a Re-Invite (Cseq x)
A responds with 200 OK (which is proxied to C).
As soon as C receives 200 OK, C sends an in-dialog INFO to B (Cseq x+1)
B sends INFO to A and receives ACK, ACK is sent to C (Cseq x+1)
~~ At this point, A sends ACK to the reinvite (Cseq was x). B ends this ACK
to C with Cseq x+1 which is incorrect.
This seems to be caused by Cseq mapping. It did not exist in 3.1.
trace:
2025/09/26 16:10:21.361305 1.2.3.4:5060 -> 5.6.7.8:5060
INVITE sip:9.10.11.12;did=33b.ae0baf63 SIP/2.0
Via: SIP/2.0/UDP 1.2.3.4;rport;branch=z9hG4bKBSyUDj3X836DH
Route: <sip:5.6.7.8;lr;ftag=wzxe7s9s-CC-1049-OFC-32;did=33b.a26efd7>
Max-Forwards: 26
From: "0445566000" <sip:445566000 at 1.2.3.4>;tag=2m7re1yvj3F5F
To: "1112223333" <sip:981112223333 at 5.6.7.8>;tag=wzxe7s9s-CC-1049-OFC-32
Call-ID: ww0q0moisw7zh30z9e9ow7qsoiz3i9s0
CSeq: 104891418 INVITE
Contact: <sip:445566000 at 1.2.3.4:5060;transport=udp>
User-Agent:
FreeSWITCH-mod_sofia/1.10.12-release+git~20240802T210227Z~a88d069d6f~64bit
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER,
REFER, NOTIFY
Supported: path, replaces
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 222
X-FS-Support: update_display,send_info
v=0
o=FreeSWITCH 1758866897 1758866898 IN IP4 1.2.3.4
s=FreeSWITCH
c=IN IP4 1.2.3.4
t=0 0
m=audio 23516 RTP/AVP 8 116
a=rtpmap:8 PCMA/8000
a=rtpmap:116 telephone-event/8000
a=fmtp:116 0-15
a=ptime:20
2025/09/26 16:10:21.361421 5.6.7.8:5060 -> 1.2.3.4:5060
SIP/2.0 100 Giving it a try
Via: SIP/2.0/UDP
1.2.3.4;received=1.2.3.4;rport=5060;branch=z9hG4bKBSyUDj3X836DH
To: "1112223333" <sip:981112223333 at 5.6.7.8>;tag=wzxe7s9s-CC-1049-OFC-32
From: "0445566000" <sip:445566000 at 1.2.3.4>;tag=2m7re1yvj3F5F
Call-ID: ww0q0moisw7zh30z9e9ow7qsoiz3i9s0
CSeq: 104891418 INVITE
Content-Length: 0
2025/09/26 16:10:21.361910 5.6.7.8:5060 -> 9.10.11.12:5060
INVITE sip:9.10.11.12;did=33b.ae0baf63 SIP/2.0
Via: SIP/2.0/UDP 5.6.7.8:5060;branch=z9hG4bK5ee.de615a07.0
Via: SIP/2.0/UDP
1.2.3.4;received=1.2.3.4;rport=5060;branch=z9hG4bKBSyUDj3X836DH
Max-Forwards: 25
From: "0445566000" <sip:445566000 at 5.6.7.8>;tag=2m7re1yvj3F5F
To: "1112223333" <sip:981112223333 at 9.10.11.12>;tag=wzxe7s9s-CC-1049-OFC-32
Call-ID: ww0q0moisw7zh30z9e9ow7qsoiz3i9s0
CSeq: 5 INVITE
Contact: <sip:445566000 at 1.2.3.4:5060;transport=udp>
User-Agent:
FreeSWITCH-mod_sofia/1.10.12-release+git~20240802T210227Z~a88d069d6f~64bit
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER,
REFER, NOTIFY
Supported: path, replaces
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 222
P-hint: rr-enforced
v=0
o=FreeSWITCH 1758866897 1758866898 IN IP4 1.2.3.4
s=FreeSWITCH
c=IN IP4 1.2.3.4
t=0 0
m=audio 23516 RTP/AVP 8 116
a=rtpmap:8 PCMA/8000
a=rtpmap:116 telephone-event/8000
a=fmtp:116 0-15
a=ptime:20
2025/09/26 16:10:21.362769 9.10.11.12:5060 -> 5.6.7.8:5060
SIP/2.0 100 Giving it a try
Via: SIP/2.0/UDP 5.6.7.8:5060
;received=5.6.7.8;rport=5060;branch=z9hG4bK5ee.de615a07.0
Via: SIP/2.0/UDP
1.2.3.4;received=1.2.3.4;rport=5060;branch=z9hG4bKBSyUDj3X836DH
To: "1112223333" <sip:981112223333 at 9.10.11.12>;tag=wzxe7s9s-CC-1049-OFC-32
From: "0445566000" <sip:445566000 at 5.6.7.8>;tag=2m7re1yvj3F5F
Call-ID: ww0q0moisw7zh30z9e9ow7qsoiz3i9s0
CSeq: 5 INVITE
Content-Length: 0
2025/09/26 16:10:21.380894 9.10.11.12:5060 -> 5.6.7.8:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP 5.6.7.8:5060
;received=5.6.7.8;rport=5060;branch=z9hG4bK5ee.de615a07.0
Via: SIP/2.0/UDP
1.2.3.4;received=1.2.3.4;rport=5060;branch=z9hG4bKBSyUDj3X836DH
Call-ID: ww0q0moisw7zh30z9e9ow7qsoiz3i9s0
From: "0445566000" <sip:445566000 at 5.6.7.8>;tag=2m7re1yvj3F5F
To: "1112223333" <sip:981112223333 at 9.10.11.12>;tag=wzxe7s9s-CC-1049-OFC-32
CSeq: 5 INVITE
Allow:
INVITE,ACK,CANCEL,OPTIONS,BYE,REGISTER,PRACK,INFO,UPDATE,SUBSCRIBE,NOTIFY,MESSAGE,REFER,PUBLISH
Contact: <sip:9.10.11.12;did=33b.ae0baf63>
Content-Length: 210
Content-Type: application/sdp
v=0
o=HuaweiSoftx3000 1743551938 1743551940 IN IP4 9.10.11.12
s=ATMS SBC
c=IN IP4 9.10.11.12
t=0 0
m=audio 16874 RTP/AVP 8 116
a=rtpmap:8 PCMA/8000
a=rtpmap:116 telephone-event/8000
a=ptime:20
2025/09/26 16:10:21.381041 5.6.7.8:5060 -> 1.2.3.4:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP
1.2.3.4;received=1.2.3.4;rport=5060;branch=z9hG4bKBSyUDj3X836DH
Call-ID: ww0q0moisw7zh30z9e9ow7qsoiz3i9s0
From: "0445566000" <sip:445566000 at 1.2.3.4>;tag=2m7re1yvj3F5F
To: "1112223333" <sip:981112223333 at 5.6.7.8>;tag=wzxe7s9s-CC-1049-OFC-32
CSeq: 104891418 INVITE
Allow:
INVITE,ACK,CANCEL,OPTIONS,BYE,REGISTER,PRACK,INFO,UPDATE,SUBSCRIBE,NOTIFY,MESSAGE,REFER,PUBLISH
Contact: <sip:9.10.11.12;did=33b.ae0baf63>
Content-Length: 210
Content-Type: application/sdp
v=0
o=HuaweiSoftx3000 1743551938 1743551940 IN IP4 9.10.11.12
s=ATMS SBC
c=IN IP4 9.10.11.12
t=0 0
m=audio 16874 RTP/AVP 8 116
a=rtpmap:8 PCMA/8000
a=rtpmap:116 telephone-event/8000
a=ptime:20
2025/09/26 16:10:21.401668 1.2.3.4:5060 -> 5.6.7.8:5060
INFO sip:9.10.11.12;did=33b.ae0baf63 SIP/2.0
Via: SIP/2.0/UDP 1.2.3.4;rport;branch=z9hG4bKc2QmFDm15cX0c
Route: <sip:5.6.7.8;lr;ftag=wzxe7s9s-CC-1049-OFC-32;did=33b.a26efd7>
Max-Forwards: 70
From: "0445566000" <sip:445566000 at 1.2.3.4>;tag=2m7re1yvj3F5F
To: "1112223333" <sip:981112223333 at 5.6.7.8>;tag=wzxe7s9s-CC-1049-OFC-32
Call-ID: ww0q0moisw7zh30z9e9ow7qsoiz3i9s0
CSeq: 104891419 INFO
Contact: <sip:445566000 at 1.2.3.4:5060;transport=udp>
User-Agent:
FreeSWITCH-mod_sofia/1.10.12-release+git~20240802T210227Z~a88d069d6f~64bit
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER,
REFER, NOTIFY
Supported: path, replaces
Content-Type: service/hostedpbx
Content-Disposition: Info-Package
Content-Length: 168
Info-Package: extraservice
service=queue;action=3;cid=981112223333;cidname=1112223333;dest=445566000;forwarder=3;all=0.0,0.0;bll=0.0,0.0;
2025/09/26 16:10:21.402216 5.6.7.8:5060 -> 9.10.11.12:5060
INFO sip:9.10.11.12;did=33b.ae0baf63 SIP/2.0
Via: SIP/2.0/UDP 5.6.7.8:5060;branch=z9hG4bK4ee.6e62ffd4.0
Via: SIP/2.0/UDP
1.2.3.4;received=1.2.3.4;rport=5060;branch=z9hG4bKc2QmFDm15cX0c
Max-Forwards: 30
From: "0445566000" <sip:445566000 at 5.6.7.8>;tag=2m7re1yvj3F5F
To: "1112223333" <sip:981112223333 at 9.10.11.12>;tag=wzxe7s9s-CC-1049-OFC-32
Call-ID: ww0q0moisw7zh30z9e9ow7qsoiz3i9s0
CSeq: 6 INFO
Contact: <sip:445566000 at 1.2.3.4:5060;transport=udp>
User-Agent:
FreeSWITCH-mod_sofia/1.10.12-release+git~20240802T210227Z~a88d069d6f~64bit
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER,
REFER, NOTIFY
Supported: path, replaces
Content-Type: service/hostedpbx
Content-Disposition: Info-Package
Content-Length: 168
Info-Package: extraservice
P-hint: rr-enforced
service=queue;action=3;cid=981112223333;cidname=1112223333;dest=445566000;forwarder=3;all=0.0,0.0;bll=0.0,0.0;
2025/09/26 16:10:21.403096 1.2.3.4:5060 -> 5.6.7.8:5060
ACK sip:9.10.11.12;did=33b.ae0baf63 SIP/2.0
Via: SIP/2.0/UDP 1.2.3.4;rport;branch=z9hG4bKDBHDH8442NKKr
Route: <sip:5.6.7.8;lr;ftag=wzxe7s9s-CC-1049-OFC-32;did=33b.a26efd7>
Max-Forwards: 70
From: "0445566000" <sip:445566000 at 1.2.3.4>;tag=2m7re1yvj3F5F
To: "1112223333" <sip:981112223333 at 5.6.7.8>;tag=wzxe7s9s-CC-1049-OFC-32
Call-ID: ww0q0moisw7zh30z9e9ow7qsoiz3i9s0
CSeq: 104891418 ACK
Content-Length: 0
2025/09/26 16:10:21.403365 5.6.7.8:5060 -> 9.10.11.12:5060
ACK sip:9.10.11.12;did=33b.ae0baf63 SIP/2.0
Via: SIP/2.0/UDP 5.6.7.8:5060;branch=z9hG4bK5ee.de615a07.2
Via: SIP/2.0/UDP
1.2.3.4;received=1.2.3.4;rport=5060;branch=z9hG4bKDBHDH8442NKKr
Max-Forwards: 30
From: "0445566000" <sip:445566000 at 5.6.7.8>;tag=2m7re1yvj3F5F
To: "1112223333" <sip:981112223333 at 9.10.11.12>;tag=wzxe7s9s-CC-1049-OFC-32
Call-ID: ww0q0moisw7zh30z9e9ow7qsoiz3i9s0
CSeq: 6 ACK
Content-Length: 0
P-hint: rr-enforced
2025/09/26 16:10:21.403477 9.10.11.12:5060 -> 5.6.7.8:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP 5.6.7.8:5060
;received=5.6.7.8;rport=5060;branch=z9hG4bK4ee.6e62ffd4.0
Via: SIP/2.0/UDP
1.2.3.4;received=1.2.3.4;rport=5060;branch=z9hG4bKc2QmFDm15cX0c
To: "1112223333" <sip:981112223333 at 9.10.11.12>;tag=wzxe7s9s-CC-1049-OFC-32
From: "0445566000" <sip:445566000 at 5.6.7.8>;tag=2m7re1yvj3F5F
Call-ID: ww0q0moisw7zh30z9e9ow7qsoiz3i9s0
CSeq: 6 INFO
Content-Length: 0
2025/09/26 16:10:21.403615 5.6.7.8:5060 -> 1.2.3.4:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP
1.2.3.4;received=1.2.3.4;rport=5060;branch=z9hG4bKc2QmFDm15cX0c
To: "1112223333" <sip:981112223333 at 5.6.7.8>;tag=wzxe7s9s-CC-1049-OFC-32
From: "0445566000" <sip:445566000 at 1.2.3.4>;tag=2m7re1yvj3F5F
Call-ID: ww0q0moisw7zh30z9e9ow7qsoiz3i9s0
CSeq: 104891419 INFO
Content-Length: 0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20250926/dd28e927/attachment.html>
More information about the Users
mailing list