[OpenSER-Users] [avp_db_query] How to analize resulting AVP's row by row?
Daniel-Constantin Mierla
daniel at voice-system.ro
Tue Aug 14 10:16:09 CEST 2007
On 08/14/07 11:14, Iñaki Baz Castillo wrote:
> El Monday 13 August 2007 18:54:57 Daniel-Constantin Mierla escribió:
>
>> Hello,
>>
>> you can access the avps via index.
>>
>
> Sorry, I've seen nothing about AVP's and index. Could you explain me this way
> please?
>
>
$avp(i:23[2]) returns the value of third avp with id 23.
http://www.openser.org/dokuwiki/doku.php/pseudovariables:devel#avps
Daniel
>
>> Also, what you want can be achieved
>> via some recursive route calling. It is a bit complex, here is the
>> pseudo-algorithm:
>> - call the route where in first place check if $avp(s:priority) is null,
>> if yes, rename back all the avps (see next) and return false
>> - if not, do the checking you want and rename the current set of avps to
>> something else and run again the route if you need it
>>
>> basically by renaming the avp you can iterate via calling routes
>> recursively until no more avps with initial name are in place. hope you
>> understand me,
>>
>
> Yes, I understood (but it's quite complex). Anyway, I think I've improved a
> lot my algorithm and now all the complex is in a single SQL query that just
> return a single row and single value. :)
>
>
> Thanks for all and regards.
>
>
>
>
More information about the sr-users
mailing list