[OpenSER-Users] Presence Working?

Anca-Maria Vamanu anca at voice-system.ro
Fri Aug 17 11:07:10 CEST 2007


Hello,

If force active is set, there is no query in xcap_xml table and the 
status is considered 'active'. However, the first subscription is sent 
with status pending to  anounce clients that a new contact should be 
added if not already in list. The watchers table, which stores the 
present state of a subscription is used only to insert a new record or 
update the state. No fetching is done when force_active is set.
Basically, if you use force active , the state will be active and 
Notifies with all changes will be sent.

regards,

Anca Vamanu


Jorge Guntanis wrote:

>Also may be you can clarify this for me.
>
>When using force_active=1 is this the behavior: instead of querying for
>permissions to see presence of other phones, it will just query the
>presentity table, and return the xml on the body column on a notify, and
>add the uri in the watcher's table so on future publishes they get
>"notified"?
>
>Am I getting the concept correctly?
>
>Best Regards,
>Jorge
>
>-----Original Message-----
>From: users-bounces at openser.org [mailto:users-bounces at openser.org] On
>Behalf Of Jorge Guntanis
>Sent: Friday, August 17, 2007 1:15 AM
>To: Anca-Maria Vamanu
>Cc: users at openser.org
>Subject: RE: [OpenSER-Users] Presence Working?
>
>Yup, at least I think so.
>This is the config for xcap-lite
>
>$XcapServerConfig=array(
>    'debug'        => true,
>    'realms'       => array(
>                            'default'      => array (
>                                                     'AuthOptions'  =>
>array(
> 
>'dsn'           => 'mysql://openser:openserrw@localhost/openser',
> 
>'table'         => 'subscriber',
> 
>'usernamecol'   => 'username',
> 
>'passwordcol'   => 'password',
> 
>'cryptType'     => 'none',
> 
>'db_fields'     => 'domain'
> 
>),
>                                                     'StorageDSN'    =>
>'mysql://openser:openserrw@localhost/openser',
>                                                     'trustedPeers'  =>
>array(),
>                                                     'xcap-root'      =>
>array('http://xcap.mydomain.com/xcap-root'),
> 
>'refreshWatchersURL' => '192.168.0.2:9090'
>                                                     ),
>                            )
>
>    );
>
>Is there anything I need to configure in the openser config file other
>than:
>modparam("mi_xmlrpc", "port", 9090)
>
>Thanks for your help.
>
>Jorge
>-----Original Message-----
>From: Anca-Maria Vamanu [mailto:anca at voice-system.ro] 
>Sent: Friday, August 17, 2007 1:05 AM
>To: Jorge Guntanis
>Cc: users at openser.org
>Subject: Re: [OpenSER-Users] Presence Working?
>
>Hello,
>
>Are you using an xcap server to work with openser?  If not, you should 
>set force_active parameter to 1.
>
>modparam("presence_xml", "force_active", 1).
>
>regards, 
>
>Anca Vamanu
>
>
>
>Jorge Guntanis wrote:
>
>  
>
>>I was wondering if anyone has gotten the presence module working with
>>openser.
>>The reason I ask is because I've been trying to make it work for 2
>>    
>>
>weeks
>  
>
>>without any luck, and at this point, I can't figure out what I'm doing
>>wrong.
>>
>>This is my setup:
>>
>>I have a debian 4.0, running openser 1.3.0-dev11-notls [svnrevision:
>>2:2607M] also tried with 2327
>>Compiled with mysql, presence, mi_xmlrpc, presence xml modules.
>>Also have the xcap-lite server set up.
>>
>>My configuration looks like this:
>>[just the related stuff]
>>
>># -- mi_xmlrpc params --
>>
>>modparam("mi_xmlrpc", "log_file", "/var/log/openser-xmlrpc.log")
>>modparam("mi_xmlrpc", "port", 9090)
>>
>>
>># -- presence params --
>>modparam("presence", "db_url",
>>"mysql://openser:openserrw@localhost/openser")
>>modparam("presence", "presentity_table", "presentity")
>>modparam("presence", "active_watchers_table", "active_watchers")
>>modparam("presence", "watchers_table", "watchers")
>>modparam("presence", "clean_period", 100)
>>modparam("presence", "to_tag_pref", 'a')
>>modparam("presence", "expires_offset", 10)
>>modparam("presence", "max_expires", 3600)
>>modparam("presence", "server_address", "sip:presense_server_ip:5065")
>>#modparam("presence", "xcap_table", "xcap_xml")
>>
>># -- presence_xml params
>>modparam("presence_xml", "force_active", 0)
>>modparam("presence_xml", "db_url",
>>"mysql://openser:openserrw@localhost/openser")
>>modparam("presence_xml", "xcap_table", "xcap_xml")
>>modparam("presence_xml", "pidf_manipulation", 1)
>>
>>
>># presence handling route
>>route[2]
>>{
>>       # absorb retransmissions
>>       if (! t_newtran())
>>       {
>>               sl_reply_error();
>>               exit;
>>       };
>>
>>       if(is_method("PUBLISH"))
>>       {
>>               if($hdr(Sender)!= NULL)
>>                       handle_publish("$hdr(Sender)");
>>               else
>>                       handle_publish("");
>>               t_release();
>>       }
>>       else if( is_method("SUBSCRIBE")) {
>>               handle_subscribe();
>>               t_release();
>>       };
>>
>>       exit;
>>}
>>
>>The presentity does get updated when I change my status.
>>
>>Ie:
>><presence xmlns="urn:ietf:params:xml:ns:pidf"
>>xmlns:pp="urn:ietf:params:xml:ns:pidf:person"
>>xmlns:et="urn:ietf:params:xml:ns:pidf:rpid:rpid-tuple"
>>xmlns:ep="urn:ietf:params:xml:ns:pidf:rpid:rpid-person"
>>xmlns:es="urn:ietf:params:xml:ns:pidf:rpid:status:rpid-status"
>>xmlns:ci="urn:ietf:params:xml:ns:pidf:cipid"
>>entity="sip:10000010002 at 216.xxx.xxx.xxx">
>> <pp:person>
>>   <status>
>>     <ep:activities>
>>   <ep:busy/>
>>     </ep:activities>
>>   </status>
>> </pp:person>
>> <note>Busy</note>
>> <tuple id="e2438d66">
>>   <contact priority="1">sip:10000010002 at 216.xxx.xxx.xxx</contact>
>>   <status>
>>     <basic>open</basic>
>>   </status>
>> </tuple>
>></presence>
>>
>>But if I add  this line into another account running eyebeam, ie:
>>account 10000010001, it doesn't get a notify with my new status.
>>So I have it "sort" of working, yet the notifies are not.
>>
>>My Server set up is as follows:
>>Ser Main Server                           <--->               Openser
>>Presence Server
>>fwd subscribes and notifies                                   
>>to openser presence server
>>using the forward(); method.
>>
>>
>>
>>This is the debug log from openser, for when I change my status.
>>
>>
>>If someone has any idea of what's wrong or has make it work, I'd really
>>appreciate any advice.
>>
>>
>>
>> 
>>
>>    
>>
>
>
>_______________________________________________
>Users mailing list
>Users at openser.org
>http://openser.org/cgi-bin/mailman/listinfo/users
>
>  
>





More information about the Users mailing list