Ok, I've just used this routing, it just shows thats its trying and the call never goes through. Here is my openser.cfg with the data from ngrep. Not sure why the call wont go through:<br> <br> debug=3<br> fork=yes<br> log_stderror=no<br> <br> listen=192.168.1.6 <br> alias=test.com<br> port=5060<br> children=4<br> <br> dns=no<br> rev_dns=no<br> <br> fifo="/tmp/openser_fifo"<br> fifo_db_url="mysql://openser:openserrw@localhost/openser"<br> <br> loadmodule "/usr/local/lib/openser/modules/mysql.so"<br> loadmodule "/usr/local/lib/openser/modules/sl.so"<br> loadmodule "/usr/local/lib/openser/modules/tm.so"<br> loadmodule "/usr/local/lib/openser/modules/rr.so"<br> loadmodule "/usr/local/lib/openser/modules/maxfwd.so"<br> loadmodule "/usr/local/lib/openser/modules/usrloc.so"<br> loadmodule "/usr/local/lib/openser/modules/registrar.so"<br> loadmodule "/usr/local/lib/openser/modules/auth.so"<br> loadmodule
"/usr/local/lib/openser/modules/auth_db.so"<br> loadmodule "/usr/local/lib/openser/modules/uri.so"<br> loadmodule "/usr/local/lib/openser/modules/uri_db.so"<br> loadmodule "/usr/local/lib/openser/modules/domain.so"<br> loadmodule "/usr/local/lib/openser/modules/nathelper.so"<br> loadmodule "/usr/local/lib/openser/modules/avpops.so"<br> loadmodule "/usr/local/lib/openser/modules/textops.so"<br> loadmodule "/usr/local/lib/openser/modules/xlog.so"<br> <br> modparam("auth_db|uri_db|usrloc", "db_url",<br> "mysql://openser:openserrw@localhost/openser")<br> modparam("auth_db", "calculate_ha1", 1)<br> modparam("auth_db", "password_column", "password")<br> <br> modparam("nathelper", "natping_interval", 30) <br> modparam("nathelper", "ping_nated_only", 1) <br> modparam("nathelper", "rtpproxy_sock", "unix:/var/run/rtpproxy.sock")<br> <br> modparam("usrloc", "db_mode", 2)<br> <br> modparam("registrar", "nat_flag", 6)<br> <br> modparam("rr",
"enable_full_lr", 1)<br> <br> modparam("tm", "fr_inv_timer", 27)<br> modparam("tm", "fr_inv_timer_avp", "inv_timeout")<br> <br> <br> route {<br> <br> # -----------------------------------------------------------------<br> # Sanity Check Section<br> # -----------------------------------------------------------------<br> if (!mf_process_maxfwd_header("10")) {<br> sl_send_reply("483", "Too Many Hops");<br> exit;<br> };<br> <br> if (msg:len > max_len) {<br> sl_send_reply("513", "Message Overflow");<br> exit;<br> };<br> <br> # -----------------------------------------------------------------<br> # Record Route Section<br> #
-----------------------------------------------------------------<br> if (method!="REGISTER") {<br> record_route();<br> };<br> <br> if (method=="BYE" || method=="CANCEL") {<br> unforce_rtp_proxy();<br> t_relay();<br> exit;<br> } <br> <br> # -----------------------------------------------------------------<br> # Loose Route Section<br> # -----------------------------------------------------------------<br> if (loose_route()) {<br> <br> if ((method=="INVITE" || method=="REFER") && !has_totag()) {<br> sl_send_reply("403", "Forbidden");<br>
return;<br> };<br> <br> if (method=="INVITE") {<br> <br> if (!proxy_authorize("","subscriber")) {<br> proxy_challenge("","0");<br> return;<br> } else if (!check_from()) {<br> sl_send_reply("403", "Use From=ID");<br> return;<br> };<br> consume_credentials();<br> <br> if (nat_uac_test("19")) {<br>
setflag(6);<br> force_rport();<br> fix_nated_contact();<br> };<br> force_rtp_proxy("l");<br> };<br> route(1);<br> return;<br> };<br> <br> # -----------------------------------------------------------------<br> # Call Type Processing Section<br> # -----------------------------------------------------------------<br> if (uri!=myself) {<br> route(4);<br>
route(1);<br> return;<br> };<br> <br> if (method=="ACK") {<br> route(1);<br> return;<br> } else if (method=="CANCEL") {<br> route(1);<br> return;<br> } else if (method=="INVITE") {<br> route(3);<br> return;<br> } else if (method=="REGISTER") {<br> route(2);<br> return;<br> };<br> <br> lookup("aliases");<br> if (uri!=myself) {<br> route(4);<br> route(1);<br> return;<br>
};<br> <br> if (!lookup("location")) {<br> sl_send_reply("404", "User Not Found");<br> return;<br> };<br> <br> route(1);<br> }<br> <br> route[1] {<br> <br> # -----------------------------------------------------------------<br> # Default Message Handler<br> # -----------------------------------------------------------------<br> <br> t_on_reply("1");<br> <br> if (!t_relay()) {<br> if (method=="INVITE" && isflagset(6)) {<br> unforce_rtp_proxy();<br> };<br> sl_reply_error();<br> };<br> }<br> <br> route[2] {<br> <br> #
-----------------------------------------------------------------<br> # REGISTER Message Handler<br> # ----------------------------------------------------------------<br> <br> if (!search("^Contact:[ ]*\*") && nat_uac_test("19")) {<br> setflag(6);<br> fix_nated_register();<br> force_rport();<br> };<br> <br> sl_send_reply("100", "Trying");<br> <br> if (!www_authorize("","subscriber")) {<br> www_challenge("","0");<br> exit;<br> };<br> <br> if (!check_to()) {<br> sl_send_reply("401", "Unauthorized");<br> return;<br> };<br> <br>
consume_credentials();<br> <br> if (!save("location")) {<br> sl_reply_error();<br> };<br> }<br> <br> route[3] {<br> <br> # -----------------------------------------------------------------<br> # INVITE Message Handler<br> # -----------------------------------------------------------------<br> <br> if (!proxy_authorize("","subscriber")) {<br> proxy_challenge("","0");<br> return;<br> } else if (!check_from()) {<br> sl_send_reply("403", "Use From=ID");<br> return;<br> };<br> <br> consume_credentials();<br> <br> if (nat_uac_test("19")) {<br>
setflag(6);<br> }<br> <br> lookup("aliases");<br> if (uri!=myself) {<br> route(4);<br> route(1);<br> return;<br> };<br> <br> <span style="background-color: rgb(255, 64, 64);"> if (uri=~"^sip:\*[0-9]*@"){</span><br style="background-color: rgb(255, 64, 64);"> <span style="background-color: rgb(255, 64, 64);"> xlog("Sip 2 Sip\n");</span><br style="background-color: rgb(255, 64, 64);"> <span style="background-color: rgb(255, 64, 64);"> strip(1); #strip away the *</span><br style="background-color: rgb(255, 64, 64);"> <span style="background-color: rgb(255, 64, 64);"> route(4);</span><br style="background-color: rgb(255, 64, 64);"> <span
style="background-color: rgb(255, 64, 64);"> route(1);</span><br style="background-color: rgb(255, 64, 64);"> <span style="background-color: rgb(255, 64, 64);"> return;</span><br style="background-color: rgb(255, 64, 64);"> <span style="background-color: rgb(255, 64, 64);"> </span><br style="background-color: rgb(255, 64, 64);"> <span style="background-color: rgb(255, 64, 64);"> };</span><br> <br> if (!lookup("location")){<br> <br> if (uri=~"^sip:[0-9]*@") { <br> xlog("PSTN Gateway\n");<br> route(4);<br> route(5);<br>
return;<br> };<br> <br> sl_send_reply("404", "User Not Found");<br> return;<br> };<br> <br> route(4);<br> route(1);<br> }<br> <br> route[4] {<br> <br> # -----------------------------------------------------------------<br> # NAT Traversal Section<br> # -----------------------------------------------------------------<br> <br> if (isflagset(6)) {<br> force_rport();<br> fix_nated_contact();<br> force_rtp_proxy();<br> }<br> }<br> <br> route[5] {<br> <br> # -----------------------------------------------------------------<br> #
PSTN Handler<br> # -----------------------------------------------------------------<br> xlog("Routed to route 5\n");<br> rewritehostport("pstn.gateway:5060"); <br> <br> avp_write("i:45", "inv_timeout");<br> <br> route(1);<br> }<br> <br> onreply_route[1] {<br> <br> if (isflagset(6) && status=~"(180)|(183)|2[0-9][0-9]") {<br> if (!search("^Content-Length:[ ]*0")) {<br> force_rtp_proxy();<br> };<br> };<br> <br> if (nat_uac_test("1")) {<br> fix_nated_contact();<br> };<br> }<br> <br> <br> U 2006/06/29 14:33:43.120386 192.168.1.1:1027 -> 192.168.1.6:5060<br> <span style="background-color: rgb(255, 0, 0);"> INVITE
</span>sip:201@test.com SIP/2.0..Record-Route: <sip:192.168.1.6;f<br> tag=1535693657;lr=on>..Via: SIP/2.0/UDP 192.168.1.6;branch=z9hG4bK038c.2054<br> 5ab4.0..Via: SIP/2.0/UDP 70.xxx.xxx.xx:5060;received=192.168.1.1;rport=5060<br> ;branch=z9hG4bK5F856FB99EE741348558D3F5BDFB4199..From: Kenny <sip:200@test.com>;tag=1535693657..To: <sip:*201@test.com>..Contact:<br> <sip:200@192.168.1.1:5060>..Call-ID: 0A64050F-C53B-4751-94FD-4658CB6CF37F@1<br> 92.168.1.30..CSeq: 33944 INVITE..Max-Forwards: 69..Content-Type: applicatio<br> n/sdp..User-Agent: X-Lite release 1105x..Content-Length: 325....v=0..o=200<br> 268371887 268371936 IN IP4 70.189.13.171..s=X-Lite..c=IN IP4 192.168.1.6..t<br> =0 0..m=audio 21088 RTP/AVP 0 8 3 98 97 101..a=rtpmap:0 pcmu/8000..a=rtpmap<br> :8 pcma/8000..a=rtpmap:3 gsm/8000..a=rtpmap:98 iLBC/8000..a=rtpmap:97 speex<br> /8000..a=rtpmap:101
telephone-event/8000..a=fmtp:101 0-15..a=sendrecv..a=no<br> rtpproxy:yes..<br> <br> U 2006/06/29 14:33:43.120906 192.168.1.6:5060 -> 192.168.1.1:5060<br> SIP/2.0 <span style="background-color: rgb(255, 0, 0);">407 Proxy Authentication Required</span>..Via: SIP/2.0/UDP 192.168.1.6;bra<br> nch=z9hG4bK038c.20545ab4.0;received=192.168.1.1..Via: SIP/2.0/UDP 70.xxx.xxx.xxx:5060;received=192.168.1.1;rport=5060;branch=z9hG4bK5F856FB99EE74134855<br> 8D3F5BDFB4199..From: Kenny <sip:200@test.com>;tag=1535693657..To:<br> <sip:*201@test.com>;tag=eb9822f1ed1b15a932bf98c097b3aaca.4dc7..C<br> all-ID: 0A64050F-C53B-4751-94FD-4658CB6CF37F@192.168.1.30..CSeq: 33944 INVI<br> TE..Proxy-Authenticate: Digest realm="test.com", nonce="44a42c439<br> d432ec2bff44d80632d0ec98b8d4d6e"..Server: OpenSer (1.0.1 (i386/linux))..Con<br> tent-Length: 0..Warning: 392 192.168.1.6:5060 "Noisy feedback tells: pid=7<br>
010 req_src_ip=192.168.1.1 req_src_port=1027 in_uri=sip:201@test.com out_uri=sip:201@test.com via_cnt==2"....<br> <br> <p> 
                <hr size=1>Yahoo! Music Unlimited - Access over 1 million songs.
<a href="http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=36035/*http://music.yahoo.com/unlimited/
">Try it free.</a>