<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’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> </o:p></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> if (uri=~"^sip:\*[0-9]*@"){<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("location")) {<br>
xlog("Sip 2 Sip\n");<br>
route(4);<br>
route(1);<br>
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'> };<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> </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> </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 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><span style='font-weight:bold;font-style:italic'>Bogdan-Andrei Iancu
<bogdan@voice-system.ro></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>
>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 <br>
<strain15 @yahoo.com="">>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>
<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>
> <o:p></o:p></span></font></p>
</div>
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> <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>