<!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">
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>
<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>
</body>
</html>