[Serusers] PA module + registration handling

Jamey Hicks jamey.hicks at hp.com
Fri Oct 15 16:56:48 CEST 2004


Dave Bath wrote:

> Hey guys,
>
> Many apologies if im just being totally dense on this one, but I’ve 
> been going back and forth for a few days now, and given how new the 
> presence module is there doesn’t seem to be huge amounts of 
> documentation on it.
>
> I’m attempting to get the PA module for the latest (as of a few days 
> ago) CVS to work. All other config bits in ser seem to work fine. I 
> think perhaps my confusion is also about how it’s supposed to work! 
> Perhaps if I could ask some questions, people could fill in where they 
> know the answers, or point me to the right place.
>
> I had in my config:
>
> if (method=="SUBSCRIBE" || method=="PUBLISH") { # BEGIN method==subscribe
>
> if (t_newtran()) {
>
> log(1,"PRESENCE: Change of state detected\n");
>
> handle_subscription("registrar");
>
> break;
>
> };
>
> };
>
Hi Dave,

I updated modules/pa/README this morning to try to reduce confusion. 
There are two functions that need to be called: handle_subscription for 
incoming SUBSCRIBE messages and handle_publish for incoming PUBLISH.

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

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

The function pa_handle_registration is no longer used.

Presence aware UA's register in the same way as others. To update 
extended status on the PA, they should send PUBLISH messages to ser.

Jamey






More information about the sr-users mailing list