[Serusers] Still trying to get record_route() to work

Bert Berlin btberlin at quintum.com
Mon Jun 7 19:47:18 CEST 2004


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 at 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.

Any ideas as to why?

thanks,
bert


#########################
#
# $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 andrei Exp $
#


# ----------- global configuration parameters ------------------------

#debug=3         # debug level (cmd line: -dddddddddd)
#fork=yes
#log_stderror=no    # (cmd line: -E)

/* Uncomment these lines to enter debugging mode */
debug=2
fork=yes
log_stderror=yes



check_via=yes    # (cmd. line: -v)
dns=yes           # (cmd. line: -r)
rev_dns=yes      # (cmd. line: -R)
port=5060
children=4
fifo="/tmp/ser_fifo"

# ------------------ module loading ----------------------------------

# Uncomment this if you want to use SQL database
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"

# 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"

# ----------------- setting module-specific parameters ---------------

# -- usrloc params --

#modparam("usrloc", "db_mode",   0)

# 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)

# -------------------------  request routing logic -------------------
alias=quintum.lab
alias=ken137.quintum.lab
alias=nisthost2.quintum.lab
alias=192.168.20.12

# 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 (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 at 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 =~


}





#######################

-- 


            Bert Berlin

Bert Berlin


Quintum Technologies, Inc.

71 James Way

Eatontown, NJ 07724

PH 732-460-9000 ext 247

Email: bert_berlin at quintum.com <mailto:beert_berlin at quintum.com>

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20040607/ea644df1/attachment.htm>


More information about the sr-users mailing list