<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hello,</p>
    <p>do you really need them in the Via header?</p>
    <p>It is abit delicate to work with, because some UA may be strict
      in what they receive, given that the Via was added by them. There
      are standard parameters that should be added such as received or
      rport, which are added by kamailio automatically if the conditions
      required by them are met.</p>
    <p>Maybe you can get what you need by adding a header instead -- a
      header can be added to the reply using append_to_reply() function
      exported by textops module.</p>
    <p>Otherwise, here are the steps that you can try to add to the Via
      header:</p>
    <p>  1) use functions from textops or textops module to update the
      Via header of the incoming request (inside request_route block),
      such as:</p>
    <p>  *
<a class="moz-txt-link-freetext" href="https://www.kamailio.org/docs/modules/stable/modules/textops.html#textops.f.subst_hf">https://www.kamailio.org/docs/modules/stable/modules/textops.html#textops.f.subst_hf</a><br>
        *
<a class="moz-txt-link-freetext" href="https://www.kamailio.org/docs/modules/stable/modules/textopsx.html#textopsx.f.insert_hf_value">https://www.kamailio.org/docs/modules/stable/modules/textopsx.html#textopsx.f.insert_hf_value</a></p>
    <p>  2) do msg_apply_changes()</p>
    <p>From that moment Kamailio will see the new Via header, with the
      changes you did. When building a reply, Kamailio should use the
      entire Via header  and you parameter should be visible in the
      reply.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div class="moz-cite-prefix">On 04/07/16 03:45, Huynh Quoc Bao
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAJGxyuyN+gNvCKQ_AdF8x2m1e1o-+aF-GaAWL-e2BG3=kKqNaQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>Hi all,</div>
        <div><br>
        </div>
        <div>Could someone give me some suggestion? Thank in advance.</div>
        <div><br>
        </div>
        <div>Brs/Bao</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Fri, Jul 1, 2016 at 3:31 PM, Huynh
          Quoc Bao <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:baohq110@gmail.com" target="_blank">baohq110@gmail.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">
              <div>Hi all,<br>
                <br>
                As title, i want to add some additional parameters to
                the topmost via header in replied message. </div>
              <div><span style="font:14px/22.4px "Helvetica
                  Neue",Helvetica,"Segoe
                  UI",Arial,freesans,sans-serif,"Apple Color
                  Emoji","Segoe UI Emoji","Segoe UI
Symbol";color:rgb(51,51,51);text-transform:none;text-indent:0px;letter-spacing:normal;word-spacing:0px;display:inline!important;white-space:normal;font-size-adjust:none;font-stretch:normal;float:none;background-color:rgb(255,255,255)">example.
                  REGISTER ==> Kamailio ===> reply 200 OK. So in
                  200 OK message, i will add some additional parameters.</span><br>
              </div>
              <div>And the same for the other message: INVITE,
                SUBSCRIBE, NOTIFY, MESSAGE message.</div>
              <div><br>
                --</div>
              <div>
                Brs/Bao
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a> - <a class="moz-txt-link-freetext" href="http://www.kamailio.org">http://www.kamailio.org</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
  </body>
</html>