[Kamailio-Devel] Any solution for pua_usrloc when Kamailio is restarted?
Daniel-Constantin Mierla
miconda at gmail.com
Thu Mar 26 13:31:10 CET 2009
Hello Inaki,
On 03/26/2009 02:11 PM, Iñaki Baz Castillo wrote:
> 2009/3/26 Iñaki Baz Castillo <ibc at aliax.net>:
>
>> This occurs because "pua" table is emptied when Kamailio is restarted, why??
>> Could we leave the "pua" table when restarting Kamailio?
>>
>
> Sorry, this is not a problem. I've inspected the code and basically
> the module loads into a hash table the "pua" table content so it can
> delete it safely.
>
> The problem occurs when, for any reason, a pua entry is deleted from
> memory and still doesn't exist in the table (perhaps due to a Kamailio
> restart just after REGISTER receiving). In that case, when a new
> REGISTER arrives it will execute an UPDATE callback to pua_usrloc
> (instead of an INSERT callback) so pua_usrloc invokes pua_send_publish
> in pua module and it fails since it wasn't information for that
> request in the PUA hash table. This is: pua module receives from
> pua_usrloc a PUBLISH with empty body.
>
> As a solution, pua_usrloc could act as if an INSERT callback occured
> when UPDATE callback failed, would it be possible?
>
to understand the issue is:
- either the pua is not flushed properly to db at shutdown
- or there is a race between register and pua table update
Your solution is good anyhow, for those enabling pua_usrloc for first
time -- there will be usrloc updates. If you get a patch, I can review.
If not, I have in my todo some work with presence in the next days, Juha
reported also some potential issues, so I will take care then.
Thanks,
Daniel
--
Daniel-Constantin Mierla
SIP Router Masterclass - Kamailio (OpenSER) Training
http://www.asipto.com/index.php/sip-router-masterclass/
More information about the Devel
mailing list