[OpenSIPS-Users] local_route & append_hf

Mark Farmer farmorg at gmail.com
Wed Jan 13 12:27:15 EST 2021

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 at localhost>;tag=81adef1f13e5d48c34554037e606a809-cdf9
Call-ID: 5918f5195ed9f0cf-315525 at
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

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20210113/aeaa5b3c/attachment-0001.html>

More information about the Users mailing list