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