<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><br></div><div><br>On 28 avr. 2013, at 22:58, Mehdi Ravanbakhsh <<a href="mailto:babakco@gmail.com">babakco@gmail.com</a>> wrote:<br><br></div><div><span></span></div><blockquote type="cite"><div><div dir="ltr"><div><div><div>Dear  <div class="">A.L.M.Buxey<br></div><span name="A.L.M.Buxey@lboro.ac.uk" class=""><br></span></div><span name="A.L.M.Buxey@lboro.ac.uk" class="">i have 2 Cisco-AVPair in request attribute :<br>
<br>Cisco-AVPair = "client-mac-address=90f6.52d2.384f"<br><br></span></div><span name="A.L.M.Buxey@lboro.ac.uk" class="">and<br><br>Cisco-AVPair = "circuit-id-tag=Azadegan-1 atm 2/16:251:0.35"<br></span></div></div></div></blockquote><div><br></div><div>You have multiple time the same attribute. Use Cisco-AVPair[X] to access a specific instance of them. If you're running version 3 you can use a foreach loop</div><div><br></div><blockquote type="cite"><div><div dir="ltr"><div><span name="A.L.M.Buxey@lboro.ac.uk" class=""><br>
</span></div><span name="A.L.M.Buxey@lboro.ac.uk" class="">for first one i use :  <br><br></span><br>             if (Cisco-AVpair =~ /^client-mac-address=([a-f0-9]<div>[a-f0-9])([a-f0-9][a-f0-9]).([a-f0-9][a-f0-9])([a-f0-9][a-f0-9]).([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])$/) {<br>

                     if (!Calling-Station-Id) {<br>                            update request {<br>                                    Calling-Station-Id := "%{1}:%{2}:%{3}:%{4}:%{5}:%{6}"<br>                                    Called-Station-Id := "%{NAS-Identifier}"<br>

                            }<br><br>                     }<br>               }<br><br></div><div>and it is work<br><br><br></div><div>for second one i use :<br></div><div><div><div><span name="A.L.M.Buxey@lboro.ac.uk" class=""><br>
    if (Cisco-AVPair =~ /^circuit-id-tag=(.*)$/)  {<br>                     <br>                            update request {<br>                                    NAS-Port-Id := "%{1}"<br>                            }     <br>
     }<br><br></span></div><div><span name="A.L.M.Buxey@lboro.ac.uk" class="">But it is not work !!!!!<br><br></span></div><div><span name="A.L.M.Buxey@lboro.ac.uk" class="">that is the problem.<br><br></span></div><div><span name="A.L.M.Buxey@lboro.ac.uk" class="">this is the attribute that come from NAS :<br>
<br>    Acct-Session-Id = "04423124"<br>    Cisco-AVPair = "client-mac-address=90f6.52d2.384f"<br>    Framed-Protocol = PPP<br>    Framed-IP-Address = 172.20.10.238<br>    User-Name = "7734247799"<br>
    Cisco-AVPair = "connect-progress=LAN Ses Up"<br>    Acct-Authentic = RADIUS<br>    Acct-Status-Type = Start<br>    NAS-Port-Type = Ethernet<br>    NAS-Port = 71446820<br>    NAS-Port-Id = "0/0/0/0"<br>
    Cisco-AVPair = "circuit-id-tag=Azadegan-1 atm 2/16:251:0.35"<br>    Service-Type = Framed-User<br>    NAS-IP-Address = 10.150.21.218<br>    X-Ascend-Session-Svr-Key = "A4477F54"<br>    Acct-Delay-Time = 29<br>
    Calling-Station-Id = ""<br>    Called-Station-Id = ""<br>    Acct-Unique-Session-Id = "8cd7eadca98e09bf"<br>    Timestamp = 1367151426<br><br><br></span></div><div><span name="A.L.M.Buxey@lboro.ac.uk" class="">Best regards<br>
</span></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 29, 2013 at 1:10 AM,  <span dir="ltr"><<a href="mailto:A.L.M.Buxey@lboro.ac.uk" target="_blank">A.L.M.Buxey@lboro.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<div class="im"><br>
>    but it is not working !<br>
<br>
</div>what do you mean? what do you want to do (ie what do you want to have/get<br>
and what do you actually get?) - what does the server say/do (ie. run in full<br>
debug mode to see what its saying/doing to your logic.<br>
<br>
alan<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></div>
</div></blockquote><blockquote type="cite"><div><span>-</span><br><span>List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html">http://www.freeradius.org/list/users.html</a></span></div></blockquote></body></html>