<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix"><tt>Hi,<br>
<br>
On each "case", please an "xlog" to print something from the
script - in this way you can double check which way your script
went. Or, you can use the script_trace() function to do that .
See:<br>
<a class="moz-txt-link-freetext" href="http://www.opensips.org/Documentation/Script-CoreFunctions-1-11#toc42">http://www.opensips.org/Documentation/Script-CoreFunctions-1-11#toc42</a><br>
<br>
Regards,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
On 29.05.2014 09:22, dpa wrote:<br>
</div>
<blockquote cite="mid:008301cf7b06$6b309540$4191bfc0$@mail.ru"
type="cite">
<meta name="Microsoft Theme 2.00" content="strtedge 011">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Arial","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
h1
        {mso-style-priority:9;
        mso-style-link:"Заголовок 1 Знак";
        margin-top:24.0pt;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:0cm;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:16.0pt;
        font-family:"Arial","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
h2
        {mso-style-priority:9;
        mso-style-link:"Заголовок 2 Знак";
        margin-top:10.0pt;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:0cm;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:14.0pt;
        font-family:"Arial","sans-serif";
        color:black;
        mso-fareast-language:EN-US;
        font-weight:normal;}
h3
        {mso-style-priority:9;
        mso-style-link:"Заголовок 3 Знак";
        margin-top:10.0pt;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:0cm;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:13.0pt;
        font-family:"Arial","sans-serif";
        color:black;
        mso-fareast-language:EN-US;
        font-weight:normal;}
h4
        {mso-style-priority:9;
        mso-style-link:"Заголовок 4 Знак";
        margin-top:10.0pt;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:0cm;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:14.0pt;
        font-family:"Arial","sans-serif";
        color:black;
        mso-fareast-language:EN-US;
        font-weight:normal;}
h5
        {mso-style-priority:9;
        mso-style-link:"Заголовок 5 Знак";
        margin-top:10.0pt;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:0cm;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:13.0pt;
        font-family:"Arial","sans-serif";
        color:black;
        mso-fareast-language:EN-US;
        font-weight:normal;}
h6
        {mso-style-priority:9;
        mso-style-link:"Заголовок 6 Знак";
        margin-top:10.0pt;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:0cm;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:11.0pt;
        font-family:"Arial","sans-serif";
        color:black;
        mso-fareast-language:EN-US;
        font-weight:normal;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#660000;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#003399;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.1
        {mso-style-name:"Заголовок 1 Знак";
        mso-style-priority:9;
        mso-style-link:"Заголовок 1";
        font-family:"Arial","sans-serif";
        color:black;
        font-weight:bold;}
span.2
        {mso-style-name:"Заголовок 2 Знак";
        mso-style-priority:9;
        mso-style-link:"Заголовок 2";
        font-family:"Arial","sans-serif";
        color:black;}
span.3
        {mso-style-name:"Заголовок 3 Знак";
        mso-style-priority:9;
        mso-style-link:"Заголовок 3";
        font-family:"Arial","sans-serif";
        color:black;}
span.4
        {mso-style-name:"Заголовок 4 Знак";
        mso-style-priority:9;
        mso-style-link:"Заголовок 4";
        font-family:"Arial","sans-serif";
        color:black;}
span.5
        {mso-style-name:"Заголовок 5 Знак";
        mso-style-priority:9;
        mso-style-link:"Заголовок 5";
        font-family:"Arial","sans-serif";
        color:black;}
span.6
        {mso-style-name:"Заголовок 6 Знак";
        mso-style-priority:9;
        mso-style-link:"Заголовок 6";
        font-family:"Arial","sans-serif";
        color:black;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:2.0cm 42.5pt 2.0cm 3.0cm;}
div.WordSection1
        {page:WordSection1;}
--></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]--><img
src="cid:part1.04000202.05070603@opensips.org"
v:src="mailbox:///home/bogdan/.thunderbird/22wfqw69.default/Mail/Local%20Folders/fa_opensips.sbd/users?number=263069119&header=quotebody&part=1.1.2&filename=image001.gif"
v:shapes="_x0000_Mail" class="shape"
style="display:none;width:0;height:0" height="0" width="0"><!--[if gte mso 9]><xml>
<v:background id="_x0000_s1025" o:bwmode="white" o:targetscreensize="1024,768">
<v:fill src="mailbox:///home/bogdan/.thunderbird/22wfqw69.default/Mail/Local%20Folders/fa_opensips.sbd/users?number=263069119&header=quotebody&part=1.1.2&filename=image001.gif" o:title="strbkgde" type="frame" />
</v:background></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
lang="EN-US">Hello!<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
lang="EN-US">I have such configuration in opensips.cfg<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
lang="EN-US">….<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
lang="EN-US"> radius_send_auth("set1","set2");<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
lang="EN-US"> switch($rc){<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
lang="EN-US"> case -2:<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
lang="EN-US"> exec_msg("echo '$avp(500) $rU $time(%c)
rejected' >> /opensips/alarmradius.txt");<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
lang="EN-US"> break;<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
lang="EN-US"> case -1:<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
lang="EN-US"> exec_msg("echo '$avp(500) $rU $time(%c)
radius' >> /opensips/alarmradius.txt");<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
lang="EN-US"> break;<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
lang="EN-US"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
lang="EN-US">…<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
lang="EN-US">In attachment you can see communication of
Opensips with radius server during making some test call
(1.1.1.1 – Opensips, 2.2.2.2 – radius server)<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
lang="EN-US">After making a test call i see in
alarmradius.txt record with “radius” word.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
lang="EN-US">The question is why do I see “radius” word (and
it means that Opensips detected “retcode -1”) but not
“rejected” (“retcode -2”) word? <o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:windowtext"
lang="EN-US">Thank you for any help.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>