[OpenSIPS-Users] methods= from register contact
Bogdan-Andrei Iancu
bogdan at opensips.org
Wed Sep 14 19:55:20 CEST 2011
Hi Dani,
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 :
http://www.opensips.org/html/docs/modules/1.7.x/registrar.html#id292848
- about the "m" flag
- about the "-2" return code.
Regards,
Bogdan
On 09/14/2011 02:34 PM, Dani Popa wrote:
> Hi,
>
> 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 ?
>
> Thanks,
> Dani
>
> On 09/14/11 11:25, Vlad Paiu wrote:
>> Hello,
>>
>> Upon registration, each UA can supply a list of allowed/supported
>> methods.
>> OpenSIPS saves this information by using an integer, and bitmask flags.
>>
>> The enum used is :
>> enum request_method {
>> METHOD_UNDEF=0, /* 0 - --- */
>> METHOD_INVITE=1, /* 1 - 2^0 */
>> METHOD_CANCEL=2, /* 2 - 2^1 */
>> METHOD_ACK=4, /* 3 - 2^2 */
>> METHOD_BYE=8, /* 4 - 2^3 */
>> METHOD_INFO=16, /* 5 - 2^4 */
>> METHOD_OPTIONS=32, /* 6 - 2^5 */
>> METHOD_UPDATE=64, /* 7 - 2^6 */
>> METHOD_REGISTER=128, /* 8 - 2^7 */
>> METHOD_MESSAGE=256, /* 9 - 2^8 */
>> METHOD_SUBSCRIBE=512, /* 10 - 2^9 */
>> METHOD_NOTIFY=1024, /* 11 - 2^10 */
>> METHOD_PRACK=2048, /* 12 - 2^11 */
>> METHOD_REFER=4096, /* 13 - 2^12 */
>> METHOD_PUBLISH=8192, /* 14 - 2^13 */
>> METHOD_OTHER=16384 /* 15 - 2^14 */
>> };
>>
>> 0x1F6F = 8047 = 4096 + 2048 + 1024 + 512 + 256 + 64 + 32 + 8 + 4 + 2
>> + 1 ,
>>
>> Basically, using the methods integer and the above enumeration, you
>> can tell what methods the registering UA supports.
>>
>>
>> Regards,
>> Vlad Paiu
>> OpenSIPS Developer
>>
>> On 09/13/2011 10:42 PM, Dani Popa wrote:
>>> Hi all,
>>>
>>> What does it mean methods=0x1F6F from register contact when i see it
>>> with opensipsctl ul show, and how can i decode it ?
>>> Contact::
>>> <sip:xxxx at x.x.x.x:xxx;transport=UDP;ob>;q=;expires=525;flags=0x0;cflags=0x0;socket=<udp:y.y.y.y:yyyy>;methods=0x1F6F;user_agent=<CSipSimple
>>> r801 / SGH-I897-7>
>>>
>>>
>>> Thanks,
>>>
>>> --
>>> Dani Popa
>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
--
Bogdan-Andrei Iancu
OpenSIPS eBootcamp - 19th of September 2011
OpenSIPS solutions and "know-how"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110914/60a05b92/attachment.htm>
More information about the Users
mailing list