[Kamailio-Users] Storing nonscalar types (lists)
Daniel-Constantin Mierla
miconda at gmail.com
Wed Feb 24 17:31:35 CET 2010
On 02/24/2010 05:21 PM, Alex Balashov wrote:
> On 02/24/2010 11:20 AM, Daniel-Constantin Mierla wrote:
>
>> sqlops result is a matrix. You can access row and column by index. Or
>> you look for something else?
>
> I look for something that's transaction-persistent so that I can
> iterate over it in failure routes, and as far as I know $dbr() is not
> transaction-persistent.
$dbr() is in private memory.
>
> Typical situation is a list of gateways in descending order of
> priority is retrieved from a database along with various other
> attributes. The only way I know to deal with that is to buffer the
> results from $dbr() into an array of AVPs
xavp might be better structured for this case.
> and then cycle through them using a global AVP as an array index.
Not sure I get it here. If you need only one global index, then you can
use $shv() to store it. If you need it per transaction, then an normal
avp should be used.
Cheers,
Daniel
--
Daniel-Constantin Mierla
Kamailio SIP Router Masterclass, Berlin, March 22-26, 2010
* http://www.asipto.com/index.php/sip-router-masterclass/
More information about the Users
mailing list