[OpenSIPS-Users] Presence for routing logic

Anca Vamanu anca at opensips.org
Wed Feb 16 18:19:17 CET 2011


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.

Regards,

-- 
Anca Vamanu
OpenSIPS Developer



On 02/16/2011 06:20 PM, Carlo Dimaggio wrote:
> Dear all,
>
> I'm thinking about a design of an unified communication system based 
> on presence status.
>
> I would like to know if the presence status of a subscriber could be 
> used to define the routing logic.
> An example is routing the call to voicemail when Alice's status is 
> "meeting" or to a cell phone when she is on "holiday".
>
>
> Thanks,
> Carlo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110216/6f6bb580/attachment.htm>


More information about the Users mailing list