while playing with dp_translate(), i noticed the following weird behavior.
i have a rule with dpid=11, where match_exp='^+' and subst_exp and repl_exp are empty.
my test goes like this:
$rU = "+35892345670"; if (dp_translate("11", $rU/$rU")) { xlog("ruri user is '$rU'\n"); };
$var(test) = "+35892345670"; if (dp_translate("11", "$var(test)/$var(test)")) { xlog("var(test) is '$var(test)'\n"); };
and this is produced to syslog:
Mar 29 20:01:39 localhost /usr/sbin/sip-proxy[20533]: ERROR: ruri user is '+35892345670' Mar 29 20:01:39 localhost /usr/sbin/sip-proxy[20533]: ERROR: var(test) is ''
that is, $rU is not translated to empty string, but $var(test) is.
can someone provide an explanation for this? what should the expected behavior be, when subst_exp and repl_exp are empty?
original author of dialplan module is Andreea-Ancuta Onofrei, but i don't know if he is still around.
-- juha