<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix"><tt>Hello,<br>
        <br>
        The nameaddr.name transformation will return the "77777" string
        along the quotes. The s.int is to transform a number from string
        representation to integer - so it is a missusage of this
        transformation here. You just want to get rid of the quotes,
        right ?<br>
        <br>
        You could do something simple like:<br>
            </tt><br>
      <tt>$avp(name) = $(hdr(P-Asserted-Identity){nameaddr.name})<br>
        # if string starts with '"", get rid of the first and last char
        from the string.<br>
        if ( $(avp(name){s,substr,0,1})=='"' )<br>
           </tt><tt><tt>$avp(name)</tt> := </tt><tt><tt>$(avp(name){s.substr,1,-1});</tt>
        <br>
        <br>
        Regards,<br>
      </tt>
      <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
      On 25.03.2014 15:15, Alexander Mustafin wrote:<br>
    </div>
    <blockquote
      cite="mid:974C6ED1-DCEA-4777-8DB8-4F4E36B845B8@gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      Hello.
      <div><br>
      </div>
      <div>I’ve got the header in message:  P-Asserted-Identity:
        «777777" &lt;<a moz-do-not-send="true" href="sip:777777@5.5.5.5">sip:777777@5.5.5.5</a>&gt;</div>
      <div><br>
      </div>
      <div>And I need to parse «name» part for future used, but without
        quotes.</div>
      <div><br>
      </div>
      <div>I’m trying:</div>
      <div><br>
      </div>
      <div>$avp(name) =
        $(hdr(P-Asserted-Identity){nameaddr.name}{s.int});</div>
      <div><br>
      </div>
      <div>but $avp(name) is null after this transformation.</div>
      <div><br>
      </div>
      <div>How to delete quotes from this field? </div>
      <div><br>
      </div>
      <div><br>
        <div apple-content-edited="true">
          <div style="color: rgb(0, 0, 0); font-family: Helvetica;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; word-wrap: break-word;
            -webkit-nbsp-mode: space; -webkit-line-break:
            after-white-space; ">
            <div>Best regards,</div>
            <div>Alexander Mustafin</div>
            <div><a moz-do-not-send="true"
                href="mailto:mustafin.aleksandr@gmail.com">mustafin.aleksandr@gmail.com</a></div>
            <div><br>
            </div>
          </div>
          <br class="Apple-interchange-newline">
          <br class="Apple-interchange-newline">
        </div>
        <br>
      </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>