<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Carlo,<br>
<br>
Here are my ideas about this. <br>
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. <br>
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.<br>
Then when handling Invites - do avp_db_load for the caller and if a
record is found forward it to that URI. <br>
<br>
Regards,<br>
<pre class="moz-signature" cols="72">--
Anca Vamanu
OpenSIPS Developer</pre>
<br>
<br>
On 02/16/2011 06:20 PM, Carlo Dimaggio wrote:
<blockquote cite="mid:4D5BF969.6020205@gmail.com" type="cite">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<font size="-1"><font face="Arial">Dear all,<br>
<br>
</font></font><font size="-1"><font face="Arial">I'm thinking
about a design of an unified communication system based on
presence status.</font></font><br>
<font size="-1"><font face="Arial"><br>
I would like to know if the presence status of a subscriber
could be used to define the routing logic. <br>
An example is routing the call to voicemail when Alice's
status is "meeting" or to a cell phone when she is on
"holiday".<br>
<br>
<br>
Thanks,<br>
Carlo</font></font><br>
</blockquote>
</body>
</html>