diff options
author | rmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-23 21:56:44 +0000 |
---|---|---|
committer | rmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-07-23 21:56:44 +0000 |
commit | 2ed045f310bbf4fdc12a00947024b4327d392e6b (patch) | |
tree | 2956574fba525068198623d51251445d4f56b2ef /apps | |
parent | fa4d0dcdaf19c46b8382fa8426b1d10f7a31c2f5 (diff) |
SIP promiscuous redirect could fail to dial the redirect.
The ast_channel was created with one variable to ast_request() but the
call to ast_call() that initiates the outgoing call was using a different
variable. The two variables are not equivalent if the call_forward string
included a channel technology specifier. e.g., SIP/200
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@279206 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_dial.c | 9 | ||||
-rw-r--r-- | apps/app_queue.c | 9 |
2 files changed, 12 insertions, 6 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c index d1a2bf49c..3a942ffc2 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -534,7 +534,9 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_l ast_channel_inherit_variables(in, o->chan); ast_channel_datastore_inherit(in, o->chan); } else - ast_log(LOG_NOTICE, "Unable to create local channel for call forward to '%s/%s' (cause = %d)\n", tech, stuff, cause); + ast_log(LOG_NOTICE, + "Forwarding failed to create channel to dial '%s/%s' (cause = %d)\n", + tech, stuff, cause); } if (!c) { ast_clear_flag(o, DIAL_STILLGOING); @@ -569,8 +571,9 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_l if (c->cid.cid_rdnis) free(c->cid.cid_rdnis); c->cid.cid_rdnis = ast_strdup(S_OR(in->macroexten, in->exten)); - if (ast_call(c, tmpchan, 0)) { - ast_log(LOG_NOTICE, "Failed to dial on local channel for call forward to '%s'\n", tmpchan); + if (ast_call(c, stuff, 0)) { + ast_log(LOG_NOTICE, "Forwarding failed to dial '%s/%s'\n", + tech, stuff); ast_clear_flag(o, DIAL_STILLGOING); ast_hangup(c); c = o->chan = NULL; diff --git a/apps/app_queue.c b/apps/app_queue.c index 88d120222..b0eb0217b 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -2321,7 +2321,9 @@ static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callatte /* Setup parameters */ o->chan = ast_request(tech, in->nativeformats, stuff, &status); if (!o->chan) { - ast_log(LOG_NOTICE, "Unable to create local channel for call forward to '%s/%s'\n", tech, stuff); + ast_log(LOG_NOTICE, + "Forwarding failed to create channel to dial '%s/%s'\n", + tech, stuff); o->stillgoing = 0; numnochan++; } else { @@ -2346,8 +2348,9 @@ static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callatte if (o->chan->cid.cid_rdnis) free(o->chan->cid.cid_rdnis); o->chan->cid.cid_rdnis = ast_strdup(S_OR(in->macroexten, in->exten)); - if (ast_call(o->chan, tmpchan, 0)) { - ast_log(LOG_NOTICE, "Failed to dial on local channel for call forward to '%s'\n", tmpchan); + if (ast_call(o->chan, stuff, 0)) { + ast_log(LOG_NOTICE, "Forwarding failed to dial '%s/%s'\n", + tech, stuff); do_hang(o); numnochan++; } |