[OpenSIPS-Users] Presence for routing logic
Carlo Dimaggio
jaasmailing at gmail.com
Thu Feb 17 10:48:40 CET 2011
Il 16/02/11 18.19, Anca Vamanu ha scritto:
> Hi Carlo,
>
> Here are my ideas about this.
> One solution would be to insert into usr_preferences table a record
> with the URI where the call must be forwarded for the user (you can
> put the username in RURI) when the presence status is "meeting",
> "holiday", etc. And delete it when changes into something else.
> Now the question is where to do this. In the OpenSIPS script is very
> hard - you have to make regexps to extract the status from the Publish
> body, select from database the previous stored state and apply the
> regexp again, very inefficient. The other solutions are an external
> application or an opensips module. The external application could
> query the presentity table periodically or maybe be called by a
> trigger at insert ( not sure this is possible). The module can export
> a function to be called before handle_publish to analyze the previous
> and the current state.
> Then when handling Invites - do avp_db_load for the caller and if a
> record is found forward it to that URI.
Hi Anca,
thank you for your interesting point of view.
Indeed I was thinking about the development of a new presence module (or
a function) but for checking the subscriber status directly from the
XCAP server. In this way in the script (INVITE) I should do
xcap_check_status for the callee, do an avp_db_load and forward the
caller to the URI stored in usr_preferences (linked to the presence status).
This is just a proof of concept, as I need a better understanding of all
opensips presence modules.
Best regards,
Carlo Dimaggio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110217/b9662397/attachment-0001.htm>
More information about the Users
mailing list