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

2017-01-16 Thread Daniel-Constantin Mierla
Hello, ok -- good that you could get what you need. As extra details that might be useful for you or others. Removing headers from received requests or replies can be done in two places: - inside request_route { ... } for requests - inside reply_route { ... } for replies The replies

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

2017-01-16 Thread Diego Nadares
Hi Daniel, With the minimal it's great. The headers are the ones that we can show. Now we are using the server_header and with this it's complete. Thanks! Diego. 2017-01-16 5:31 GMT-03:00 Daniel-Constantin Mierla : > The 200ok for CANCEL generated by Kamailio doesn't get

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

2017-01-16 Thread Daniel-Constantin Mierla
The 200ok for CANCEL generated by Kamailio doesn't get inside the onreply_route -- this block is only for SIP replies received by kamailio. However, the 200ok for CANCEL should have limited (minimal) number of headers. Which ones besides the Server do you want to remove? Cheers, Daniel On

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

2017-01-13 Thread Sergey Basov
Your are welcome. No, for local generated answer you shood do as Daniel suggested. But if kamailio generates CANCEL, than 200 ok is reply for it and 200 ok to another side is generated by kamailio itselfs... 13 янв. 2017 г. 8:00 PM пользователь "Diego Nadares" написал: >

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

2017-01-13 Thread Diego Nadares
Thanks Sergey! It works like a charm for BYEs. Is it working for you on 200cancelling generated by Kamailio? I tried the same work around with no success. if (is_method("CANCEL")) { if (t_check_trans()) { if(!t_is_set("onreply_route"))

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

2017-01-13 Thread Sergey Basov
Hi All. I have similar task. But i have to remove server and user-agent headers from all request an replyes. You can try: I have added route: # Fix user-agent and server route[RemoveHeader] { remove_hf("server"); remove_hf("user-agent"); return; } I use it form

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

2017-01-13 Thread Diego Nadares
If you need any additional data please let me know. Cheers, Diego 2017-01-12 15:04 GMT-03:00 Diego Nadares : > Hi Daniel! > > Thanks for your answer. The idea is to show only a few headers. In BYE > works great. I'm removing and adding the following hdrs: > > *User-Agent:

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

2017-01-12 Thread Diego Nadares
Hi Daniel! Thanks for your answer. The idea is to show only a few headers. In BYE works great. I'm removing and adding the following hdrs: *User-Agent: Kamailio. <---I will try what you said* *Supported:.* *Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, NOTIFY, INFO.* *Accept: application/sdp,

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

2017-01-12 Thread Daniel-Constantin Mierla
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.