[Serusers] Bye messages not logged

Marc Khayat marc at globalcarrier.net
Tue Aug 30 12:25:30 CEST 2005


Hi all,
I upgraded my system from ser-0.8.14 to ser-0.9.3, and updated my
ser.cfg.
However, with the new thing, I'm getting INVITE and ACK messages, but no
the BYE nor the REGISTER messages.
I made no changes to the config file, only added the accounting
requirements. But is the below stateful?
Here's my ser.cfg:

loadmodule "/usr/local/lib/ser/modules/acc.so"
modparam("acc", "log_flag", 1 )
modparam("acc", "log_fmt", "miocfst") 
modparam("acc", "failed_transactions", 1)
modparam("acc", "log_missed_flag", 2)
modparam("acc", "report_cancels", 1)
modparam("acc", "db_url", "mysql://ser:heslo@localhost/ser")
modparam("acc", "db_flag", 5)
modparam("acc", "db_missed_flag", 6)
# 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 >=  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 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;
        };

setflag(5);
setflag(6);
        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=="INVITE") {
                        if (uri=~"^sip:9") {
                                t_relay_to_udp("50.65.11.23", "5060");
                                break;
                        };
                };
                if (method=="REGISTER") {

# Uncomment this if you want to use digest authentication
#                       if (!www_authorize("mydomain.net",
"subscriber")) {
#                               www_challenge("mydomain.net", "0");
#                               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;
                };
        };
        append_hf("P-hint: usrloc applied\r\n"); 
        route(1);
}
route[1] 
{
        # send it out now; use stateful forwarding as it works reliably
        # even for UDP2TCP
        if (!t_relay()) {
                sl_reply_error();
        };
}




More information about the sr-users mailing list