Hi all,
I am jus trying to experiment strange things. please tell me if this is possible. I have an user behind NAT calling a user on pstn side. Since the pstn gateway is on a public IP, I dont use mediaproxy, what i do before an invite is:
fix_nated_contact();
fix_nated_sdp("15");
This call is successful and both the parties can hear. But again when a user at public IP trues to contact the user behind NAT, there is only "one way audio". Here also I do a fix_nated_contact() and fix_nated_sdp("15") in the onreply_route[], but I get the foll error in my syslog.
Mar 23 14:36:19 switch2 /usr/local/sbin/openser[29070]: ERROR: extract_mediaip: no `c=' in SDP
Mar 23 14:36:19 switch2 /usr/local/sbin/openser[29070]: ERROR: extract_mediaip: no `o=' in SDP
Can someone pls explain what these errors are and why do they occur. My cfg file is below:
debug=9            # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=no
check_via=no    # (cmd. line: -v)
dns=no          # (cmd. line: -r)
rev_dns=no      # (cmd. line: -R)
listen=202.XX.XX.XX
port=5060
children=4
fifo="/tmp/openser_fifo"
loadmodule "/usr/local/lib/openser/modules/mysql.so"
loadmodule "/usr/local/lib/openser/modules/sl.so"
loadmodule "/usr/local/lib/openser/modules/tm.so"
loadmodule "/usr/local/lib/openser/modules/rr.so"
loadmodule "/usr/local/lib/openser/modules/maxfwd.so"
loadmodule "/usr/local/lib/openser/modules/usrloc.so"
loadmodule "/usr/local/lib/openser/modules/registrar.so"
loadmodule "/usr/local/lib/openser/modules/textops.so"
loadmodule "/usr/local/lib/openser/modules/auth.so"
loadmodule "/usr/local/lib/openser/modules/auth_db.so"
loadmodule "/usr/local/lib/openser/modules/mediaproxy.so"
loadmodule "/usr/local/lib/openser/modules/nathelper.so"
loadmodule "/usr/local/lib/openser/modules/domain.so"
modparam("auth_db|usrloc",
        "db_url", "mysql://openser:openserrw@localhost/openser")
modparam("usrloc", "db_mode", 2)
modparam("auth_db", "calculate_ha1", 1)
modparam("auth_db", "password_column", "password")
modparam("registrar", "nat_flag", 6)
modparam("rr", "enable_full_lr", 1)
modparam("mediaproxy", "natping_interval", 30)
modparam("nathelper", "rtpproxy_disable", 1)
modparam("nathelper", "natping_interval", 0)
 
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;
        };
        if(!method=="REGISTER") {
                record_route();
        };
        if (loose_route()) {
                append_hf("P-hint: rr-enforced\r\n");
                route(1);
                return;
        };
        if (uri!=myself) {
            route(1);
            return;
        };
 if(uri==myself) {
                if(method=="REGISTER") {
                sl_send_reply("100", "Trying");
                if (!search("^Contact:\ +\*") && client_nat_test("7")) {
                setflag(6);
                force_rport();
                fix_nated_contact();
                };
                if (!www_authorize("","subscriber")) {
                www_challenge("", "0");
                exit;
                };
                save("location");
                exit;
                };
                if(method=="INVITE") {
                        if (client_nat_test("3")) {
                        force_rport();
                        fix_nated_sdp("15");
                        fix_nated_contact();
                        setflag(7);
                        };
                        if(src_ip==202.XX.XX.44) { #my pstn gateway. calls are only for registered users
                                if(!lookup("location")) {
                                sl_send_reply("404", "User not found");
                                exit;
                                };
                        route(1);
                        };
                if (!proxy_authorize("","subscriber")) {
                        proxy_challenge("", "0");
                        exit;
                        };
                        route(2);
                        return;
                };
        };
}
route[1] {
        t_on_reply("1");
        if(!t_relay()) {
                sl_reply_error();
                exit;
        };
}
route[2] {
        if(uri=~"^sip:0[0-9]*@") {
                strip(1);
                rewritehost("202.80.61.1");
                route(1);
                exit;
        };
        if(!lookup("location")) {
               sl_send_reply("404", "User not found");
               exit;
        };
        route(1);
        exit;
}
onreply_route[1] {
        if ((isflagset(6) || isflagset(7)) &&
            (status=~"(180)|(183)|2[0-9][0-9]")) {
                if (!search("^Content-Length:\ +0")) {
                force_rport();
                fix_nated_sdp("15");
                fix_nated_contact();
                };
        };
}


 
 


Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.