<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:st1="urn:schemas-microsoft-com:office:smarttags" 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]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:PMingLiU;
        panose-1:2 2 3 0 0 0 0 0 0 0;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@PMingLiU";
        panose-1:2 2 3 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.EmailStyle17
        {mso-style-type:personal;
        font-family:Arial;
        color:navy;}
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 bgcolor=white lang=EN-US link=blue vlink=purple>

<div class=Section1>

<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=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=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>IS your SIPUA support STUN if yes it can
use it and get wrong information and try to change IP/PORT to wrong values&#8230;.<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=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I do not know what is caputure, but you
can get ngrep in SER distribution at sip_router/utils/ngrep<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=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>When u will execute it use : ngrep -qW
byline &lt;exp&gt;<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=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>To get &#8220;nice&#8221; output </span></font><font
size=2 color=navy face=Wingdings><span style='font-size:10.0pt;font-family:
Wingdings;color:navy'>J</span></font><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=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=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><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;font-family:"Times New Roman"'>

<hr size=3 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'> support
[mailto:support@cybertel.biz] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Sunday, February 27, 2005
9:25 PM<br>
<b><span style='font-weight:bold'>To:</span></b> Vitaly Nikolaev;
serusers@lists.iptel.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [Serusers] ser +
rtpproxy - call disconnected</span></font><font face="Times New Roman"><span
style='font-family:"Times New Roman"'><o:p></o:p></span></font></p>

</div>

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

<div>

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

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;font-family:"Times New Roman"'>In fact, my PSTN&nbsp;GW does not support
STUN. If it support STUN, then I will not use rtpproxy.<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;font-family:"Times New Roman"'>The following problem happens:<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;font-family:"Times New Roman"'>I&nbsp;try to use a fix IP for PSTN GW to
register with SER, if I don't enable rtpproxy, only ringing tones could be
heard, but no voice passing through it. Why does this happen?<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;font-family:"Times New Roman"'>Another question is that where could I
download and install ngrep? If I use a capture program to capture all packets,
could I replace&nbsp;ngrep with it?<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;font-family:"Times New Roman"'>Thank you for the advice.<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

<div>

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

</div>

<div>

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

</div>

<div>

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

</div>

<div>

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

</div>

<blockquote style='border:none;border-left:solid black 1.5pt;padding:0in 0in 0in 3.0pt;
margin-left:3.0pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'>

<div>

<p class=MsoNormal><font size=2 face=PMingLiU><span style='font-size:10.0pt'>-----
Original Message ----- <o:p></o:p></span></font></p>

</div>

<div style='font-color:black'>

<p class=MsoNormal style='background:#E4E4E4'><b><font size=2 face=PMingLiU><span
style='font-size:10.0pt;font-weight:bold'>From:</span></font></b><font size=2><span
style='font-size:10.0pt'> <a href="mailto:vitaly@voipsonic.com"
title="vitaly@voipsonic.com">Vitaly Nikolaev</a> <o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><b><font size=2 face=PMingLiU><span style='font-size:10.0pt;
font-weight:bold'>To:</span></font></b><font size=2><span style='font-size:
10.0pt'> <a href="mailto:support@cybertel.biz" title="support@cybertel.biz">'support'</a>
; <a href="mailto:serusers@lists.iptel.org" title="serusers@lists.iptel.org">serusers@lists.iptel.org</a>
<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><b><font size=2 face=PMingLiU><span style='font-size:10.0pt;
font-weight:bold'>Sent:</span></font></b><font size=2><span style='font-size:
10.0pt'> Thursday, January 03, 2002 3:37 AM<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><b><font size=2 face=PMingLiU><span style='font-size:10.0pt;
font-weight:bold'>Subject:</span></font></b><font size=2><span
style='font-size:10.0pt'> RE: [Serusers] ser + rtpproxy - call disconnected<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Even if half of all RTP packets get lost
you will just have bad quality of call.<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=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>In your case it very looks like you have
problem with ACK<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=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>DO ngrep and see if PSTN GW receive ACK
packet after OK (otherwise GW will repeat OK few times and then disconnect
call) if it is an issue just do search in this list with keyword ACK<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=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face=PMingLiU><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'> <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> Saturday, February 26, 2005
12:24 AM<br>
<b><span style='font-weight:bold'>To:</span></b> serusers@lists.iptel.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> [Serusers] ser + rtpproxy
- call disconnected</span></font><o:p></o:p></p>

</div>

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

<div>

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

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;font-family:"Times New Roman"'>When I try to make a call using rtpproxy
and ser-0.8.14 (SIP UA &lt;---&gt; PSTN), most of the time the call will be
disconnected within 1 minutes. Sometimes, it will be so unstable that the call
be disconnected after 15 seconds. The above scenarios happens</span></font><o:p></o:p></p>

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;font-family:"Times New Roman"'>Will this problem related to unstable
rtpproxy? Because I know that all packets will route through the server. once
rtp packet get loss, the call will be disconnected. Is this correct?</span></font><o:p></o:p></p>

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;font-family:"Times New Roman"'>Perhaps it depends on my ser.cfg.</span></font><o:p></o:p></p>

</div>

<div>

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

</div>

<div>

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

</div>

<div>

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

</div>

<div>

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

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;font-family:"Times New Roman"'>My ser.cfg:</span></font><o:p></o:p></p>

</div>

<div>

<div>

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

</div>

<div>

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

</div>

<div>

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

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;font-family:"Times New Roman"'># ----------- global configuration
parameters ------------------------<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

<div>

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

</div>

<div>

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

</div>

<div>

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

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;font-family:"Times New Roman"'>listen=&quot;&quot;<br>
port=5060<br>
children=4<br>
fifo_mode=0666<br>
fifo=&quot;/tmp/ser_fifo&quot;<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

<div>

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

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;font-family:"Times New Roman"'>loadmodule
&quot;/usr/local/lib/ser/modules/mysql.so&quot;<br>
loadmodule &quot;/usr/local/lib/ser/modules/sl.so&quot;<br>
loadmodule &quot;/usr/local/lib/ser/modules/tm.so&quot;<br>
loadmodule &quot;/usr/local/lib/ser/modules/rr.so&quot;<br>
loadmodule &quot;/usr/local/lib/ser/modules/maxfwd.so&quot;<br>
loadmodule &quot;/usr/local/lib/ser/modules/usrloc.so&quot;<br>
loadmodule &quot;/usr/local/lib/ser/modules/registrar.so&quot;<br>
loadmodule &quot;/usr/local/lib/ser/modules/textops.so&quot;<br>
loadmodule &quot;/usr/local/lib/ser/modules/auth.so&quot;<br>
loadmodule &quot;/usr/local/lib/ser/modules/auth_db.so&quot;<br>
loadmodule &quot;/usr/local/lib/ser/modules/nathelper.so&quot;<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;font-family:"Times New Roman"'># ----------------- setting
module-specific parameters ---------------<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

<div>

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

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;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(&quot;usrloc&quot;, &quot;db_mode&quot;, 2)<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;font-family:"Times New Roman"'># -- auth params --<br>
# Uncomment if you are using auth module<br>
#<br>
modparam(&quot;auth_db&quot;, &quot;calculate_ha1&quot;, yes)<br>
#<br>
# If you set &quot;calculate_ha1&quot; parameter to yes (which true in this
config), <br>
# uncomment also the following parameter)<br>
#<br>
modparam(&quot;auth_db&quot;, &quot;password_column&quot;,
&quot;password&quot;)<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;font-family:"Times New Roman"'># -- rr params --<br>
# add value to ;lr param to make some broken UAs happy<br>
modparam(&quot;rr&quot;, &quot;enable_full_lr&quot;, 1)<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;font-family:"Times New Roman"'># -- Nathelper params --<br>
modparam(&quot;registrar&quot;, &quot;nat_flag&quot;, 6)<br>
modparam(&quot;nathelper&quot;, &quot;natping_interval&quot;, 30)&nbsp; # <st1:place
w:st="on">Ping</st1:place> interval<br>
modparam(&quot;nathelper&quot;, &quot;ping_nated_only&quot;, 1) # <st1:place
w:st="on">Ping</st1:place> only clients behind NAT<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

<div>

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

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;font-family:"Times New Roman"'># main routing logic<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

<div>

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

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;font-family:"Times New Roman"'># -----------------------------------------------<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(&quot;10&quot;)) {<br>
&nbsp;&nbsp;sl_send_reply(&quot;483&quot;,&quot;Too Many Hops&quot;);<br>
&nbsp;&nbsp;break;<br>
&nbsp;};<br>
&nbsp;if ( msg:len &gt; max_len ) {<br>
&nbsp;&nbsp;sl_send_reply(&quot;513&quot;, &quot;Message too big&quot;);<br>
&nbsp;&nbsp;break;<br>
&nbsp;};<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;font-family:"Times New Roman"'>#
-----------------------------------------------<br>
# NOTIFY Keep-Alive Section<br>
# -----------------------------------------------<br>
&nbsp;if ((method==&quot;NOTIFY&quot;) &amp;&amp; search(&quot;^Event:
keep-alive&quot;)) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
sl_send_reply(&quot;200&quot;,&quot;OK&quot;);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;font-family:"Times New Roman"'>&nbsp;# Nathelper<br>
&nbsp;if (nat_uac_test(&quot;3&quot;)) {<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 == &quot;REGISTER&quot; || !
search(&quot;^Record-Route:&quot;)) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fix_nated_contact(); # Rewrite contact with
source IP of signalling<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (method == &quot;INVITE&quot;) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
fix_nated_sdp(&quot;1&quot;); # 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;};<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;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==&quot;REGISTER&quot;) record_route();&nbsp;<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;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(&quot;P-hint: rr-enforced\r\n&quot;); <br>
&nbsp;&nbsp;route(1);<br>
&nbsp;&nbsp;break;<br>
&nbsp;};<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;font-family:"Times New Roman"'>&nbsp;if (!uri==myself) {<br>
&nbsp;&nbsp;# mark routing logic in request<br>
&nbsp;&nbsp;append_hf(&quot;P-hint: outbound\r\n&quot;); <br>
&nbsp;&nbsp;route(1);<br>
&nbsp;&nbsp;break;<br>
&nbsp;};<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

<div>

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

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp;if
(method==&quot;REGISTER&quot;) {<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;font-family:"Times New Roman"'># Uncomment this if you want to use
digest authentication<br>
&nbsp;&nbsp;&nbsp;if (!www_authorize(&quot;&quot;, &quot;subscriber&quot;)) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;www_challenge(&quot;&quot;, &quot;0&quot;);<br>
&nbsp;&nbsp;&nbsp;&nbsp;break;<br>
&nbsp;&nbsp;&nbsp;};<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;font-family:"Times New Roman"'>&nbsp;&nbsp;&nbsp;save(&quot;location&quot;);<br>
&nbsp;&nbsp;&nbsp;break;<br>
&nbsp;&nbsp;};<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;font-family:"Times New Roman"'>&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=~&quot;^sip:(852|)358915[0-9][0-9]@&quot;) ||
(uri=~&quot;^sip:(852|)358916[0-9][0-9]@&quot;) ||
(uri=~&quot;^sip:(852|)358917[0-9][0-9]@&quot;)) {<br>
&nbsp;&nbsp;&nbsp;if (uri=~&quot;^sip:852*&quot;) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;strip(3);<br>
&nbsp;&nbsp;&nbsp;};<br>
&nbsp;&nbsp;};<br>
&nbsp;&nbsp;<br>
&nbsp;&nbsp;lookup(&quot;aliases&quot;);<br>
&nbsp;&nbsp;<br>
&nbsp;&nbsp;if (!uri==myself) {<br>
&nbsp;&nbsp;&nbsp;append_hf(&quot;P-hint: outbound alias\r\n&quot;); <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 <st1:PersonName
w:st="on">DB</st1:PersonName><br>
&nbsp;&nbsp;# Call Routing Section<br>
&nbsp;&nbsp;if (!lookup(&quot;location&quot;)) {<br>
&nbsp;&nbsp;&nbsp;if (uri=~&quot;^sip:(852|)[0-9]{8}@&quot;) {<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(&quot;404&quot;, &quot;User Not Found&quot;);<br>
&nbsp;&nbsp;&nbsp;break;<br>
&nbsp;&nbsp;};<br>
&nbsp;};<br>
&nbsp;append_hf(&quot;P-hint: usrloc applied\r\n&quot;);<br>
&nbsp;route(1);<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

<div>

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

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;font-family:"Times New Roman"'>route[1] <br>
{<br>
&nbsp;# Nathelper<br>
&nbsp;if (uri=~&quot;[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)&quot;
&amp;&amp; !search(&quot;^Route:&quot;)){<br>
&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply(&quot;479&quot;, &quot;We don't forward
to private IP addresses&quot;);<br>
&nbsp;&nbsp;&nbsp;&nbsp; break;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

<div>

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

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;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(&quot;1&quot;);<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>
}<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;font-family:"Times New Roman"'># PSTN Call to T1 Trunk GW<br>
route[2] {<br>
&nbsp;rewritehostport(&quot;&quot;);<br>
&nbsp;if (isflagset(6)) {<br>
&nbsp;&nbsp;force_rtp_proxy();<br>
&nbsp;}; <br>
&nbsp;t_on_reply(&quot;1&quot;);<br>
&nbsp;if (!t_relay()) {<br>
&nbsp;&nbsp;sl_reply_error();<br>
&nbsp;&nbsp;break;<br>
&nbsp;};<br>
}<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;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 =~
&quot;(183)|2[0-9][0-9]&quot;) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fix_nated_contact();<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt;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(&quot;^Content-Length:\0&quot;)) {<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(&quot;1&quot;)) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fix_nated_contact();<br>
&nbsp;&nbsp;&nbsp; };<br>
}<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

</div>

</blockquote>

</div>

</body>

</html>