[SR-Users] Parallel call forward

Raúl Alexis Betancor Santana rabs at dimension-virtual.com
Mon Feb 9 08:18:57 CET 2015


Hi all, 

I'm getting crazy trying to setup a kamailio to do a parallel call forward to multiple destinations based on a query to the DB. 

I do the db query and get the RURI's of the destinations I could forward the call to in parallel, then when I get the resulset I do: 

[...] 

$var(cf_idx) = 0; 
while(is_avp_set("$(avp(s:cf_destinations)[0])")) 
{ 
$ru = $(avp(s:cf_destinations)[0]); # Set the new RURI to call to 
$(avp(s:cf_destinations)[0]) = $null; # Setting it to $null pull the value from the stack 
$(avp(s:callee_fr_inv_timer)[*]) = $(avp(s:cf_timeouts)[0]) * 1000; 
t_set_fr("$avp(s:callee_fr_inv_timer)"); 
$(avp(s:cf_timeouts)[0]) = $null; 
route(ROUTE_ACC_CF); # Do the ACC 
$(avp(s:acc_state)[*]) = "cfna"; 
$(avp(s:hih_cause)[*]) = "404"; 
$var(cf_idx) = $var(cf_idx) + 1; 
append_branch(); 
} 
route(ROUTE_EXECUTE_CF_LOOP); # Some final task and then t_relay 

[...] 

But only the last RURI get called 

How do I do to accomplish this? ... I need to change the $ru of each new branch, so when request get loop-back to the proxy, it do again all the lookup logic. 


Best regards 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150209/ceb91c36/attachment.html>


More information about the sr-users mailing list