[SR-Users] Manipulating User Agent header in dispatcher OPTIONS
Andrew White
andrew at uconnected.com.au
Wed Mar 27 16:26:50 CET 2019
Thanks Fred, works like a charm!
Might be worth adding to https://www.kamailio.org/wiki/tutorials/security/kamailio-security <https://www.kamailio.org/wiki/tutorials/security/kamailio-security> in the same section as masking the Server header. I never considered the cookbook for this, I’d gotten the original idea from the security suggestions page!
Thanks again :).
________________________________
Andrew White - Director
uConnected
Email: andrew at uconnected.com.au
Web: www.uConnected.com.au
> On 28 Mar 2019, at 2:19 am, Fred Posner <fred at palner.com> wrote:
>
> You can make it global with:
>
> user_agent_header="User-Agent: My Super SIP Server"
>
> https://www.kamailio.org/wiki/cookbooks/5.2.x/core#user_agent_header
>
>
> Fred Posner
> fred at qxork.com
> https://qxork.com
> Direct/SMS: +1 (224) 334-3733
> Direct/SMS: +1 (336) 439-3733
>
> Need Fred? Call Fred. 336-HEY-FRED
> Matrix: @fred:matrix.lod.com
>
> On 3/27/19 11:11 AM, Andrew White wrote:
>> Hi all,
>> I’ve set the server_header variable in my primary config, and I’ve got a catch in the default reply route to modify headers where required. I’m masking this value for security reasons, and filling it with my own value for vanity reasons :).
>> I’ve noticed that the OPTIONS packet that is send via the dispatcher module when probing mode is on contains a User-Agent field which has the full version and OS type. Unfortunately I don’t necessarily have trust of the end destination being dispatcher to, nor the packet switchers in-between.
>> How can I catch this OPTIONS packet to manipulate the value? It doesn’t appear to go through the REQUEST route or the ONSEND route.
>> Thanks!
>> ________________________________
>> Andrew White - Director
>> uConnected
>> Email: andrew at uconnected.com.au <mailto:andrew at uconnected.com.au>
>> Web: www.uConnected.com.au
>> _______________________________________________
>> Kamailio (SER) - Users Mailing List
>> sr-users at lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20190328/1d7a159a/attachment.html>
More information about the sr-users
mailing list