Hi Users

Hi Users,

I install the openser 1.0.1  and rtp proxy 0.3 in same  Linux System.
Openser server is located with public id xx.xxx.xxx.xx of   192.168.2.2 ,
And  UAC are outside the NAT,
1)         When  one UAC call to other UAC( are both in  outside the NAT where 
openser server), after the INVITE method get request by server,  after 32 
second its hung up automatically, Voice is ok , and callee is hung upping, not 
caller,
2)        UAC ( inside the nAT , openser server ) calls to UAC (outside the NAT 
) in not hung uping and voice is not ok....
3)         UAC calls to UAC (both are in inside the NAT, where OpenSER is 
located in same network ).
Where is the problem, in NAt with rtp or networking,

Here by My openser.cfg with 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("xx.xxx.xxx.xxx", "subscriber")) {
                www_challenge("xx.xxx.xxx.xxx", "0");
                exit;
            };

            if (isflagset(5)) {
                setflag(6);
                # if you want OPTIONS natpings uncomment next
                # setflag(7);
            };
            save("location");
            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/')){
        setflag(6);
    };

    if (isflagset(5)||isflagset(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(5);
    };
}

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 (isflagset(6) || isflagset(5)) {
        unforce_rtp_proxy();
    }
}

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

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



Thanks & Regards

Sunkara Ravi Prakash,
Hyperion Technologies,
www.hyperion-tech.com.


_______________________________________________
Devel mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/devel

Reply via email to