[OpenSER-Users] A function to know if a user is registered?

Bogdan-Andrei Iancu bogdan at voice-system.ro
Fri Aug 10 09:07:38 CEST 2007


Hi,

check the "registered()" function:
    http://www.openser.org/docs/modules/1.2.x/registrar.html#AEN368

as it checks the RURI, you may need to "play" a bit to make it work for 
To URI (backup ruri, put to_uri in ruri, run function, restore ruri).

regards,
bogdan

Iñaki Baz Castillo wrote:
> Because I use pua_usrloc I want to apply pua_set_publish() in a REGISTER only 
> if the user wasn't already registered (in order to avoid new NOTIFY with 
> just "online" which can substitute the user client real state PUBLISH).
>
> So I need a function to determine if the user is registered. I can't use:
>   if ( ! lookup("location") { ...
> because that function checks the URI in "location" table, and in a REGISTER 
> message the URI is just:
>   sip:server
>
> So I need a function to check if the "To:" field ($tu) is registered. Is that 
> exist? or should I make a custom avp_query and so?
>
> Thanks.
>
>
>   





More information about the sr-users mailing list