<div dir="ltr"><div>Hi,</div><div><br></div><div>Just to add one more point that $fU & $fn I'm checking not in script but in SIP packet. So using sngrep i see in SIP packet from header where $fU and $fn are
"1234567+123456".</div><div><br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Jurijs<br></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 17, 2019 at 1:06 PM Jurijs Ivolga <<a href="mailto:jurijs.ivolga@gmail.com">jurijs.ivolga@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi! <br><br>I have small problem. When I assign $fU or $fn in request-route and then one more time I make new assignment in branch_route. Instead of rewriting it is just concatenate needed value at the end. lets assume $avp(cli)=1234567 and $avp(cliplus)=+1234567. So if in request_route I do $fU=$avp(cli); and then in branch_route $fU=$avp(cliplus);. $fU becomes one string: "1234567+1234567". Is it a bug or I missing something?<div><br></div><div>Here is config snippet:</div><div><br></div><div>request_route {</div><div>...</div><div>route(MY);<br></div><div>...<br></div><div>}<br></div><div><br></div><div>route[MY] {<br><br>...<br> $avp(cli) = "1234567"<br> $avp(cliplus) = "+"+$avp(cli);<br> $fU=$avp(cli); # here $fU=1234567<br> $fn=$avp(cli); # here $fn=1234567<br> route(LCR_ROUTE);<br> exit;<br>}<br><br>route[LCR_ROUTE]<br>{<br> if(!is_method("INVITE"))<br> return;<br> if (!load_gws("1",$rU,$avp(cli))) {<br> send_reply("503", "Error loading gateways");<br> exit;<br> }<br><br> $var(i)=0;<br> while($(avp(lcr_gw_uri)[$var(i)])!= $null){<br> xlog("L_INFO", "loaded gw_uri_avp[$var(i)]=$(avp(lcr_gw_uri)[$var(i)]) \n");<br> $var(i) = $var(i)+1;<br> }<br><br> if (!next_gw()) {<br> send_reply("503", "No available gateways");<br> exit;<br> }<br><br> xlog("L_INFO", "request-uri $ru \n");<br> xlog("L_INFO", "$avp(lcr_gw_uri), $avp(lcr_id)\n");<br><br> xlog("L_INFO", "flag $avp(lcr_flag) \n");<br><br> t_set_fr(0, 4000);<br> t_on_failure("RTF_LCR_ROUTE");<br> t_on_branch("BRANCH_CUST");<br> route(RELAY);<br> exit;<br>}<br><br>branch_route[BRANCH_CUST] {<br> if ( $avp(lcr_flag) == 4) {<br> $fU=$avp(cliplus); #here $fU=1234567+1234567<br> $fn=$avp(cliplus); #here $fn=1234567+1234567<br> }<br>}</div><div><br></div><div><div dir="ltr"><div dir="ltr">Jurijs<br></div></div></div></div>
</blockquote></div>