[Serusers] Ser and new Mediaproxy

Tjapko Smits itsc99 at cantv.net
Fri Jul 2 16:16:52 CEST 2004


Hello , 

Can someone provide me full working ser.cfg example for latest version
of Mediaproxy (example distributed with new mediaproxy does not seem to
work properly). Herunder you will find the test.cfg that we use.

Regards, Tjapko. 

Here is the ser.cfg that we use to test mediaproxy. 

# Example ser.cfg for mediaproxy functionality
debug=7
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"
alias=some.site.com
listen=82.100.100.100

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/usrloc.so"
loadmodule "/usr/local/lib/ser/modules/registrar.so"
loadmodule "/usr/local/lib/ser/modules/textops.so"
#loadmodule "/usr/local/lib/ser/modules/acc.so"

loadmodule "/usr/local/lib/ser/modules/domain.so"
loadmodule "/usr/local/lib/ser/modules/mediaproxy.so"

modparam("usrloc","db_mode",0)
modparam("rr", "enable_full_lr", 1)
modparam("mediaproxy", "natping_interval", 60)

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 == "BYE" || method == "CANCEL") {
        end_media_session();
    };

    if (loose_route()) {
        t_relay();
        break;
    };

    if (method == "INVITE") {
        record_route();
    };

    if (client_nat_test("3")) {
        if (method == "REGISTER" || ! search("^Record-Route:")) {
        fix_contact();
        force_rport();
        };
   
    if (method == "REGISTER"){
        save("location");
        break;
        };

    if (method=="INVITE") {
        use_media_proxy();
        t_on_reply("1");
    };

    if (!t_relay()) {
        sl_reply_error();
    };
}

onreply_route[1] {

    if (status=~"(183)|2[0-9][0-9]") {
        if (client_nat_test("1")) {
            fix_contact();
        };

           fix_contact();
        };
        use_media_proxy();
    };

    if (status=~"[3-4]0[0-9]") {
        end_media_session();
        break;
    };
}





More information about the sr-users mailing list