[OpenSIPS-Devel] rls_handle_subscribe() return code when list is not found
Dan Pascu
dan at ag-projects.com
Wed Sep 2 15:37:41 CEST 2009
On 28 Aug 2009, at 13:32, Anca Vamanu wrote:
> Hi Juha,
>
> You are right, a Subscribe that contains Supported:eventlist header
> but
> for which a list definition is not found, is replied with 404 and not
> sent to the presence server. It has been the way described in the
> documentation but changed in a commit on 12 November last year:
> http://opensips.svn.sourceforge.net/viewvc/opensips?view=rev&revision=4944
> .
>
> I have now looked through the RFC and to be honest, I think that I
> shouldn't have done the change and still let the Subscribe go to the
> presence server. I don't remember which was the reason to change it at
> that moment, but I remember it came after a discussion with Dan Pascu
> when he gave me a strong argument to do so. I am willing to change it
> back, but will first wait for Dan's input on this.
The discussion we had back then was not related to this issue, but to
the fact that in certain cases no reply was sent at all by rls/
presence. So when the control was returned to the script, I could not
know if a reply was sent or not, even though the return code would
indicate me that the condition was final and I need to stop
processing. My argument was that in such a case a reply should have
always be sent.
However what Juha says here is correct. If the Supported: eventlist is
present but the uri doesn't point to a rls uri (there is no rls
document associated with it), it should fallback to presence. This
case is not a final condition for rls (since the uri is not actually
rls related), so it should not give a reply, but allow you to fallback
to presence.
I recall I asked you about this a few weeks ago and you confirmed that
if the Supported: eventlist header is present but the uri doesn't
point to a rls uri it still fallbacks to presence. Apparently this is
not the case it seems.
> Thanks and regards,
> Anca
>
> Juha Heinanen wrote:
>> Iñaki Baz Castillo writes:
>>
>>> I haven't inspected the code, but rls_handle_subscribe() does what
>>> it's supposed to do (return the preconfigured to $rc when no RL
>>> doc is
>>> found).
>>
>> inaki,
>>
>> are you sure that it returns pre-configured $rc even when Supported:
>> header includes 'eventlist', but there is no presence list document
>> in
>> xcap server?
>>
>> if there is no 'eventlist' in Supported header, then pre-configured
>> $rc
>> is returned as it should. my understand from reading the code and
>> from
>> doing some tests is that in the above mentioned combination things,
>> -1
>> is incorrectly returned.
>>
>> -- juha
>>
>> _______________________________________________
>> Devel mailing list
>> Devel at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>>
>>
>
>
> _______________________________________________
> Devel mailing list
> Devel at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
--
Dan
More information about the Devel
mailing list