[OpenSIPS-Users] validate_dialog() failing to recognise reinvites

Kingsley Tart kingsley at dns99.co.uk
Mon Oct 18 14:25:38 EST 2021


Hi,

Using OpenSIPS 3.1.5 I'm getting validate_dialog() returning $rc=-1 on
re-invites.


I have this in opensips.cfg:

modparam("dialog", "dlg_match_mode", 1)


The top of route() looks like this:

route {
	if (has_totag()) {
		if (is_method("ACK") && t_check_trans()) {
			t_relay();
			exit;
		}

		if (!loose_route()) {
			send_reply(404, "Not here");
			exit;
		}

		if (!validate_dialog()) {
			xlog("L_WARN", "Ignoring $rm from $si due to invalid dialog; rc=$rc\n");
		}


I've attached an (anonymised) SIP trace. OpenSIPS isn't responding to
the reinvites as I'm seeing "Ignoring INVITE from (address) due to
invalid dialog: rc=-1" (as per the xlog above).

Is there something wrong with these re-invite messages, or something
I'm doing wrong in OpenSIPS?

Cheers,
Kingsley.
-------------- next part --------------
U 2021/10/18 14:15:23.943154 2.2.2.2:5060 -> 1.1.1.1:5060 #59215
INVITE sip:+44116xxxx100 at 1.1.1.1;user=phone SIP/2.0.
Record-Route: <sip:2.2.2.2;lr;did=b67.9e943751>.
Via: SIP/2.0/UDP 2.2.2.2:5060;branch=z9hG4bKe056.3c6d36.0.
Via: SIP/2.0/UDP 1.1.1.28:5060;received=1.1.1.28;rport=5060;branch=z9hG4bKPj5938cccb-0c93-4e5d-bead-6e3935d11729.
Call-ID: 82dafe20-03a2-4007-a9d8-f9e5efa2cb4f.
CSeq: 12746 INVITE.
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER.
Supported: 100rel, timer, replaces, norefersub, histinfo.
Session-Expires: 1800.
Min-SE: 90.
Privacy: none.
X-Channel: PJSIP/custom-00000016.
X-Call-Unique-Id: 1634562923.45_8.
Max-Forwards: 70.
User-Agent: Asterisk PBX GIT-master-cc127a999cM.
Content-Type: application/sdp.
Content-Length:   396.
To: <sip:+44116xxxx100 at 1.1.1.1;user=phone>.
From: <sip:+44197xxxx014 at 1.1.1.28;user=phone>;tag=e8ade979-2439-47b4-94c9-6e67ea31c76d.
Contact: <sip:asterisk at 1.1.1.28:5060;user=phone>.
P-Asserted-Identity: "+44197xxxx014" <sip:+44197xxxx014 at 1.1.1.28;user=phone>.
P-Preferred-Identity: "+44197xxxx014" <sip:+44197xxxx014 at 1.1.1.28;user=phone>.
Remote-Party-ID: "+44197xxxx014" <sip:+44197xxxx014 at 1.1.1.28;user=phone>;privacy=off;screen=yes.
.
v=0.
o=- 1815475440 1815475440 IN IP4 1.1.1.28.
s=Asterisk.
c=IN IP4 1.1.1.28.
t=0 0.
m=audio 19038 RTP/AVP 8 0 3 9 110 117 119 101.
a=rtpmap:8 PCMA/8000.
a=rtpmap:0 PCMU/8000.
a=rtpmap:3 GSM/8000.
a=rtpmap:9 G722/8000.
a

U 2021/10/18 14:15:23.952884 1.1.1.1:5060 -> 2.2.2.2:5060 #59216
SIP/2.0 100 Trying.
Via: SIP/2.0/UDP 2.2.2.2:5060;branch=z9hG4bKe056.3c6d36.0.
Via: SIP/2.0/UDP 1.1.1.28:5060;received=1.1.1.28;rport=5060;branch=z9hG4bKPj5938cccb-0c93-4e5d-bead-6e3935d11729.
From: <sip:+44197xxxx014 at 1.1.1.28;user=phone>;tag=e8ade979-2439-47b4-94c9-6e67ea31c76d.
To: <sip:+44116xxxx100 at 1.1.1.1;user=phone>.
Call-ID: 82dafe20-03a2-4007-a9d8-f9e5efa2cb4f.
CSeq: 12746 INVITE.
Content-Length: 0.
.

U 2021/10/18 14:15:24.087736 1.1.1.1:5060 -> 2.2.2.2:5060 #59217
SIP/2.0 180 Ringing.
Require: 100rel.
Via: SIP/2.0/UDP 2.2.2.2:5060;branch=z9hG4bKe056.3c6d36.0.
Via: SIP/2.0/UDP 1.1.1.28:5060;received=1.1.1.28;rport=5060;branch=z9hG4bKPj5938cccb-0c93-4e5d-bead-6e3935d11729.
RSeq: 1.
Record-Route: <sip:2.2.2.2;lr;did=b67.9e943751>.
To: <sip:+44116xxxx100 at 1.1.1.1;user=phone>;tag=3843551724-754411543.
From: <sip:+44197xxxx014 at 1.1.1.28;user=phone>;tag=e8ade979-2439-47b4-94c9-6e67ea31c76d.
Call-ID: 82dafe20-03a2-4007-a9d8-f9e5efa2cb4f.
CSeq: 12746 INVITE.
Allow: UPDATE,PRACK,INFO,OPTIONS,BYE,INVITE,ACK,CANCEL.
Contact: <sip:+44116xxxx100 at 1.1.1.1:5060>.
Content-Length: 0.
.

U 2021/10/18 14:15:24.089132 2.2.2.2:5060 -> 1.1.1.1:5060 #59220
PRACK sip:+44116xxxx100 at 1.1.1.1:5060 SIP/2.0.
Via: SIP/2.0/UDP 2.2.2.2:5060;branch=z9hG4bKf056.534775a.0.
Via: SIP/2.0/UDP 1.1.1.28:5060;received=1.1.1.28;rport=5060;branch=z9hG4bKPj97ff6c6d-3bea-4e77-9a3d-707144abac65.
From: <sip:0197xxxx014 at 1.1.1.28>;tag=e8ade979-2439-47b4-94c9-6e67ea31c76d.
To: <sip:0116xxxx100 at 2.2.2.2>;tag=3843551724-754411543.
Call-ID: 82dafe20-03a2-4007-a9d8-f9e5efa2cb4f.
CSeq: 12747 PRACK.
RAck: 1 12746 INVITE.
Max-Forwards: 70.
User-Agent: Asterisk PBX GIT-master-cc127a999cM.
Content-Length:  0.
.

U 2021/10/18 14:15:24.391563 1.1.1.1:5060 -> 2.2.2.2:5060 #59223
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 2.2.2.2:5060;branch=z9hG4bKf056.534775a.0.
Via: SIP/2.0/UDP 1.1.1.28:5060;received=1.1.1.28;rport=5060;branch=z9hG4bKPj97ff6c6d-3bea-4e77-9a3d-707144abac65.
Record-Route: <sip:2.2.2.2;lr;did=b67.9e943751>.
To: <sip:+44116xxxx100 at 1.1.1.1;user=phone>;tag=3843551724-754411543.
From: <sip:+44197xxxx014 at 1.1.1.28;user=phone>;tag=e8ade979-2439-47b4-94c9-6e67ea31c76d.
Call-ID: 82dafe20-03a2-4007-a9d8-f9e5efa2cb4f.
CSeq: 12747 PRACK.
Allow: UPDATE,PRACK,INFO,OPTIONS,BYE,INVITE,ACK,CANCEL.
Content-Length: 0.
.

U 2021/10/18 14:15:24.392177 1.1.1.1:5060 -> 2.2.2.2:5060 #59225
SIP/2.0 180 Ringing.
Via: SIP/2.0/UDP 2.2.2.2:5060;branch=z9hG4bKe056.3c6d36.0.
Via: SIP/2.0/UDP 1.1.1.28:5060;received=1.1.1.28;rport=5060;branch=z9hG4bKPj5938cccb-0c93-4e5d-bead-6e3935d11729.
Record-Route: <sip:2.2.2.2;lr;did=b67.9e943751>.
To: <sip:+44116xxxx100 at 1.1.1.1;user=phone>;tag=3843551724-754411543.
From: <sip:+44197xxxx014 at 1.1.1.28;user=phone>;tag=e8ade979-2439-47b4-94c9-6e67ea31c76d.
Call-ID: 82dafe20-03a2-4007-a9d8-f9e5efa2cb4f.
CSeq: 12746 INVITE.
Allow: UPDATE,PRACK,INFO,OPTIONS,BYE,INVITE,ACK,CANCEL.
Contact: <sip:+44116xxxx100 at 1.1.1.1:5060>.
Content-Length: 0.
.

U 2021/10/18 14:15:34.601395 2.2.2.2:5060 -> 1.1.1.1:5060 #59276
ACK sip:+44116xxxx100 at 1.1.1.1:5060 SIP/2.0.
Via: SIP/2.0/UDP 2.2.2.2:5060;branch=z9hG4bKe056.3c6d36.2.
Via: SIP/2.0/UDP 1.1.1.28:5060;received=1.1.1.28;rport=5060;branch=z9hG4bKPj957d6fcf-11a6-4d72-9995-42e2082f3dc4.
From: <sip:0197xxxx014 at 1.1.1.28>;tag=e8ade979-2439-47b4-94c9-6e67ea31c76d.
To: <sip:0116xxxx100 at 2.2.2.2>;tag=3843551724-754411543.
Call-ID: 82dafe20-03a2-4007-a9d8-f9e5efa2cb4f.
CSeq: 12746 ACK.
Max-Forwards: 70.
User-Agent: Asterisk PBX GIT-master-cc127a999cM.
Content-Length:  0.
.






U 2021/10/18 14:15:34.599736 1.1.1.1:5060 -> 2.2.2.2:5060 #59273
SIP/2.0 200 OK.
Session-Expires: 1800;refresher=uas.
Require: timer.
Via: SIP/2.0/UDP 2.2.2.2:5060;branch=z9hG4bKe056.3c6d36.0.
Via: SIP/2.0/UDP 1.1.1.28:5060;received=1.1.1.28;rport=5060;branch=z9hG4bKPj5938cccb-0c93-4e5d-bead-6e3935d11729.
Record-Route: <sip:2.2.2.2;lr;did=b67.9e943751>.
Supported: from-change,replaces.
To: <sip:+44116xxxx100 at 1.1.1.1;user=phone>;tag=3843551724-754411543.
From: <sip:+44197xxxx014 at 1.1.1.28;user=phone>;tag=e8ade979-2439-47b4-94c9-6e67ea31c76d.
Call-ID: 82dafe20-03a2-4007-a9d8-f9e5efa2cb4f.
CSeq: 12746 INVITE.
Allow: UPDATE,PRACK,INFO,OPTIONS,BYE,INVITE,ACK,CANCEL.
Contact: <sip:+44116xxxx100 at 1.1.1.1:5060>.
Content-Type: application/sdp.
Accept: application/sdp.
Content-Length: 204.
.
v=0.
o=sbc-uk-bs05a 968179878 968179879 IN IP4 1.1.1.1.
s=sip call.
c=IN IP4 109.159.136.164.
t=0 0.
m=audio 64728 RTP/AVP 8 0.
a=rtpmap:8 PCMA/8000.
a=rtpmap:0 PCMU/8000.
a=ptime:20.
a=sendrecv.





U 2021/10/18 14:15:54.320803 1.1.1.1:5060 -> 2.2.2.2:5060 #59337
INVITE sip:asterisk at 1.1.1.28:5060;user=phone SIP/2.0.
Max-Forwards: 68.
Session-Expires: 1800;refresher=uac.
Min-SE: 600.
Supported: from-change,replaces,timer.
Route: <sip:2.2.2.2;lr;did=b67.9e943751>.
To: <sip:+44197xxxx014 at 1.1.1.28;user=phone>;tag=e8ade979-2439-47b4-94c9-6e67ea31c76d.
From: <sip:+44116xxxx100 at 1.1.1.1;user=phone>;tag=3843551724-754411543.
Call-ID: 82dafe20-03a2-4007-a9d8-f9e5efa2cb4f.
CSeq: 2 INVITE.
Allow: UPDATE,INFO,OPTIONS,BYE,INVITE,ACK,CANCEL.
Via: SIP/2.0/UDP 1.1.1.1:5060;branch=z9hG4bKddf9a25a15de8a098159cdcf08b1592f.
Contact: <sip:+44116xxxx100 at 1.1.1.1:5060>.
Content-Type: application/sdp.
Accept: application/sdp.
Content-Length: 338.
.
v=0.
o=sbc-uk-bs05a 968179878 968179880 IN IP4 1.1.1.1.
s=sip call.
c=IN IP4 109.159.136.164.
t=0 0.
m=audio 64728 RTP/AVP 8 0 3 111 9 101.
a=sendonly.
a=rtpmap:8 PCMA/8000.
a=rtpmap:0 PCMU/8000.
a=rtpmap:3 GSM/8000.
a=rtpmap:111 G726-32/8000.
a=rtpmap:9 G722/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=ptime:20.

U 2021/10/18 14:15:54.820921 1.1.1.1:5060 -> 2.2.2.2:5060 #59338
INVITE sip:asterisk at 1.1.1.28:5060;user=phone SIP/2.0.
Max-Forwards: 68.
Session-Expires: 1800;refresher=uac.
Min-SE: 600.
Supported: from-change,replaces,timer.
Route: <sip:2.2.2.2;lr;did=b67.9e943751>.
To: <sip:+44197xxxx014 at 1.1.1.28;user=phone>;tag=e8ade979-2439-47b4-94c9-6e67ea31c76d.
From: <sip:+44116xxxx100 at 1.1.1.1;user=phone>;tag=3843551724-754411543.
Call-ID: 82dafe20-03a2-4007-a9d8-f9e5efa2cb4f.
CSeq: 2 INVITE.
Allow: UPDATE,INFO,OPTIONS,BYE,INVITE,ACK,CANCEL.
Via: SIP/2.0/UDP 1.1.1.1:5060;branch=z9hG4bKddf9a25a15de8a098159cdcf08b1592f.
Contact: <sip:+44116xxxx100 at 1.1.1.1:5060>.
Content-Type: application/sdp.
Accept: application/sdp.
Content-Length: 338.
.
v=0.
o=sbc-uk-bs05a 968179878 968179880 IN IP4 1.1.1.1.
s=sip call.
c=IN IP4 109.159.136.164.
t=0 0.
m=audio 64728 RTP/AVP 8 0 3 111 9 101.
a=sendonly.
a=rtpmap:8 PCMA/8000.
a=rtpmap:0 PCMU/8000.
a=rtpmap:3 GSM/8000.
a=rtpmap:111 G726-32/8000.
a=rtpmap:9 G722/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=ptime:20.

U 2021/10/18 14:15:55.820998 1.1.1.1:5060 -> 2.2.2.2:5060 #59339
INVITE sip:asterisk at 1.1.1.28:5060;user=phone SIP/2.0.
Max-Forwards: 68.
Session-Expires: 1800;refresher=uac.
Min-SE: 600.
Supported: from-change,replaces,timer.
Route: <sip:2.2.2.2;lr;did=b67.9e943751>.
To: <sip:+44197xxxx014 at 1.1.1.28;user=phone>;tag=e8ade979-2439-47b4-94c9-6e67ea31c76d.
From: <sip:+44116xxxx100 at 1.1.1.1;user=phone>;tag=3843551724-754411543.
Call-ID: 82dafe20-03a2-4007-a9d8-f9e5efa2cb4f.
CSeq: 2 INVITE.
Allow: UPDATE,INFO,OPTIONS,BYE,INVITE,ACK,CANCEL.
Via: SIP/2.0/UDP 1.1.1.1:5060;branch=z9hG4bKddf9a25a15de8a098159cdcf08b1592f.
Contact: <sip:+44116xxxx100 at 1.1.1.1:5060>.
Content-Type: application/sdp.
Accept: application/sdp.
Content-Length: 338.
.
v=0.
o=sbc-uk-bs05a 968179878 968179880 IN IP4 1.1.1.1.
s=sip call.
c=IN IP4 109.159.136.164.
t=0 0.
m=audio 64728 RTP/AVP 8 0 3 111 9 101.
a=sendonly.
a=rtpmap:8 PCMA/8000.
a=rtpmap:0 PCMU/8000.
a=rtpmap:3 GSM/8000.
a=rtpmap:111 G726-32/8000.
a=rtpmap:9 G722/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=ptime:20.

U 2021/10/18 14:15:57.821101 1.1.1.1:5060 -> 2.2.2.2:5060 #59340
INVITE sip:asterisk at 1.1.1.28:5060;user=phone SIP/2.0.
Max-Forwards: 68.
Session-Expires: 1800;refresher=uac.
Min-SE: 600.
Supported: from-change,replaces,timer.
Route: <sip:2.2.2.2;lr;did=b67.9e943751>.
To: <sip:+44197xxxx014 at 1.1.1.28;user=phone>;tag=e8ade979-2439-47b4-94c9-6e67ea31c76d.
From: <sip:+44116xxxx100 at 1.1.1.1;user=phone>;tag=3843551724-754411543.
Call-ID: 82dafe20-03a2-4007-a9d8-f9e5efa2cb4f.
CSeq: 2 INVITE.
Allow: UPDATE,INFO,OPTIONS,BYE,INVITE,ACK,CANCEL.
Via: SIP/2.0/UDP 1.1.1.1:5060;branch=z9hG4bKddf9a25a15de8a098159cdcf08b1592f.
Contact: <sip:+44116xxxx100 at 1.1.1.1:5060>.
Content-Type: application/sdp.
Accept: application/sdp.
Content-Length: 338.
.
v=0.
o=sbc-uk-bs05a 968179878 968179880 IN IP4 1.1.1.1.
s=sip call.
c=IN IP4 109.159.136.164.
t=0 0.
m=audio 64728 RTP/AVP 8 0 3 111 9 101.
a=sendonly.
a=rtpmap:8 PCMA/8000.
a=rtpmap:0 PCMU/8000.
a=rtpmap:3 GSM/8000.
a=rtpmap:111 G726-32/8000.
a=rtpmap:9 G722/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=ptime:20.




More information about the Users mailing list