<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body ><div>Fair enough..... I will take care of it and push it as a fix for a logical bug.</div><div><br></div><div>Thanks and regards,</div><div>Bogdan</div><div><br></div><div><br></div><div><div style="font-size:9px;color:#575757">Sent from Samsung Mobile</div></div><br><br>-------- Original message --------<br>From: John Quick <john.quick@smartvox.co.uk> <br>Date:08/04/2014 11:38 (GMT+01:00) <br>To: 'Bogdan-Andrei Iancu' <bogdan@opensips.org> <br>Cc: 'OpenSIPS users mailling list' <users@lists.opensips.org> <br>Subject: RE: [OpenSIPS-Users] radius_send_auth returns Vendor Specific Attributes <br><br>You could add a modparam option to make it keep working as before or in the<br>new way, then set default for that parameter to "old way".<br><br>John<br><br>-----Original Message-----<br>From: Bogdan-Andrei Iancu [mailto:bogdan@opensips.org] <br>Sent: 07 April 2014 23:00<br>To: john.quick@smartvox.co.uk<br>Cc: 'OpenSIPS users mailling list'<br>Subject: Re: [OpenSIPS-Users] radius_send_auth returns Vendor Specific<br>Attributes<br><br>I'm glad it works.<br><br>I definitely think this must be pushed as bug fix (as it poses serious<br>limitations) , but we need to be very careful to backward compatibility<br>(which may be affected)...do you see any way nicely deal with this ?<br><br>Regards,<br><br>Bogdan-Andrei Iancu<br>OpenSIPS Founder and Developer<br>http://www.opensips-solutions.com<br><br>On 07.04.2014 18:22, John Quick wrote:<br>> Bogdan,<br>><br>> That seems to have fixed it. Thanks.<br>><br>> John<br>><br>><br>> -----Original Message-----<br>> From: Bogdan-Andrei Iancu [mailto:bogdan@opensips.org]<br>> Sent: 04 April 2014 16:15<br>> To: john.quick@smartvox.co.uk<br>> Cc: 'OpenSIPS users mailling list'<br>> Subject: Re: [OpenSIPS-Users] radius_send_auth returns Vendor Specific <br>> Attributes<br>><br>> Hi John,<br>><br>> There was a small bug - please test this new attached patch (remove <br>> the prev one).<br>><br>> Regards,<br>><br>> Bogdan-Andrei Iancu<br>> OpenSIPS Founder and Developer<br>> http://www.opensips-solutions.com<br>><br>> On 04.04.2014 17:29, John Quick wrote:<br>>> Hi Bogdan,<br>>><br>>> From my initial testing, I think the inner while loop never terminates.<br>>> Luckily I added a trap using an integer counter with a limit of 40 <br>>> iterations.<br>>> What is it in the call to rc_avpair_get() that allows it to cycle <br>>> through each instance with a matching name rather than just keep <br>>> getting the first instance?<br>>><br>>> John<br>>><br>>><br>>> -----Original Message-----<br>>> From: Bogdan-Andrei Iancu [mailto:bogdan@opensips.org]<br>>> Sent: 03 April 2014 17:21<br>>> To: john.quick@smartvox.co.uk<br>>> Cc: 'OpenSIPS users mailling list'<br>>> Subject: Re: [OpenSIPS-Users] radius_send_auth returns Vendor <br>>> Specific Attributes<br>>><br>>> John - please try the attached patch, with all the disclaimers it was <br>>> not tested :)<br>>><br>>> Regards,<br>>><br>>> Bogdan-Andrei Iancu<br>>> OpenSIPS Founder and Developer<br>>> http://www.opensips-solutions.com<br>>><br>>> On 03.04.2014 19:13, John Quick wrote:<br>>>> Hi Bogdan,<br>>>><br>>>> If the variable is a var, at the moment you would only get the first<br>>> value.<br>>>> After modification, you would only get the last value. I agree this <br>>>> is changed behaviour, but one case does not seem to me to be any <br>>>> worse than the other. The advantage that multiple values *can* be <br>>>> returned in an AVP seems to me to outweigh the risk of changed <br>>>> behaviour on the next release of OpenSIPS. For me, it would be a <br>>>> great advantage to be able to retrieve multiple values where this is <br>>>> not<br>> possible at the moment.<br>>>> If you are able to send me the diff file (or simply a description) <br>>>> for the changes, I would be happy to test it here.<br>>>><br>>>> Thanks for responding.<br>>>><br>>>> John<br>>>><br>>>> -----Original Message-----<br>>>> From: Bogdan-Andrei Iancu [mailto:bogdan@opensips.org]<br>>>> Sent: 03 April 2014 16:53<br>>>> To: john.quick@smartvox.co.uk<br>>>> Cc: 'OpenSIPS users mailling list'<br>>>> Subject: Re: [OpenSIPS-Users] radius_send_auth returns Vendor <br>>>> Specific Attributes<br>>>><br>>>> John,<br>>>><br>>>> We could do that (pushing back to OpenSIPS all values for that <br>>>> RADIUS AVP), but it may be dangerous if you use on the OpenSIPS side <br>>>> a variable that does not support multiple values - actually the AVPs <br>>>> are the<br>>> only one doing that.<br>>>> Imagine the RADIUS reply returns multiple instances on an RADIUS AVP.<br>>>> And you use a $var() variable to get the value - each value will be <br>>>> pushed to that $var(), but as it can hold only one value, it will <br>>>> keep being overwritten -> only last value will be actually available.<br>>>> If this behavior is not a problem, we can fix the code and iterate <br>>>> through the entire list of RADIUS AVP and get all instances.<br>>>><br>>>> Regards,<br>>>><br>>>> Bogdan-Andrei Iancu<br>>>> OpenSIPS Founder and Developer<br>>>> http://www.opensips-solutions.com<br>>>><br>>>> On 02.04.2014 10:20, John Quick wrote:<br>>>>> Bogdan,<br>>>>><br>>>>> I was hoping to get all the values returned in 1 avp, the avp <br>>>>> defined for Cisco-AVPairs in set2. This takes advantage of the <br>>>>> ability of OpenSIPS avps to hold multiple indexed values and also <br>>>>> means minimal changes to the documentation of the aaa_radius module.<br>>>>> If you add a numeric index in the set definition, you must know <br>>>>> which position the required attribute is in and it is even possible <br>>>>> the server may return<br>>>> them in a different order.<br>>>>> Also, if you want to retrieve 10 values this makes the set2 <br>>>>> definition very big and clumsy. Adding an index in the set <br>>>>> definition would only be a good solution if the index was a string <br>>>>> identifying the Attribute name within Cisco-AVPairs.<br>>>>><br>>>>> I would be very happy to test if you can show me what changes need <br>>>>> to be made in the sources. I would have tried it already, but <br>>>>> wasn't sure how to add multiple values to the avp.<br>>>>><br>>>>> John<br>>>>><br>>>>> -----Original Message-----<br>>>>> From: Bogdan-Andrei Iancu [mailto:bogdan@opensips.org]<br>>>>> Sent: 01 April 2014 22:49<br>>>>> To: john.quick@smartvox.co.uk<br>>>>> Cc: 'OpenSIPS users mailling list'<br>>>>> Subject: Re: [OpenSIPS-Users] radius_send_auth returns Vendor <br>>>>> Specific Attributes<br>>>>><br>>>>> John,<br>>>>><br>>>>> I understand the issue and agree over the need of a solution. Two <br>>>>> possible<br>>>>> approaches:<br>>>>> - return all the values for that radius AVP<br>>>>> - include an index in the set definition - to say which <br>>>>> instance of the radius AVP you are looking for<br>>>>><br>>>>> Regards,<br>>>>><br>>>>> Bogdan-Andrei Iancu<br>>>>> OpenSIPS Founder and Developer<br>>>>> http://www.opensips-solutions.com<br>>>>><br>>>>> On 01.04.2014 21:29, John Quick wrote:<br>>>>>> Hi Bogdan,<br>>>>>><br>>>>>> Yes absolutely certain. I used Wireshark to check.<br>>>>>><br>>>>>> I did make a little progress with this problem after finding some <br>>>>>> info on the Internet.<br>>>>>> The name that has to be used in set2 is "Cisco-AVPair". This <br>>>>>> allows me to retrieve just one VSA value.<br>>>>>> The *real* problem is that you cannot retrieve values 2, 3, 4, etc.<br>>>>>> This is because multiple instances are returned using the same VSA.<br>>>>>> They are all returned by the server in the attribute called <br>>>>>> h323-ivr-in. I even found the code in the sources that retrieves them.<br>>>>>> It loops through every instance in<br>>>>>> set2 and looks for 1 matching value. So even if you add "Cisco-AVPair"<br>>>>>> several times into set2 all you get is the first matching value <br>>>>>> many<br>>>>> times.<br>>>>>> John<br>>>>>><br>>>>>> -----Original Message-----<br>>>>>> From: Bogdan-Andrei Iancu [mailto:bogdan@opensips.org]<br>>>>>> Sent: 01 April 2014 19:15<br>>>>>> To: john.quick@smartvox.co.uk; OpenSIPS users mailling list<br>>>>>> Subject: Re: [OpenSIPS-Users] radius_send_auth returns Vendor <br>>>>>> Specific Attributes<br>>>>>><br>>>>>> Hi John,<br>>>>>><br>>>>>> It may be a stupid question, but are you sure the AVP does exist <br>>>>>> in the RADIUS reply ?<br>>>>>><br>>>>>> Regards,<br>>>>>><br>>>>>> Bogdan-Andrei Iancu<br>>>>>> OpenSIPS Founder and Developer<br>>>>>> http://www.opensips-solutions.com<br>>>>>><br>>>>>> On 28.03.2014 13:23, John Quick wrote:<br>>>>>>> Hi,<br>>>>>>><br>>>>>>> With help from this forum, I have just got radius_send_auth working.<br>>>>>>> I needed some extra dictionaries including dictionary.cisco In <br>>>>>>> that dictionary, there are vendor specific attributes like this:<br>>>>>>> ATTRIBUTE h323-ivr-in 100 string<br>>>>>>> Cisco<br>>>>>>> ATTRIBUTE h323-credit-amount 101 string<br>>>>>>> Cisco<br>>>>>>><br>>>>>>> My Radius server returns some data using these VSA's. In <br>>>>>>> particular, it returns many values using the same VSA - <br>>>>>>> h323-ivr-in<br>>>>>>><br>>>>>>> I am having trouble recovering the returned values using set2 of <br>>>>>>> radius_send_auth Can anyone advise me how I should define set2 to <br>>>>>>> get at these returned values? I have tried the following with no<br>>>> success:<br>>>>>>> modparam("aaa_radius", "sets", "set2 = <br>>>>>>> (h323-return-code=$avp(retcode),<br>>>>>>> h323-ivr-in=$avp(authretvals))")<br>>>>>>><br>>>>>>> After the function is called, there are no values in<br>>>>>>> $avp(authretvals)<br>>>>>>><br>>>>>>> Thanks.<br>>>>>>><br>>>>>>> John Quick<br>>>>>>> Smartvox Limited<br>>>>>>> Web: www.smartvox.co.uk<br>>>>>>><br>>>>>>><br>>>>>>><br>>>>>>><br>>>>>>> _______________________________________________<br>>>>>>> Users mailing list<br>>>>>>> Users@lists.opensips.org<br>>>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users<br>>>>>>><br>>>>>>><br>>><br>><br>><br><br><br><br></body>