[Serusers] SER, presentity and mySQL

Vaclav Kubart vaclav.kubart at iptel.org
Tue Dec 13 10:31:15 CET 2005


Hi,
PA module should process PUBLISH messages (RFC 3903), not NOTIFY. You have 
to run the processing in the config script like:

...
if (method=="PUBLISH") {
    if (!t_newtran()) {
       log(1, "newtran error\n");
       sl_reply_error();
    };
    handle_publish("registrar");
    break;
};
...

But might be, that it will work for NOTIFY too (instead method=="PUBLISH" 
try method=="NOTIFY")... but this is not good solution (look to the 
publish RFC).

If you want to have published data (and existing subscriptions) stored in 
database, you have to set PA module parameters (use_db to 1, db_url to URL 
to db connection like other modules). This storage works only as a 
PA module status "backup" (it is reloaded after restart).

You can see status of PA module using serctl:
    serctl fifo pa_trace

 	Vaclav

On Tue, 13 Dec 2005, [ISO-8859-1] Ángel Gómez wrote:

> Hi, I'm working wich SER and making it to suport presence.
>
> Now I have SER instaled with the mySQL and pa modules loaded, the thing is
> than I make the pa module to use db to store the presence data, but when I
> send a Notify to the server its don't store any data in the
> presentity_contact table, and I want to know why it dosen't store anything
> in there.
>
> If some one knows why isn't stored any data, of if I make the notify bad, or
> if I doing this in the wrong way... please tell me, my objetive is to store
> the presentity status in teh data base.
>
> here is the notify than I use:
>
> NOTIFY sip:10.22.1.5:5060 SIP/2.0
> To: <sip:angel at 10.22.1.249>
> From: <sip:angel at 10.22.1.249>;tag=edf6b60e8b292eeca4ee51d20e01ffa7-e36a
> CSeq: 1 NOTIFY
> Call-ID: af2756608d177822
> Content-Length: 244
> User-Agent: Sip EXpress router(0.9.3 (i386/linux))
> Event: presence
> Content-Type: application/pidf+xml
> Subscription-State: active;expires=594
>
> <?xml version="1.0"?>
> <!DOCTYPE presence PUBLIC "//IETF//DTD RFCxxxx PIDF 1.0//EN" "pidf.dtd">
> <presence entity="sip:ninguna at 10.22.1.249">
> <tuple id="9r28r49">ser">
>  <status>
>    <basic>closed</basic>
>  </status>
> </tuple>
> </presence>
>


More information about the sr-users mailing list