<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=koi8-r">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@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;}
/* 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;}
span.EmailStyle17
        {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:2.0cm 42.5pt 2.0cm 3.0cm;}
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=RU link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span lang=EN-US>Ok. It's work.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> User-Name =
"sip:loft@voapp.com"<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> Called-Station-Id =
"sip:769101@voapp.com"<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US> Calling-Station-Id =
"sip:loft@voapp.com"<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>But there is the same problem as in early
version of OpenSER. Field User-Name depend on who hang-up the call. In case of
A call B in Start record we receive right User-Name=A, Calling=A, Called=B. But
if B hang up first then in Stop record we'll receive User-Name=B, Calling=B, Called=A.
It is difficult to manipulate fields in some RADIUS servers. I think that<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>modparam("acc",
"detect_direction", 1)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>helps to resolve this problem now. But if
we receive RADIUS field through modparam("acc",
"radius_extra", "... command we can use only pseudo variables
and avp. And there is no variable for Invite username. And AVP (pv_printf("$avp(username)",
"$au@voapp.com");) exists only on Invite. When we receive BYE this
AVP will be empty because AVPs are persistent per SIP transaction only.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Can we somehow get initial (from INVITE) UserA
and UserB for Stop RADIUS messages in BYE processing stage?<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Dmitry<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;color:#1F497D'> </span><span
lang=EN-US style='color:#1F497D'> </span><span lang=EN-US 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"'> Dan-Cristian Bogos [mailto:danb.l</span><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>ists@googlemail.com]
<br>
<b>Sent:</b> Monday, June 02, 2008 3:29 PM<br>
<b>To:</b> Dmitry Lyubimkov<br>
<b>Cc:</b> users@lists.openser.org<br>
<b>Subject:</b> Re: [OpenSER-Users] Trouble with RADIUS Accounting<o:p></o:p></span></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'>Hi Dmitry,<br>
<br>
starting of 1.2 version OpenSER does not add anymore any attribute
automatically, you must instead add your wishlist manually with radius_extra
parameter:<br>
<a href="http://www.openser.org/docs/modules/1.3.x/acc.html#AEN319">http://www.openser.org/docs/modules/1.3.x/acc.html#AEN319</a><br>
<br>
An example of config:<br>
<br>
modparam("acc", "radius_extra", "<br>
Called-Station-Id=$tu;<br>
Calling-Station-Id=$fu;<br>
Canonical-URI=$(avp(s:canonical_uri));<br>
User-Name=$fu;<br>
Sip-User-Realm=$ar;<br>
Source-IP=$si;<br>
Source-Port=$sp;<br>
Acct-Authentic=$(avp(s:authentic));<br>
From-Header=$(hdr(from));<br>
User-Agent=$(hdr(user-agent));<br>
Contact=$(hdr(contact));<br>
Event=$(hdr(event))<br>
")<br>
<br>
Cheers,<br>
DanB<o:p></o:p></p>
<div>
<p class=MsoNormal>On Mon, Jun 2, 2008 at 12:39 PM, Dmitry Lyubimkov <<a
href="mailto:loft@onego.ru">loft@onego.ru</a>> wrote:<o:p></o:p></p>
<p class=MsoNormal>But we did it!!! I don't need to remove this attributes. We
need User-Name, Called-Station-Id, Calling-Station-Id, etc for billing purpose.
But our RADIUS server does not receive them from OpenSER! Look at our
Start/Stop messages. There are not such important attributes as User-Name, etc.<br>
Is this bug of OpenSER or bug of our script? If it is bug of script, then what
commands, what modules, what modparam can lead to such result?<br>
<br>
Dmitry<br>
<br>
-----Original Message-----<br>
From: Mike O'Connor [mailto:<a href="mailto:mike@pineview.net">mike@pineview.net</a>]<br>
Sent: Monday, June 02, 2008 1:07 PM<br>
To: Dmitry Lyubimkov<br>
Subject: Re: [OpenSER-Users] Trouble with RADIUS Accounting<br>
<br>
Hi Dmitry<br>
<br>
You not can remove them from OpenSER with out adjusting the code,<br>
instead you need to put the radius packets thought something like a<br>
radius proxy which removes them.<br>
<br>
Mike<o:p></o:p></p>
<div>
<div>
<p class=MsoNormal><br>
<br>
Dmitry Lyubimkov wrote:<br>
> Hi.<br>
> We have new installation of OpenSER V.1.3.1 with new script. All work fine<br>
> except RADIUS accounting. Accounting Start and Stop records come to RADIUS<br>
> server, but there are no some attributes in them - User-Name,<br>
> Called-Station-Id, Calling-Station-Id,...<br>
> Example of Start and Stop records (FreeRADIUS log):<br>
> Acct-Status-Type = Start<br>
> Service-Type = IAPP-Register<br>
> Sip-Response-Code = 200<br>
> Sip-Method = 1<br>
> Event-Timestamp = "Jun 2 2008
10:34:05 MSD"<br>
> Sip-From-Tag = "5d12c92c"<br>
> Sip-To-Tag = "6845627C-1EF5"<br>
> Acct-Session-Id =
"ODhmMjE4MmUxNzc3ZmZjN2U3MjJlM2I4NzQ0MjMzNTU."<br>
> NAS-Port = 5060<br>
> Acct-Delay-Time = 0<br>
> NAS-IP-Address = <a href="http://172.16.2.10"
target="_blank">172.16.2.10</a><br>
> Client-IP-Address = <a
href="http://172.16.2.10" target="_blank">172.16.2.10</a><br>
> Timestamp = 1212388445<br>
><br>
> Acct-Status-Type = Stop<br>
> Service-Type = IAPP-Register<br>
> Sip-Response-Code = 200<br>
> Sip-Method = 8<br>
> Event-Timestamp = "Jun 2 2008
10:34:12 MSD"<br>
> Sip-From-Tag = "5d12c92c"<br>
> Sip-To-Tag = "6845627C-1EF5"<br>
> Acct-Session-Id =
"ODhmMjE4MmUxNzc3ZmZjN2U3MjJlM2I4NzQ0MjMzNTU."<br>
> NAS-Port = 5060<br>
> Acct-Delay-Time = 0<br>
> NAS-IP-Address = <a href="http://172.16.2.10"
target="_blank">172.16.2.10</a><br>
> Client-IP-Address = <a
href="http://172.16.2.10" target="_blank">172.16.2.10</a><br>
> Timestamp = 1212388452<br>
><br>
> Where is trouble? Required attributes are described in dictionary file. If
I<br>
> remove it then OpenSER says<br>
> Jun 2 11:02:23 [4064] ERROR:auth_radius:mod_init: auth_radius: can't
get<br>
> code for the User-Name attribute<br>
> Jun 2 11:02:23 [4064] ERROR:core:init_mod: failed to initialize
module<br>
> auth_radius<br>
> Jun 2 11:02:23 [4064] ERROR:core:main: error while initializing
modules<br>
><br>
> How and where in script we can prohibit send of some attributes?<br>
><br>
> Dmitry<br>
><br>
><br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.openser.org">Users@lists.openser.org</a><br>
> <a href="http://lists.openser.org/cgi-bin/mailman/listinfo/users"
target="_blank">http://lists.openser.org/cgi-bin/mailman/listinfo/users</a><br>
><br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.openser.org">Users@lists.openser.org</a><br>
<a href="http://lists.openser.org/cgi-bin/mailman/listinfo/users"
target="_blank">http://lists.openser.org/cgi-bin/mailman/listinfo/users</a><o:p></o:p></p>
</div>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</body>
</html>