<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hi Dani,<br>
    <br>
    Actually the lookup() function has an "m" flag to do "method
    filtering" - if the current method you are doing lookup for does not
    exists in the method bitmask of the record, the record is considered
    not matching. See :<br>
    &nbsp;&nbsp;&nbsp;
    <a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/1.7.x/registrar.html#id292848">http://www.opensips.org/html/docs/modules/1.7.x/registrar.html#id292848</a><br>
    &nbsp;&nbsp; - about the "m" flag<br>
    &nbsp;&nbsp; - about the "-2" return code.<br>
    <br>
    Regards,<br>
    Bogdan<br>
    <br>
    <br>
    On 09/14/2011 02:34 PM, Dani Popa wrote:
    <blockquote cite="mid:4E709130.2040606@gmail.com" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      Hi,<br>
      <br>
      Based on this mehods value, opensips will relay sip messages to
      the contact ? I mean, if methods value is matching bitwise with
      METHOD_MESSAGE value, opensips will sent sip MESSAGES method to
      the contact, otherwise, it will not send it ?<br>
      <br>
      Thanks,<br>
      Dani<br>
      <br>
      On 09/14/11 11:25, Vlad Paiu wrote:
      <blockquote cite="mid:4E706503.3000305@opensips.org" type="cite">
        <meta content="text/html; charset=ISO-8859-1"
          http-equiv="Content-Type">
        <title></title>
        Hello,<br>
        <br>
        Upon registration, each UA can supply a list of
        allowed/supported methods.<br>
        OpenSIPS saves this information by using an integer, and bitmask
        flags.<br>
        <br>
        The enum used is :<br>
        &nbsp;&nbsp;&nbsp; enum request_method {<br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; METHOD_UNDEF=0,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* 0 - --- */<br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; METHOD_INVITE=1,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* 1 - 2^0 */<br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; METHOD_CANCEL=2,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* 2 - 2^1 */<br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; METHOD_ACK=4,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* 3 - 2^2 */<br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; METHOD_BYE=8,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* 4 - 2^3 */<br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; METHOD_INFO=16,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* 5 - 2^4 */<br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; METHOD_OPTIONS=32,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* 6 - 2^5 */<br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; METHOD_UPDATE=64,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* 7 - 2^6 */<br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; METHOD_REGISTER=128,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* 8 - 2^7 */<br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; METHOD_MESSAGE=256,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* 9 - 2^8 */<br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; METHOD_SUBSCRIBE=512,&nbsp;&nbsp;&nbsp;&nbsp; /* 10 - 2^9 */<br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; METHOD_NOTIFY=1024,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* 11 - 2^10 */<br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; METHOD_PRACK=2048,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* 12 - 2^11 */<br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; METHOD_REFER=4096,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* 13 - 2^12 */<br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; METHOD_PUBLISH=8192,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* 14 - 2^13 */<br>
        &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; METHOD_OTHER=16384&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* 15 - 2^14 */<br>
        };<br>
        <br>
        0x1F6F = 8047 = 4096 + 2048 + 1024 + 512 + 256 + 64 + 32 + 8 + 4
        + 2 + 1 ,<br>
        <br>
        Basically, using the methods integer and the above enumeration,
        you can tell what methods the registering UA supports.<br>
        <br>
        <br>
        Regards,<br>
        <pre class="moz-signature" cols="72">Vlad Paiu
OpenSIPS Developer</pre>
        <br>
        On 09/13/2011 10:42 PM, Dani Popa wrote:
        <blockquote
cite="mid:CAEOhXaYxZeOFD3eQBhF-7-kH+wfNWbqxCJ=ir7sw4eEKk4t8OA@mail.gmail.com"
          type="cite">
          <div>Hi all,</div>
          <div><br>
          </div>
          <div>What does it mean&nbsp;methods=0x1F6F from register contact
            when i see it with opensipsctl ul show, and how can i decode
            it ?&nbsp;</div>
          Contact:: <a moz-do-not-send="true"
            class="moz-txt-link-rfc2396E"
            href="mailto:sip:xxxx@x.x.x.x:xxx;transport=UDP;ob">&lt;sip:xxxx@x.x.x.x:xxx;transport=UDP;ob&gt;</a>;q=;expires=525;flags=0x0;cflags=0x0;socket=&lt;udp:y.y.y.y:yyyy&gt;;methods=0x1F6F;user_agent=&lt;CSipSimple


          r801 / SGH-I897-7&gt;<br clear="all">
          <div><br>
          </div>
          <div><br>
          </div>
          <div>Thanks,</div>
          <div><br>
          </div>
          -- <br>
          Dani Popa<br>
          <pre wrap=""><fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" 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>
        <pre wrap=""><fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a moz-do-not-send="true" 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>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
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>
    <br>
    <pre class="moz-signature" cols="72">-- 
Bogdan-Andrei Iancu
OpenSIPS eBootcamp - 19th of September 2011
OpenSIPS solutions and "know-how"</pre>
  </body>
</html>