> On 6 Oct 2023, at 10:39, Barry Flanagan via sr-users 
> <sr-users@lists.kamailio.org> wrote:
> 
> On 06/10/2023 15:23, Alex Balashov via sr-users wrote:
>> Hello,
>> 
>> If you can't key by R-URI, perhaps then just store a list of routes in a 
>> database table or similar?
> 
> Thanks. The routes are received via an API call, and are dynamic. Trying to 
> avoid the overhead of a database.

Ah. Then the easiest approach is probably to buffer them into an XAVP array and 
just iterate through them. R-URI can be one attribute of each, while the 
destination URI/next-hop can be another. 

   $var(i) = 0;

   while(defined $xavp(route_set[$var(i)])) {
       $ru = $xavp(route_set[$var(i)]=>ruri);
       $du = $xavp(route_set[$var(i)]=>duri);

       $var(i) = $var(i) + 1;
   }

-- Alex

-- 
Alex Balashov
Principal Consultant
Evariste Systems LLC
Web: https://evaristesys.com
Tel: +1-706-510-6800

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:

Reply via email to