[OpenSIPS-Users] local_route & append_hf

Mark Farmer farmorg at gmail.com
Wed Jan 13 15:39:55 EST 2021


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 <arsperger at 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 <farmorg at 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 at localhost>;tag=81adef1f13e5d48c34554037e606a809-cdf9
>> CSeq: 14 OPTIONS
>> Call-ID: 5918f5195ed9f0cf-315525 at 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 at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
>
> --
> Arsen Semenov
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>


-- 
Mark Farmer
farmorg at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20210113/775ecebb/attachment-0001.html>


More information about the Users mailing list