[SR-Users] Parallel call forward

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


This is what I testet: 

route[ROUTE_EXECUTE_CF_LOOP_NR] 
{ 
xlog("L_NOTICE", "ROUTE_EXECUTE_CF_LOOP_NR"); 
if(!t_is_failure_route()) 
{ 
record_route(); 
} 
$var(count_dlg) = 0; 
route(ROUTE_SET_CALLER_DIALOG); 
$du = "sip:192.168.20.100:5060"; 
xlog("L_INFO", "Trigger CF loop NR to '$du' for call to '$ru' - [% logreq -%]\n"); 
t_on_failure("FAILURE_ROUTE_HUNT"); 
t_on_branch("BRANCH_ROUTE_FWD_LOOP"); 
} 

while(is_avp_set("$(avp(s:cf_destinations)[0])")) 
{ 
$ru = $(avp(s:cf_destinations)[0]); 
$var(new_ruri) = $(avp(s:cf_destinations)[0]); 
$(avp(s:cf_destinations)[0]) = $null; 
xlog("L_NOTICE", "1 DST: $ru"); 
append_branch($avp(new_ruri)); 
route(ROUTE_EXECUTE_CF_LOOP_NR); 
} 
t_relay_to("0x01"); 
exit; 

With $avp(s:cf_destinations)[0] = "555 at dom1.com" and $avp(s:cf_destinations)[1] = "666 at dom1.com", what I get on the logs is ... 

[...] 
1 DST: sip:555 at dom1.com 
1 DST: sip:666 at dom1.com 
Appending P-D-URI 'sip:192.168.20.100:5060' - R=sip:666 at dom1.com ID=54d8f17fbb4a-m5l3n9j3xd73 
Appending P-D-URI 'sip:192.168.20.100:5060' - R=sip:666 at dom1.com ID=54d8f17fbb4a-m5l3n9j3xd73 
[...] 

Meaning (from my ignorance), that the last $ru it's used for both 'appended_branches', no matter what I pass to append_branch 

When I expected: 
[...] 
1 DST: sip:555 at dom1.com 
1 DST: sip:666 at dom1.com 
Appending P-D-URI 'sip:192.168.20.100:5060' - R=sip:555 at dom1.com ID=54d8f17fbb4a-m5l3n9j3xd73.1 
Appending P-D-URI 'sip:192.168.20.100:5060' - R=sip:666 at dom1.com ID=54d8f17fbb4a-m5l3n9j3xd73.2 
[...] 

Are there any example of parallel forking, that works like this? ... I'm doing something terrible wrong? 

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


More information about the sr-users mailing list