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;
};
};
And like this, a presence aware client could register ok, and I could see from the debug outputs that they had registered, and when I tried to add new contacts to the "buddy list" subscribe requests were being issued. However, I have not yet seen any publish requests. Do I need to use the function handle_publish? Whenever this subscribe request happened, I see some errors in the syslog:
Oct 5 10:59:52 sip ser[15409]: PRESENCE: Change of state detected
Oct 5 10:59:52 sip ser[15409]: handle_subscription() entered
Oct 5 10:59:52 sip ser[15409]: parse_hfs(): Error while parsing headers
Oct 5 10:59:52 sip ser[15409]: handle_subscription(): Error while parsing message header
Oct 5 10:59:52 sip ser[15409]: handle_subscription about to send_reply and return -2
Also, I am a bit confused about registrations... as there is the function pa_handle_registration... Originally I did not modify the registration code, but when I tried to add this:
if (method=="REGISTER") { # BEGIN method==Register checking
if(t_newtran()){
pa_handle_registration("registrar");
break;
};
... etc, before my regular registration code, normal (voice) clients could no longer register and I got errors such as :
Oct 5 11:02:59 sip ser[15706]: parse_hfs(): Error while parsing headers
Oct 5 11:02:59 sip ser[15706]: pa_handle_registration(): Error while parsing headers
So I guess my question about that is, do presence-aware clients need to registered differently? And if so, how do you make sure you don't send your normal voice clients into that registration as well?
Any guidance on how to these functions are supposed to integrate would be very very much appreciated.
Many thanks in advance for all the help this list provides..
Dave
------------------------------------- Dave Bath dave-at-fuuz-dot-com www.fuuz.com http://www.fuuz.com/ 07736 232085
NOTE: The information contained in this email is intended for the named recipients only, it may be privileged and confidential. If you are not the intended recipient, you must not copy distribute or take any action in reliance upon it. No warranties or assurances are made in relation to the safety and content of this email and any attachments. No liability is accepted for any consequences arising from it
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