Hi,
what version of SER are you using? It seems that it is 0.9.x - there was
presence support working only partialy. Can you try 2.0?
Vaclav
On St, lis 28, 2007 at 01:27:53 +0000, Yufei Tao wrote:
Hi
I want to be able to use PUBLISH/SUBSCRIBE/NOTIFY for presence
information of users. So users can update their presence information by
PUBLISH and watchers be informed by NOTIFY when there are changes in
the presence status. I am using pa.so, mysql. Not using XCAP.
My problems are
1. The OK from SER to PUBLISH has no SIP_ETag. Also SER prints out debug
messages saying:
publish_presentity: no tuple for 01(a)sertest.com
I wonder if there's something wrong with my PUBLISH and PIDF so SER is
not processing it?
2. The watcher subscribes to the presentity 01(a)sertest.com. But the
NOTIFY message the watcher gets always has basic status being closed,
despite that the presentity has PUBLISHed its status as open. I guess
this may be due to problem 1 - SER never understood the PUBLISH?
Currently my UA sends PUBLISH message:
PUBLISH sip:01@sertest.com:5060 SIP/2.0
via: SIP/2.0/UDP 192.168.168.149:40070;branch=z9hG4bK314278337
max-forwards: 70
to: <sip:01@sertest.com:5060>
from: <sip:01@sertest.com:5060>;tag=314279337
call-id: cd674de3-0-1196253409
cseq: 46046 PUBLISH
contact: <sip:01@192.168.168.149:40070>
expires: 3600
user-agent: Red v1.00 0.6.3.42 - von
event: presence
content-type: application/pidf+xml
content-length: 274
<?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf"
entity="sip:01@sertest.com">
<tuple id="status">
<status>
<basic>open</basic>
</status>
<contact priority="0.500000">sip:01@sertest.com</contact>
</tuple>
</presence>
and SER replies with the following msg where there is no SIP-ETag field:
SIP/2.0 200 OK
via: SIP/2.0/UDP 192.168.168.149:40070;branch=z9hG4bK314278338
to: <sip:01@sertest.com:5060>;tag=482760500770a188d9ef565befb876b4-7979
from: <sip:01@sertest.com:5060>;tag=314279338
call-id: cd674de3-0-1196253409
cseq: 46047 PUBLISH
Server: Sip EXpress router (0.9.6 (i386/linux))
Content-Length: 0
Warning: 392 192.168.168.241:5060 "Noisy feedback tells: pid=14095
req_src_ip=192.168.168.149 req_src_port=40070
in_uri=sip:01@sertest.com:5060 out_uri=sip:01@sertest.com:5060 via_cnt==1"
The parts in my ser.cfg that are relevant to SUBSCRIBE and PUBLISH:
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "timer_interval", 10)
modparam("auth_db", "calculate_ha1", 1)
modparam("auth_db", "password_column", "password")
modparam("rr", "enable_full_lr", 1)
# for SUBSCRIBE/NOTIFY
modparam("pa", "default_expires", 3600)
modparam("pa", "use_db", 1)
modparam("pa", "db_url",
"mysql://ser:heslo@localhost/ser")
modparam("pa", "pa_domain", "sertest.com")# -- same as or
different from
registrar
... ...
... ...
if (method=="SUBSCRIBE") {
if (!t_newtran()) {
sl_reply_error();
break;
};
handle_subscription("registrar");
break;
}
if (method=="PUBLISH") {
if (!t_newtran()) {
log(1, "newtran error\n");
sl_reply_error();
};
handle_publish("registrar");
break;
};
lookup("aliases");
if (!uri==myself) {
append_hf("P-hint: outbound alias\r\n");
route(1);
break;
};
_______________________________________________
Serusers mailing list
Serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers