[Serusers] record_route() problem

Tuan Pham tuan_junk at yahoo.com
Mon Mar 27 11:08:09 CEST 2006


  I am trying to force the ACK and BYE messages to go through SER.  However, I seem to have a problem with   record_route().  The record route field appears to be mangled (i.e., missing “;”   and a couple of characters after the IP address).
    Here is what the Record-Route field as sent from SER:
            Record-Route:   <sip:24.5.167.173ag=9612000026130000;lr=on>
  
  What do I need to do to get the ACK and BYE messages to go through SER?   Thanks,
    Tuan
    ---------------------------------------------
    Here’s my ser.cfg   file:
    #
  # $Id: ser.cfg,v 1.21.4.1 2003/11/10   15:35:15 andrei Exp $
  #
  # simple quick-start config   script
  #
   
  # ----------- global configuration   parameters ------------------------
   
  debug=3         # debug level (cmd   line: -dddddddddd)
  fork=yes
  log_stderror=no            # (cmd   line: -E)
   
  alias=24.5.167.173
  port=5060
  children=4
   
  dns=no
  rev_dns=no
  fifo="/tmp/ser_fifo"
  fifo_db_url="mysql://ser:heslo@localhost/ser"
   
  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/uri_db.so"
  loadmodule   "/usr/local/lib/ser/modules/auth.so"
  loadmodule   "/usr/local/lib/ser/modules/auth_db.so"
   
  modparam("auth_db|usrloc", "db_url",   "mysql://ser:heslo@localhost/ser")
  modparam("auth_db", "calculate_ha1",   1)
  modparam("auth_db",   "password_column", "password")
  modparam("usrloc", "db_mode",   2)
  modparam("rr", "enable_full_lr",   1)
   
  # -------------------------  request   routing logic -------------------
   
  # 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
              record_route();    
              # loose-route   processing
              if (loose_route())   {
                           t_relay();
                           break;
                };
   
              # if the request is for   other domain use UsrLoc
              # (in case, it does not   work, use the following command
              # with proper names and   addresses in it)
          if (uri==myself)   {
   
                           if (method=="REGISTER") {
                                       if (!www_authorize("", "subscriber")) {
                                                   www_challenge("", "0");
                                                   break;
                                       };
   
                                       save("location");
                                       break;
                           };
   
                           # native SIP destinations are handled using our USRLOC DB
                           if (!lookup("location")) {
                                       sl_send_reply("404", "Not Found");
                                       break;
                           };
                };
              # 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();
                };
   
  }

  
  
		
---------------------------------
New Yahoo! Messenger with Voice. Call regular phones from your PC for low, low rates.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20060327/ca8318bf/attachment.htm>


More information about the sr-users mailing list