So I took your advice and decided to use * to identify sip 2 sip calls. However, theres something wrong with my routing. I added route(6) to get authorize. Because when I try to dial sip to sip I get 407 proxy authentication required. Still after adding route(6), I still get the 407 proxy authentication required message. What is wrong? Route (1) is just the default message handler This is what I have:<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> if (uri=~"^sip:\*[0-9]*@"){<br> xlog("Sip 2 Sip\n");<br> strip(1); #strip the * because we dont need it<br> route(4);<br> route(6);<br> route(1);<br>
return;<br> <br> };<br> <br> if (!lookup("location")){<br> <br> if (uri=~"^sip:[0-9]*@") { # International PSTN<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>
route[6] {<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> <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>
<b><i>Bogdan-Andrei Iancu <bogdan@voice-system.ro></i></b> wrote: Hi,<br> <br> that's right. For example SIPURA ATAs with two lines but online one <br> terminal use # for line selection....<br> you better use a digit that does not overlap with the PSTN dialling plan.<br> <br> regards,<br> bogdan<br> <br> Glenn Dalgliesh wrote:<br> <br> >Well I would becarefull using # since some UA's use # to terminate digit input and dial..... Not positive but I think * would be a better choice.<br> >---------------------<br> >Sent with ChatterEmail<br> >True push email for the Treo Smartphone<br> >www.chatteremail.com<br> ><br> ><br> >-----Original Message-----<br> >From: Kenny Chua <strain15 @yahoo.com=""><br>>Date: Wednesday, Jun 28, 2006 10:56 pm<br>>Subject: [Users] Using # for Sip 2 Sip calls<br>><br>>Hello, I was wondering how to set my dialing plans to use # only for Sip 2 Sip calls. A user has to press the # sign if he wants to call
another sip number, and just dial normally for PSTN calls?<br>> <br>> I came up with something like this: <br>> lookup("aliases");<br>> if (uri=~"^sip:#[0-9]*@"){<br>> xlog("Sip 2 SIP\n");<br>> route(4);<br>> route(1);<br>> return;<br>> };<br>> <br>> Which of course don't work. So I'll need help. I know its possible to use 9 for PSTN calls, but I'm sure that you can use # for Sip 2 Sip. Please help me out here. Thank you.<br>> <br>> <br>>---------------------------------<br>>Do you Yahoo!?<br>> Get on board. You're invited to try the new Yahoo! Mail Beta.<br>>--0-591390942-1151549737=:48905<br>>Content-Type: text/html; charset=iso-8859-1<br>>Content-Transfer-Encoding: 8bit<br>><br>>Hello, I was wondering how to set my dialing plans to use # only for Sip 2 Sip calls. A user has to press the # sign if he wants to call another sip number, and just dial normally for
PSTN calls?<br> <br> I came up with something like this: <br> lookup("aliases");<br> if (uri=~"^sip:#[0-9]*@"){<br> xlog("Sip 2 SIP\n");<br> route(4);<br> route(1);<br> return;<br> };<br> <br> Which of course don't work. So I'll need help. I know its possible to use 9 for PSTN calls, but I'm sure that you can use # for Sip 2 Sip. Please help me out here. Thank you.<br> </strain15> <div> <br>> </div> <p> 
        
                <hr size=1>Sneak preview the <a href="http://us.rd.yahoo.com/evt=40762/*http://www.yahoo.com/preview"> all-new Yahoo.com</a>. It's not radically different. Just radically better.