Hi,
I use Presence Snapshot 4.1 on Linux 9.3.
SER doesn't generate a NOTIFY when status changes. In MySQL database, I can
see the change:
table: Presentity_Contact
basic: online/offline
status:""
I wonder why basic is online/offline and status is "". Is this correct? In
my messages, i send basic=open/closed.
In my config-file, I set the timer_interval to 5 seconds.
What am I doing wrong?
Regards,
Alois
SUBSCRIBE sip:PDA_User@fh-joanneum.at SIP/2.0..Via: SIP/2.0/UDP
10.15.200.22:5060;rport;branch=z9hG4bK67417..Max-Forwards: 70..To:
<sip:PDA_User@fh-joanneum.at>..From:
<sip:esca@fh-joanneum.at>;tag=z9hG4bK64795000..Call-ID:
720365631452@10.15.200.22..CSeq: 1 SUBSCRIBE..Contact:
<sip:esca@10.15.200.22>..Expires: 3600..User-Agent: mjsip stack 1.6..Event:
presence..Accept: application/cpimpidf+xml..Content-Length: 0....
SIP/2.0 202 Accepted..Via: SIP/2.0/UDP
10.15.200.22:5060;rport=5060;branch=z9hG4bK67417..To:<sip:PDA_User@fhjoanneum.at>;tag=589230a54cd08b3768529724501fae28-4f39..From:
<sip:esca@fh-joanneum.at>;tag=z9hG4bK64795000..Call-ID:720365631452@10.15.200.22..CSeq:
1 SUBSCRIBE..Expires: 3600..Contact: <sip:10.15.200.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 feedba
ck tells: pid=17547 req_src_ip=10.15.200.22 req_src_port=5060
in_uri=sip:PDA_User@fhjoanneum.
at out_uri=sip:PDA_User@fh-joanneum.at via_cnt==1"....
NOTIFY sip:esca@10.15.200.22 SIP/2.0..Via: SIP/2.0/UDP
10.15.200.57;branch=z9hG4bK720f.274f52a6.0..To:<sip:esca@fhjoanneum.at>;tag=z9hG4bK64795000..From:
<sip:PDA_User@fh-joanneum.at>;tag=589230a54cd08b3768529724501fae28-4f39..CSeq:1
NOTIFY..Call-ID: 720365631452@10.15.200.22..Content-Length: 0..
User-Agent: Sip EXpress router(0.10.99-dev35-pa-4.1 (i386/linux))..Event:
presence..Contact:
<sip:10.15.200.57:5060>..Subscription-State: pending;expires=3600....
U 10.15.200.22:5060 -> 10.15.200.57:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP
10.15.200.57;branch=z9hG4bK720f.274f52a6.0..To:
<sip:esca@fh-joanneum.at>;tag=z9hG4bK64795000..From: <sip:PDA_User@fh
-joanneum.at>;tag=589230a54cd08b3768529724501fae28-4f39..Call-ID:
720365631452@10.15.200.22..CSeq: 1 NOTIFY..Server: mjsip stack
1.6..Content-Length:0.
PUBLISH sip:PDA_User@fh-joanneum.at SIP/2.0..Via: SIP/2.0/UDP
10.0.0.3:5060;branch=z9hG4bK843798674..Max-Forwards: 70..From:
<sip:PDA_User@fhjoanneum
.at>;tag=850624414..To: <sip:PDA_User@fh-joanneum.at>..Call-ID:
1836804380-820133259-
1969969487..CSeq: 6 PUBLISH..Contact: <sip:PDA_User@fh-joanneum.a
t>..Content-Type: application/pidf+xml..Content-Length: 226..Expires:
7200..Event:
presence..User-Agent: SIP .NET 1.0 evaluation version,
www.independ
entsoft.com..SIP-If-Match: 0x409c3088x10cc41b0x4496b143....<?xml
version="1.0"
encoding="utf-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf"
entity="pres:PDA_user@fh-joanneum.at">
<tuple id="4e9a7335-5f7f-4a3c-91a7-fd761e9138b0">
<status><basic>open</basic>
</status>
</tuple>
</presence>..
SIP/2.0 200 OK..Via: SIP/2.0/UDP 10.0.0.3:5060;branch=z9hG4bK843798674..
From:<sip:PDA_User@fh-joanneum.at>;tag=850624414..To:
<sip:PDA_User@fh-joanneum.at>;tag=589230a54cd08b3768529724501fae28-ed6b..Call-ID:
1836804380-820133259-
1969969487..CSeq: 6 PUBLISH..Expires:
120..SIP-Tag:0x409c3088x10cc41b0x4496b143..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=17551 req_src_ip=10.0.0.3 req_src_port=5060
in_uri=sip:PDA_User@fh-joanneum.at out_uri=sip:PDA_User@fh-joanneum.at
via_cnt==1"
#
modparam("msilo","registrar","sip:registrar@test-domain.com")
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", "xcap") # 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", 120) # maximum value of
Expires for
publications
modparam("pa", "timer_interval", 5)
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")
route{
# XML RPC
if (method == "POST" || method == "GET") {
create_via();
log(1, "Created via()");
dispatch_rpc();
log(1, "Dispatched rps()");
break;
log(1, "break XML RPC");
}
# initial sanity checks -- messages with
# max_forwards==0, or excessively long requests
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
break;
};
if (msg:len >= max_len ) {
sl_send_reply("513", "Message too big");
break;
};
# we record-route all messages -- to make sure that
# subsequent messages will go through our proxy; that's
# particularly good if upstream and downstream entities
# use different transport protocol
if (!method=="REGISTER") record_route();
# subsequent messages withing a dialog should take the
# path determined by record-routing
if (loose_route()) {
# mark routing logic in request
append_hf("P-hint: rr-enforced\r\n");
route(1);
break;
};
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;
};
# message authorization
if (method=="MESSAGE") {
log(1, "MESSAGE authorization\n");
if (!authorize_message("http://localhost/xcap")) {
sl_reply("403", "Forbidden");
break;
}
}
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
log(1, "!lookup location gö");
sl_send_reply("404", "Not Found");
break;
};
};
# append_hf("P-hint: usrloc applied\r\n");
log(1, "route (1)");
route(1);
}
route[1]
{
# send it out now; use stateful forwarding as it works reliably
# even for UDP2TCP
if (!t_relay()) {
log(1, "!t_relay - sl reply error");
sl_reply_error();
};
}