Hi Users,

I installed  Openser server  and Using the Nathelper with RtpProxy .

The openser server and  RtpProxy are located in  the Same system with ip add (192.168.2.2) ,

And Public IP address is xx.xxx.xxx.xxx.,  openSER sip_doamin name is xx.xxx.xxx.xxx

 Ours Network connect  for openser System is given below

                                                   
                                  modem------xx.xxx.xxx.xxx.-------------> router(firewall) ---------------------------------> server   1
                                                                                             |________________ > server   2
                                                                                             |
                                                                                             |_________________>  server 3  ( openser and rtp )

For Testing i'm X-lite softphones  with different network of openser system ( out the NAT )

When made the call from one softphone to other softphones..
When caller calls to callee ,   when the callee is lefted up the phone after 32 seconds the phone hungups automatically.
And   OpenSER is Not receive the Ack, when the invite is response and Softphones are Ringing after it lefted up .   For callee only hung up

And Missed Call and  Ignore Calls are working Fine ...
I gucess  is  problem in Firewall setting in Router and System  FireWall.setting .
Can Any one tell me How to   resolve my problem ...
here is My openser.cfg

route{
     
    # -----------------------------------------------------------------
    # Sanity Check Section
    # -----------------------------------------------------------------
    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);
 
 
    # -----------------------------------------------------------------
    # Record Route Section
    # -----------------------------------------------------------------
    if (!method=="REGISTER")
        record_route();
         
    # -----------------------------------------------------------------
    # Loose Route Section
    # -----------------------------------------------------------------
    if (loose_route()) {
         
        append_hf("P-hint: rr-enforced\r\n"); 
        if ((method=="INVITE" || method=="REFER") && !has_totag()) {
            sl_send_reply("403", "Forbidden");
            return;
        };
 
        if (method=="INVITE") {
 
            if (!proxy_authorize("xx.xxx.xxx.xxx","subscriber")) {
                proxy_challenge("xx.xxx.xxx.xxx","0");
                return;
            } else if (!check_from()) {
                sl_send_reply("403", "Use From=ID");
                return;
            };
            consume_credentials();
        };
        route(1);
    };
 
 
    # -----------------------------------------------------------------
    # Call Type Processing Section
    # -----------------------------------------------------------------
    if (!is_uri_host_local()) {
        if (is_from_local() || allow_trusted()) {
            route(4);
            route(1);
        } else {
            sl_send_reply("403", "Forbidden");
        };
    };
 
    if (method=="ACK") {
        route(1);
        return;
    } else if (method=="CANCEL") {
        route(1);
        return;
    } else if (method=="INVITE") {
        route(5);
        return;
    } else  if (method=="REGISTER") {
        route(4);
        return;
    };
 
    lookup("aliases");
    if (!is_uri_host_local()) {
        route(4);
        route(1);
        return;
    };
 
    if (!lookup("location")) {
        sl_send_reply("404", "User 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");
}
 
route[4] {
     
    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");
         
    if (!lookup("location")) {
        sl_send_reply("401", "Unauthorized");
    };
         
    append_hf("P-hint: usrloc applied\r\n"); 
 
}
 
route[5] {
     
    # -----------------------------------------------------------------
    # INVITE Message Handler
    # -----------------------------------------------------------------     
    if (!allow_trusted()) {
     
        if (!proxy_authorize("xx.xxx.xxx.xxx","subscriber")) {
            proxy_challenge("xx.xxx.xxx.xxx","0");
            return;
        } else if (!check_from()) {
            sl_send_reply("403", "Use From=ID");
            return;
        };
    };
     
    lookup("aliases");
    if (!is_uri_host_local()) {
        route(1);
        return;
    };
 
    if (uri=~"^sip:[0-9]@") {
        lookup("aliases");
        lookup("location");
        route(1);
        return;
    };     
 
    if(!lookup("location")){
        sl_send_reply("404", "User Not Found");
        return;
    };
 
    route(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 and Regards with cheers
Sunkara Ravi Prakash (Voip Developer)
Hyperion Technology
Kondapur, Hi-tech city,
Hyderabad.
www.hyperion-tech.com
+91-9985077535