<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Looks like you are doing proxy with 2
twice. You didn&#8217;t include route[1] so not sure what you are doing in that
but I would assume t_relay<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;&nbsp;&nbsp; if (uri=~&quot;^sip:\*[0-9]*@&quot;){<o:p></o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>strip(1); #strip the * because we dont need it<br>
if (lookup(&quot;location&quot;)) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;xlog(&quot;Sip 2 Sip\n&quot;);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; route(4);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; route(1);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return;<br>
};<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>&nbsp;&nbsp;&nbsp; };<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
users-bounces@openser.org [mailto:users-bounces@openser.org] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Kenny Chua<br>
<b><span style='font-weight:bold'>Sent:</span></b> Thursday, June 29, 2006 2:02
PM<br>
<b><span style='font-weight:bold'>To:</span></b> users@openser.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [Users] Using # for
Sip 2 Sip calls</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>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&nbsp; 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>
&nbsp;&nbsp;&nbsp; #
-----------------------------------------------------------------<br>
&nbsp;&nbsp;&nbsp; # INVITE Message Handler<br>
&nbsp;&nbsp;&nbsp; #
-----------------------------------------------------------------<br>
<br>
&nbsp;&nbsp;&nbsp; if (!proxy_authorize(&quot;&quot;,&quot;subscriber&quot;)) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
proxy_challenge(&quot;&quot;,&quot;0&quot;);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return;<br>
&nbsp;&nbsp;&nbsp; } else if (!check_from()) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; sl_send_reply(&quot;403&quot;, &quot;Use
From=ID&quot;);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return;<br>
&nbsp;&nbsp;&nbsp; };<br>
<br>
&nbsp;&nbsp;&nbsp; consume_credentials();<br>
<br>
&nbsp;&nbsp;&nbsp; if (nat_uac_test(&quot;19&quot;)) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; setflag(6);<br>
&nbsp;&nbsp;&nbsp; }<br>
<br>
&nbsp;&nbsp;&nbsp; lookup(&quot;aliases&quot;);<br>
&nbsp;&nbsp;&nbsp; if (uri!=myself) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; route(4);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; route(1);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return;<br>
&nbsp;&nbsp;&nbsp; };<br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; if (uri=~&quot;^sip:\*[0-9]*@&quot;){<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; xlog(&quot;Sip 2 Sip\n&quot;);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; strip(1); #strip the * because we dont
need it<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; route(4);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; route(6);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; route(1);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; };<br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; if (!lookup(&quot;location&quot;)){<br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (uri=~&quot;^sip:[0-9]*@&quot;)
{&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; # International PSTN<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; xlog(&quot;PSTN
Gateway\n&quot;);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; route(4);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; route(5);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; };<br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; sl_send_reply(&quot;404&quot;, &quot;User
Not Found&quot;);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return;<br>
&nbsp;&nbsp;&nbsp; };<br>
<br>
&nbsp;&nbsp;&nbsp; route(4);<br>
&nbsp;&nbsp;&nbsp; route(1);<br>
}<br>
<br>
route[4] {<br>
<br>
&nbsp;&nbsp;&nbsp; # -----------------------------------------------------------------<br>
&nbsp;&nbsp;&nbsp; # NAT Traversal Section<br>
&nbsp;&nbsp;&nbsp; #
-----------------------------------------------------------------<br>
<br>
&nbsp;&nbsp;&nbsp; if (isflagset(6)) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; force_rport();<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; fix_nated_contact();<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; force_rtp_proxy();<br>
&nbsp;&nbsp;&nbsp; }<br>
}<br>
<br>
route[5] {<br>
<br>
&nbsp;&nbsp;&nbsp; #
-----------------------------------------------------------------<br>
&nbsp;&nbsp;&nbsp; # PSTN Handler<br>
&nbsp;&nbsp;&nbsp; #
-----------------------------------------------------------------<br>
&nbsp;&nbsp;&nbsp; xlog(&quot;Routed to route 5\n&quot;);<br>
&nbsp;&nbsp;&nbsp; rewritehostport(&quot;pstn.gateway:5060&quot;); <br>
<br>
&nbsp;&nbsp;&nbsp; avp_write(&quot;i:45&quot;, &quot;inv_timeout&quot;);<br>
<br>
&nbsp;&nbsp;&nbsp; route(1);<br>
}<br>
<br>
route[6] {<br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; if (!proxy_authorize(&quot;&quot;,&quot;subscriber&quot;)) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
proxy_challenge(&quot;&quot;,&quot;0&quot;);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return;<br>
&nbsp;&nbsp;&nbsp; } else if (!check_from()) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; sl_send_reply(&quot;403&quot;, &quot;Use
From=ID&quot;);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return;<br>
&nbsp;&nbsp;&nbsp; };<br>
}<br>
<br>
<br>
onreply_route[1] {<br>
<br>
&nbsp;&nbsp;&nbsp; if (isflagset(6) &amp;&amp;
status=~&quot;(180)|(183)|2[0-9][0-9]&quot;) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (!search(&quot;^Content-Length:[
]*0&quot;)) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; force_rtp_proxy();<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; };<br>
&nbsp;&nbsp;&nbsp; };<br>
<br>
&nbsp;&nbsp;&nbsp; if (nat_uac_test(&quot;1&quot;)) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; fix_nated_contact();<br>
&nbsp;&nbsp;&nbsp; };<br>
}<br>
<br>
<br>
<b><i><span style='font-weight:bold;font-style:italic'>Bogdan-Andrei Iancu
&lt;bogdan@voice-system.ro&gt;</span></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>
&gt;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>
&gt;---------------------<br>
&gt;Sent with ChatterEmail<br>
&gt;True push email for the Treo Smartphone<br>
&gt;www.chatteremail.com<br>
&gt;<br>
&gt;<br>
&gt;-----Original Message-----<br>
&gt;From: Kenny Chua <br>
<strain15 @yahoo.com="">&gt;Date: Wednesday, Jun 28, 2006 10:56 pm<br>
&gt;Subject: [Users] Using # for Sip 2 Sip calls<br>
&gt;<br>
&gt;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>
&gt; <br>
&gt; I came up with something like this: <br>
&gt; lookup(&quot;aliases&quot;);<br>
&gt; if (uri=~&quot;^sip:#[0-9]*@&quot;){<br>
&gt; xlog(&quot;Sip 2 SIP\n&quot;);<br>
&gt; route(4);<br>
&gt; route(1);<br>
&gt; return;<br>
&gt; };<br>
&gt; <br>
&gt; 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>
&gt; <br>
&gt; <br>
&gt;---------------------------------<br>
&gt;Do you Yahoo!?<br>
&gt; Get on board. You're invited to try the new Yahoo! Mail Beta.<br>
&gt;--0-591390942-1151549737=:48905<br>
&gt;Content-Type: text/html; charset=iso-8859-1<br>
&gt;Content-Transfer-Encoding: 8bit<br>
&gt;<br>
&gt;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>
&nbsp;&nbsp;&nbsp; lookup(&quot;aliases&quot;);<br>
&nbsp;&nbsp;&nbsp; if (uri=~&quot;^sip:#[0-9]*@&quot;){<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; xlog(&quot;Sip 2 SIP\n&quot;);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; route(4);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; route(1);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return;<br>
&nbsp;&nbsp;&nbsp; };<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>
<o:p></o:p></span></font></p>

</strain15>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
&gt; <o:p></o:p></span></font></p>

</div>

<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>&nbsp; <o:p></o:p></span></font></p>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=1 width="100%" align=center>

</span></font></div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>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. <o:p></o:p></span></font></p>

</div>

</body>

</html>