He was describing the behavour correctly. A channel is needed in order to call the extension/run the application. That is only available once the outgoing call is answered.
int ast_pbx_outgoing_exten(const char *type, int format, void *data, int timeout, const char *context, const char *exten, int priority, int *reason, int synchronous, const char *cid_num, const char *cid_name, struct ast_variable *vars, const char *account, struct ast_channel **channel)
....
chan = __ast_request_and_dial(type, format, data, timeout, reason, cid_num, cid_name, &oh);
....
if (chan) {
if (chan->_state == AST_STATE_UP) {
res = 0;
ast_verb(4, "Channel %s was answered.\n", chan->name);
....
if (ast_pbx_run(chan)) {
ast_log(LOG_ERROR, "Unable to run PBX on %s\n", chan->name);
Only when it runs pbx_run is the dialplan, and therefore the extension, being processed. Note that this id predicated on the channel being UP, i.e. answered. I wonder if you are using an analogue channel without answer supervision?
I’ve tried just switching the values for Channel and Exten. I used “SIP/102” as the Channel, and the Channel as Exten. I also tried different combinations of values for Exten (e.g. SIP/2068527662, GnC/2068527662). I tried added “@outgoing” to the end of the Exten, as well, for our outbound route.
Extension 102 rings, but when I answer, it just says “Goodbye”, and hangs up.
The channel should be a local channel, referencing the original extension. The extension should be a new extension that includes Dial(original channel).
I really consider this Asterisk/101, once you know to use local channels. On a general purpose installation, you will already have a context and extension that are close to doing the job.
My feeling is that, if you need help at this level, you should really be paying for a consultant.
Thanks for all the help. it turns out that all we needed to use the context “from-internal” rather than the “default”. i know this is the case with freepbx, it’s possible that it needs to be defined manually if freepbx is not used.