<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hello,</p>
    <p>ok -- good that you could get what you need.</p>
    <p>As extra details that might be useful for you or others.</p>
    <p>Removing headers from received requests or replies can be done in
      two places:</p>
    <p>  - inside request_route { ... } for requests</p>
    <p>  - inside reply_route { ... } for replies</p>
    <p>The replies generated by Kamailio should have only required
      headers by SIP, if you want to add more, you have to use
      append_to_reply() function from textops module.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="moz-cite-prefix">On 16/01/2017 13:56, Diego Nadares
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAP-r+epbfOXTfX9ryaqTmhjZ_--eAm33fKc=7EqiVZPZmYjyxw@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi Daniel,
        <div><br>
        </div>
        <div>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.</div>
        <div><br>
        </div>
        <div>Thanks!</div>
        <div><br>
        </div>
        <div>Diego.</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">2017-01-16 5:31 GMT-03:00
          Daniel-Constantin Mierla <span dir="ltr"><<a
              moz-do-not-send="true" href="mailto:miconda@gmail.com"
              target="_blank">miconda@gmail.com</a>></span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <p>The 200ok for CANCEL generated by Kamailio doesn't get
                inside the onreply_route -- this block is only for SIP
                replies received by kamailio.</p>
              <p>However, the 200ok for CANCEL should have limited
                (minimal) number of headers. Which ones besides the
                Server do you want to remove?</p>
              <p>Cheers,<br>
                Daniel<br>
              </p>
              <div>
                <div class="h5">
                  <div class="m_6293490847849254866moz-cite-prefix">On
                    13/01/2017 19:00, Diego Nadares wrote:<br>
                  </div>
                  <blockquote type="cite">
                    <div dir="ltr">Thanks Sergey! It works like a charm
                      for BYEs.
                      <div><br>
                      </div>
                      <div>Is it working for you on 200cancelling
                        generated by Kamailio?<br>
                      </div>
                      <div><br>
                      </div>
                      <div>
                        <div>I tried the same work around with no
                          success. </div>
                        <div><br>
                        </div>
                        <div>
                          <div> if (is_method("CANCEL")) {</div>
                          <div>                if (t_check_trans()) {</div>
                          <div>                       <span
                              style="font-family:sans-serif;font-size:10.112px"> </span><span
style="font-family:sans-serif;font-size:10.112px">if(!t_is_set("onreply_route"<wbr>))</span></div>
                          <span
                            style="font-family:sans-serif;font-size:10.112px"> 
                                                                     
                            t_on_reply("MANAGE_REPLY_ON_<wbr>CANCEL</span><span
style="font-family:sans-serif;font-size:10.112px">");</span>
                          <div>                        route(RELAY);</div>
                          <div>                }</div>
                          <div>                exit;</div>
                          <div>        }</div>
                        </div>
                      </div>
                      <div><br>
                      </div>
                      <div><br>
                      </div>
                      <div>Thanks again,</div>
                      <div><br>
                      </div>
                      <div>Diego<br>
                        <div><br>
                        </div>
                        <div><br>
                        </div>
                      </div>
                    </div>
                    <div class="gmail_extra"><br>
                      <div class="gmail_quote">2017-01-13 13:27
                        GMT-03:00 Sergey Basov <span dir="ltr"><<a
                            moz-do-not-send="true"
                            href="mailto:sergey.v.basov@gmail.com"
                            target="_blank">sergey.v.basov@gmail.com</a>></span>:<br>
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex">
                          <div dir="auto">
                            <div>Hi All. 
                              <div dir="auto"><br>
                              </div>
                              <div dir="auto">I have similar task. But i
                                have to remove server and user-agent
                                headers from all request an replyes. </div>
                              <div dir="auto"><br>
                              </div>
                              <div dir="auto">You can try:</div>
                              <div dir="auto"><br>
                              </div>
                              <div dir="auto"><br
                                  style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">I
                                  have added route:</span><br
                                  style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">#
                                  Fix user-agent and server</span><br
                                  style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">route[RemoveHeader]
                                  {</span><br
                                  style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px"> 
                                        remove_hf("server");</span><br
                                  style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px"> 
                                        remove_hf("user-agent");</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px"> 
                                        return;</span><br
                                  style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">}</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <br
                                  style="font-family:sans-serif;font-size:10.112px">
                                <br
                                  style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">I
                                  use it form</span><br
                                  style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">request_route
                                  {</span><br
                                  style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">....</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">route(RemoveHeader);</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">.....</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">}</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <br
                                  style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">failure_route[---
                                  all what i have ---] {</span><br
                                  style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">....</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">route(RemoveHeader);</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">.....</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">}</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <br
                                  style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">branch_route[MANAGE_BRANCH]{</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">....</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">route(RemoveHeader);</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">.....</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">}</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <br
                                  style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">onreply_route[MANAGE_REPLY]
                                  {</span><br
                                  style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">....</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">route(RemoveHeader);</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">.....</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">}</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <br
                                  style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">failure_route[MANAGE_FAILURE]
                                  {</span><br
                                  style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">....</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">route(RemoveHeader);</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">.....</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">}</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <br
                                  style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">Seems
                                  all is fine It removes headers in all
                                  packets except 200 OK on BYE....</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">After
                                  debugging script I does not seen in
                                  which route this 200 Ok goes..</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">But
                                  if I adding next to</span><br
                                  style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">route[RELAY]
                                  {</span><br
                                  style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">....</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px"> 
                                        if (is_method("BYE")) {</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px"> 
                                                xlog("L_INFO","route
                                  RELAY method BYE \n");</span><br
                                  style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px"> 
                                               
                                  if(!t_is_set("onreply_route"))</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">t_on_reply("MANAGE_REPLY_ON_</span><span
style="font-family:sans-serif;font-size:10.112px">BY<wbr>E");</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px"> 
                                        }</span><br
                                  style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">.......</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">}</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <br
                                  style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">and
                                  adding route</span><br
                                  style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">onreply_route[MANAGE_REPLY_ON_</span><span
style="font-family:sans-serif;font-size:10.112px"><wbr>BYE] {</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px"> 
                                        route(RemoveHeader);</span><br
                                  style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px"> 
                                        xlog("L_INFO","route
                                  MANAGE_REPLY_ON_BYE entered \n");</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">}</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <br
                                  style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">this
                                  200 Ok successfully goes to
                                  MANAGE_REPLY_ON_BYE route and headers</span><br
style="font-family:sans-serif;font-size:10.112px">
                                <span
                                  style="font-family:sans-serif;font-size:10.112px">are
                                  removed.</span><br>
                              </div>
                              <div dir="auto"><br>
                              </div>
                              <br>
                              <div class="gmail_extra"><br>
                                <div class="gmail_quote">13 янв. 2017 г.
                                  4:59 PM пользователь "Diego Nadares"
                                  <<a moz-do-not-send="true"
                                    href="mailto:dnadares@gmail.com"
                                    target="_blank">dnadares@gmail.com</a>>
                                  написал:
                                  <div>
                                    <div class="m_6293490847849254866h5"><br
                                        type="attribution">
                                      <blockquote
                                        class="m_6293490847849254866m_-455791431899295284quote"
                                        style="margin:0 0 0
                                        .8ex;border-left:1px #ccc
                                        solid;padding-left:1ex">
                                        <div dir="ltr">
                                          <div>If you need any
                                            additional data please let
                                            me know.</div>
                                          <div><br>
                                          </div>
                                          <div>Cheers,</div>
                                          <div><br>
                                          </div>
                                          <div>Diego</div>
                                        </div>
                                        <div
                                          class="m_6293490847849254866m_-455791431899295284elided-text">
                                          <div class="gmail_extra"><br>
                                            <div class="gmail_quote">2017-01-12
                                              15:04 GMT-03:00 Diego
                                              Nadares <span dir="ltr"><<a
                                                  moz-do-not-send="true"
href="mailto:dnadares@gmail.com" target="_blank">dnadares@gmail.com</a>></span>:<br>
                                              <blockquote
                                                class="gmail_quote"
                                                style="margin:0 0 0
                                                .8ex;border-left:1px
                                                #ccc
                                                solid;padding-left:1ex">
                                                <div dir="ltr">Hi
                                                  Daniel!
                                                  <div><br>
                                                  </div>
                                                  <div>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:</div>
                                                  <div>
                                                    <div><b><br>
                                                      </b></div>
                                                    <div><b>User-Agent:
                                                        Kamailio.
                                                        <---I will
                                                        try what you
                                                        said</b></div>
                                                    <div><b>Supported:.</b></div>
                                                    <div><b>Allow:
                                                        INVITE, OPTIONS,
                                                        BYE, CANCEL,
                                                        ACK, NOTIFY,
                                                        INFO.</b></div>
                                                    <div><b>Accept:
                                                        application/sdp,
                                                        application/gtd.</b></div>
                                                  </div>
                                                  <div><br>
                                                  </div>
                                                  <div>For example in
                                                    following messages (
                                                    Kamailio is
                                                    172.16.213.38)</div>
                                                  <div><br>
                                                  </div>
                                                  <div>
                                                    <div>#</div>
                                                    <div>U 2017/01/12
                                                      14:51:10.593782 <a
moz-do-not-send="true" href="http://172.16.200.159:57270"
                                                        target="_blank">172.16.200.159:57270</a>
                                                      -> <a
                                                        moz-do-not-send="true"
href="http://172.16.213.38:5060" target="_blank">172.16.213.38:5060</a></div>
                                                  </div>
                                                  <div>
                                                    <div>BYE <a
                                                        moz-do-not-send="true"
class="m_6293490847849254866moz-txt-link-freetext">sip:127.0.0.8:5060;line=sr-987</a><wbr>9879879798**
                                                      SIP/2.0.</div>
                                                    <div>Via:
                                                      SIP/2.0/UDP
                                                       172.16.200.159:5060;branch=z9<wbr>hG4bK12B9605ED.</div>
                                                    <div>From: xx <<a
moz-do-not-send="true" href="mailto:sip%3Axx@172.16.213.38"
                                                        target="_blank">sip:xx@172.16.213.38</a>>;tag=95E<wbr>7E4A4-23F2.</div>
                                                    <div>To: xxx <<a
moz-do-not-send="true" href="mailto:sip%3Axxx@172.16.213.38"
                                                        target="_blank">sip:xxx@172.16.213.38</a>>;tag=SD<wbr>mmb7201-as0518eb07.</div>
                                                    <div>Date: Thu, 12
                                                      Jan 2017 17:51:05
                                                      GMT.</div>
                                                    <div>Call-ID:
                                                      SDmmb7201-f5ded6cf4cd5d84736b0<wbr>88e39277e8db-c540dl1.</div>
                                                    <div>User-Agent:
                                                      Cisco-SIPGateway/IOS-12.x.</div>
                                                    <div>Max-Forwards:
                                                      15.</div>
                                                    <div>Route: <<a
                                                        moz-do-not-send="true"
class="m_6293490847849254866moz-txt-link-freetext">sip:172.16.213.38;lr;ftag=SDm</a><wbr>mb7201-as0518eb07;did=bf.cab>.</div>
                                                    <div>Timestamp:
                                                      1484243470.</div>
                                                    <div>CSeq: 101 BYE.</div>
                                                    <div>Reason:
                                                      Q.850;cause=16.</div>
                                                    <div>Content-Disposition:
signal;handling=optional.</div>
                                                    <div>Content-Type:
                                                      application/gtd.</div>
                                                    <div>Content-Length:
                                                      26.</div>
                                                    <div>.</div>
                                                    <div>.....</div>
                                                    <div>.</div>
                                                    <div><br>
                                                    </div>
                                                    <div>#</div>
                                                    <div>U 2017/01/12
                                                      14:51:10.647164 <a
moz-do-not-send="true" href="http://172.16.213.38:5060" target="_blank">172.16.213.38:5060</a>
                                                      -> <a
                                                        moz-do-not-send="true"
href="http://172.16.50.41:5060" target="_blank">172.16.50.41:5060</a></div>
                                                    <div>BYE <a
                                                        moz-do-not-send="true"
href="http://sip:xxx@172.16.50.41:5060" target="_blank">sip:xxx@172.16.50.41:5060</a>;tran<wbr>sport=udp
                                                      SIP/2.0.</div>
                                                    <div>Via:
                                                      SIP/2.0/UDP
                                                      172.16.213.38;branch=z9hG4bKdc<wbr>f6.f898feef02d601e36a22d26bf3a<wbr>e5e4a.0.</div>
                                                    <div>Via:
                                                      SIP/2.0/UDP
                                                      127.0.0.8;branch=z9hG4bKsr-asd<wbr>fasdfF.</div>
                                                    <div>From: xx <<a
moz-do-not-send="true" href="mailto:sip%3Axx@172.16.213.38"
                                                        target="_blank">sip:xx@172.16.213.38</a>>;tag=95E<wbr>7E4A4-23F2.</div>
                                                    <div>To: xxx <<a
moz-do-not-send="true" href="mailto:sip%3Axxx@172.16.50.41"
                                                        target="_blank">sip:xxx@172.16.50.41</a>>;tag=SDm<wbr>mb7201-as0518eb07.</div>
                                                    <div>Call-ID:
                                                      SDmmb7201-f5ded6cf4cd5d84736b0<wbr>88e39277e8db-c540dl1.</div>
                                                    <div>Max-Forwards:
                                                      14.</div>
                                                    <div>CSeq: 101 BYE.</div>
                                                    <div>Content-Type:
                                                      application/gtd.</div>
                                                  </div>
                                                  <div>
                                                    <div>Content-Length:
                                                      26.</div>
                                                    <div><b>User-Agent:
                                                        Kamailio.</b></div>
                                                    <div><b>Supported:.</b></div>
                                                    <div><b>Allow:
                                                        INVITE, OPTIONS,
                                                        BYE, CANCEL,
                                                        ACK, NOTIFY,
                                                        INFO.</b></div>
                                                    <div><b>Accept:
                                                        application/sdp,
                                                        application/gtd.</b></div>
                                                    <div>.</div>
                                                    <div>......</div>
                                                  </div>
                                                  <div><br>
                                                  </div>
                                                  <div>But in ok I can't</div>
                                                  <div><br>
                                                  </div>
                                                  <div>
                                                    <div>#</div>
                                                    <div>U 2017/01/12
                                                      14:51:10.653701 <a
moz-do-not-send="true" href="http://172.16.50.41:5060" target="_blank">172.16.50.41:5060</a>
                                                      -> <a
                                                        moz-do-not-send="true"
href="http://172.16.213.38:5060" target="_blank">172.16.213.38:5060</a></div>
                                                    <div>SIP/2.0 200 OK.</div>
                                                    <div>Via:
                                                      SIP/2.0/UDP
                                                      172.16.213.38;branch=z9hG4bKdc<wbr>f6.f898feef02d601e36a22d26bf3a<wbr>e5e4a.0.</div>
                                                    <div>Via:
                                                      SIP/2.0/UDP
                                                      127.0.0.8;branch=z9hG4bKsr-sad<wbr>fasdf.</div>
                                                    <div>From: xx <<a
moz-do-not-send="true" href="mailto:sip%3Axx@172.16.213.38"
                                                        target="_blank">sip:xx@172.16.213.38</a>>;tag=95E<wbr>7E4A4-23F2.</div>
                                                    <div>To: xxx <<a
moz-do-not-send="true" href="mailto:sip%3Axxx@172.16.50.41"
                                                        target="_blank">sip:xxx@172.16.50.41</a>>;tag=SDm<wbr>mb7201-as0518eb07.</div>
                                                    <div>Call-ID:
                                                      SDmmb7201-f5ded6cf4cd5d84736b0<wbr>88e39277e8db-c540dl1.</div>
                                                    <div>CSeq: 101 BYE.</div>
                                                    <div>Server:
                                                      Asterisk PBX
                                                      11.17.0.</div>
                                                    <div>Allow: INVITE,
                                                      ACK, CANCEL,
                                                      OPTIONS, BYE,
                                                      REFER, SUBSCRIBE,
                                                      NOTIFY, INFO,
                                                      PUBLISH, MESSAGE.</div>
                                                    <div>Supported:
                                                      replaces, timer.</div>
                                                    <div>Content-Length:
                                                      0.</div>
                                                    <div>.</div>
                                                    <div>FY, INFO.</div>
                                                    <div>Accept</div>
                                                    <div>#</div>
                                                    <div>U 2017/01/12
                                                      14:51:10.669460 <a
moz-do-not-send="true" href="http://172.16.213.38:5060" target="_blank">172.16.213.38:5060</a>
                                                      -> <a
                                                        moz-do-not-send="true"
href="http://172.16.200.159:5060" target="_blank">172.16.200.159:5060</a></div>
                                                    <div>SIP/2.0 200 OK.</div>
                                                    <div>Via:
                                                      SIP/2.0/UDP
                                                       172.16.200.159:5060;branch=z9<wbr>hG4bK12B9605ED.</div>
                                                    <div>From: xx <<a
moz-do-not-send="true" href="mailto:sip%3Axx@172.16.213.38"
                                                        target="_blank">sip:xx@172.16.213.38</a>>;tag=95E<wbr>7E4A4-23F2.</div>
                                                    <div>To: xxx <<a
moz-do-not-send="true" href="mailto:sip%3Axxx@172.16.213.38"
                                                        target="_blank">sip:xxx@172.16.213.38</a>>;tag=SD<wbr>mmb7201-as0518eb07.</div>
                                                    <div>Call-ID:
                                                      SDmmb7201-f5ded6cf4cd5d84736b0<wbr>88e39277e8db-c540dl1.</div>
                                                    <div>CSeq: 101 BYE.</div>
                                                    <div><b>Server:
                                                        Asterisk PBX
                                                        11.17.0.</b></div>
                                                    <div><b>Allow:
                                                        INVITE, ACK,
                                                        CANCEL, OPTIONS,
                                                        BYE, REFER,
                                                        SUBSCRIBE,
                                                        NOTIFY, INFO,
                                                        PUBLISH,
                                                        MESSAGE.</b></div>
                                                    <div><b>Supported:
                                                        replaces, timer.</b></div>
                                                    <div>Content-Length:
                                                      0.</div>
                                                    <div>.</div>
                                                  </div>
                                                  <div><br>
                                                  </div>
                                                  <div><br>
                                                  </div>
                                                </div>
                                                <div
class="m_6293490847849254866m_-455791431899295284m_-532204234115859028HOEnZb">
                                                  <div
class="m_6293490847849254866m_-455791431899295284m_-532204234115859028h5">
                                                    <div
                                                      class="gmail_extra"><br>
                                                      <div
                                                        class="gmail_quote">2017-01-12
                                                        13:23 GMT-03:00
Daniel-Constantin Mierla <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span>:<br>
                                                        <blockquote
                                                          class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                                          <div
                                                          bgcolor="#FFFFFF"
                                                          text="#000000">
                                                          <p>Hello,</p>
                                                          <p>if you are
                                                          looking to
                                                          remove the
                                                          server header
                                                          (server
                                                          signature),
                                                          that can be
                                                          controlled via
                                                          global
                                                          parameters:</p>
                                                          <p>  - <a
                                                          moz-do-not-send="true"
class="m_6293490847849254866m_-455791431899295284m_-532204234115859028m_-409734095957794762m_-1776178681903754250moz-txt-link-freetext"
href="https://www.kamailio.org/wiki/cookbooks/4.4.x/core#server_header"
target="_blank">https://www.kamailio.org/wiki/<wbr>cookbooks/4.4.x/core#server_he<wbr>ader</a></p>
                                                          <p>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.<br>
                                                          </p>
                                                          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?<br>
                                                          <br>
                                                          Cheers,<br>
                                                          Daniel
                                                          <div>
                                                          <div
class="m_6293490847849254866m_-455791431899295284m_-532204234115859028m_-409734095957794762h5"><br>
                                                          <br>
                                                          <div
class="m_6293490847849254866m_-455791431899295284m_-532204234115859028m_-409734095957794762m_-1776178681903754250moz-cite-prefix">On
                                                          12/01/2017
                                                          17:00, Diego
                                                          Nadares wrote:<br>
                                                          </div>
                                                          </div>
                                                          </div>
                                                          <blockquote
                                                          type="cite">
                                                          <div>
                                                          <div
class="m_6293490847849254866m_-455791431899295284m_-532204234115859028m_-409734095957794762h5">
                                                          <div dir="ltr">Hi
                                                          List,
                                                          <div><br>
                                                          </div>
                                                          <div>I'm
                                                          trying to add
                                                          and remove
                                                          some headers
                                                          in 200
                                                          canceling and
                                                          200 ok to BYEs
                                                          with no
                                                          success.</div>
                                                          <div><br>
                                                          </div>
                                                          <div>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.</div>
                                                          <div><br>
                                                          </div>
                                                          <div>I tried
                                                          adding it in </div>
                                                          <div><br>
                                                          </div>
                                                          <div>
                                                          <div>event_route[tm:local-response]
                                                          {</div>
                                                          <div>       
                                                          xlog("L_ERR",
                                                          "TM LOCAL
                                                          REPONSE!");</div>
                                                          <div>       
                                                          route(MANAGE_HEADERS);</div>
                                                          <div>}</div>
                                                          </div>
                                                          <div><br>
                                                          </div>
                                                          <div>This is
                                                          my route to
                                                          manage hdrs:</div>
                                                          <div><br>
                                                          </div>
                                                          <div>
                                                          <div>route[MANAGE_HEADERS]{</div>
                                                          <div><br>
                                                          </div>
                                                          <div>       
                                                          xlog("L_ERR",
                                                          "MANAGE HDRS
                                                          !");</div>
                                                          <div><br>
                                                          </div>
                                                          <div>       
                                                          keep_hf("TH");
                                                          # for topoh</div>
                                                          </div>
                                                          <div><br>
                                                          </div>
                                                          <div>       
                                                          append("AHDR1:asdf\r\n");</div>
                                                          <div><br>
                                                          </div>
                                                          <div>       
                                                          return;</div>
                                                          <div>}</div>
                                                          <div><br>
                                                          </div>
                                                          <div>I suppose
                                                          SERVER HDR
                                                          should be
                                                          removed but:</div>
                                                          <div><br>
                                                          </div>
                                                          <div>
                                                          <div>U
                                                          2017/01/12
                                                          12:45:41.566733
                                                          <a
                                                          moz-do-not-send="true"
href="http://172.16.213.38:5060" target="_blank">172.16.213.38:5060</a>
                                                          -> <a
                                                          moz-do-not-send="true"
href="http://172.16.50.41:5060" target="_blank">172.16.50.41:5060</a></div>
                                                          <div>SIP/2.0
                                                          200 canceling.</div>
                                                          <div>Via:
                                                          SIP/2.0/UDP
                                                          172.16.50.41:5060;branch=z9hG4<wbr>bKgg8ekd3080braugkm700.1.</div>
                                                          <div>CSeq: 102
                                                          CANCEL.</div>
                                                          <div>From:
                                                          <<a
                                                          moz-do-not-send="true"
href="mailto:sip%3Axx@172.16.50.41" target="_blank">sip:xx@172.16.50.41</a>>;tag=SD7b<wbr>10b01-as5ba5e269.</div>
                                                          <div>To: <<a
moz-do-not-send="true" href="mailto:sip%3Axxx@172.16.213.38"
                                                          target="_blank">sip:xxx@172.16.213.38</a>>;tag=4a<wbr>86e96addfb27a943bc86e1872032b6<wbr>-0a8b.</div>
                                                          <div>Call-ID:
SD7b10b01-6a7d1089793bda79481f<wbr>25cf88c023ed-c540dl1.</div>
                                                          <div>Server:
                                                          kamailio
                                                          (4.4.4
                                                          (x86_64/linux)).</div>
                                                          <div>Content-Length:
                                                          0.</div>
                                                          </div>
                                                          <div><br>
                                                          </div>
                                                          <div><br>
                                                          </div>
                                                          <div>Any help
                                                          will be very
                                                          appreciated.<br>
                                                          </div>
                                                          <div><br>
                                                          </div>
                                                          <div>Thanks in
                                                          advance!</div>
                                                          <div><br>
                                                          </div>
                                                          <div>Diego</div>
                                                          </div>
                                                          <br>
                                                          <fieldset
class="m_6293490847849254866m_-455791431899295284m_-532204234115859028m_-409734095957794762m_-1776178681903754250mimeAttachmentHeader"></fieldset>
                                                          <br>
                                                          </div>
                                                          </div>
                                                          <pre>______________________________<wbr>_________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" class="m_6293490847849254866m_-455791431899295284m_-532204234115859028m_-409734095957794762m_-1776178681903754250moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" class="m_6293490847849254866m_-455791431899295284m_-532204234115859028m_-409734095957794762m_-1776178681903754250moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cg<wbr>i-bin/mailman/listinfo/sr-user<wbr>s</a><span class="m_6293490847849254866m_-455791431899295284m_-532204234115859028m_-409734095957794762HOEnZb"><font color="#888888">
</font></span></pre><span class="m_6293490847849254866m_-455791431899295284m_-532204234115859028m_-409734095957794762HOEnZb"><font color="#888888">
    </font></span></blockquote><span class="m_6293490847849254866m_-455791431899295284m_-532204234115859028m_-409734095957794762HOEnZb"><font color="#888888">
    

    <pre class="m_6293490847849254866m_-455791431899295284m_-532204234115859028m_-409734095957794762m_-1776178681903754250moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a moz-do-not-send="true" class="m_6293490847849254866m_-455791431899295284m_-532204234115859028m_-409734095957794762m_-1776178681903754250moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a moz-do-not-send="true" class="m_6293490847849254866m_-455791431899295284m_-532204234115859028m_-409734095957794762m_-1776178681903754250moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio World Conference - May 8-10, 2017 - <a moz-do-not-send="true" class="m_6293490847849254866m_-455791431899295284m_-532204234115859028m_-409734095957794762m_-1776178681903754250moz-txt-link-abbreviated" href="http://www.kamailioworld.com" target="_blank">www.kamailioworld.com</a></pre>
  </font></span></div>


______________________________<wbr>_________________

SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list

<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>

<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/cg<wbr>i-bin/mailman/listinfo/sr-user<wbr>s</a>


</blockquote></div>
</div>
</div></div></blockquote></div>
</div>
</div>
______________________________<wbr>_________________

SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list

<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>

<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/cg<wbr>i-bin/mailman/listinfo/sr-user<wbr>s</a>


</blockquote></div></div></div>
</div></div></div>

______________________________<wbr>_________________

SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list

<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>

<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/cg<wbr>i-bin/mailman/listinfo/sr-user<wbr>s</a>


</blockquote></div>
</div>


<fieldset class="m_6293490847849254866mimeAttachmentHeader"></fieldset>
<pre>______________________________<wbr>_________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" class="m_6293490847849254866moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" class="m_6293490847849254866moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a>
</pre>

</blockquote>
<pre class="m_6293490847849254866moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a moz-do-not-send="true" class="m_6293490847849254866moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a moz-do-not-send="true" class="m_6293490847849254866moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio World Conference - May 8-10, 2017 - <a moz-do-not-send="true" class="m_6293490847849254866moz-txt-link-abbreviated" href="http://www.kamailioworld.com" target="_blank">www.kamailioworld.com</a></pre></div></div></div>
______________________________<wbr>_________________

SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list

<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>

<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a>


</blockquote></div>
</div>



</blockquote>
<pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio World Conference - May 8-10, 2017 - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre></body></html>