<div dir="ltr"><div><div>Hello,</div><div><br></div><div>I am trying to use the dialplan module but I am having this problem:</div><div><br></div><div>First of all, I pull the "dpid" value from the two first digits of the dnis:</div><div><br></div><div><span style="white-space:pre">     </span>$var(dialplan_vendor) = $(rU{s.substr,0,2});</div><div><br></div><div>Then</div><div><br></div><div><span style="white-space:pre">     </span>if(!dp_translate("$var(dialplan_vendor)","$dlg_var(servicio)/$var(ani_dialplan)")) {</div><div><span style="white-space:pre">              </span>xlog("L_NOTICE","Error al seleccionar el dialplan\n");<span style="white-space:pre">           </span></div><div><span style="white-space:pre">              </span>sl_send_reply("403", "Not allowed");<span style="white-space:pre">     </span></div><div><span style="white-space:pre">              </span>drop;</div><div><span style="white-space:pre"> </span>}</div><div><br></div><div>But when I test everything I get:</div><div><br></div><div><span style="white-space:pre">   </span>ERROR: dialplan [dialplan.c:233]: dp_get_ivalue(): no AVP, XAVP or SCRIPTVAR found (error in scripts)</div><div><br></div><div>I think the problem is related to variable $var(dialplan_vendor). It is set up as string due to the transformation and dialplan need a integer.</div><div><br></div><div>If I set up the variable this way for testing: $var(dialplan_vendor) = 18, it works correctly.</div><div><br></div><div>Question, how can I transform the sting into a integer?</div><div><br></div><div>Thank you</div><div><br></div><div>Nelson.</div></div></div>