Thanks Arsen, that makes sense. The trace is there so that I can use sngrep which in this case was misleading :)
Mark. On Wed, 13 Jan 2021 at 15:02, Arsen Semenov <arsper...@gmail.com> wrote: > Hi, > > 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. > So actually your header should be there. > > On Wed, Jan 13, 2021 at 5:30 PM Mark Farmer <farm...@gmail.com> wrote: > >> Hi everyone >> >> 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: >> >> OPTIONS sip:sip.pstnhub.microsoft.com:5061 SIP/2.0 >> Via: SIP/2.0/TLS xxx.xxx.xxx.xxx:5061;branch=z9hG4bK4e45.15b9f883.0 >> To: sip:sip.pstnhub.microsoft.com:5061 >> From: <sip:Anonymous@localhost>;tag=81adef1f13e5d48c34554037e606a809-cdf9 >> CSeq: 14 OPTIONS >> Call-ID: 5918f5195ed9f0cf-315525@10.150.50.110 >> Max-Forwards: 70 >> Content-Length: 0 >> User-Agent: OpenSIPS >> >> if (is_method("OPTIONS") && ($(rd{s.index, $var(dst)}) != NULL)) >> xlog("CUSTOM_LOG: local_route Matched OPTIONS to $rd"); >> append_hf("Contact: <sip:my.domain.com:5061 >> ;transport=tls>\r\n"); >> trace("htid","t"); >> >> It seems to be matching just fine: >> >> CUSTOM_LOG: local_route 5 >> CUSTOM_LOG: local_route Matched OPTIONS to sip3.pstnhub.microsoft.com >> >> I checked the doc for sipmsgops and append_hf does NOT say that it can be >> used in local_route. >> >> Any ideas? >> >> Many thanks >> Mark. >> >> >> _______________________________________________ >> Users mailing list >> Users@lists.opensips.org >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users >> > > > -- > Arsen Semenov > > _______________________________________________ > Users mailing list > Users@lists.opensips.org > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > -- Mark Farmer farm...@gmail.com
_______________________________________________ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users