<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">:-)<div class=""><br class=""></div><div class="">The real reason is because I am not getting an ACK back from a 200 OK and I suspected that the remote peer doesn’t like the contact header I’m sending back:</div><div class=""><br class=""></div><div class=""><div class="">2018/09/24 16:38:19.089883 81.187.30.116:5060 -> 10.10.10.14:5080</div><div class="">INVITE <a href="sip:b73c6f29-0101-4802-afcd-efb63f1e6d8f@provider:5060" class="">sip:b73c6f29-0101-4802-afcd-efb63f1e6d8f@provider:5060</a> SIP/2.0</div><div class="">Via: SIP/2.0/UDP 81.187.30.116;branch=z9hG4bK2018092417381900003-1;rport</div><div class="">CSeq: 1 INVITE</div><div class="">Max-Forwards: 68</div><div class="">User-Agent: FireBrick/1.49.016</div><div class="">Call-ID: 2018092417381900003@2700-0344-0103-359</div><div class="">From: "07858 592563" <<a href="sip:07858592563@provider" class="">sip:07858592563@provider</a>>;tag=2018092417381900003</div><div class="">To: <<a href="sip:b73c6f29-0101-4802-afcd-efb63f1e6d8f@provider:5060" class="">sip:b73c6f29-0101-4802-afcd-efb63f1e6d8f@provider:5060</a>></div><div class="">Contact: <<a href="sip:2018092417381900003@81.x.x" class="">sip:2018092417381900003@81.x.x</a>.x></div><div class="">Content-Type: application/sdp</div><div class="">Content-Length: 188</div><div class=""><br class=""></div><div class="">The 200 that gets no ACK looks like this:</div><div class=""><br class=""></div><div class=""><div class="">2018/09/24 16:38:20.774332 10.10.10.14:5080 -> 81.x.x.x:5060</div><div class="">SIP/2.0 200 OK</div><div class="">Via: SIP/2.0/UDP 81.x.x.x.x;received=81.x.x.x;branch=z9hG4bK2018092417381900003-1;rport=5060</div><div class="">Record-Route: <<a href="sip:10.10.10.14:5080;lr;ftag=2018092417381900003" class="">sip:10.10.10.14:5080;lr;ftag=2018092417381900003</a>></div><div class="">From: "07858 xxxxxx" <<a href="sip:07858xxxxxx@provider" class="">sip:07858xxxxxx@provider</a>>;tag=2018092417381900003</div><div class="">To: <<a href="sip:b73c6f29-0101-4802-afcd-efb63f1e6d8f@provider:5060" class="">sip:b73c6f29-0101-4802-afcd-efb63f1e6d8f@provider:5060</a>>;tag=22v0rKN4eeN7Q</div><div class="">Call-ID: 2018092417381900003@2700-0344-0103-359</div><div class="">CSeq: 1 INVITE</div><div class="">Contact: <<a href="sip:b73c6f29-0101-4802-afcd-efb63f1e6d8f@10.10.10.12:5090;transport=udp" class="">sip:b73c6f29-0101-4802-afcd-efb63f1e6d8f@10.10.10.12:5090;transport=udp</a>></div><div class="">User-Agent: FreeSWITCH-mod_sofia/1.6.13+git~20161129T154639Z~e755b430da~64bit</div><div class="">Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY</div><div class="">Supported: timer, path, replaces</div><div class="">Allow-Events: talk, hold, conference, refer</div><div class="">Content-Type: application/sdp</div><div class="">Content-Disposition: session</div><div class="">Content-Length: 224</div></div><div class=""><br class=""></div><div class="">This is after invoking fix_nated_contact() on the reply.</div><div class=""><br class=""></div><div class="">So I thought I’d try to break the problem down and send back the exact same contact header in the 200 as I received in the original INVITE.</div><div class=""><br class=""></div><div class="">And to do that, I thought the easiest way to just hack this in temporarily was to with subst_hf().</div><div class=""><br class=""></div><div class="">I thought if I can craft the contact header manually and see if that makes a difference.</div><div class=""><br class="Apple-interchange-newline">
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On 24 Sep 2018, at 18:02, Alex Balashov <<a href="mailto:abalashov@evaristesys.com" class="">abalashov@evaristesys.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">The real question is, why are you rewriting a Contact header? :-) That<br class="">might be what you're really doing wrong ...<br class=""><br class="">On Mon, Sep 24, 2018 at 05:54:04PM +0100, Ben Hood wrote:<br class=""><br class=""><blockquote type="cite" class="">Hi,<br class=""><br class="">I’m wondering how to use subst_hf() properly.<br class=""><br class="">I’m trying to debug a broken flow by manually rewriting the contact header from<br class=""><br class="">Contact: <<a href="sip:b73c6f29-0101-4802-afcd-efb63f1e6d8f@10.10.10.12:5090;transport=udp" class="">sip:b73c6f29-0101-4802-afcd-efb63f1e6d8f@10.10.10.12:5090;transport=udp</a>><br class=""><br class="">to<br class=""><br class="">Contact: <<a href="sip:2018092417381900003@81.x.x.x" class="">sip:2018092417381900003@81.x.x.x</a>><br class=""><br class="">by using<br class=""><br class="">$var(ctct) = "<<a href="sip:2018092417381900003@81.x.x.x" class="">sip:2018092417381900003@81.x.x.x</a>>";<br class="">subst_hf("Contact", “/\<.+\>/$var(ctct)\r\n/", "a”);<br class=""><br class="">but the result is<br class=""><br class="">Contact: <<a href="sip:2018092417381900003@81.x.x.x" class="">sip:2018092417381900003@81.x.x.x</a>><br class=""><a href="sip:b73c6f29-0101-4802-afcd-efb63f1e6d8f@10.10.10.12:5090;transport=udp" class="">sip:b73c6f29-0101-4802-afcd-efb63f1e6d8f@10.10.10.12:5090;transport=udp</a><br class=""><br class="">Testing the regex with an external tool appears to match all of the original header, so I’m wondering why subst_hf doesn’t appear to rewrite the entire header.<br class=""><br class="">Is there something I’m doing wrong?<br class=""><br class="">TIA,<br class=""><br class="">Ben<br class=""><br class=""><br class=""><br class=""><br class="">_______________________________________________<br class="">Kamailio (SER) - Users Mailing List<br class="">sr-users@lists.kamailio.org<br class="">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users<br class=""></blockquote><br class="">-- <br class="">Alex Balashov | Principal | Evariste Systems LLC<br class=""><br class="">Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) <br class="">Web: <a href="http://www.evaristesys.com/" class="">http://www.evaristesys.com/</a>, <a href="http://www.csrpswitch.com/" class="">http://www.csrpswitch.com/</a><br class=""><br class="">_______________________________________________<br class="">Kamailio (SER) - Users Mailing List<br class=""><a href="mailto:sr-users@lists.kamailio.org" class="">sr-users@lists.kamailio.org</a><br class="">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users<br class=""></div></div></blockquote></div><br class=""></div></body></html>