Hi All
I have a scenario in which I want to deploy SER with mediaproxy & allow everyone/anyone connecting with my SER to talk to each other. I am using ONSIP gettingStarted document. In order to allow everyone to connect to my SER without authentication I commented the following portion in ser.cfg:

in Route[2]

 #if (!www_authorize("","subscriber")) {
        #       www_challenge("","0");
        #       break;
        #};

        #if (!check_to()) {
        #       sl_send_reply("401", "Unauthorized");
        #       break;
        #};

        # consume_credentials();

and in Route[3]

        # if (!proxy_authorize("","subscriber")) {
        #       proxy_challenge("","0");
        #       break;
        #} else if (!check_from()) {
        #       sl_send_reply("403", "Use From=ID");
        #       break;
        #};

        #consume_credentials();

Now when I try to connect 2 UA (Simpleopal) from behind a same NAT, they do get registered, & records also appear in location table of DataBase. But when I place call from UA1 to UA2 like "call sip:UA2@aa.bb.cc.dd", where aa.bb.cc.dd is the public IP of my SER machine (mediaproxy is also running on same machine), it ends up showing transport error. On SER side:

A) SER logs say:

on lookup() "UA2 not found in usrloc" and on is_local() "Realm 'ab.cc.dd.ee' is not local". the is_lcoal appears again saying "Realm 192.168.0.241 is not local" where 192.168.0.241 is UA2's local IP.   

B)Mediaproxy log says:

command request c78d68c6-fbf4-1810-80b4-0050badb4a03@UA1 203.82.51.9:5000:audio 203.82.51.9  aa.bb.cc.dd remote 192.168.0.241 remote OPAL/2.0 info=from:UA1@aa.bb.cc.dd,to:UA2@aa.bb.cc.dd,fromtag:b09168c6-fbf4-1810-80b4-0050badb4a03,totag:
session c78d68c6-fbf4-1810-80b4-0050badb4a03@UA1: started. listening on aa.bb.cc.dd:35000
command execution time:  9.35 ms
command request c78d68c6-fbf4-1810-80b4-0050badb4a03@UA1 203.82.51.9:5000:audio 203.82.51.9 aa.bb.cc.dd remote 192.168.0.241 remote OPAL/2.0 info= from:UA1@aa.bb.cc.dd,to:UA2@aa.bb.cc.dd,fromtag:b09168c6-fbf4-1810-80b4-0050badb4a03,totag:
command execution time:  0.60 ms
session c78d68c6-fbf4-1810-80b4-0050badb4a03@UA1: 0/0/0 packets, 0/0/0 bytes (caller/called/relayed)
session c78d68c6-fbf4-1810-80b4-0050badb4a03@UA1: ended (did timeout).

(203.82.51.9) is my LAN's public IP aa.bb.cc.dd is the public IP of SER machine

C) using ngrep I found out that it sends an "SIP/2.0 408 Request Timeout"

cant figure out whats going on, anybody having any idea please help.

Thanx in advance

Regards

Muhammad Asif Ali