<div dir="ltr">thanks for all support from the forum before hand.<div style>i am having an issue with my setup, i am trying to make the dispatcher dynamic by asigning a value from a variable, that variable is define on my dispatcher.lst but i am getting an error, if anyone can help thanks.</div>
<div style><br></div><div style>my config on the relay route</div><div style>first i strip the prefix from my dial string, and set variable y with that code, then i strip it and dial it. but it does not work.</div><div style>
again thanks if anyone can helpme.</div><div style><br></div><div style><div><br></div><div><br></div><div>xlog(" anrtes de strip >> el r-uri($ru)>($ru{s.substr,0,3})\n");</div><div><br></div><div><br>
</div><div>$var(x) = $ru; #>> set varx as an string</div><div><br></div><div>$var(y)=$(var(x){s.substr,4,3}); #>>>>strip the first 3 digits to find my route</div><div><br></div><div><br></div><div><br></div>
<div>xlog("dsroute $var(y) my test ($ru)\n"); #check for variables loaded</div><div><br></div><div>strip(3); # strip the prefix to route to destinatio</div><div><br></div><div>xlog("despues de strip time [$Tf] method ($rm) r-uri ($ru) 2nd via el code ($var(y)\n"); #check for loaded variables after strip</div>
<div><br></div><div><br></div><div>ds_select_dst("$var(y)", "4");#>>carrer dynamic don't work variable is load propperly but i get the following error</div><div><div><b><br></b></div><div><b>##Apr 8 17:59:32 ip-10-0-1-206 /usr/sbin/kamailio[8975]: ERROR: <script>: despues de strip time [Mon Apr 8 17:59:32 2013] method (ACK) r-uri (sip:54.236.192.19) 2nd via el code (54). >>> i see a the right code in the variable</b></div>
<div><b>##Apr 8 17:59:32 ip-10-0-1-206 /usr/sbin/kamailio[8975]: ERROR: <core> [sr_module.c:1726]: Could not convert PV to int </b></div></div><div><br></div><div><br></div><div>#ds_select_dst("097", "4");#statically define works</div>
<div><br></div><div>xlog("print el destination y el $var(y) ($du)>>($td)>>> ($ru)\n");</div><div><br></div><div> if (!t_relay_to_udp()) {</div><div><br></div><div>sl_reply_error();</div><div>
};</div><div><br></div><div><br></div><div> exit;</div><div>}</div><div><br></div><div><br></div><div><br></div><div style>dispatcher.lst</div><div style><br></div><div style><div>#lineformat</div><div>#setit(integer)destination(sipuri)flags(integer,optional)</div>
<div><br></div><div><br></div><div>#Asterisks</div><div><br></div><div>007 sip:<a href="http://1.1.1.1:5060">1.1.1.1:5060</a> ##route 1</div><div>024 sip:<a href="http://2.2.2.2:5060">2.2.2.2:5060</a> ##route 2</div><div>
100 sip:<a href="http://1.1.1.100:5060">1.1.1.100:5060</a> ##route 100<br></div><div>103 sip:<a href="http://1.1.1.103:5060">1.1.1.103:5060</a> ###route 103</div><div><br></div></div></div></div>