My full SQL statement is:<div><br></div><div>accounting_stop_query = "EXEC ${stopacnt_sp} @username = '%{SQL-User-Name}', @av_pair = '%{h323-incoming-conf-id}', @gw_session_id_out = '%{Quintum-h323-conf-id}', @call_origin = '%{Quintum-h323-call-origin}', @dialstring_from = '%{Calling-Station-Id}', @dialstring_to = '%{Called-Station-Id}', @disconnect_code_hex = '%{Quintum-h323-disconnect-cause}', @session_time = '%{Acct-Session-Time}', @gw_ip = '%{NAS-IP-Address}', @gw_name = '' "<br>
<br><div class="gmail_quote">2009/11/17 Andrew Paternoster <span dir="ltr"><<a href="mailto:andrew@gpk.net.au">andrew@gpk.net.au</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div lang="EN-AU" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">What operator are you using? I have multi AVPairs and i have :=
on the first one and += on the others working for me.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p>
<font face="Arial" size="2"><strong><font color="#ff8000"><br>Andrew Paternoster</font></strong><br><font color="#a0a0a4">Senior System Engineer</font></font><br><br>
<table style="width:475px" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="width:120px"><font color="#818a8f" size="2" face="Arial"><a title="" href="http://www.gpk.net.au/" target="_blank"><img style="width:125px;min-height:50px" border="0" hspace="0" alt=""></a></font></td>
<td style="width:11px"><font color="#818a8f" size="2" face="Arial"><a title="" href="http://www.gpk.net.au" target="_blank"><img style="width:11px;min-height:60px" border="0" hspace="0" alt="" width="11" height="60"></a></font></td>
<td><span><font color="#818a8f" size="2" face="Arial">2/94 Abbott
Road, Hallam, VIC 3083</font></span><span style="color:#818a8f;font-size:9pt"><br><strong><span>Phone:</span></strong> <span>1300 854 223<strong>
Fax:</strong></span> 1300 854 228<br></span><span style="color:#aa272f;font-size:9pt"><strong><a title="" href="http://www.gpk.net.au/" target="_blank">www.gpk.net.au</a></strong></span></td></tr></tbody></table>
<p style="margin:0cm 0cm 0pt" class="MsoNormal"><span style="color:black" lang="EN-US"></span> <br><font style="background-color:#ffffff" size="2" face="Arial"><em>Did you know that you can now log faults by just sending an
email to </em></font><a href="mailto:support@gpk.net.au" target="_blank"><font style="background-color:#ffffff" color="#808080" size="2" face="Arial"><em><strong>support@gpk.net.au</strong></em></font></a></p><br>
<div>
<p class="MsoNormal" style="margin:0cm 0cm 0pt"><span style="font-size:7.5pt;color:black">The
information contained in or accompanying this e-mail is intended only for the
use of the stated recipient and may contain information that is confidential
and/or privileged. If the reader is not the intended recipient or the agent
thereof, you are hereby notified that any dissemination, distribution or copying
of this e-mail is strictly prohibited and may constitute a breach of confidence
and/or privilege. If you have received this e-mail in error, please notify us
immediately. Any views or opinions presented are those solely of the author and
do not necessarily represent those of GPK Computers Pty Ltd..</span><span style="font-size:10pt;color:black"></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt"><span style="color:black"> </span><span style="font-size:12pt;color:black"></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt"><span style="font-size:7.5pt;color:black">Warning:
Although the company has taken reasonable precautions to ensure no viruses are
present in this e-mail, the company cannot accept responsibility for any loss or
damage arising from the use of this e-mail or attachments</span><span lang="EN-US" style="color:black"></span></p></div><br><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">From:</span></b><span lang="EN-US" style="font-size:10.0pt">
freeradius-users-bounces+andrew=<a href="http://gpk.net.au" target="_blank">gpk.net.au</a>@<a href="http://lists.freeradius.org" target="_blank">lists.freeradius.org</a>
[mailto:<a href="mailto:freeradius-users-bounces%2Bandrew" target="_blank">freeradius-users-bounces+andrew</a>=<a href="http://gpk.net.au" target="_blank">gpk.net.au</a>@<a href="http://lists.freeradius.org" target="_blank">lists.freeradius.org</a>] <b>On
Behalf Of </b>Robert White<br>
<b>Sent:</b> Tuesday, 17 November 2009 1:05 PM<br>
<b>To:</b> FreeRadius users mailing list<br>
<b>Subject:</b> Accessing a second AV Pair</span></p>
</div><div><div></div><div class="h5">
<p class="MsoNormal"> </p>
<p class="MsoNormal">Hi,</p>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">I have a Radius message which has two AV Pairs and I want to
insert them both in to a database. However, I'm unable to access the
second AVPair. </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">Here is the Radius packet....</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<div>
<p class="MsoNormal">rad_recv: Accounting-Request packet from host 10.152.0.7
port 20001, id=87, length=662</p>
</div>
<div>
<p class="MsoNormal"> NAS-IP-Address = 10.152.0.7</p>
</div>
<div>
<p class="MsoNormal"> Quintum-NAS-Port = "0
7/7/24"</p>
</div>
<div>
<p class="MsoNormal"> NAS-Port-Type = Async</p>
</div>
<div>
<p class="MsoNormal"> User-Name =
"99999999"</p>
</div>
<div>
<p class="MsoNormal"> Called-Station-Id =
"990006"</p>
</div>
<div>
<p class="MsoNormal"> Calling-Station-Id =
"1002"</p>
</div>
<div>
<p class="MsoNormal"> Acct-Status-Type = Stop</p>
</div>
<div>
<p class="MsoNormal"> Acct-Delay-Time = 0</p>
</div>
<div>
<p class="MsoNormal"> Acct-Input-Octets = 0</p>
</div>
<div>
<p class="MsoNormal"> Acct-Output-Octets = 0</p>
</div>
<div>
<p class="MsoNormal"> Acct-Session-Id =
"000000AA00000039"</p>
</div>
<div>
<p class="MsoNormal"> Acct-Session-Time = 75</p>
</div>
<div>
<p class="MsoNormal"> Acct-Input-Packets = 0</p>
</div>
<div>
<p class="MsoNormal"> Acct-Output-Packets = 0</p>
</div>
<div>
<p class="MsoNormal"> Service-Type = Login-User</p>
</div>
<div>
<p class="MsoNormal"><span><span style="background:#FFFF66">
Quintum-AVPair = "h323-ivr-out=ACCESSCODE:990006"</span></span></p>
</div>
<div>
<p class="MsoNormal"> Quintum-h323-conf-id =
"h323-conf-id=34623032 38616662 32630030 37333300"</p>
</div>
<div>
<p class="MsoNormal"><span><span style="background:#FFFF66">
Quintum-AVPair = "h323-incoming-conf-id=34623032
38616662 32630030 37333300"</span></span></p>
</div>
<div>
<p class="MsoNormal"> Quintum-h323-gw-id =
"h323-gw-id=au-syd-test1"</p>
</div>
<div>
<p class="MsoNormal"> Quintum-h323-call-origin =
"h323-call-origin=answer"</p>
</div>
<div>
<p class="MsoNormal"> Quintum-h323-call-type =
"h323-call-type=Telephony"</p>
</div>
<div>
<p class="MsoNormal"> Quintum-h323-setup-time =
"h323-setup-time=01:37:31.685 UTC Tue Nov 17 2009"</p>
</div>
<div>
<p class="MsoNormal"> Quintum-h323-connect-time =
"h323-connect-time=01:37:31.885 UTC Tue Nov 17 2009"</p>
</div>
<div>
<p class="MsoNormal">
Quintum-h323-disconnect-time = "h323-disconnect-time=01:38:46.495
UTC Tue Nov 17 2009"</p>
</div>
<div>
<p class="MsoNormal">
Quintum-h323-disconnect-cause = "h323-disconnect-cause=10"</p>
</div>
<div>
<p class="MsoNormal"> Quintum-h323-voice-quality
= "h323-voice-quality=0"</p>
</div>
<div>
<p class="MsoNormal"> Quintum-Trunkid-In =
"0 7/7/24"</p>
</div>
<div>
<p class="MsoNormal"> Quintum-Trunkid-Out =
"10.0.20.36"</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">When using the standard dictionary.quintum %{Quintum-AVPair}
= h323-ivr-out=ACCESSCODE:990006. I couldn't read the second AVPair.</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">I did some Googling and read </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">"<span><span style="font-size:10.0pt">if it [the preprocess module] founds
Cisco-AVPair attribute like</span></span></p>
</div>
<p class="MsoNormal"><span><span style="font-size:10.0pt">Cisco-AVPair =
"gw-rxd-cdn=ton:0,npi:1,#:XXXXXXXX"</span></span><span style="font-size:10.0pt"><br>
<span>and there's dictionary attribute gw-rxd-cdn, then
it adds new attribute</span><br>
<span>"gw-rxd-cdn" with value
"ton:0,npi:1,#:XXXXXXXX".</span><br>
<span>So if you have Cisco-AVPair attributes which you
would like to insert</span><br>
<span>into SQL, you need to create them in cisco
dictionary."</span></span></p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"><span>As Quintum
and Cisco are very similar I tried the same thing and edited the
dictionary.quintum file adding in the following lines:</span></p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<div>
<p class="MsoNormal"><span>ATTRIBUTE
h323-ivr-out
3000 string</span></p>
</div>
<div>
<p class="MsoNormal"><span>ATTRIBUTE
h323-incoming-conf-id
3001 string</span></p>
</div>
<div>
<p class="MsoNormal"><span> </span></p>
</div>
<div>
<p class="MsoNormal"><span>I noted
that there is already a very similar attribute for h323-incoming-conf-id - it
just has the word 'Quintum' prepended to it.</span></p>
</div>
<div>
<p class="MsoNormal"><span> </span></p>
</div>
<div>
<p class="MsoNormal"><span>However,
after the dictionary edit, Radius failed to load. I got the following error:</span></p>
</div>
<div>
<p class="MsoNormal"><span> </span></p>
</div>
<div>
<p class="MsoNormal"><span>"Errors
reading dictionary: dict_init:
/usr/local/share/freeradius/dictionary.quintum[53]: dict_init:
/usr/local/share/freeradius/dictionary.quintum[53]:"</span></p>
</div>
<div>
<p class="MsoNormal"><span> </span></p>
</div>
<div>
<p class="MsoNormal"><span>Am I on the
right track here?</span></p>
</div>
<div>
<p class="MsoNormal"><span> </span></p>
</div>
<div>
<p class="MsoNormal"><span>Any help
appreciated.</span></p>
</div>
<div>
<p class="MsoNormal"><span> </span></p>
</div>
<div>
<p class="MsoNormal"><span>Thanks,</span></p>
</div>
<div>
<p class="MsoNormal"><span> </span></p>
</div>
<div>
<p class="MsoNormal"><span>Rob</span></p>
</div>
<div>
<p class="MsoNormal"><span> </span></p>
</div>
</div>
</div></div></div>
</div>
<br>-<br>
List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">http://www.freeradius.org/list/users.html</a><br></blockquote></div><br><br clear="all"><br>-- <br>Rob White<br>Assistant IT Manager<br>
Core Infrastructure & System Development<br>Global Gossip Group<br>Address: 14 Wentworth Avenue, Sydney NSW 2010<br>Telephone: +61 292 630 460<br>Fax: +61 292 630 404<br>Mobile: +61 410 700 733<br>Email: <a href="mailto:rwhite@globalgossip.net">rwhite@globalgossip.net</a><br>
Skype: robwhite83<br>
</div>