[Users] is_method

Daniel-Constantin Mierla daniel at voice-system.ro
Wed Mar 15 10:46:09 CET 2006


Hello,

On 03/14/06 22:10, Helge Waastad wrote:
> Hi,
> and thanks for your reply. 
> The only thing that confuses me is that is_method("PUBLISH") and
> is_method("SUBSCRIBE") separate works allright...
>   
when only one method name is present, and it is not one which has an 
integer id, then string comparison is used (similar to method=="xxx" but 
the function works for replies as well).
> (the log shows: textops:fixup_method: unknown method in list
> [SUBSCRIBE,PUBLISH/8704] - must be only defined methods)
>   
When a list is used, then the comparison can be easily done with bit 
operations (methods id are all powers of two). At startup a bitmask is 
compiled from the methods list and used at runtime. If the method is 
unknown, then the bitmask comparison cannot be used. A note about this 
is written in the readme:
http://openser.org/docs/modules/1.1.x/textops.html#AEN407

I will add today the publish method in the list. Seems to be the only 
one missing from the methods list defined by IANA.

Cheers,
Daniel

> br hw
>
>
> tir, 14,.03.2006 kl. 17.21 +0200, skrev Daniel-Constantin Mierla:
>   
>> Hello,
>>
>> On 03/14/06 16:03, Helge Waastad wrote:
>>     
>>> Hi,
>>> has anyone tried:
>>>
>>> is_method("SUBSCRIBE|PUBLISH")?
>>>   
>>>       
>> PUBLISH is not in the list of known methods. It should be added. 
>> Currently the list with known methods which iare translated to integer 
>> IDs is:
>>
>>     INVITE
>>     CANCEL
>>     ACK
>>     BYE
>>     INFO
>>     OPTIONS
>>     UPDATE
>>     REGISTER
>>     MESSAGE
>>     SUBSCRIBE
>>     NOTIFY
>>     PRACK
>>     REFER
>>
>> Any other method missing here (except PUBLISH)?
>>
>> Cheers,
>> Daniel
>>
>>  > It's not working.
>>     
>>> br hw
>>>
>>>   
>>>       




More information about the Users mailing list