[Kamailio-Users] Retransmitted SUBSCRIBEs
catalina oancea
catalina.oancea at gmail.com
Mon Oct 12 11:04:40 CEST 2009
Hello,
I discovered that is I use the example in the sample config for presence:
if (! t_newtran())
{
sl_reply_error();
exit;
};
if(is_method("PUBLISH"))
{
handle_publish();
t_release();
} else if( is_method("SUBSCRIBE")) {
handle_subscribe();
t_release();
};
then it works, the retransmission is recognized correctly. But when I
add the authentication part, and it becomes like this:
if (! t_newtran())
{
sl_reply_error();
exit;
};
if (!www_authorize("", "subscriber")) {
www_challenge("", "0");
#t_release(); #commented on
un-commented, it makes no difference
exit;
};
if(is_method("PUBLISH"))
{
handle_publish();
t_release();
} else if( is_method("SUBSCRIBE")) {
handle_subscribe();
t_release();
};
then it stops working. I really need authentication so is anybody
using any workaround for this?
Thanks,
Catalina
2009/10/9 catalina oancea <catalina.oancea at gmail.com>:
> Here is my config part for handling SUBSCRIBEs:
>
> t_newtran();
> xlog("L_ERROR","I am after t_newtran");
> handle_subscribe();
> t_release();
>
> And for the previously mentioned scenario I see in my log:
> /usr/sbin/kamailio[13463]: I am after t_newtran
> /usr/sbin/kamailio[13463]: I am after t_newtran
> /usr/sbin/kamailio[13463]: ERROR:presence:get_stored_info: wrong
> sequence number;received: 2 - stored: 2
>
>
>
>
> 2009/10/9 Klaus Darilion <klaus.mailinglists at pernau.at>:
>> Try xlog() after t_newtran. In case of the retransmission, you should not
>> see the xlog as it should be absorbed silently by t_newtran.
>>
>> regards
>> klaus
>>
>> catalina oancea schrieb:
>>>
>>> Hi
>>>
>>> Thanks for answering. I tried with t_newtran. It still doesn't work.
>>> The error is:
>>>
>>> ERROR:presence:get_stored_info: wrong sequence number;received: 2 -
>>> stored: 2
>>>
>>> Thanks
>>> Catalina
>>>
>>>
>>> 2009/10/9 Klaus Darilion <klaus.mailinglists at pernau.at>:
>>>>
>>>> catalina oancea schrieb:
>>>>>
>>>>> Hello,
>>>>>
>>>>> If a phone re-sends a presence SUBSCRIBE requests even after 5 or 500
>>>>> milliseconds, kamailio replied with '400 Bad request' to the second
>>>>> SUBSCRIBE
>>>>>
>>>>> The scenario is:
>>>>>
>>>>> Phone Kamailio
>>>>> SUBSCRIBE ---------->
>>>>> 401 <----------
>>>>> SUBSCRIBE ---------->
>>>>> 202 <----------
>>>>> Pause [ 5ms] (or 500 ms, the same thing
>>>>> happens)
>>>>> SUBSCRIBE ----------> (previous SUBSCRIBE retransmitted)
>>>>> 400 Bad request <----------
>>>>>
>>>>> Is this the expected behavior? Is there any way to get kamailio to
>>>>> recognize the retransmission?
>>>>> This causes problems with Snom phones because they receive 400 reply
>>>>> when they retransmit the SUBSCRIBE, and presence stops working.
>>>>
>>>> First, it would be a good idea to handle the SUBSCRIBE stateful, I think
>>>> his
>>>> can be done by calling t_newtran() before, and t_release() after
>>>> handle_subscribe().
>>>>
>>>> regards
>>>> klaus
>>>>
>>
>
More information about the Users
mailing list