[OpenSER-Users] openser 1.3.0 and presence module

Sigrid Thijs sigrid.thijs at androme.com
Fri Feb 15 12:46:32 CET 2008


Sigrid Thijs wrote:
> Hi,
> 
> we're testing openser 1.3.0 on a linux server with presence module. I'm 
> using the provided configuration file with the following modifications:
> 
> - loaded the modules mysql, presence, presence_xml
> - set the following parameters for these modules:
>    modparam("presence|presence_xml", "db_url",
>          "mysql://openser:[secret]@localhost/openser")
>    modparam("presence_xml", "force_active", 1)
>    modparam("presence", "server_address", "sip:[ip]:5060")
>    modparam("presence_xml","integrated_xcap_server", 1)
> - uncommented the code to handle PUBLISH/SUBSCRIBE requests to the
> presence module
> 

...

> 
> Furthermore I noticed that sometimes, the presence NOTIFY requests do
> not contain a body. I checked the database, and there was data in the
> body column in the presentity table for the presence resource.
> The value in the status column of the watchers/active_watchers table is
> 1. When I restart openser, the presence descriptions are added to the
> NOTIFY requests again (the entry in the database did not change).
> 
> I have to say that we insert some presence states directly in the 
> database via another process. But this is nothing more than an INSERT or 
> UPDATE statement on the presentity table.
> 
> Do you have any idea why a NOTIFY without body is sent? Do i need to
> configure something extra? And why does it seem to work after openser
> has restarted?
> 

Here's a scenario in which this happened again.
The presence of user1 at domain.com was inserted into the database by an 
external process.

user2 at domain.com subscribes to the presence of user1 at domain.com. A 202 
OK to the SUBSCRIBE request is received, followed by a NOTIFY without a 
body in the NOTIFY request.

I checked the tables in the database:
- there's an entry for user1 at domain.com in the presentity table (with 
the presence description in the body column):

| 21 | user1   | domain.com | presence | w.1203078663.80 | 1203078963 | 
    1203078663 | <?xml version="1.0" encoding="UTF-8"?>
<presence
   xmlns="urn:ietf:params:xml:ns:pidf"
   xmlns:ep="urn:ietf:params:xml:ns:pidf:status:rpid-status"
   xmlns:et="urn:ietf:params:xml:ns:pidf:rpid-tuple"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   entity="user1">
   <tuple id="446678912">
     <status>
       <basic>open</basic>
     </status>
   </tuple>
</presence>
  |


- the watchers table contains the following entry:
| 12 | sip:user1 at domain.com      | user2      | domain.com    | presence 
|      1 | NULL   |    1203078715 |

- the active_watchers table does not contain an entry for presentity_uri 
  'sip:user1 at domain.com'

After a while (a few minutes ?), the active_watchers table *does* 
contain an entry for the presentity_uri:

| 23 | sip:user1 at domain.com      | user2     | domain.com    | user1 | 
domain.com | presence |          | 10.31030.1203078715.1 | 3757768384 | 
1688817425 at 172.17.10.21 |          1 |           1 | 
sip:user1 at 172.17.10.21:5061 |              | 1203082315 |      1 | 
   |       1 | udp:172.17.10.86:5070 | sip:172.17.10.86:5070 |

When the client un-SUBSCRIBEs from the presence of user1 at domain.com, and 
subscribes again, the NOTIFY still does not contain a body.

When I restart openser, and the client SUBSCRIBES to the presence of 
user1 at domain.com, the NOTIFY does contain a body.

I guess it has something to do with openser not knowing that the entry 
has been added to the database. Is there some configuration option or mi 
command I can use to resolve this behavior?

kind regards,

Sigrid




More information about the Users mailing list