I am using javascript based routing, the code of the external routing is below. Should I do the config you mentioned as well or is it not necessary?
function routeExternally(msg) {
   var server = "zzz";
   var called = "xxx";
   var caller = "yyy";
   Engine.output("OUTGOING CALL TO: "+ called +" command: "+"sip/sip:" + called + "@" + server + ":5060");
   Channel.callTo("sip/sip:" + called + "@" + server + ":5060", {"caller":caller});
   Engine.output("Performed!");
}
if(message.called == "1234"){
   routeExternally(message);
}