diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2002-03-05 15:59:01 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2002-03-05 15:59:01 +0000 |
commit | 979f047eb3f6598bb98635bd4600d47f2a57f801 (patch) | |
tree | eb24eae822aac20c68f241c6d57dd51e6db930bb | |
parent | 385223b5ca909aed7354e3ec7e95465ff1b31350 (diff) |
Version 0.1.11 from FTP
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@418 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-x | apps/app_dial.c | 19 | ||||
-rwxr-xr-x | include/asterisk/channel.h | 8 |
2 files changed, 24 insertions, 3 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c index 5b24c6f5a..0fbfad004 100755 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -313,15 +313,34 @@ static int dial_exec(struct ast_channel *chan, void *data) cur = rest; continue; } + if (strlen(tmp->chan->call_forward)) { + if (option_verbose > 2) + ast_verbose(VERBOSE_PREFIX_3 "Forwarding call to '%s@%s'\n", tmp->chan->call_forward, tmp->chan->context); + /* Setup parameters */ + strncpy(chan->exten, tmp->chan->call_forward, sizeof(chan->exten)); + strncpy(chan->context, tmp->chan->context, sizeof(chan->context)); + chan->priority = 0; + to = 0; + ast_hangup(tmp->chan); + free(tmp); + cur = rest; + break; + } tmp->chan->appl = "AppDial"; tmp->chan->data = "(Outgoing Line)"; tmp->chan->whentohangup = 0; if (tmp->chan->callerid) free(tmp->chan->callerid); + if (tmp->chan->ani) + free(tmp->chan->ani); if (chan->callerid) tmp->chan->callerid = strdup(chan->callerid); else tmp->chan->callerid = NULL; + if (chan->ani) + tmp->chan->ani = strdup(chan->ani); + else + tmp->chan->ani = NULL; /* Presense of ADSI CPE on outgoing channel follows ours */ tmp->chan->adsicpe = chan->adsicpe; /* Place the call, but don't wait on the answer */ diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index 1d2b9c7e5..1331846cd 100755 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -169,8 +169,8 @@ struct ast_channel { char *dnid; /*! Malloc'd Caller ID */ char *callerid; - /*! Malloc'd Hidden Caller*ID */ - char *hidden_callerid; + /*! Malloc'd ANI */ + char *ani; /*! Current extension context */ @@ -203,6 +203,8 @@ struct ast_channel { struct ast_cdr *cdr; /*! Whether or not ADSI is detected on CPE */ int adsicpe; + /*! Where to forward to if asked to dial on this interface */ + char call_forward[AST_MAX_EXTENSION]; /*! For easy linking */ struct ast_channel *next; @@ -445,7 +447,7 @@ char ast_waitfordigit(struct ast_channel *c, int ms); /*! * \param c channel to read from * \param s string to read in to. Must be at least the size of your length - * \param len how many digits to read + * \param len how many digits to read (maximum) * \param timeout how long to timeout between digits * \param rtimeout timeout to wait on the first digit * \param enders digits to end the string |