<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:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:odc="urn:schemas-microsoft-com:office:odc" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc="http://microsoft.com/officenet/conferencing" xmlns:D="DAV:" xmlns:Repl="http://schemas.microsoft.com/repl/" xmlns:mt="http://schemas.microsoft.com/sharepoint/soap/meetings/" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ppda="http://www.passport.com/NameSpace.xsd" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec="http://www.w3.org/2001/04/xmlenc#" xmlns:sp="http://schemas.microsoft.com/sharepoint/" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcs="http://schemas.microsoft.com/data/udc/soap" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udcp2p="http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss="http://schemas.microsoft.com/office/2006/digsig-setup" xmlns:dssi="http://schemas.microsoft.com/office/2006/digsig" xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:spwp="http://microsoft.com/sharepoint/webpartpages" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:pptsl="http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/" xmlns:spsl="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService" xmlns:Z="urn:schemas-microsoft-com:" xmlns:st="&#1;" 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 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
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-AU link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Hi,<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I got the following settings on my SER handling authentication.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>route[AUTHENTICATION]<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>{<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # CANCELs and ACKs cannot be challenged.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (method == &quot;CANCEL&quot; || method ==
&quot;ACK&quot;) {<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Authentication<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (method == &quot;REGISTER&quot;) {<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!radius_www_authenticate(&quot;
&quot;)) {<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>www_challenge(&quot;&quot;,
&quot;1&quot;);<o:p></o:p></span></b></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; save(&quot;location&quot;);<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drop;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>}<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>However, when I try to run SER with this file, error come up &#8220;unknown
command, missing loadmodule?&#8221; indicating the line in </span><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>red </span><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>has
problem. If I comment this line, SER starts fine but no authentication
performed.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Anyone can help?<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Thanks<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Leon<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> Tomasz Zieleniewski
[mailto:tzieleniewski@gmail.com] <br>
<b>Sent:</b> Thursday, 7 May 2009 11:03 PM<br>
<b>To:</b> Leon Li<br>
<b>Cc:</b> serusers@lists.iptel.org<br>
<b>Subject:</b> Re: [Serusers] SER with RADIUS<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='margin-bottom:12.0pt'>Hi,<br>
<br>
In order to use radius you need auth_radius module to use database auth_db.<br>
Other thing is that if You want to authorize user as UAS (registrar)<br>
then You should use radius_www_authenticate(disgest_realm) function.<br>
<br>
Kind regards,<br>
- Tomasz<o:p></o:p></p>

<div>

<p class=MsoNormal>2009/5/7 Leon Li &lt;<a href="mailto:Leon.Li@aarnet.edu.au">Leon.Li@aarnet.edu.au</a>&gt;<o:p></o:p></p>

<div>

<div>

<p><span style='font-size:11.0pt;color:#1F497D'>Thanks Tomasz,</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>&nbsp;</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>I know we need different
function, however, my problem is that it won&#8217;t accept www_challenge in ser.cfg
which is introduced by auth module, I think.</span><o:p></o:p></p>

<div>

<p><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if
(method==&quot;REGISTER&quot;) {</b><o:p></o:p></p>

<p><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# authentication</b><o:p></o:p></p>

<p><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
if (!radius_www_authorize(&quot;&quot;)) {</b><o:p></o:p></p>

<p><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
www_challenge(&quot;&quot;, &quot;0&quot;);</b><o:p></o:p></p>

<p><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
break;</b><o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
};<o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>&nbsp;</span><o:p></o:p></p>

</div>

<p><span style='font-size:11.0pt;color:#1F497D'>Regards</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>Leon</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>&nbsp;</span><o:p></o:p></p>

<p><span style='font-size:11.0pt;color:#1F497D'>&nbsp;</span><o:p></o:p></p>

<div style='border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0cm 0cm 0cm;
border-color:-moz-use-text-color -moz-use-text-color'>

<p><b><span lang=EN-US style='font-size:10.0pt'>From:</span></b><span
lang=EN-US style='font-size:10.0pt'> Tomasz Zieleniewski [mailto:<a
href="mailto:tzieleniewski@gmail.com" target="_blank">tzieleniewski@gmail.com</a>]
<br>
<b>Sent:</b> Wednesday, 6 May 2009 6:25 PM<br>
<b>To:</b> Leon Li<br>
<b>Cc:</b> <a href="mailto:serusers@lists.iptel.org" target="_blank">serusers@lists.iptel.org</a><br>
<b>Subject:</b> Re: [Serusers] SER with RADIUS</span><o:p></o:p></p>

</div>

<div>

<div>

<p>&nbsp;<o:p></o:p></p>

<p style='margin-bottom:12.0pt'>Hi,<br>
<br>
>From SER version 2.x in order to challenge a SIP Request with FreeRADIUS
authorization You need to use the radius_proxy_authorize(digest_realm)
function.<br>
And analogously proxy_authorize(digest_realm, credentials) if You want to use
SER database.<br>
<br>
Kind regards,<br>
- Tomasz Zieleniewski <o:p></o:p></p>

<div>

<p>2009/5/6 Leon Li &lt;<a href="mailto:Leon.Li@aarnet.edu.au" target="_blank">Leon.Li@aarnet.edu.au</a>&gt;<o:p></o:p></p>

<div>

<div>

<p>Hi,<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p>I am trying to make SER working with FreeRADIUS. However, I got an error
using www_challenge, &quot; 0(3184) parse error (119,25-26): unknown command,
missing loadmodule?&quot; The 119 line is www_challenge(&quot;&quot;,
&quot;0&quot;); I did load auth module. Any idea?<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p>Here is my config:<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p>#<o:p></o:p></p>

<p># $Id: ser-basic.cfg,v 1.1.2.2 2008/06/12 13:15:06 alfredh Exp $ # # This a
very basic config file w aliases and anamed route but # w/o authentication,
accounting, database, multi-domain support etc.<o:p></o:p></p>

<p># Please refer to ser.cfg for a more complete example #<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p># ----------- global configuration parameters ------------------------<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p>debug=3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # debug level (cmd
line: -dddddddddd)<o:p></o:p></p>

<p>#memdbg=10 # memory debug message level<o:p></o:p></p>

<p>#memlog=10 # memory statistics log level #log_facility=LOG_LOCAL0 # sets the
facility used for logging (see syslog(3))<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p>/* Uncomment these lines to enter debugging mode fork=no log_stderror=yes */<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p>check_via=no&nbsp;&nbsp;&nbsp; # (cmd. line: -v)<o:p></o:p></p>

<p>dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # (cmd. line:
-r)<o:p></o:p></p>

<p>rev_dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # (cmd. line: -R)<o:p></o:p></p>

<p>listen=202.158.197.134<o:p></o:p></p>

<p>port=5060<o:p></o:p></p>

<p>children=4<o:p></o:p></p>

<p>#user=ser<o:p></o:p></p>

<p>#group=ser<o:p></o:p></p>

<p>#disable_core=yes #disables core dumping<o:p></o:p></p>

<p>#open_fd_limit=1024 # sets the open file descriptors limit #mhomed=yes&nbsp;
# usefull for multihomed hosts, small performance penalty #disable_tcp=yes
#tcp_accept_aliases=yes # accepts the tcp alias via option (see NEWS)<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p>#<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p># ------------------ module loading ----------------------------------<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p>loadmodule &quot;/usr/local/lib/ser/modules/sl.so&quot;<o:p></o:p></p>

<p>loadmodule &quot;/usr/local/lib/ser/modules/tm.so&quot;<o:p></o:p></p>

<p>loadmodule &quot;/usr/local/lib/ser/modules/rr.so&quot;<o:p></o:p></p>

<p>loadmodule &quot;/usr/local/lib/ser/modules/textops.so&quot;<o:p></o:p></p>

<p>loadmodule &quot;/usr/local/lib/ser/modules/maxfwd.so&quot;<o:p></o:p></p>

<p>loadmodule &quot;/usr/local/lib/ser/modules/usrloc.so&quot;<o:p></o:p></p>

<p>loadmodule &quot;/usr/local/lib/ser/modules/registrar.so&quot;<o:p></o:p></p>

<p>loadmodule &quot;/usr/local/lib/ser/modules/ctl.so&quot;<o:p></o:p></p>

<p><b>loadmodule &quot;/usr/local/lib/ser/modules/auth.so&quot;</b><o:p></o:p></p>

<p>loadmodule &quot;/usr/local/lib/ser/modules/auth_radius.so&quot;<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p># ----------------- setting module-specific parameters ---------------<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p># -- usrloc params --<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p>modparam(&quot;usrloc&quot;, &quot;db_mode&quot;,&nbsp;&nbsp; 0)<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p># -- rr params --<o:p></o:p></p>

<p># add value to ;lr param to make some broken UAs happy
modparam(&quot;rr&quot;, &quot;enable_full_lr&quot;, 1)<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p># ctl params<o:p></o:p></p>

<p># by default ctl listens on unixs:/tmp/ser_ctl if no other address is #
specified in modparams; this is also the default for sercmd
modparam(&quot;ctl&quot;, &quot;binrpc&quot;, &quot;unixs:/tmp/ser_ctl&quot;) #
listen on the &quot;standard&quot; fifo for backward compatibility
modparam(&quot;ctl&quot;, &quot;fifo&quot;, &quot;fifo:/tmp/ser_fifo&quot;) #
listen on tcp, localhost #modparam(&quot;ctl&quot;, &quot;binrpc&quot;,
&quot;tcp:localhost:2046&quot;)<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p># -- auth_radius params --<o:p></o:p></p>

<p>modparam(&quot;auth_radius&quot;, &quot;radius_config&quot;,
&quot;/usr/local/etc/radiusclient-ng/radiusclient.conf&quot;)<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p># -------------------------&nbsp; request routing logic -------------------<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p># main routing logic<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p>route{<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # initial sanity checks -- messages with<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # max_forwards==0, or excessively long
requests<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if
(!mf_process_maxfwd_header(&quot;10&quot;)) {<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
sl_reply(&quot;483&quot;,&quot;Too Many Hops&quot;);<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (msg:len &gt;=&nbsp; max_len ) {<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
sl_reply(&quot;513&quot;, &quot;Message too big&quot;);<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # we record-route all messages -- to make
sure that<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # subsequent messages will go through our
proxy; that's<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # particularly good if upstream and
downstream entities<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # use different transport protocol<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!method==&quot;REGISTER&quot;)
record_route();<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # subsequent messages withing a dialog should
take the<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # path determined by record-routing<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (loose_route()) {<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # mark
routing logic in request<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
append_hf(&quot;P-hint: rr-enforced\r\n&quot;);<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
route(FORWARD);<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!uri==myself) {<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # mark
routing logic in request<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
append_hf(&quot;P-hint: outbound\r\n&quot;);<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; route(FORWARD);<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # if the request is for other domain use
UsrLoc<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # (in case, it does not work, use the
following command<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # with proper names and addresses in it)<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (uri==myself) {<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if
(method==&quot;REGISTER&quot;) {</b><o:p></o:p></p>

<p><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# authentication</b><o:p></o:p></p>

<p><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
if (!radius_www_authorize(&quot;&quot;)) {</b><o:p></o:p></p>

<p><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
www_challenge(&quot;&quot;, &quot;0&quot;);</b><o:p></o:p></p>

<p><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
break;</b><o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
};<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
save_contacts(&quot;location&quot;);<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
break;<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # native
SIP destinations are handled using our USRLOC DB<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if
(!lookup_contacts(&quot;location&quot;)) {<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
sl_reply(&quot;404&quot;, &quot;Not Found&quot;);<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
break;<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; append_hf(&quot;P-hint:
usrloc applied\r\n&quot;);<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; route(FORWARD);<o:p></o:p></p>

<p>}<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p>route[FORWARD]<o:p></o:p></p>

<p>{<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # send it out now; use stateful forwarding as
it works reliably<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # even for UDP2TCP<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!t_relay()) {<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
sl_reply_error();<o:p></o:p></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></p>

<p>}<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

<p>Thanks,<o:p></o:p></p>

<p>Leon<o:p></o:p></p>

<p>&nbsp;<o:p></o:p></p>

</div>

</div>

<p style='margin-bottom:12.0pt'><br>
_______________________________________________<br>
Serusers mailing list<br>
<a href="mailto:Serusers@lists.iptel.org" target="_blank">Serusers@lists.iptel.org</a><br>
<a href="http://lists.iptel.org/mailman/listinfo/serusers" target="_blank">http://lists.iptel.org/mailman/listinfo/serusers</a><o:p></o:p></p>

</div>

<p>&nbsp;<o:p></o:p></p>

</div>

</div>

</div>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>