[SR-Users] Remove/Append headers in 200 canceling and 200 ok to BYE

Daniel-Constantin Mierla miconda at gmail.com
Thu Jan 12 17:23:26 CET 2017


Hello,

if you are looking to remove the server header (server signature), that
can be controlled via global parameters:

  - https://www.kamailio.org/wiki/cookbooks/4.4.x/core#server_header

Note that there is another header, User-Agent, that may be added by
Kamailio in local generate request. There is a global parameter to
control it as well.

If you want more than that, can you add a bit more details, because
CANCEL and BYE are processed differently. With which one you get issues?

Cheers,
Daniel

On 12/01/2017 17:00, Diego Nadares wrote:
> Hi List,
>
> I'm trying to add and remove some headers in 200 canceling and 200 ok
> to BYEs with no success.
>
> I don't know in which route to add my remove_hf and append_hf. It
> seems that I can't catch it on reply either on request route.
>
> I tried adding it in 
>
> event_route[tm:local-response] {
>         xlog("L_ERR", "TM LOCAL REPONSE!");
>         route(MANAGE_HEADERS);
> }
>
> This is my route to manage hdrs:
>
> route[MANAGE_HEADERS]{
>
>         xlog("L_ERR", "MANAGE HDRS !");
>
>         keep_hf("TH"); # for topoh
>
>         append("AHDR1:asdf\r\n");
>
>         return;
> }
>
> I suppose SERVER HDR should be removed but:
>
> U 2017/01/12 12:45:41.566733 172.16.213.38:5060
> <http://172.16.213.38:5060> -> 172.16.50.41:5060
> <http://172.16.50.41:5060>
> SIP/2.0 200 canceling.
> Via: SIP/2.0/UDP 172.16.50.41:5060;branch=z9hG4bKgg8ekd3080braugkm700.1.
> CSeq: 102 CANCEL.
> From: <sip:xx at 172.16.50.41
> <mailto:sip%3Axx at 172.16.50.41>>;tag=SD7b10b01-as5ba5e269.
> To: <sip:xxx at 172.16.213.38
> <mailto:sip%3Axxx at 172.16.213.38>>;tag=4a86e96addfb27a943bc86e1872032b6-0a8b.
> Call-ID: SD7b10b01-6a7d1089793bda79481f25cf88c023ed-c540dl1.
> Server: kamailio (4.4.4 (x86_64/linux)).
> Content-Length: 0.
>
>
> Any help will be very appreciated.
>
> Thanks in advance!
>
> Diego
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20170112/e49ccc21/attachment.html>


More information about the sr-users mailing list