Greetings,
I seem to be having some trouble with the pa module on SER 0.10.99-dev0
running on Fedora 3.
I can REGISTER fine, and issuing a SUBSCRIBE results in a 200 OK response
(and NOTIFYs being generated by the server).
However, both the 200 OK response to the SUBSCRIBE and the NOTIFY messages
are all missing a Contact header field.
Here's the messages:
======================================================
Session Initiation Protocol
Request-Line: SUBSCRIBE sip:dontest@172.17.76.25 SIP/2.0
Method: SUBSCRIBE
Resent Packet: False
Message Header
To: <sip:dontest@172.17.76.25>
From: <sip:don@172.17.76.25>;tag=b029225f
Via: SIP/2.0/UDP
172.17.84.29:5060;branch=z9hG4bK-d87543-671970329-1--d87543-;rport
Call-ID: 7f37841cd1635a0b
CSeq: 1 SUBSCRIBE
Contact: <sip:don@172.17.84.29:5060>
Expires: 600
Max-Forwards: 70
Accept: application/pidf+xml
Event: presence
Content-Length: 0
Session Initiation Protocol
Status-Line: SIP/2.0 200 OK
Status-Code: 200
Resent Packet: False
Message Header
To:
<sip:dontest@172.17.76.25>;tag=44274c5ba0cc60268b6a1c7eb3de8672-9325
From: <sip:don@172.17.76.25>;tag=b029225f
Via: SIP/2.0/UDP
172.17.84.29:5060;branch=z9hG4bK-d87543-671970329-1--d87543-;rport=5060
Call-ID: 7f37841cd1635a0b
CSeq: 1 SUBSCRIBE
Server: Sip EXpress router (0.10.99-dev0 (i386/linux))
Content-Length: 0
Session Initiation Protocol
Request-Line: NOTIFY sip:don@172.17.84.29:5060 SIP/2.0
Method: NOTIFY
Resent Packet: False
Message Header
Via: SIP/2.0/UDP 172.17.76.25;branch=z9hG4bKaebf.9fd37101.0
To: <sip:don@172.17.76.25>;tag=855dae7f
From:
<sip:dontest@172.17.76.25>;tag=44274c5ba0cc60268b6a1c7eb3de8672-0ddd
CSeq: 3 NOTIFY
Call-ID: b063ea763c2f6d3d
Content-Length: 245
User-Agent: Sip EXpress router(0.10.99-dev0 (i386/linux))
Event: presence
Content-Type: application/pidf+xml
Subscription-State: active;expires=594
Message body
======================================================
I've been looking at all the documentation I can find, and I can't seem to
find out why these are being omitted.
Is there something wrong w/my configuration? (see below) Any suggestions
why this might be ocurring?
don_g
======================================================
ser.cfg file:
======================================================
#---------------------------------------------------------------------
# global configuration parameters
#---------------------------------------------------------------------
#debug=7
#fork=no
#log_stderror=no
listen="172.17.76.25"
alias="localhost.localdomain"
alias="172.17.76.25"
alias="localhost.mycompany.com"
dns=no
rev_dns=no
port=5060
check_via=no
sip_warning=no
fifo="/tmp/ser_fifo"
fifo_db_url="mysql://ser:heslo@localhost/ser"
#---------------------------------------------------------------------
# module loading
#---------------------------------------------------------------------
loadmodule "/usr/local/lib/ser/modules/mysql.so"
loadmodule "/usr/local/lib/ser/modules/sl.so"
loadmodule "/usr/local/lib/ser/modules/tm.so"
loadmodule "/usr/local/lib/ser/modules/rr.so"
loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
loadmodule "/usr/local/lib/ser/modules/usrloc.so"
loadmodule "/usr/local/lib/ser/modules/registrar.so"
loadmodule "/usr/local/lib/ser/modules/auth.so"
loadmodule "/usr/local/lib/ser/modules/auth_db.so"
loadmodule "/usr/local/lib/ser/modules/exec.so"
loadmodule "/usr/local/lib/ser/modules/group.so"
loadmodule "/usr/local/lib/ser/modules/print.so"
loadmodule "/usr/local/lib/ser/modules/uri.so"
loadmodule "/usr/local/lib/ser/modules/uri_db.so"
loadmodule "/usr/local/lib/ser/modules/domain.so"
loadmodule "/usr/local/lib/ser/modules/xlog.so"
loadmodule "/usr/local/lib/ser/modules/options.so"
loadmodule "/usr/local/lib/ser/modules/textops.so"
loadmodule "/usr/local/lib/ser/modules/pa.so"
#---------------------------------------------------------------------
# setting module-specific parameters
#---------------------------------------------------------------------
#---------------------------------------------------------------------
# tm module parameters
#---------------------------------------------------------------------
modparam("tm", "fr_inv_timer", 40)
modparam("tm", "wt_timer", 5)
modparam("tm", "fr_timer", 20)
#---------------------------------------------------------------------
# rr module parameters
#---------------------------------------------------------------------
modparam("rr", "enable_full_lr", 1)
#---------------------------------------------------------------------
# userloc module parameters
#---------------------------------------------------------------------
modparam("usrloc", "db_url",
"mysql://ser:heslo@localhost/ser")
modparam("usrloc", "timer_interval", 60)
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "use_domain", 1)
modparam("usrloc", "desc_time_order", 1)
#---------------------------------------------------------------------
# registrar module parameters
#---------------------------------------------------------------------
modparam("registrar", "default_expires", 3600)
modparam("registrar", "min_expires", 60)
modparam("registrar", "max_expires", 86400)
modparam("registrar", "append_branches", 1)
modparam("registrar", "use_domain", 1)
modparam("registrar", "desc_time_order", 1)
#---------------------------------------------------------------------
# pa module parameters
#---------------------------------------------------------------------
modparam("pa", "default_expires", 3600)
modparam("pa", "default_priority_percentage", 50)
modparam("pa", "db_url", "mysql://ser:heslo@localhost/ser")
modparam("pa", "pa_domain", "172.17.76.25")
modparam("pa", "use_db", 1)
#---------------------------------------------------------------------
# auth_db module parameters
#---------------------------------------------------------------------
modparam("auth_db", "db_url",
"mysql://ser:heslo@localhost/ser")
modparam("auth_db", "password_column", "password")
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "use_domain", 1)
#---------------------------------------------------------------------
# exec module parameters
#---------------------------------------------------------------------
modparam("exec", "setvars", 1)
modparam("exec", "time_to_kill", 10)
#---------------------------------------------------------------------
# group module parameters
#---------------------------------------------------------------------
modparam("group", "db_url",
"mysql://ser:heslo@localhost/ser")
modparam("group", "use_domain", 1)
#---------------------------------------------------------------------
# uri_db module parameters
#---------------------------------------------------------------------
modparam("uri_db", "db_url",
"mysql://ser:heslo@localhost/ser")
modparam("uri_db", "use_domain", 1)
#---------------------------------------------------------------------
# domain module parameters
#---------------------------------------------------------------------
modparam("domain", "db_url",
"mysql://ser:heslo@localhost/ser")
modparam("domain", "db_mode", 1)
#---------------------------------------------------------------------
# xlog module parameters
#---------------------------------------------------------------------
modparam("xlog", "buf_size", 8192)
#---------------------------------------------------------------------
# main routing logic
#---------------------------------------------------------------------
route{
#---------------------------------------------------------
# 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 within 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) {
# mark routing logic in request
append_hf("P-hint: outbound\r\n");
route(1);
break;
};
if (uri==myself) {
if (method=="REGISTER") {
if (!www_authorize("172.17.76.25", "subscriber")) {
www_challenge("172.17.76.25", "1");
break;
};
save("location");
break;
};
lookup("aliases");
if (!uri==myself) {
append_hf("P-hint: outbound alias\r\n");
route(1);
break;
};
#------------------------------------------------------
# native SIP destinations are handled using our USRLOC DB
#------------------------------------------------------
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
break;
};
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;
};
};
append_hf("P-hint: userloc applied\r\n");
route(1);
}
#---------------------------------------------------------------------
# Route Section [1]
#---------------------------------------------------------------------
route[1]
{
#------------------------------------------------------
# forward to current uri now; use stateful forwarding; that
# works reliably even if we forward from TCP to UDP
#------------------------------------------------------
if (!t_relay()) {
sl_reply_error();
};
}