Hi,
more tuples are sent because you have "use_callbacks" parameter set
to 1 and thus it uses contacts registered by REGISTER as tuples. And
other reason is that your PUBLISH can not override existing tuple status
even if you use the same tuple ID as returned in NOTIFY. For "new" publications
(without Sip-If-Match, see RFC 3903) new tuples are created and they got
new generated IDs.
Some of that NOTIFYs are from other subscriptions (other dialog - it has
different call-id, ...).
You have to subscribe to watcher info for presence (RFC 3857) to receive
watcher info notifications.
Vaclav
On Mon, Jun 19, 2006 at 09:31:07PM +0200, Alois Schafferhofer wrote:
Hi,
I have some questions about PUBLISH handling. SER sends a lot of NOTIFYS
when status changes. Additionally, SER sends more than one tuples in one
Response (open and closed in one Response).
The second question is about WATCHERINFO_NOTIFY. I have the line:
modparam("pa", "watcherinfo_notify", 1) in my config file, but SER
doesn't
NOTIFY me, if someone SUBSCRIBEs to my Presence information.
Regards,
Alois
10.40.1.42:5060 -> 10.15.200.57:5060
SUBSCRIBE sip:PDA_User@fh-joanneum.at SIP/2.0..Via: SIP/2.0/UDP
10.40.1.42:5060;rport;branch=z9hG4bK92504..Max-Forwards: 70..To:
<sip:PDA_User@fh-joan
neum.at>..From: <sip:esca@fh-joanneum.at>;tag=z9hG4bK19686534..Call-ID:
035185567140@10.40.1.42..CSeq: 1 SUBSCRIBE..Contact:
<sip:esca@10.40.1.42>..Ex
pires: 3600..User-Agent: mjsip stack 1.6..Event: presence..Accept:
application/cpim-pidf+xml..Content-Length: 0....
#
10.15.200.57:5060 -> 10.40.1.42:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP
10.40.1.42:5060;rport=5060;branch=z9hG4bK92504..To:
<sip:PDA_User@fhjoanneum.
at>;tag=589230a54cd08b3768529724501fae2
8-51f5..From: <sip:esca@fh-joanneum.at>;tag=z9hG4bK19686534..Call-ID:
035185567140@10.40.1.42..CSeq: 1 SUBSCRIBE..Expires:
3600..Contact: <sip:10.15.2
00.57:5060>..Server: Sip EXpress router (0.10.99-dev35-pa-4.1
(i386/linux))..Content-Length: 0..Warning: 392 10.15.200.57:5060 "Noisy
feedback
tells:
pid=7288 req_src_ip=10.40.1.42 req_src_port=5060
in_uri=sip:PDA_User@fh-joanneum.at out_uri=sip:PDA_User@fh-joanneum.at
via_cnt==1"....
#
10.15.200.57:5060 -> 10.40.1.42:5060
NOTIFY sip:esca@10.40.1.42 SIP/2.0..Via: SIP/2.0/UDP
10.15.200.57;branch=z9hG4bKc1d8.7c27cd7.0..To: <sip:esca@fhjoanneum.
at>;tag=z9hG4bK19686534..Fro
m:
<sip:PDA_User@fh-joanneum.at>;tag=589230a54cd08b3768529724501fae28-51f5..CSeq:
1 NOTIFY..Call-ID:
035185567140@10.40.1.42..Content-Length: 305..Use
r-Agent: Sip EXpress router(0.10.99-dev35-pa-4.1 (i386/linux))..Event:
presence..Content-Type: application/cpim-pidf+xml..Contact:
<sip:10.15.200.57:5
060>..Subscription-State: active;expires=3600....<?xml version="1.0"
encoding="UTF-8"?>..<presence
xmlns="urn:ietf:params:xml:ns:cpim-pidf"
entity="pr
es:PDA_User@fh-joanneum.at">...<tuple
id="0x409c3328x557f3c98x44970bc3">....<status><basic>open</basic></status>....<contact
priority="0.00">sip:pda_u
ser@fh-joanneum.at</contact>...</tuple>..</presence>..
#
10.40.1.42:5060 -> 10.15.200.57:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP
10.15.200.57;branch=z9hG4bKc1d8.7c27cd7.0..To:
<sip:esca@fh-joanneum.at>;tag=z9hG4bK19686534..From:
<sip:PDA_User@fhjoanneum.
at>;tag=589230a54cd08b3768529724501fae28-51f5..Call-ID:
035185567140@10.40.1.42..CSeq: 1 NOTIFY..Server: mjsip stack
1.6..Content-Length: 0.
10.0.0.3:5060 -> 10.0.0.11:5060
PUBLISH sip:pda_user@fh-joanneum.at SIP/2.0..Via: SIP/2.0/UDP
10.0.0.3:5060;branch=z9hG4bK1286239759..Max-Forwards: 70..From:
<sip:pda_user@fh-joanneu
m.at>;tag=264505054..To: <sip:pda_user@fh-joanneum.at>..Call-ID:
2090602137-1913544447-137194582..CSeq: 2 PUBLISH..Contact:
<sip:pda_user@fh-joanneum.
at>..Content-Type: application/cpim-pidf+xml..Content-Length: 219..Expires:
7200..Event: presence..User-Agent: SIP .NET 1.0 evaluation version,
www.in
dependentsoft.com....<?xml version="1.0"
encoding="utf-8"?><presence
xmlns="urn:ietf:params:xml:ns:pidf"entity="pres:pda_user@fhjoanneum.
at"><tuple i
d="0x409c3328x557f3c98x44970bc3"><status><basic>closed</basic></status></tuple></presence>..
#
10.0.0.11:5060 -> 10.0.0.3:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP
10.0.0.3:5060;branch=z9hG4bK1286239759..From:
<sip:pda_user@fh-joanneum.at>;tag=264505054..To:
<sip:pda_user@fh-joann
eum.at>;tag=589230a54cd08b3768529724501fae28-f3b7..Call-ID:
2090602137-1913544447-137194582..CSeq: 2 PUBLISH..Expires: 120..SIPETag:
0x409c2714x56983
668x449711ab..Contact: <sip:10.0.0.11:5060>..Server: Sip EXpress router
(0.10.99-dev35-pa-4.1 (i386/linux))..Content-Length: 0..Warning: 392
10.0.0.11
:5060 "Noisy feedback tells: pid=7293 req_src_ip=10.0.0.3 req_src_port=5060
in_uri=sip:pda_user@fh-joanneum.at out_uri=sip:pda_user@fhjoanneum.
at vi
a_cnt==1"
10.15.200.57:5060 -> 10.40.1.42:5060
NOTIFY sip:esca@10.40.1.42 SIP/2.0..Via: SIP/2.0/UDP
10.15.200.57;branch=z9hG4bK91d8.2831e0b1.0..To: <sip:esca@fhjoanneum.
at>;tag=z9hG4bK19686534..Fr
om:
<sip:PDA_User@fh-joanneum.at>;tag=589230a54cd08b3768529724501fae28-51f5..CSeq:
2 NOTIFY..Call-ID:
035185567140@10.40.1.42..Content-Length: 441..Us
er-Agent: Sip EXpress router(0.10.99-dev35-pa-4.1 (i386/linux))..Event:
presence..Content-Type: application/cpim-pidf+xml..Contact:
<sip:10.15.200.57:
5060>..Subscription-State: active;expires=3545....<?xml version="1.0"
encoding="UTF-8"?>..<presence
xmlns="urn:ietf:params:xml:ns:cpim-pidf"
entity="p
res:PDA_User@fh-joanneum.at">...<tuple
id="0x409c45e0x5dd5903fx449711ab">....<status><basic>closed</basic></status>....<contact
priority="0.00"></cont
act>...</tuple>...<tuple
id="0x409c3328x557f3c98x44970bc3">....<status><basic>open</basic></status>....<contact
priority="0.00">sip:pda_user@fh-joanne
um.at</contact>...</tuple>..</presence>..
#
10.15.200.57:5060 -> 10.40.1.42:5060
NOTIFY sip:esca@10.40.1.42 SIP/2.0..Via: SIP/2.0/UDP
10.15.200.57;branch=z9hG4bK23e1.c6b3a835.0..To: <sip:esca@fhjoanneum.
at>;tag=z9hG4bK13311114..Fr
om:
<sip:PDA_User@fh-joanneum.at>;tag=589230a54cd08b3768529724501fae28-4a9d..CSeq:
6 NOTIFY..Call-ID:
480873203923@10.40.1.42..Content-Length: 441..Us
er-Agent: Sip EXpress router(0.10.99-dev35-pa-4.1 (i386/linux))..Event:
presence..Content-Type: application/cpim-pidf+xml..Contact:
<sip:10.15.200.57:
5060>..Subscription-State: active;expires=2198....<?xml version="1.0"
encoding="UTF-8"?>..<presence
xmlns="urn:ietf:params:xml:ns:cpim-pidf"
entity="p
res:PDA_User@fh-joanneum.at">...<tuple
id="0x409c45e0x5dd5903fx449711ab">....<status><basic>closed</basic></status>....<contact
priority="0.00"></cont
act>...</tuple>...<tuple
id="0x409c3328x557f3c98x44970bc3">....<status><basic>open</basic></status>....<contact
priority="0.00">sip:pda_user@fh-joanne
um.at</contact>...</tuple>..</presence>..
#
10.15.200.57:5060 -> 10.40.1.42:5060
NOTIFY sip:esca@10.40.1.42 SIP/2.0..Via: SIP/2.0/UDP
10.15.200.57;branch=z9hG4bKe636.2a57bde3.0..To: <sip:esca@fhjoanneum.
at>;tag=z9hG4bK49649677..Fr
om:
<sip:PDA_User@fh-joanneum.at>;tag=589230a54cd08b3768529724501fae28-9d18..CSeq:
12 NOTIFY..Call-ID:
047322370278@10.40.1.42..Content-Length: 441..U
ser-Agent: Sip EXpress router(0.10.99-dev35-pa-4.1 (i386/linux))..Event:
presence..Content-Type: application/cpim-pidf+xml..Contact:
<sip:10.15.200.57
:5060>..Subscription-State: active;expires=1614....<?xml version="1.0"
encoding="UTF-8"?>..<presence
xmlns="urn:ietf:params:xml:ns:cpim-pidf"
entity="
pres:PDA_User@fh-joanneum.at">...<tuple
id="0x409c45e0x5dd5903fx449711ab">....<status><basic>closed</basic></status>....<contact
priority="0.00"></con
tact>...</tuple>...<tuple
id="0x409c3328x557f3c98x44970bc3">....<status><basic>open</basic></status>....<contact
priority="0.00">sip:pda_user@fh-joann
eum.at</contact>...</tuple>..</presence>..
#
10.15.200.57:5060 -> 10.40.1.42:5060
NOTIFY sip:esca@10.40.1.42 SIP/2.0..Via: SIP/2.0/UDP
10.15.200.57;branch=z9hG4bKe7b3.ac386935.0..To: <sip:esca@fhjoanneum.
at>;tag=z9hG4bK24602857..Fr
om:
<sip:PDA_User@fh-joanneum.at>;tag=589230a54cd08b3768529724501fae28-52ae..CSeq:
19 NOTIFY..Call-ID:
310599367527@10.40.1.42..Content-Length: 441..U
ser-Agent: Sip EXpress router(0.10.99-dev35-pa-4.1 (i386/linux))..Event:
presence..Content-Type: application/cpim-pidf+xml..Contact:
<sip:10.15.200.57
:5060>..Subscription-State: active;expires=1236....<?xml version="1.0"
encoding="UTF-8"?>..<presence
xmlns="urn:ietf:params:xml:ns:cpim-pidf"
entity="
pres:PDA_User@fh-joanneum.at">...<tuple
id="0x409c45e0x5dd5903fx449711ab">....<status><basic>closed</basic></status>....<contact
priority="0.00"></con
tact>...</tuple>...<tuple
id="0x409c3328x557f3c98x44970bc3">....<status><basic>open</basic></status>....<contact
priority="0.00">sip:pda_user@fh-joann
eum.at</contact>...</tuple>..</presence>..
#
10.40.1.42:5060 -> 10.15.200.57:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP
10.15.200.57;branch=z9hG4bK91d8.2831e0b1.0..To:
<sip:esca@fh-joanneum.at>;tag=z9hG4bK19686534..From:
<sip:PDA_User@fh
-joanneum.at>;tag=589230a54cd08b3768529724501fae28-51f5..Call-ID:
035185567140@10.40.1.42..CSeq: 2 NOTIFY..Server: mjsip stack
1.6..Content-Length: 0.
...
#
10.40.1.42:5060 -> 10.15.200.57:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP
10.15.200.57;branch=z9hG4bK23e1.c6b3a835.0..To:
<sip:esca@fh-joanneum.at>;tag=z9hG4bK13311114..From:
<sip:PDA_User@fh
-joanneum.at>;tag=589230a54cd08b3768529724501fae28-4a9d..Call-ID:
480873203923@10.40.1.42..CSeq: 6 NOTIFY..Server: mjsip stack
1.6..Content-Length: 0.
...
#
10.40.1.42:5060 -> 10.15.200.57:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP
10.15.200.57;branch=z9hG4bKe636.2a57bde3.0..To:
<sip:esca@fh-joanneum.at>;tag=z9hG4bK49649677..From:
<sip:PDA_User@fh
-joanneum.at>;tag=589230a54cd08b3768529724501fae28-9d18..Call-ID:
047322370278@10.40.1.42..CSeq: 12 NOTIFY..Server: mjsip stack
1.6..Content-Length: 0
....
#
10.40.1.42:5060 -> 10.15.200.57:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP
10.15.200.57;branch=z9hG4bKe7b3.ac386935.0..To:
<sip:esca@fh-joanneum.at>;tag=z9hG4bK24602857..From:
<sip:PDA_User@fh
-joanneum.at>;tag=589230a54cd08b3768529724501fae28-52ae..Call-ID:
310599367527@10.40.1.42..CSeq: 19 NOTIFY..Server: mjsip stack
1.6..Content-Length: 0
modparam("msilo","use_contact",0)
modparam("msilo","expire_time",7200)
# -- usrloc params --
# -- auth params --
# Uncomment if you are using auth module
#
modparam("auth_db", "calculate_ha1", yes)
#
# If you set "calculate_ha1" parameter to yes (which true in this config),
# uncomment also the following parameter)
#
modparam("auth_db", "password_column", "password")
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
modparam("rls", "min_expiration", 200)
modparam("rls", "max_expiration", 300)
modparam("rls", "default_expiration", 300)
modparam("rls", "auth", "none") #"implicit"
modparam("rls", "xcap_root", "http://localhost/xcap")
modparam("rls", "reduce_xcap_needs", 1)
modparam("rls", "db_mode", 1)
modparam("rls", "db_url",
"mysql://ser:heslo@localhost:3306/ser")
modparam("pa", "default_expires", 3600)
modparam("pa", "use_db", 1)
#modparam("pa", "pa_domain", "fh-joanneum.at")
modparam("pa", "use_offline_winfo", 1) # allow storing authorization
requests for offline users into database
modparam("pa", "offline_winfo_timer", 600) # how often try to remove
old
stored authorization requests
modparam("pa", "offline_winfo_expiration", 600) # how long stored
authorization requests live
modparam("pa", "db_url",
"mysql://ser:heslo@localhost:3306/ser")
modparam("pa", "auth", "none") # mode of PA authorization:
none, implicit
or xcap
#modparam("pa", "auth_xcap_root", "http://localhost/xcap")
modparam("pa", "winfo_auth", "none") # do not authorize
watcherinfo
subscriptions
modparam("pa", "use_callbacks", 1) # use only published information
if set
to 0
modparam("pa", "accept_internal_subscriptions", 1) # don't accept
internal
subscriptions from RLS, ...
modparam("pa", "watcherinfo_notify", 1)
modparam("pa", "max_subscription_expiration", 3600) # maximum value
of
Expires for subscriptions
modparam("pa", "max_publish_expiration", 3600) # maximum value of
Expires
for publications
modparam("pa", "timer_interval", 5) # how often test if something
changes
and send NOTIFY
modparam("presence_b2b", "presence_route",
"<sip:127.0.0.1;transport=tcp;lr>") # route for generated SUBSCRIBE
requests
for presence
modparam("presence_b2b", "on_error_retry_time", 60) # waiting time
from
error to new attepmt about SUBSCRIBE
modparam("presence_b2b", "wait_for_term_notify", 33) # how long wait
for
NOTIFY with Subscription-Status=terminated
after unsubscribe
modparam("presence_b2b", "resubscribe_delta", 30) # how long before
expiration send renewal SUBSCRIBE request
modparam("presence_b2b", "min_resubscribe_time", 60) # minimal time
to send
renewal SUBSCRIBE request from receiving
previous response
modparam("presence_b2b", "default_expiration", 3600) # default
expiration
timeout
modparam("presence_b2b", "handle_presence_subscriptions", 1) #
process
internal subscriptions to presence events
modparam("usrloc", "db_mode", 1)
modparam("domain", "db_mode", 1)
modparam("domain|uri_db|acc|auth_db|usrloc|msilo", "db_url",
"mysql://ser:heslo@localhost:3306/ser")
modparam("domain", "domain_table", "domain")
#modparam("domain", "domain_column", "domain")
modparam("fifo", "fifo_file", "/tmp/ser_fifo")
if (uri==myself) {
log(1, "URI == myself");
if (method=="SUBSCRIBE") {
log(1, "SUBSCRIBE received");
if (!t_newtran()) {
sl_reply_error();
break;
};
# new subscription
if (@to.tag=="") {
log(1, "new SUBSCRIPTION");
if ((@msg.supported=~"eventlist")) {
log(1, "msg.supported=eventlist");
# Supported header field
# -> may be RLS subscription
if (is_simple_rls_target("$uid-list")) {
log(1, "it is simple subscription!\n");
# handle_rls_subscription("1");
# takes From UID and makes XCAP query
# for user's list named "default"
if (@to.tag=="") {
# only for new subscriptions (with empty to tag
if (!query_resource_list("default")) {
t_reply("500", "XCAP query error");
break;
}
}
}
if (!have_flat_list()) {
# query_resource_list failed or was not called
# do standard RLS query acording to To/AOR
query_rls_services();
}
if (have_flat_list()) {
handle_rls_subscription("1");
break;
}
}
# SUBSCRIBE to existing user
# xlog("L_ERR", "PA: handling subscription: %tu from: %fu\n");
log(1, "handle SUBSCRIBE request\n");
handle_subscription("registrar");
log(1, "handled subscription\n");
log(1, "break 1");
break;
}
else { # renewal subscription
log(1, "else - renewal subscription");
if (!handle_rls_subscription("0")) {
log(1, "!handle rls subscription");
handle_subscription("registrar");
log(1, "handled subscription 2");
}
log(1, "break 2");
break;
}
}
if (method=="REGISTER") {
log(1, "REGISTER received");
# if (!www_authorize("fh-joanneum.at", "credentials")) {
# www_challenge("fh-joanneum.at", "0");
# break;
# };
save("location");
log(1, "saved location");
break;
};
if (method=="PUBLISH") {
log(1, "PUBLISH received");
if (!t_newtran()) {
sl_reply_error();
break;
};
log(1, "handle publish request\n");
handle_publish("registrar");
log(1, "handled publish\n");
break;
};
if (method=="NOTIFY") {
log(1, "NOTIFY received");
if (!t_newtran()) {
log(1, "newtran error\n");
sl_reply_error();
break;
};
if (!handle_notify()) {
log(1, "unable to handle notification - lui");
t_reply("481", "Unable to handle notification");
}
break;
};
_______________________________________________
Serusers mailing list
Serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers