<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Carlo,<br>
<br>
On 02/17/2011 11:48 AM, Carlo Dimaggio wrote:
<blockquote cite="mid:4D5CEEF8.4080705@gmail.com" type="cite">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title></title>
Il 16/02/11 18.19, Anca Vamanu ha scritto:
<blockquote cite="mid:4D5C0715.8090802@opensips.org" type="cite">
<meta content="text/html; charset=UTF-8"
http-equiv="Content-Type">
<title></title>
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>
</blockquote>
<br>
Hi Anca,<br>
thank you for your interesting point of view.<br>
<br>
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).<br>
</blockquote>
<br>
XCAP server does not store the published presence state, but only a
permanent state - through pidf manipulation (RFC 4827) ( not sure
though what clients support this). <br>
So in fact for your design, you should maybe query the published
state in presence server and also check if the user has some default
state set in XCAP server.<br>
One of our development projects this year will be add an event
notification interface to OpenSIPS. And presence status change
events will also be included. It will be announced soon, stay tuned
:) . Then it will be possible to have an external application that
will be notified when a status change occurs for a user, maybe also
say which was the previous status. And your external application can
do anything with it - insert/delete a row usr_preferences for
example.<br>
<br>
Regards,<br>
<pre class="moz-signature" cols="72">--
Anca Vamanu
OpenSIPS Developer</pre>
<br>
<br>
<br>
<blockquote cite="mid:4D5CEEF8.4080705@gmail.com" type="cite"> <br>
This is just a proof of concept, as I need a better understanding
of all opensips presence modules.<br>
<br>
<br>
Best regards,<br>
Carlo Dimaggio<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</body>
</html>