[Devel] New Feature: Supported methods and lookup
Klaus Darilion
klaus.mailinglists at pernau.at
Fri Dec 9 15:54:36 CET 2005
Bogdan-Andrei Iancu wrote:
> Hi Klaus,
>
> not sure I get it - you say -3 is never returned by function? or?
according to the docs, yes:
Return codes:
*
1 - contacts found and returned.
-1 - no contact found.
-2 - contacts found, but method not supported.
1 - internal error during processing.
This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
>
> regards,
> bogdan
>
> Klaus Darilion wrote:
>
>> Hi Bogdan!
>>
>> regardin the example:
>> case -3: is not defined as return value, looks like a typo
>>
>> klaus
>>
>> Bogdan-Andrei Iancu wrote:
>>
>>> Hi,
>>>
>>> based on Juha's patch - saving in usrloc the supported methods
>>> advertised during REGISTER - I extended lookup() function to perform
>>> method based filtering. What this means: lookup() may return only
>>> contacts which supports the method of the processed request.
>>>
>>> Ex: there are two clients registering as same user:
>>> 1) a SIP phone which support INVITE & family, but no presence and
>>> messaging.
>>> 2) a soft messaging client : supports only MESSAGE
>>> When a call hits the server, the lookup() will send it only to
>>> contact (1), to the phone, since the contact (2) does not support
>>> INVITE. When a MESSAGE hits the server, the lookup() will send it
>>> only to contact (2), to the soft client, since the contact (1) does
>>> not support MESSAGE.
>>>
>>>
>>> the advantage is that you avoid un-necessary parallel forking and
>>> extra signalling. Also there are SIP implementation which does not
>>> even reply to methods they are not supporting, forcing the proxy to
>>> generate timeout..:(
>>>
>>>
>>> The feature may be turned on or off via the module parameter
>>> "method_filtering":
>>> http://www.openser.org/docs/modules/1.1.x/registrar.html#AEN247
>>>
>>> For more, see also the script snapshot from :
>>> http://www.openser.org/docs/modules/1.1.x/registrar.html#AEN288
>>>
>>>
>>> regards,
>>> bogdan
>>> _______________________________________________
>>> Devel mailing list
>>> Devel at openser.org
>>> http://openser.org/cgi-bin/mailman/listinfo/devel
>>>
>>>
>>
>
>
More information about the Devel
mailing list