[Serusers] ACK relaying?

Igor Diakonov igorsd at satcomtel.spb.ru
Thu Nov 27 16:05:39 CET 2003



I'm new to ser. I'm trying to setup ser to handle registrations, local call's and forward all other call's to PSTN gateway.


I cant get SER to send ACK's recieved from local client to PSTN gate...
What am I doing wrong?

Here's my config file:

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"


loadmodule "/usr/local/lib/ser/modules/auth.so"
loadmodule "/usr/local/lib/ser/modules/auth_db.so"

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

modparam("usrloc", "db_mode", 1)
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")
modparam("rr", "enable_full_lr", 1)

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

# main routing logic

route{
        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;
        };
        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) {
                if (method=="REGISTER") {
                        if (!www_authorize("quantum.ru", "subscriber")) {
                                www_challenge("quantum.ru", "0");
                                break;
                        };
                        save("location");
                        break;
                };
                if (method=="INVITE") {
                    if(lookup("location")) {
                        append_hf("P-hint: usrloc applied\r\n"); 
                        route(1);
                        break;
                    } else {
                        if (uri=~"^sip:10372[0-9][0-9]@.*") {
                            log(1,"**** user not found");
                            sl_send_reply("404", "Not Found");
                            break;
                        } else {
                             log (1, "Forwarding to PSTN");
                             rewritehostport("194.186.xx.xx:5060");
                             route(1);
                            break;
                        };
                    };
                break;
                };
    };
}


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