[OpenSER-Users] Calls disconnect automatically

VoIP Forums www.Go4Calls.com go4calls at hotmail.com
Sun Jan 20 17:00:39 CET 2008


Hi sorry,

I forget to give my openser.cfg, there is one more point if i am using STUN server in our linksys device the call goes normal for long time till user finish the call. It seems something wrong in NAT configuration.

#
# sample config file to be used with nathelper/rtpproxy
#

#

# ----------- global configuration parameters ------------------------

debug=7            # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=yes # (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)
listen=212.XXX.XXX.XXX:5064
#port=5064
children=4

disable_dns_blacklist = yes

# --- module loading

mpath="/usr/local/lib/openser/modules/"

loadmodule "mysql.so"
loadmodule "sl.so"
loadmodule "tm.so"
loadmodule "rr.so"
loadmodule "maxfwd.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "textops.so"
loadmodule "nathelper.so"
loadmodule "auth.so"
loadmodule "auth_db.so"
loadmodule "mi_fifo.so"

modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")

modparam("usrloc", "db_mode", 2)
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")
modparam("usrloc|auth_db","db_url","mysql://proxy:MoHaKa21@192.168.1.50/emafone")

# -- usrloc params --

modparam("usrloc", "nat_bflag", 6)

# -- registrar params --
modparam("registrar|nathelper", "received_avp", "$avp(i:42)")

# -- auth params --


# -- rr params --
modparam("rr", "enable_full_lr", 1)

# -- nathelper

modparam("nathelper", "natping_interval", 0)
modparam("nathelper", "ping_nated_only", 1)
modparam("nathelper", "rtpproxy_sock", "unix:/var/run/rtpproxy.sock")
modparam("nathelper", "rtpproxy_disable", 0)
modparam("nathelper", "rtpproxy_disable_tout", 60)
modparam("nathelper", "rtpproxy_tout", 1)
modparam("nathelper", "rtpproxy_retr", 5)
modparam("nathelper", "sipping_method", "OPTIONS")
modparam("nathelper", "received_avp", "$avp(i:801)")


#modparam("nathelper", "rtpproxy_sock", "udp:212.100.235.229:22222") 
#modparam("nathelper", "rtpproxy_sock", "/var/run/rtpproxy.sock") 
#modparam("nathelper", "natping_interval", 30)
#modparam("nathelper", "ping_nated_only", 1)
#modparam("nathelper", "sipping_bflag", 7)
#modparam("nathelper", "sipping_from", "sip:pinger at openser.org")

# --- main routing logic
route{
    if (!mf_process_maxfwd_header("10")) {
        sl_send_reply("483","Too Many Hops");
        exit;
    };
    if (msg:len >=  2048 ) {
        sl_send_reply("513", "Message too big");
        exit;
    };





    # NAT detection
    route(2);

    if (!method=="REGISTER")
        record_route();

    if (loose_route()) {
        append_hf("P-hint: rr-enforced\r\n"); 
        route(1);
    };

    if (!uri==myself) {
        #append_hf("P-hint: outbound\r\n"); 
        route(1);
    };

    if (uri==myself) {
        if (method=="REGISTER") {
            if (!www_authorize("212.XXX.XXX.XXX", "subscriber")) {
                www_challenge("212.XXX.XXX.XXX", "0");
                exit;
            };
            
            if (isflagset(5)) {
                setbflag(6);
                # if you want OPTIONS natpings uncomment next
                # setbflag(7);
            };
            save("location");
            exit;
        };


    #########PSTTN CALL #############################################

            if (uri=~"sip:00[1-9][0-9]+ at .*") {
                strip(2);
                rewritehostport("212.XXX.XXX.XXX:5060");
                route(1);
                exit;

            };

    


    ###################################################################

        if (!lookup("location")) {
            sl_send_reply("404", "Not Found");
            exit;
        };
        append_hf("P-hint: usrloc applied\r\n"); 
    };

    route(1);
}


route[1] {
    if (subst_uri('/(sip:.*);nat=yes/\1/')){
        setbflag(6);
    };

    if (isflagset(5)||isbflagset(6)) {
        route(3);
    }

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

route[2]{
    force_rport();
    if (nat_uac_test("19")) {
        if (method=="REGISTER") {
            fix_nated_register();
        } else {
            fix_nated_contact();
        };
        setflag(6);
    };
}

route[3] {
    if (is_method("BYE|CANCEL")) {
        unforce_rtp_proxy();
    } else if (is_method("INVITE")){
        force_rtp_proxy();
        t_on_failure("1");


    };

    if (isflagset(5))
        search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');
    t_on_reply("1");
}

failure_route[1] {
    if (isbflagset(6) || isflagset(5)) {
        unforce_rtp_proxy();
    }
}

onreply_route[1] {
    if ((isflagset(5) || isbflagset(6)) && status=~"(183)|(2[0-9][0-9])") {
        force_rtp_proxy();
    }
    search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');

    if (isbflagset(6)) {
        fix_nated_contact();
    }
    exit;
}


Regards, 
www.Go4Calls.Com 
VoIP Forums 

From: go4calls at hotmail.com
To: users at lists.openser.org; users at openser.org
Subject: Calls disconnect automatically
Date: Sun, 20 Jan 2008 18:01:48 +0800








Hi Friends,

I start getting one problem, the calls disconnect automatically in 30 and 32 sec.
I am using openser + rtpproxy before with the same openser.cfg it was running smoothly and once traffic increased this problem appeared.

Could you please help me to solve this issue because i put openser in production and now no one can make long call.



Regards, 
www.Go4Calls.Com 
VoIP Forums 
Express yourself instantly with MSN Messenger! MSN Messenger

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/users/attachments/20080121/8ef2ea9a/attachment-0001.htm 


More information about the Users mailing list