<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi, Ehrny!<br>
      <br>
      Yes, you can transform the P-Asserted-Identity header as you wish,
      by dropping the existing one and creating a new one. Use the
      remove_hf()[1] and append_hf()[2] headers for that, i.e.:<br>
      <br>
      if (is_present_hf("P-Asserted-Identity")) {<br>
          remove_hf("</tt><tt><tt>P-Asserted-Identity</tt>");<br>
          $avp(rpid) = "new-header";<br>
          append_hf("</tt><tt><tt><tt>P-Asserted-Identity: $avp(rpid)
          <a class="moz-txt-link-rfc2396E" href="mailto:sip:$avp(rpid)@opensips.org">&lt;sip:$avp(rpid)@opensips.org&gt;</a>\r\n");</tt></tt><br>
      }<br>
      <br>
      [1]
      <a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/2.2.x/sipmsgops.html#id293937">http://www.opensips.org/html/docs/modules/2.2.x/sipmsgops.html#id293937</a><br>
      [2]
      <a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/2.2.x/sipmsgops.html#id249696">http://www.opensips.org/html/docs/modules/2.2.x/sipmsgops.html#id249696</a><br>
      <br>
      Best regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Răzvan Crainea
OpenSIPS Solutions
<a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a></pre>
    <div class="moz-cite-prefix">On 11/13/2016 08:55 PM, Ehrny wrote:<br>
    </div>
    <blockquote
      cite="mid:8B36F227BD22B041AEA7015FD914CD950278897397@JET-EX02.jettel.ru"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:2.0cm 42.5pt 2.0cm 3.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal">Hello team, <o:p></o:p></p>
        <p class="MsoNormal">I’m trying to follow my carrier’s request
          to transform P-Asserted-Identity header.<o:p></o:p></p>
        <p class="MsoNormal">Is there any possibilities to do that on
          the fly with opensips (v2.2.2)?<o:p></o:p></p>
        <p class="MsoNormal">Yet another project assume to add the
          redirecting number even if it’s not exists. Would it be
          possible to add it in the route?<o:p></o:p></p>
        <p class="MsoNormal">Your help is really appreciated,<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Best Regards,<o:p></o:p></p>
        <p class="MsoNormal">Ehrny<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>