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.
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.
again thanks if anyone can helpme.
xlog(" anrtes de strip >> el r-uri($ru)>($ru{s.substr,0,3})\n");
$var(x) = $ru; #>> set varx as an string
$var(y)=$(var(x){s.substr,4,3}); #>>>>strip the first 3 digits to find my route
xlog("dsroute $var(y) my test ($ru)\n"); #check for variables loaded
strip(3); # strip the prefix to route to destinatio
xlog("despues de strip time [$Tf] method ($rm) r-uri ($ru) 2nd via el code ($var(y)\n"); #check for loaded variables after strip
ds_select_dst("$var(y)", "4");#>>carrer dynamic don't work variable is load propperly but i get the following error
##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
##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
#ds_select_dst("097", "4");#statically define works
xlog("print el destination y el $var(y) ($du)>>($td)>>> ($ru)\n");
if (!t_relay_to_udp()) {
sl_reply_error();
};
exit;
}
dispatcher.lst
#lineformat
#setit(integer)destination(sipuri)flags(integer,optional)
#Asterisks