[Serdev] ser 0.9.0, CANCEL/t_on_failure broken

Andres andres at telesip.net
Fri Mar 4 07:12:36 UTC 2005


I just tried testing 0.9.0 for this first time.  Unfortunately 
t_on_failure seems broken when a CANCEL is processed.

I reported this last week regarding CVS HEAD but since nobody answered 
then I tried 0.9.0.  First with our production ser.cfg and then with the 
stripped down ser.cfg from the "sip_router/etc" directory.

The problem is that if a call is CANCELLED, the fr_inv_timer keeps 
running so 120 seconds later a new INVITE is fired to the backup gateway. 

I have attached an Ethereal trace of the event.   Note the second INVITE 
120 seconds later.

This is the ser.cfg used:
#
# $Id: ser.cfg,v 1.25.2.1 2005/02/18 14:30:44 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)

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

check_via=no    # (cmd. line: -v)
dns=no           # (cmd. line: -r)
rev_dns=no      # (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"
loadmodule "/usr/local/lib/ser/modules/textops.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)
modparam("rr", "enable_full_lr", 1)

# -------------------------  request routing logic -------------------

# main routing logic
alias="xxxxxx.telesip.net"

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 >=  2048 ) {
                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) {
                # mark routing logic in request
                append_hf("P-hint: outbound\r\n");
                route(1);
                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") {
                        save("location");
                        break;
                };
        if (method=="INVITE") {
                 if ((uri=~"sip:01954[0-9]{7}@.*")) {
                      log(1, "This is a Local Call\n");
                      route(2);
                      break;
                  };
       };
       };
        route(1);
}
################
route[1]
{
        # send it out now; use stateful forwarding as it works reliably
        # even for UDP2TCP
         t_relay();
}

route[2]
{
        rewritehostport("xxxxx.telesip.net:5066");
        t_on_failure("2");
        if (!t_relay()) {
                sl_reply_error();
        };
}

failure_route[2] {
         rewritehostport("200.116.XXX.XX:5060");
         append_branch();
         log(1, "Forwarding Call to Backup Gateway!\n");
         t_relay();
}
                                                                                 



-- 
Andres
Network Admin
http://www.telesip.net

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Cancel.zip
Type: application/x-zip-compressed
Size: 1677 bytes
Desc: not available
Url : http://lists.iptel.org/pipermail/serdev/attachments/20050304/757baa50/Cancel.bin


More information about the Serdev mailing list