[SR-Users] remove_hf("Bla") for all requests

Joel Serrano joel at textplus.com
Wed Sep 12 17:18:35 CEST 2018


I don't know if I understood correctly, but have you tried just adding
the remove_hf("User-Agent")
in the onreply_route just as you did in the request_route?

On Wed, Sep 12, 2018 at 7:37 AM, Sergiu Pojoga <pojogas at gmail.com> wrote:

> Hi there,
>
> Say I need to remove_hf("User-Agent") for all requests, back and forth. So
> I add it at the top of *request_route *section. However, replies don't
> seem to be affected by it.
>
> Do I really need to arm a *t_on_reply route* for this simple purpose?
> "Problem" with that is that *route[RELAY]* already has some
> *onreply_route* block doing things like *NATMANAGE *for some methods and
> as far as I know - only one* onreply_route* can be armed for a request?
>
> route[RELAY] {
>
> ...
>
> if (is_method("INVITE|SUBSCRIBE|UPDATE")) {
>     if(!t_is_set("onreply_route")) t_on_reply("MANAGE_REPLY");
> }
> t_relay();
>
> }
>
> onreply_route[MANAGE_REPLY] {
>
> ...
>
> route(NATMANAGE);
>
> }
>
> Any suggestions? Thanks.
>
> _______________________________________________
> 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/20180912/f7e0e1fd/attachment.html>


More information about the sr-users mailing list