Hi,
I have gotten one attempt at helping me with record_route(), which
doesn't seem to work in my simple config file. Again, what I am trying
to do is use SER in a lab situation, to test our UA under development.
I can successfully REGISTER, and the appropriate information is saved
in the location table in mysql. I can make a match on a sip uri ok,
and then forward to another uri.
However, when I attempt to use the record_route() function, nothing
seems to happen.
Attached is the config file. Note that I added, for debugging
purposes, a couple of fake sl_send_reply arguments, so I could see
when a match was made successfully to a uri, and after the
record_route(). An ethereal sniff shows that the uri in the first
block is matched (if (uri=="sip:17325555555@192.168.20.12")) , and the
message 678 etc appears in the Ethereal sniff. Then apparently the
record_route() is executed, and the "999" message appears in the
sniff. However, record_routing doesn't actually seem to occur. The
call is never completed, and there is nothing from the SER server that
shows up in the Ethereal sniff except the "999" message.
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
loadmodule "/usr/local/lib/ser/modules/auth.so"
loadmodule "/usr/local/lib/ser/modules/auth_db.so"
# Uncomment this if you want to use SQL database
# for persistent storage and comment the previous line
modparam("usrloc", "db_mode", 2)
# -- 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)
# 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 (len_gt( max_len )) {
sl_send_reply("513", "Message too big");
break;
};
# store user location if a REGISTER appears
if (method=="REGISTER") {
save("location");
break;
};
############################
if (uri=="sip:17325555555@192.168.20.12")
{
if(method=="INVITE")
{
sl_send_reply("678","matched uri for 20.137");
record_route();
sl_send_reply("999","return from record_route for
20.137");
};
};
if (uri=~"sip:1732922[0-9]*@192.168.20.12")
{
if(method=="INVITE")
{
sl_send_reply("678","matched uri for 20.220");
record_route();
};
};
if (uri=~"sip:173221000[0-9]*@192.168.20.12")
{
sl_send_reply("678","matched uri for 20.210");
forward(192.168.20.210, 5060);
};
if (uri=~"sip:173220000[0-9]*@192.168.20.12")
{
sl_send_reply("678","matched uri for 20.209");
forward(192.168.20.209, 5060);
};#end if uri =~