<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>$hdr(Contact) return the whole Contact header which is a
      name-addr spec (according to the RFC3261 grammar). <br>
      <br>
      You should try: $(hdr(Contact){nameaddr.param,expires})<br>
      <br>
      See : <a class="moz-txt-link-freetext" href="http://www.opensips.org/Documentation/Script-Tran-2-3#toc68">http://www.opensips.org/Documentation/Script-Tran-2-3#toc68</a><br>
      <br>
      Regards,<br>
      <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>
    <div class="moz-cite-prefix">On 11/27/2017 02:56 PM, Dragomir
      Haralambiev wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CADzurOKA6oZ7QYartFm1CH=3prCfyD2pvgE7kciuQ1v34-+7uw@mail.gmail.com">
      <div dir="ltr">
        <div>I try this:</div>
        <div>xlog("Expires= $(hdr(Contact){uri.param,expires}) \n");<br>
          <br>
          Here is ERRORS:<br>
          Nov 27 14:53:07 /usr/local/sbin/opensips[28413]:
          ERROR:core:parse_uri: bad uri, state 0 parsed: <<sip>
          (4) / <<<a
            href="http://sip:555555555@192.168.178.21:5060"
            moz-do-not-send="true">sip:555555555@192.168.178.21:5060</a>>;audio;expires=120>
          (57)</div>
        <div>Nov 27 14:53:07 /usr/local/sbin/opensips[28413]:
          ERROR:core:tr_eval_uri: invalid uri [<<a
            href="http://sip:555555555@192.168.178.21:5060"
            moz-do-not-send="true">sip:555555555@192.168.178.21:5060</a>>;audio;expires=120]</div>
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">2017-11-27 14:14 GMT+02:00 Liviu Chircu
          <span dir="ltr"><<a href="mailto:liviu@opensips.org"
              target="_blank" moz-do-not-send="true">liviu@opensips.org</a>></span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div text="#000000" bgcolor="#FFFFFF">
              <p><tt>Hi Dragomir,</tt></p>
              <p><tt>There is no "Expires" in REGISTER, so $hdr(expires)
                  prints "<null>". Try $(hdr(Contact){uri.param,<wbr>expires}).</tt></p>
              <p><tt>Regards,<br>
                </tt></p>
              <pre class="m_-8484814825404973569moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="m_-8484814825404973569moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">http://www.opensips-solutions.<wbr>com</a></pre>
              <div>
                <div class="h5">
                  <div class="m_-8484814825404973569moz-cite-prefix">On
                    27.11.2017 13:46, Dragomir Haralambiev wrote:<br>
                  </div>
                </div>
              </div>
              <blockquote type="cite">
                <div>
                  <div class="h5">
                    <div dir="ltr">Hello,
                      <div><br>
                      </div>
                      <div>I try to get expires from REGISTER.</div>
                      <div>xlog("Expires=$hdr(expires)\n"<wbr>);<br>
                      </div>
                      <div><br>
                      </div>
                      <div>I receive this:</div>
                      <div>
                        <div>Expires=<null></div>
                      </div>
                      <div><br>
                      </div>
                      <div>Here is REGISTER</div>
                      <div><br>
                      </div>
                      <div>
                        <div>Session Initiation Protocol (SIP as raw
                          text)</div>
                        <div>    REGISTER sip:<a
                            href="http://sip-server.com:5060"
                            target="_blank" moz-do-not-send="true">sip-server.com:5060</a>
                          SIP/2.0\r\n</div>
                        <div>    Accept: application/reginfo+xml,
                          application/sdp, application/simple-message-<wbr>summary,
                          message/sipfrag, multipart/mixed,
                          multipart/related\r\n</div>
                        <div>    Via: SIP/2.0/UDP
                          10.152.220.38:5062;branch=<wbr>z9hG4bKde569c7a0f7678fe1;<wbr>rport\r\n</div>
                        <div>    Max-Forwards: 70\r\n</div>
                        <div>    From: "55555555" <<a
                            href="http://sip:55555555@sip-server.com:5060"
                            target="_blank" moz-do-not-send="true">sip:55555555@sip-server.com:<wbr>5060</a>>;tag=026b9b8a13\r\n</div>
                        <div>    To: "55555555" <<a
                            href="http://sip:55555555@sip-server.com:5060"
                            target="_blank" moz-do-not-send="true">sip:55555555@sip-server.com:<wbr>5060</a>>\r\n</div>
                        <div>    Call-ID: de52071eacc30295\r\n</div>
                        <div>    CSeq: 448743846 REGISTER\r\n</div>
                        <div>    Allow: ACK, BYE, CANCEL, INVITE,
                          MESSAGE, NOTIFY, OPTIONS, REFER, SUBSCRIBE,
                          UPDATE\r\n</div>
                        <div>    Contact: <<a
                            href="http://sip:55555555@10.152.220.38:5062"
                            target="_blank" moz-do-not-send="true">sip:55555555@10.152.220.38:<wbr>5062</a>>;audio;expires=120\r\n</div>
                        <div>    User-Agent: Media5-fone/4.25.4.13060
                          Android/8.0.0\r\n</div>
                        <div>    Content-Length: 0\r\n</div>
                        <div>    \r\n</div>
                      </div>
                    </div>
                    <br>
                    <fieldset
                      class="m_-8484814825404973569mimeAttachmentHeader"></fieldset>
                    <br>
                  </div>
                </div>
                <pre>______________________________<wbr>_________________
Users mailing list
<a class="m_-8484814825404973569moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a>
<a class="m_-8484814825404973569moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>
</pre>
              </blockquote>
              <br>
            </div>
            <br>
            ______________________________<wbr>_________________<br>
            Users mailing list<br>
            <a href="mailto:Users@lists.opensips.org"
              moz-do-not-send="true">Users@lists.opensips.org</a><br>
            <a
              href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
              rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a><br>
            <br>
          </blockquote>
        </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>