<div dir="ltr">Hi,<br><br>I will put here an example of what I get in caller_contact with re-INVITE.<br><br>This is incoming INVITE:<br>------------------------<br>INVITE <a href="mailto:sip%3A7654321@192.168.224.50">sip:7654321@192.168.224.50</a>;transport=tcp SIP/2.0<br>Via: SIP/2.0/TCP 172.17.17.55:49677;rport;branch=z9hG4bKPj0c5e8cf59ad645119867f42d06c77a9f;alias<br>Max-Forwards: 70<br>From: <<a href="mailto:sip%3A1002@192.168.224.50">sip:1002@192.168.224.50</a>>;tag=b8b13e3376954c7dbaff8da68ee1d44a<br>To: <<a href="mailto:sip%3A7654321@192.168.224.50">sip:7654321@192.168.224.50</a>><br>Contact: <sip:1002@172.17.17.55:49677;transport=TCP;ob><br>Call-ID: 5e97161dba344eeeab00d40bc883e4e3<br>CSeq: 17799 INVITE<br>Route: <sip:4.4.4.2;transport=tcp;lr><br>....<br>------------------------<br>This is forwarded INVITE:<br>------------------------<br>INVITE <a href="mailto:sip%3A7654321@192.168.224.50">sip:7654321@192.168.224.50</a>;transport=tcp SIP/2.0<br>Record-Route: <sip:192.168.224.91:5090;transport=tcp;r2=on;lr;ftag=b8b13e3376954c7dbaff8da<br>68ee1d44a;nat=yes;did=61f.b845fdd7><br>Record-Route: <sip:4.4.4.2:5060;transport=tcp;r2=on;lr;ftag=b8b13e3376954c7dbaff8da68ee1d4<br>4a;nat=yes;did=61f.b845fdd7><br>Via: SIP/2.0/TCP 192.168.224.91:5090;branch=z9hG4bK86c6.385ee382.0;i=a51f1803<br>Via: SIP/2.0/TCP 172.17.17.55:49677;received=4.4.4.1;rport=49677;branch=z9hG4bKPj0c5e8cf59<br>ad645119867f42d06c77a9f;alias<br>Max-Forwards: 69<br>From: <<a href="mailto:sip%3A1002@192.168.224.50">sip:1002@192.168.224.50</a>>;tag=b8b13e3376954c7dbaff8da68ee1d44a<br>To: <<a href="mailto:sip%3A7654321@192.168.224.50">sip:7654321@192.168.224.50</a>><br>Contact: <sip:1002@4.4.4.1:49677;transport=TCP;ob><br>Call-ID: 5e97161dba344eeeab00d40bc883e4e3<br>CSeq: 17799 INVITE<br>...<br>------------------------<br>dlg_list:<br>------------------------<br>{<br> "Dialogs": [<br> {<br> "ID": "61f.b845fdd7",<br> "db_id": "16589275485323",<br> "state": 4,<br> "user_flags": "DISPATCHED_FLG",<br> "timestart": 1708744350,<br> "datestart": "2024-02-24 06:12:30",<br> "timeout": 1708787549,<br> "dateout": "2024-02-24 18:12:29",<br> "callid": "5e97161dba344eeeab00d40bc883e4e3",<br> "from_uri": "<a href="mailto:sip%3A1002@192.168.224.50">sip:1002@192.168.224.50</a>",<br> "to_uri": "<a href="mailto:sip%3A7654321@192.168.224.50">sip:7654321@192.168.224.50</a>",<br> "caller_tag": "b8b13e3376954c7dbaff8da68ee1d44a",<br> "caller_contact": "sip:1002@4.4.4.1:49677;transport=TCP;ob",<br> "callee_cseq": "0",<br> ...<br>------------------------<br>For now caller_contact has the value "sip:1002@4.4.4.1:49677;transport=TCP;ob".<br><br><br>Then i do re-INVITE from caller:<br>------------------------<br>INVITE sip:192.168.224.50:5060;transport=tcp SIP/2.0<br>Via: SIP/2.0/TCP 172.17.17.55:49677;rport;branch=z9hG4bKPjdfcc1bcad866428c8d43d1fbcfeaba54;alias<br>Max-Forwards: 70<br>From: <<a href="mailto:sip%3A1002@192.168.224.50">sip:1002@192.168.224.50</a>>;tag=b8b13e3376954c7dbaff8da68ee1d44a<br>To: <<a href="mailto:sip%3A7654321@192.168.224.50">sip:7654321@192.168.224.50</a>>;tag=008162B2-5CFB-15D9-810C-32E0A8C0AA77-3<br>Contact: <sip:1002@172.17.17.55:49677;transport=TCP;ob><br>Call-ID: 5e97161dba344eeeab00d40bc883e4e3<br>CSeq: 17800 INVITE<br>...<br>------------------------<br>forwarded re-INVITE:<br>------------------------<br>INVITE sip:192.168.224.50:5060;transport=tcp SIP/2.0<br>Via: SIP/2.0/TCP 192.168.224.91:5090;branch=z9hG4bKbb97.f5810342.0;i=a51f1803<br>Via: SIP/2.0/TCP 172.17.17.55:49677;received=4.4.4.1;rport=49677;branch=z9hG4bKPjdfcc1bcad<br>866428c8d43d1fbcfeaba54;alias<br>Max-Forwards: 69<br>From: <<a href="mailto:sip%3A1002@192.168.224.50">sip:1002@192.168.224.50</a>>;tag=b8b13e3376954c7dbaff8da68ee1d44a<br>To: <<a href="mailto:sip%3A7654321@192.168.224.50">sip:7654321@192.168.224.50</a>>;tag=008162B2-5CFB-15D9-810C-32E0A8C0AA77-3<br>Contact: <sip:1002@4.4.4.1:49677;transport=TCP;ob><br>Call-ID: 5e97161dba344eeeab00d40bc883e4e3<br>CSeq: 17800 INVITE<br>...<br>------------------------<br>dlg_list:<br>------------------------<br>{<br> "Dialogs": [<br> {<br> "ID": "61f.b845fdd7",<br> "db_id": "16589275485323",<br> "state": 4,<br> "user_flags": "DISPATCHED_FLG",<br> "timestart": 1708744350,<br> "datestart": "2024-02-24 06:12:30",<br> "timeout": 1708787549,<br> "dateout": "2024-02-24 18:12:29",<br> "callid": "5e97161dba344eeeab00d40bc883e4e3",<br> "from_uri": "<a href="mailto:sip%3A1002@192.168.224.50">sip:1002@192.168.224.50</a>",<br> "to_uri": "<a href="mailto:sip%3A7654321@192.168.224.50">sip:7654321@192.168.224.50</a>",<br> "caller_tag": "b8b13e3376954c7dbaff8da68ee1d44a",<br> "caller_contact": "<a href="mailto:sip%3A1002@4.4.4.1">sip:1002@4.4.4.1</a>\ufffd",<br> "callee_cseq": "0",<br> ...<br>}<br>------------------------<br>Now caller_contact has the value "<a href="mailto:sip%3A1002@4.4.4.1">sip:1002@4.4.4.1</a>\ufffd".<br><br>If i do re-INVITE from callee side:<br>------------------------<br>INVITE sip:1002@4.4.4.1:49677;transport=TCP;ob SIP/2.0<br>From: <<a href="mailto:sip%3A7654321@192.168.224.50">sip:7654321@192.168.224.50</a>>;tag=008162B2-5CFB-15D9-810C-32E0A8C0AA77-3<br>To: <<a href="mailto:sip%3A1002@192.168.224.50">sip:1002@192.168.224.50</a>>;tag=b8b13e3376954c7dbaff8da68ee1d44a<br>Call-ID: 5e97161dba344eeeab00d40bc883e4e3<br>CSeq: 1 INVITE<br>Content-Length: 310<br>Content-Type: application/sdp<br>Via: SIP/2.0/TCP 192.168.224.50:5060;branch=z9hG4bK008162BC-5CFB-15D9-810C-32E0A8C0AA77-7<br>Contact: <sip:192.168.224.50:5060;transport=tcp><br>------------------------<br>forwarded re-INVITE:<br>------------------------<br>INVITE sip:1002@4.4.4.1:49677;transport=TCP;ob SIP/2.0<br>From: <<a href="mailto:sip%3A7654321@192.168.224.50">sip:7654321@192.168.224.50</a>>;tag=008162B2-5CFB-15D9-810C-32E0A8C0AA77-3<br>To: <<a href="mailto:sip%3A1002@192.168.224.50">sip:1002@192.168.224.50</a>>;tag=b8b13e3376954c7dbaff8da68ee1d44a<br>Call-ID: 5e97161dba344eeeab00d40bc883e4e3<br>CSeq: 1 INVITE<br>Content-Length: 302<br>Content-Type: application/sdp<br>Via: SIP/2.0/TCP 4.4.4.2:5060;branch=z9hG4bKd4ff.c838c3a3.0;i=881f1803<br>Via: SIP/2.0/TCP 192.168.224.50:5060;rport=36702;received=192.168.224.50;branch=z9hG4bK008162BC-5CFB-15D9-810C-32E0A8C0AA77-7<br>Contact: <sip:192.168.224.50:5060;transport=tcp><br>------------------------<br>dlg_list<br>------------------------<br>{<br> "Dialogs": [<br> {<br> "ID": "61f.b845fdd7",<br> "db_id": "16589275485323",<br> "state": 4,<br> "user_flags": "DISPATCHED_FLG",<br> "timestart": 1708744350,<br> "datestart": "2024-02-24 06:12:30",<br> "timeout": 1708787549,<br> "dateout": "2024-02-24 18:12:29",<br> "callid": "5e97161dba344eeeab00d40bc883e4e3",<br> "from_uri": "<a href="mailto:sip%3A1002@192.168.224.50">sip:1002@192.168.224.50</a>",<br> "to_uri": "<a href="mailto:sip%3A7654321@192.168.224.50">sip:7654321@192.168.224.50</a>",<br> "caller_tag": "b8b13e3376954c7dbaff8da68ee1d44a",<br> "caller_contact": "sip:1002@4.4.4.1:49677;transport=TCP;ob",<br> "callee_cseq": "2",<br> ...<br>------------------------<br>caller_contact value in dlg_list starts to look like it should be: "sip:1002@4.4.4.1:49677;transport=TCP;ob" .</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">пт, 23 февр. 2024 г. в 14:59, Bogdan-Andrei Iancu <<a href="mailto:bogdan@opensips.org">bogdan@opensips.org</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>
<div>
<font face="monospace">Hi Denis,<br>
<br>
Could post the actual Contact hdr as received (network level like
pcap or trace) by OpenSIPS from both caller and callee parties ?<br>
<br>
Regards<br>
</font>
<pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="https://www.opensips-solutions.com" target="_blank">https://www.opensips-solutions.com</a>
<a href="https://www.siphub.com" target="_blank">https://www.siphub.com</a></pre>
<div>On 22.02.2024 07:34, Denis Lyubimov
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Hi all,<br>
<br>
My network scheme is <br>
softphone <-nat-external network-nat-> opensips
<-local network-> sip servers <-local network->
softphone<br>
No b2b or topology_hiding modules are used.<br>
</div>
<div>Opensips versions I tried: 3.4.4-1 and 3.4.3-1.</div>
<div><br>
I make a call from a phone behind nat to sip server via
opensips, so I use the fix_contact function from
nat_traversal/fix_nated_contact from nathelper for each
request.<br>
On the first invite I get "caller_contact":
<a>"sip:1002@3.3.3.1:49682;transport=TCP;ob"</a> in "opensips-cli -x
mi dlg_list".<br>
If caller side makes re-invite, then i see this
"caller_contact": "\u0001" for nat_traversal, <br>
and this "caller_contact": "<a href="mailto:sip%3A1002@3.3.3.1" target="_blank">sip:1002@3.3.3.1</a>\ufffd"
with nathelper in dlg_list.<br>
In that case dlg_send_sequential mi dialog function cannot be
used cause caller contact cannot be read.<br>
<br>
Also if i make a re-invite from the caller side then the
caller_contact field in dlg_list starts looking normal.<br>
<br>
Am I doing something wrong with fixing the nated contact
field?<br>
<br>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</div>
</blockquote></div>