<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v = 
"urn:schemas-microsoft-com:vml" xmlns:o = 
"urn:schemas-microsoft-com:office:office" xmlns:w = 
"urn:schemas-microsoft-com:office:word" xmlns:st1 = 
"urn:schemas-microsoft-com:office:smarttags"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1491" name=GENERATOR><!--[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]--><o:SmartTagType name="place" 
namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><!--[if !mso]>
<STYLE>
st1\:*{behavior:url(#default#ieooui) }
</STYLE>
<![endif]-->
<STYLE>
<!--
 /* Font Definitions */
 @font-face
        {font-family:PMingLiU;
        panose-1:2 1 6 1 0 1 1 1 1 1;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@PMingLiU";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:PMingLiU;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
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 vLink=purple link=blue bgColor=white>
<DIV>Hi,</DIV>
<DIV>&nbsp;</DIV>
<DIV>Yes, this configuration allow SIP clients to call each other.</DIV>
<DIV>&nbsp;</DIV>
<DIV>This is the updated config.</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thomas</DIV>
<DIV>&nbsp;</DIV>
<DIV>#<BR># $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 andrei Exp $<BR>#<BR># 
simple quick-start config script<BR>#</DIV>
<DIV>&nbsp;</DIV>
<DIV># ----------- global configuration parameters 
------------------------</DIV>
<DIV>&nbsp;</DIV>
<DIV>debug=3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # debug level (cmd 
line: -dddddddddd)<BR>fork=yes<BR>log_stderror=no&nbsp;# (cmd line: -E)</DIV>
<DIV>&nbsp;</DIV>
<DIV>check_via=no&nbsp;# (cmd. line: 
-v)<BR>dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 
(cmd. line: -r)<BR>rev_dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # (cmd. line: 
-R)</DIV>
<DIV>&nbsp;</DIV>
<DIV>listen=""<BR>port=5060<BR>children=4<BR>fifo_mode=0666<BR>fifo="/tmp/ser_fifo"</DIV>
<DIV>&nbsp;</DIV>
<DIV># ------------------ module loading 
----------------------------------</DIV>
<DIV>&nbsp;</DIV>
<DIV>loadmodule "/usr/local/lib/ser/modules/mysql.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/sl.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/tm.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/rr.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/maxfwd.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/usrloc.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/registrar.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/textops.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/auth.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/auth_db.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/nathelper.so"</DIV>
<DIV>&nbsp;</DIV>
<DIV># ----------------- setting module-specific parameters 
---------------</DIV>
<DIV>&nbsp;</DIV>
<DIV># -- usrloc params --</DIV>
<DIV>&nbsp;</DIV>
<DIV># Uncomment this if you want to use SQL database <BR># for persistent 
storage and comment the previous line<BR>modparam("usrloc", "db_mode", 2)</DIV>
<DIV>&nbsp;</DIV>
<DIV># -- auth params --<BR># Uncomment if you are using auth 
module<BR>#<BR>modparam("auth_db", "calculate_ha1", yes)<BR>#<BR># If you set 
"calculate_ha1" parameter to yes (which true in this config), <BR># uncomment 
also the following parameter)<BR>#<BR>modparam("auth_db", "password_column", 
"password")</DIV>
<DIV>&nbsp;</DIV>
<DIV># -- rr params --<BR># add value to ;lr param to make some broken UAs 
happy<BR>modparam("rr", "enable_full_lr", 1)</DIV>
<DIV>&nbsp;</DIV>
<DIV># -- Nathelper params --<BR>modparam("registrar", "nat_flag", 
6)<BR>modparam("nathelper", "natping_interval", 30)&nbsp; # Ping 
interval<BR>modparam("nathelper", "ping_nated_only", 1) # Ping only clients 
behind NAT</DIV>
<DIV>&nbsp;</DIV>
<DIV># -------------------------&nbsp; request routing logic 
-------------------</DIV>
<DIV>&nbsp;</DIV>
<DIV># main routing logic</DIV>
<DIV>&nbsp;</DIV>
<DIV>route{</DIV>
<DIV>&nbsp;</DIV>
<DIV># -----------------------------------------------<BR># Sanity Check 
Section<BR># -----------------------------------------------<BR>&nbsp;# initial 
sanity checks -- messages with<BR>&nbsp;# max_forwards==0, or excessively long 
requests<BR>&nbsp;if (!mf_process_maxfwd_header("10")) 
{<BR>&nbsp;&nbsp;sl_send_reply("483","Too Many 
Hops");<BR>&nbsp;&nbsp;break;<BR>&nbsp;};<BR>&nbsp;if ( msg:len &gt; max_len ) 
{<BR>&nbsp;&nbsp;sl_send_reply("513", "Message too 
big");<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</DIV>
<DIV>&nbsp;</DIV>
<DIV># -----------------------------------------------<BR># NOTIFY Keep-Alive 
Section<BR># -----------------------------------------------<BR>&nbsp;if 
((method=="NOTIFY") &amp;&amp; search("^Event: keep-alive")) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
sl_send_reply("200","OK");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
break;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;# Nathelper<BR>&nbsp;if (nat_uac_test("3")) {<BR>&nbsp;&nbsp;# Allow 
RR-ed requests, as these may indicate that<BR>&nbsp;&nbsp;# a NAT-enabled proxy 
takes care of it; unless it is<BR>&nbsp;&nbsp;# a 
REGISTER<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;if (method == "REGISTER" || ! 
search("^Record-Route:")) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
fix_nated_contact(); # Rewrite contact with source IP of 
signalling<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (method == "INVITE") 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fix_nated_sdp("1"); 
# Add direction=active to SDP<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
};<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; force_rport(); # Add rport parameter to 
topmost Via<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; setflag(6);&nbsp;&nbsp;&nbsp; # 
Mark as NATed<BR>&nbsp;&nbsp;};<BR>&nbsp;};</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;# we record-route all messages -- to make sure that<BR>&nbsp;# 
subsequent messages will go through our proxy; that's<BR>&nbsp;# particularly 
good if upstream and downstream entities<BR>&nbsp;# use different transport 
protocol<BR>&nbsp;if (!method=="REGISTER") record_route();&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;# subsequent messages withing a dialog should take the<BR>&nbsp;# 
path determined by record-routing<BR>&nbsp;if (loose_route()) {<BR>&nbsp;&nbsp;# 
mark routing logic in request<BR>&nbsp;&nbsp;append_hf("P-hint: 
rr-enforced\r\n"); 
<BR>&nbsp;&nbsp;route(1);<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;if (!uri==myself) {<BR>&nbsp;&nbsp;# mark routing logic in 
request<BR>&nbsp;&nbsp;append_hf("P-hint: outbound\r\n"); 
<BR>&nbsp;&nbsp;route(1);<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;# if the request is for other domain use UsrLoc<BR>&nbsp;# (in case, 
it does not work, use the following command<BR>&nbsp;# with proper names and 
addresses in it)<BR>&nbsp;if (uri==myself) {</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;if (method=="REGISTER") {</DIV>
<DIV>&nbsp;</DIV>
<DIV># Uncomment this if you want to use digest 
authentication<BR>&nbsp;&nbsp;&nbsp;if (!www_authorize("", "subscriber")) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;www_challenge("", 
"0");<BR>&nbsp;&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;&nbsp;};</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;save("location");<BR>&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;};</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;# if the dialed number lies in the range 35891500-35891799, 
don't forward it to T1 Trunk GW&nbsp;<BR>&nbsp;&nbsp;if 
((uri=~"^sip:(852|)358915[0-9][0-9]@") || (uri=~"^sip:(852|)358916[0-9][0-9]@") 
|| (uri=~"^sip:(852|)358917[0-9][0-9]@")) {<BR>&nbsp;&nbsp;&nbsp;if 
(uri=~"^sip:852*") 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;strip(3);<BR>&nbsp;&nbsp;&nbsp;};<BR>&nbsp;&nbsp;};<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;lookup("aliases");<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;if 
(!uri==myself) {<BR>&nbsp;&nbsp;&nbsp;append_hf("P-hint: outbound alias\r\n"); 
<BR>&nbsp;&nbsp;&nbsp;route(1);<BR>&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;};<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;# 
native SIP destinations are handled using our USRLOC DB<BR>&nbsp;&nbsp;# Call 
Routing Section<BR>&nbsp;&nbsp;if (!lookup("location")) 
{<BR>&nbsp;&nbsp;&nbsp;if (uri=~"^sip:(852|)[0-9]{8}@") 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;# Send to PSTN 
Gateway<BR>&nbsp;&nbsp;&nbsp;&nbsp;route(2);<BR>&nbsp;&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;&nbsp;};<BR>&nbsp;&nbsp;&nbsp;sl_send_reply("404", 
"User Not 
Found");<BR>&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;};<BR>&nbsp;};<BR>&nbsp;append_hf("P-hint: 
usrloc applied\r\n");<BR>&nbsp;route(1);</DIV>
<DIV>&nbsp;</DIV>
<DIV>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>route[1] <BR>{<BR>&nbsp;# Nathelper<BR>&nbsp;if 
(uri=~"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)" &amp;&amp; 
!search("^Route:")){<BR>&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply("479", "We don't 
forward to private IP addresses");<BR>&nbsp;&nbsp;&nbsp;&nbsp; 
break;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;# if client or server know to be behind a NAT, enable 
relay<BR>&nbsp;if (isflagset(6)) {<BR>&nbsp;&nbsp;&nbsp;&nbsp; 
force_rtp_proxy();<BR>&nbsp;};</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;# NAT processing of replies; apply to all transactions (for 
example,<BR>&nbsp;# re-INVITEs from public to private UA are hard to identify 
as<BR>&nbsp;# NATed at the moment of request processing); look at 
replies<BR>&nbsp;t_on_reply("1");<BR>&nbsp;<BR>&nbsp;<BR>&nbsp;# send it out 
now; use stateful forwarding as it works reliably<BR>&nbsp;# even for 
UDP2TCP<BR>&nbsp;if (!t_relay()) 
{<BR>&nbsp;&nbsp;sl_reply_error();<BR>&nbsp;&nbsp;break;<BR>&nbsp;};<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV># PSTN Call to T1 Trunk GW<BR>route[2] 
{<BR>&nbsp;rewritehostport("");<BR>&nbsp;if (isflagset(6)) 
{<BR>&nbsp;&nbsp;force_rtp_proxy();<BR>&nbsp;}; 
<BR>&nbsp;t_on_reply("1");<BR>&nbsp;if (!t_relay()) 
{<BR>&nbsp;&nbsp;sl_reply_error();<BR>&nbsp;&nbsp;break;<BR>&nbsp;};<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV># !! Nathelper<BR>onreply_route[1] {<BR>&nbsp;&nbsp;&nbsp; # NATed 
transaction ?<BR>&nbsp;&nbsp;&nbsp; if (isflagset(6) &amp;&amp; status =~ 
"(183)|2[0-9][0-9]") {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
fix_nated_contact();</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;# Not all 2xx messages have a content body so here we make 
sure<BR>&nbsp;# out Content-Length &gt; 0 to avoid a parse error<BR>&nbsp;if 
(!search("^Content-Length:\0")) 
{<BR>&nbsp;&nbsp;force_rtp_proxy();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
};<BR>&nbsp;&nbsp;&nbsp; # otherwise, is it a transaction behind a NAT and we 
did not<BR>&nbsp;&nbsp;&nbsp; # know at time of request processing ? (RFC1918 
contacts)<BR>&nbsp;&nbsp;&nbsp; } else if (nat_uac_test("1")) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
fix_nated_contact();<BR>&nbsp;&nbsp;&nbsp; };<BR>}<BR></DIV>
<DIV>---------end of config -----------</DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE dir=ltr 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt &#26032;&#32048;&#26126;&#39636;">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt &#26032;&#32048;&#26126;&#39636;; font-color: black"><B>From:</B> 
  <A title=jefrey@mithotech.com href="mailto:jefrey@mithotech.com">Jefrey</A> 
  </DIV>
  <DIV style="FONT: 10pt &#26032;&#32048;&#26126;&#39636;"><B>To:</B> <A title=support@cybertel.biz 
  href="mailto:support@cybertel.biz">'support'</A> </DIV>
  <DIV style="FONT: 10pt &#26032;&#32048;&#26126;&#39636;"><B>Sent:</B> Wednesday, February 23, 2005 10:44 
  PM</DIV>
  <DIV style="FONT: 10pt &#26032;&#32048;&#26126;&#39636;"><B>Subject:</B> RE: [Serusers] ser-0.8.14 / 
  ser-0.9 + rtpproxy + PSTN</DIV>
  <DIV><BR></DIV>
  <DIV class=Section1>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Hi<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  Just needing some of your expertise, does this configuration allow your SIP 
  clients to call each other?<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Regards,<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Jef.<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN 
  style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <DIV>
  <DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT 
  face=PMingLiU size=3><SPAN style="FONT-SIZE: 12pt">
  <HR tabIndex=-1 align=center width="100%" SIZE=2>
  </SPAN></FONT></DIV>
  <P class=MsoNormal><B><FONT face=Tahoma size=2><SPAN 
  style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT 
  face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"> <A 
  href="mailto:serusers-bounces@iptel.org">serusers-bounces@lists.iptel.org</A> 
  [mailto:serusers-bounces@lists.iptel.org] <B><SPAN style="FONT-WEIGHT: bold">On 
  Behalf Of </SPAN></B>support<BR><B><SPAN 
  style="FONT-WEIGHT: bold">Sent:</SPAN></B> Monday, February 14, 2005 5:42 
  PM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> <A 
  href="mailto:serusers@lists.iptel.org">serusers@lists.iptel.org</A><BR><B><SPAN 
  style="FONT-WEIGHT: bold">Subject:</SPAN></B> [Serusers] ser-0.8.14 / ser-0.9 
  + rtpproxy + PSTN</SPAN></FONT><o:p></o:p></P></DIV>
  <P class=MsoNormal><FONT face=PMingLiU size=3><SPAN 
  style="FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">Hi,</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">After studying some 
  ser.cfg files, I could route a SIP call to PSTN gateway 
  successfully.</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">If ser receives 
  "866+any PSTN num", ser will forward to T1 trunk gateway. T1 trunkgateway will 
  drop the prefix 866 and route the call out to PSTN 
  line.</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">i.e. SIP client 
  (866+PSTN num) ---&gt; T1 Trunk Gateway (drop prefix 866) ---&gt; PSTN call 
  (PSTN num)</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">SER version: 
  ser-0.8.14 or&nbsp;ser-0.9.</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">rtpproxy version: 
  latest cvs version from berlios</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">I have posted a 
  ser.cfg in this email.</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">Best 
  Regards,</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">Thomas</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">#<BR># $Id: ser.cfg,v 
  1.21.4.1 2003/11/10 15:35:15 andrei Exp $<BR>#<BR># simple quick-start config 
  script<BR>#</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"># ----------- global 
  configuration parameters 
  ------------------------</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">debug=3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  # debug level (cmd line: -dddddddddd)<BR>fork=yes<BR>log_stderror=no&nbsp;# 
  (cmd line: -E)</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">check_via=no&nbsp;# 
  (cmd. line: 
  -v)<BR>dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 
  (cmd. line: -r)<BR>rev_dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # (cmd. line: 
  -R)</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">listen=""<BR>port=5060<BR>#children=4<BR>fifo_mode=0666<BR>fifo="/tmp/ser_fifo"</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"># ------------------ 
  module loading 
  ----------------------------------</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"># Uncomment this if 
  you want to use SQL database<BR>loadmodule 
  "/usr/local/lib/ser/modules/mysql.so"</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">loadmodule 
  "/usr/local/lib/ser/modules/sl.so"<BR>loadmodule 
  "/usr/local/lib/ser/modules/tm.so"<BR>loadmodule 
  "/usr/local/lib/ser/modules/rr.so"<BR>loadmodule 
  "/usr/local/lib/ser/modules/maxfwd.so"<BR>loadmodule 
  "/usr/local/lib/ser/modules/usrloc.so"<BR>loadmodule 
  "/usr/local/lib/ser/modules/registrar.so"<BR>loadmodule 
  "/usr/local/lib/ser/modules/textops.so"</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"># Uncomment this if 
  you want digest authentication<BR># mysql.so must be loaded !<BR>loadmodule 
  "/usr/local/lib/ser/modules/auth.so"<BR>loadmodule 
  "/usr/local/lib/ser/modules/auth_db.so"</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"># 
  Nathelper<BR>loadmodule "/usr/local/lib/ser/modules/nathelper.so"<BR># 
  ----------------- setting module-specific parameters 
  ---------------</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"># -- usrloc params 
  --</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">#modparam("usrloc", 
  "db_mode",&nbsp;&nbsp; 0)</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"># Uncomment this if 
  you want to use SQL database <BR># for persistent storage and comment the 
  previous line<BR>modparam("usrloc", "db_mode", 
  2)</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"># -- auth params 
  --<BR># Uncomment if you are using auth module<BR>#<BR>modparam("auth_db", 
  "calculate_ha1", yes)<BR>#<BR># If you set "calculate_ha1" parameter to yes 
  (which true in this config), <BR># uncomment also the following 
  parameter)<BR>#<BR>modparam("auth_db", "password_column", 
  "password")</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"># -- rr params --<BR># 
  add value to ;lr param to make some broken UAs happy<BR>modparam("rr", 
  "enable_full_lr", 1)</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"># -- Nathelper params 
  --<BR>modparam("registrar", "nat_flag", 6)<BR>modparam("nathelper", 
  "natping_interval", 30)&nbsp; # <st1:place w:st="on">Ping</st1:place> 
  interval<BR>modparam("nathelper", "ping_nated_only", 1) # <st1:place 
  w:st="on">Ping</st1:place> only clients behind 
  NAT</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"># 
  -------------------------&nbsp; request routing logic 
  -------------------</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"># main routing 
  logic</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">route{</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;# initial sanity 
  checks -- messages with<BR>&nbsp;# max_forwards==0, or excessively long 
  requests<BR>&nbsp;if (!mf_process_maxfwd_header("10")) 
  {<BR>&nbsp;&nbsp;sl_send_reply("483","Too Many 
  Hops");<BR>&nbsp;&nbsp;break;<BR>&nbsp;};<BR>&nbsp;if ( msg:len &gt; max_len ) 
  {<BR>&nbsp;&nbsp;sl_send_reply("513", "Message too 
  big");<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;# 
  Nathelper<BR>&nbsp;if (nat_uac_test("3")) {<BR>&nbsp;&nbsp;# Allow RR-ed 
  requests, as these may indicate that<BR>&nbsp;&nbsp;# a NAT-enabled proxy 
  takes care of it; unless it is<BR>&nbsp;&nbsp;# a 
  REGISTER<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;if (method == "REGISTER" || ! 
  search("^Record-Route:")) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; log("LOG: 
  Someone trying to register from private IP, 
  rewriting\n");</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  # This will work only for user agents that support 
  symmetric<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # communication. We tested quite 
  many of them and majority is<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # smart enough 
  to be symmetric. In some phones it takes a 
  configuration<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # option. With Cisco 7960, it 
  is called NAT_Enable=Yes, with kphone it is<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  # called "symmetric media" and "symmetric 
  signalling".</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  fix_nated_contact(); # Rewrite contact with source IP of 
  signalling<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (method == "INVITE") 
  {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  fix_nated_sdp("1"); # Add direction=active to 
  SDP<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  force_rport(); # Add rport parameter to topmost 
  Via<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; setflag(6);&nbsp;&nbsp;&nbsp; # Mark as 
  NATed<BR>&nbsp;&nbsp;};<BR>&nbsp;};</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;# we 
  record-route all messages -- to make sure that<BR>&nbsp;# subsequent messages 
  will go through our proxy; that's<BR>&nbsp;# particularly good if upstream and 
  downstream entities<BR>&nbsp;# use different transport protocol<BR>&nbsp;if 
  (!method=="REGISTER") record_route();&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;# subsequent 
  messages withing a dialog should take the<BR>&nbsp;# path determined by 
  record-routing<BR>&nbsp;if (loose_route()) {<BR>&nbsp;&nbsp;# mark routing 
  logic in request<BR>&nbsp;&nbsp;append_hf("P-hint: rr-enforced\r\n"); 
  <BR>&nbsp;&nbsp;route(1);<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;if 
  (!uri==myself) {<BR>&nbsp;&nbsp;# mark routing logic in 
  request<BR>&nbsp;&nbsp;append_hf("P-hint: outbound\r\n"); 
  <BR>&nbsp;&nbsp;route(1);<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;# if the request 
  is for other domain use UsrLoc<BR>&nbsp;# (in case, it does not work, use the 
  following command<BR>&nbsp;# with proper names and addresses in 
  it)<BR>&nbsp;if (uri==myself) {</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;&nbsp;if 
  (method=="REGISTER") {</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"># Uncomment this if 
  you want to use digest authentication<BR>&nbsp;&nbsp;&nbsp;if 
  (!www_authorize("", "subscriber")) 
  {<BR>&nbsp;&nbsp;&nbsp;&nbsp;www_challenge("", 
  "0");<BR>&nbsp;&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;&nbsp;};</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;&nbsp;&nbsp;save("location");<BR>&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;};<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;if 
  (uri=~"^sip:866*") {<BR>&nbsp;&nbsp;&nbsp;log(1, "going to PSTN 
  route\n");<BR>&nbsp;&nbsp;&nbsp;route(2);<BR>&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;};<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;lookup("aliases");<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;if 
  (!uri==myself) {<BR>&nbsp;&nbsp;&nbsp;append_hf("P-hint: outbound alias\r\n"); 
  <BR>&nbsp;&nbsp;&nbsp;route(1);<BR>&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;};<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;# 
  native SIP destinations are handled using our USRLOC DB<BR>&nbsp;&nbsp;if 
  (!lookup("location")) {<BR>&nbsp;&nbsp;&nbsp;sl_send_reply("404", "Not 
  Found");<BR>&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;};<BR>&nbsp;};<BR>&nbsp;append_hf("P-hint: 
  usrloc applied\r\n");<BR>&nbsp;route(1);</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">}</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">route[1] 
  <BR>{<BR>&nbsp;# !! Nathelper<BR>&nbsp;if 
  (uri=~"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)" &amp;&amp; 
  !search("^Route:")){<BR>&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply("479", "We 
  don't forward to private IP addresses");<BR>&nbsp;&nbsp;&nbsp;&nbsp; 
  break;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  };</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;# if client or 
  server know to be behind a NAT, enable relay<BR>&nbsp;if (isflagset(6)) 
  {<BR>&nbsp;&nbsp;&nbsp;&nbsp; 
  force_rtp_proxy();<BR>&nbsp;};</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;# NAT processing 
  of replies; apply to all transactions (for example,<BR>&nbsp;# re-INVITEs from 
  public to private UA are hard to identify as<BR>&nbsp;# NATed at the moment of 
  request processing); look at 
  replies<BR>&nbsp;t_on_reply("1");<BR>&nbsp;<BR>&nbsp;<BR>&nbsp;# send it out 
  now; use stateful forwarding as it works reliably<BR>&nbsp;# even for 
  UDP2TCP<BR>&nbsp;if (!t_relay()) 
  {<BR>&nbsp;&nbsp;sl_reply_error();<BR>&nbsp;&nbsp;break;<BR>&nbsp;};<BR>}</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">route[2] 
  {<BR>&nbsp;force_rtp_proxy();<BR>&nbsp;record_route();<BR>&nbsp;t_on_reply("1");<BR>&nbsp;t_relay_to_udp("<EM><I><U><FONT 
  face="Times New Roman">T1&nbsp;gateway 
  IP</FONT></U></I></EM>","<EM><I><U><FONT face="Times New Roman">T1 Gateway UDP 
  port</FONT></U></I></EM>");<BR>}</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'"># !! 
  Nathelper<BR>onreply_route[1] {<BR>&nbsp;&nbsp;&nbsp; # NATed transaction 
  ?<BR>&nbsp;&nbsp;&nbsp; if (isflagset(6) &amp;&amp; status =~ 
  "(183)|2[0-9][0-9]") {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  fix_nated_contact();</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;# Not all 2xx 
  messages have a content body so here we make sure<BR>&nbsp;# out 
  Content-Length &gt; 0 to avoid a parse error<BR>&nbsp;if 
  (!search("^Content-Length:\0")) 
  {<BR>&nbsp;&nbsp;force_rtp_proxy();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  };<BR>&nbsp;&nbsp;&nbsp; # otherwise, is it a transaction behind a NAT and we 
  did not<BR>&nbsp;&nbsp;&nbsp; # know at time of request processing ? (RFC1918 
  contacts)<BR>&nbsp;&nbsp;&nbsp; } else if (nat_uac_test("1")) 
  {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  fix_nated_contact();<BR>&nbsp;&nbsp;&nbsp; 
  };<BR>}</SPAN></FONT><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'">&nbsp;<o:p></o:p></SPAN></FONT></P></DIV></DIV></BLOCKQUOTE></BODY></HTML>