<div dir="ltr">Thanks Arsen, that makes sense.<div><br></div><div>The trace is there so that I can use sngrep which in this case was misleading :)</div><div><br></div><div>Mark.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 13 Jan 2021 at 15:02, Arsen Semenov <<a href="mailto:arsperger@gmail.com">arsperger@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div>The msg you've catched with trace("htid","t") you see it - as it is in the buffer, before the changes are applied. The diff (removed or appended headers) is being applied right before the message goes to wires. <div>So actually your header should be there. <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 13, 2021 at 5:30 PM Mark Farmer <<a href="mailto:farmorg@gmail.com" target="_blank">farmorg@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi everyone<div dir="ltr"></div><div><br></div><div>I have append_hf in my local_route to add the contact header in for MS Teams but the OPTIONS message does not contain the contact header:</div><div><br></div><div><div>OPTIONS sip:<a href="http://sip.pstnhub.microsoft.com:5061" target="_blank">sip.pstnhub.microsoft.com:5061</a> SIP/2.0</div><div>Via: SIP/2.0/TLS xxx.xxx.xxx.xxx:5061;branch=z9hG4bK4e45.15b9f883.0</div><div>To: sip:<a href="http://sip.pstnhub.microsoft.com:5061" target="_blank">sip.pstnhub.microsoft.com:5061</a></div><div>From: <sip:Anonymous@localhost>;tag=81adef1f13e5d48c34554037e606a809-cdf9</div><div>CSeq: 14 OPTIONS</div><div>Call-ID: <a href="mailto:5918f5195ed9f0cf-315525@10.150.50.110" target="_blank">5918f5195ed9f0cf-315525@10.150.50.110</a></div><div>Max-Forwards: 70</div><div>Content-Length: 0</div><div>User-Agent: OpenSIPS</div></div><div><br></div><div><div>if (is_method("OPTIONS") && ($(rd{s.index, $var(dst)}) != NULL))</div><div>                xlog("CUSTOM_LOG: local_route Matched OPTIONS to $rd");</div><div>                append_hf("Contact: <sip:my.domain.com:5061;transport=tls>\r\n");</div><div>                trace("htid","t");</div></div><div><br></div><div>It seems to be matching just fine:</div><div><br></div><div>CUSTOM_LOG: local_route 5<br></div><div>CUSTOM_LOG: local_route Matched OPTIONS to <a href="http://sip3.pstnhub.microsoft.com" target="_blank">sip3.pstnhub.microsoft.com</a><br></div><div><br></div><div>I checked the doc for sipmsgops and append_hf does NOT say that it can be used in local_route.</div><div><br></div><div>Any ideas?</div><div><br></div><div>Many thanks</div><div>Mark.</div><div><br></div><div><br></div></div></div></div></div></div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div>Arsen Semenov<br></div><div><br></div></div></div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Mark Farmer<br><a href="mailto:farmorg@gmail.com" target="_blank">farmorg@gmail.com</a></div>