<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:m="http://schemas.microsoft.com/office/2004/12/omml" 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> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I am using 2.0.0. <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'>And I am using radius_www_authenticate to authenticate via
FreeRADIUS. The problem is not with this function, but <b>www_challenge
function returns error </b></span><b><span style='font-size:11.0pt;color:#1F497D'>“unknown
command, missing loadmodule?”.</span></b><span style='font-size:11.0pt;
color:#1F497D'><o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;color:#1F497D'>Cheers<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;color:#1F497D'>Leon </span><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> </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>
<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> Tuesday, 12 May 2009 5:44 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> </o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'>Hi,<br>
<br>
You must use www_authenticate(digest_realm, credentials)<br>
function in order to perform the user authentication.<br>
<br>
BTW which version of SER do You use? <br>
<br>
Kind regards,<br>
Tomasz<o:p></o:p></p>
<div>
<p class=MsoNormal>2009/5/12 Leon Li <<a href="mailto:Leon.Li@aarnet.edu.au">Leon.Li@aarnet.edu.au</a>><o:p></o:p></p>
<div>
<div>
<p><span style='font-size:11.0pt;color:#1F497D'>Hi,</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>I got the following settings on
my SER handling authentication.</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>route[AUTHENTICATION]</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>{</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>
# CANCELs and ACKs cannot be challenged.</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>
if (method == "CANCEL" || method == "ACK") {</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>
break;</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>
}</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>
</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>
# Authentication</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>
if (method == "REGISTER") {</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>
if (!radius_www_authenticate(" ")) {</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>
</span><b><span style='font-size:11.0pt;color:red'>www_challenge("",
"1");</span></b><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>
break;</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>
}</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>
save("location");</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>
drop;</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>
}</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>}</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>However, when I try to run SER
with this file, error come up “unknown command, missing loadmodule?” indicating
the line in </span><span style='font-size:11.0pt;color:red'>red </span><span
style='font-size:11.0pt;color:#1F497D'>has problem. If I comment this line, SER
starts fine but no authentication performed.</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>Anyone can help?</span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'>Thanks</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'> </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> Thursday, 7 May 2009 11:03 PM<o:p></o:p></span></p>
<div>
<div>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt'><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<o:p></o:p></span></p>
</div>
</div>
</div>
<div>
<div>
<p> <o:p></o:p></p>
<p 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>2009/5/7 Leon Li <<a href="mailto:Leon.Li@aarnet.edu.au" target="_blank">Leon.Li@aarnet.edu.au</a>><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'> </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’t accept www_challenge in ser.cfg
which is introduced by auth module, I think.</span><o:p></o:p></p>
<div>
<p><b> if
(method=="REGISTER") {</b><o:p></o:p></p>
<p><b>
# authentication</b><o:p></o:p></p>
<p><b>
if (!radius_www_authorize("")) {</b><o:p></o:p></p>
<p><b>
www_challenge("", "0");</b><o:p></o:p></p>
<p><b>
break;</b><o:p></o:p></p>
<p>
};<o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'> </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'> </span><o:p></o:p></p>
<p><span style='font-size:11.0pt;color:#1F497D'> </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'>
<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> <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 <<a href="mailto:Leon.Li@aarnet.edu.au" target="_blank">Leon.Li@aarnet.edu.au</a>><o:p></o:p></p>
<div>
<div>
<p>Hi,<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>I am trying to make SER working with FreeRADIUS. However, I got an error
using www_challenge, " 0(3184) parse error (119,25-26): unknown command,
missing loadmodule?" The 119 line is www_challenge("",
"0"); I did load auth module. Any idea?<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>Here is my config:<o:p></o:p></p>
<p> <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> <o:p></o:p></p>
<p># ----------- global configuration parameters ------------------------<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>debug=3 # 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> <o:p></o:p></p>
<p>/* Uncomment these lines to enter debugging mode fork=no log_stderror=yes */<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>check_via=no # (cmd. line: -v)<o:p></o:p></p>
<p>dns=no # (cmd. line:
-r)<o:p></o:p></p>
<p>rev_dns=no # (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
# 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> <o:p></o:p></p>
<p>#<o:p></o:p></p>
<p> <o:p></o:p></p>
<p># ------------------ module loading ----------------------------------<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>loadmodule "/usr/local/lib/ser/modules/sl.so"<o:p></o:p></p>
<p>loadmodule "/usr/local/lib/ser/modules/tm.so"<o:p></o:p></p>
<p>loadmodule "/usr/local/lib/ser/modules/rr.so"<o:p></o:p></p>
<p>loadmodule "/usr/local/lib/ser/modules/textops.so"<o:p></o:p></p>
<p>loadmodule "/usr/local/lib/ser/modules/maxfwd.so"<o:p></o:p></p>
<p>loadmodule "/usr/local/lib/ser/modules/usrloc.so"<o:p></o:p></p>
<p>loadmodule "/usr/local/lib/ser/modules/registrar.so"<o:p></o:p></p>
<p>loadmodule "/usr/local/lib/ser/modules/ctl.so"<o:p></o:p></p>
<p><b>loadmodule "/usr/local/lib/ser/modules/auth.so"</b><o:p></o:p></p>
<p>loadmodule "/usr/local/lib/ser/modules/auth_radius.so"<o:p></o:p></p>
<p> <o:p></o:p></p>
<p># ----------------- setting module-specific parameters ---------------<o:p></o:p></p>
<p> <o:p></o:p></p>
<p># -- usrloc params --<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>modparam("usrloc", "db_mode", 0)<o:p></o:p></p>
<p> <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("rr", "enable_full_lr", 1)<o:p></o:p></p>
<p> <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("ctl", "binrpc", "unixs:/tmp/ser_ctl") #
listen on the "standard" fifo for backward compatibility
modparam("ctl", "fifo", "fifo:/tmp/ser_fifo") #
listen on tcp, localhost #modparam("ctl", "binrpc",
"tcp:localhost:2046")<o:p></o:p></p>
<p> <o:p></o:p></p>
<p># -- auth_radius params --<o:p></o:p></p>
<p>modparam("auth_radius", "radius_config",
"/usr/local/etc/radiusclient-ng/radiusclient.conf")<o:p></o:p></p>
<p> <o:p></o:p></p>
<p># ------------------------- request routing logic -------------------<o:p></o:p></p>
<p> <o:p></o:p></p>
<p># main routing logic<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>route{<o:p></o:p></p>
<p> <o:p></o:p></p>
<p> # initial sanity checks -- messages with<o:p></o:p></p>
<p> # max_forwards==0, or excessively long
requests<o:p></o:p></p>
<p> if
(!mf_process_maxfwd_header("10")) {<o:p></o:p></p>
<p>
sl_reply("483","Too Many Hops");<o:p></o:p></p>
<p> break;<o:p></o:p></p>
<p> }<o:p></o:p></p>
<p> if (msg:len >= max_len ) {<o:p></o:p></p>
<p>
sl_reply("513", "Message too big");<o:p></o:p></p>
<p> break;<o:p></o:p></p>
<p> }<o:p></o:p></p>
<p> <o:p></o:p></p>
<p> # we record-route all messages -- to make
sure that<o:p></o:p></p>
<p> # subsequent messages will go through our
proxy; that's<o:p></o:p></p>
<p> # particularly good if upstream and
downstream entities<o:p></o:p></p>
<p> # use different transport protocol<o:p></o:p></p>
<p> if (!method=="REGISTER")
record_route();<o:p></o:p></p>
<p> <o:p></o:p></p>
<p> # subsequent messages withing a dialog should
take the<o:p></o:p></p>
<p> # path determined by record-routing<o:p></o:p></p>
<p> if (loose_route()) {<o:p></o:p></p>
<p> # mark
routing logic in request<o:p></o:p></p>
<p>
append_hf("P-hint: rr-enforced\r\n");<o:p></o:p></p>
<p>
route(FORWARD);<o:p></o:p></p>
<p> break;<o:p></o:p></p>
<p> }<o:p></o:p></p>
<p> <o:p></o:p></p>
<p> if (!uri==myself) {<o:p></o:p></p>
<p> # mark
routing logic in request<o:p></o:p></p>
<p>
append_hf("P-hint: outbound\r\n");<o:p></o:p></p>
<p>
route(FORWARD);<o:p></o:p></p>
<p> break;<o:p></o:p></p>
<p> }<o:p></o:p></p>
<p> <o:p></o:p></p>
<p> # if the request is for other domain use
UsrLoc<o:p></o:p></p>
<p> # (in case, it does not work, use the
following command<o:p></o:p></p>
<p> # with proper names and addresses in it)<o:p></o:p></p>
<p> if (uri==myself) {<o:p></o:p></p>
<p> <o:p></o:p></p>
<p><b> if
(method=="REGISTER") {</b><o:p></o:p></p>
<p><b>
# authentication</b><o:p></o:p></p>
<p><b>
if (!radius_www_authorize("")) {</b><o:p></o:p></p>
<p><b>
www_challenge("", "0");</b><o:p></o:p></p>
<p><b>
break;</b><o:p></o:p></p>
<p>
};<o:p></o:p></p>
<p>
save_contacts("location");<o:p></o:p></p>
<p>
break;<o:p></o:p></p>
<p> }<o:p></o:p></p>
<p> <o:p></o:p></p>
<p> # native
SIP destinations are handled using our USRLOC DB<o:p></o:p></p>
<p> if
(!lookup_contacts("location")) {<o:p></o:p></p>
<p>
sl_reply("404", "Not Found");<o:p></o:p></p>
<p>
break;<o:p></o:p></p>
<p> }<o:p></o:p></p>
<p>
append_hf("P-hint: usrloc applied\r\n");<o:p></o:p></p>
<p> }<o:p></o:p></p>
<p> route(FORWARD);<o:p></o:p></p>
<p>}<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>route[FORWARD]<o:p></o:p></p>
<p>{<o:p></o:p></p>
<p> # send it out now; use stateful forwarding as
it works reliably<o:p></o:p></p>
<p> # even for UDP2TCP<o:p></o:p></p>
<p> if (!t_relay()) {<o:p></o:p></p>
<p>
sl_reply_error();<o:p></o:p></p>
<p> }<o:p></o:p></p>
<p>}<o:p></o:p></p>
<p> <o:p></o:p></p>
<p>Thanks,<o:p></o:p></p>
<p>Leon<o:p></o:p></p>
<p> <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> <o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
<p> <o:p></o:p></p>
</div>
</div>
</div>
</div>
<p class=MsoNormal style='margin-bottom:12.0pt'><br>
_______________________________________________<br>
Serusers mailing list<br>
<a href="mailto:Serusers@lists.iptel.org">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 class=MsoNormal><o:p> </o:p></p>
</div>
</body>
</html>