summaryrefslogtreecommitdiff
path: root/main/dial.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2009-04-03 22:41:46 +0000
committerMark Michelson <mmichelson@digium.com>2009-04-03 22:41:46 +0000
commit6f53ed4c6707b30078ed4863e27facb7b454b600 (patch)
tree2e466f746a2e29094d6dcc3c6f2577f4dd85f4c0 /main/dial.c
parent3525e37e633b8b7bcf59262fbab21c16afadfa35 (diff)
This commit introduces COLP/CONP and Redirecting party information into Asterisk.
The channel drivers which have been most heavily tested with these enhancements are chan_sip and chan_misdn. Further work is being done to add Q.SIG support and will be introduced in a later commit. chan_skinny has code added to it here, but according to user pj, the support on chan_skinny is not working as of now. This will be fixed in a later commit. A special thanks goes out to bugtracker user gareth for getting the ball rolling and providing the initial support for this work. Without his initial work on this, this would not have been nearly as painless as it was. This functionality has been tested by Digium's product quality department, as well as a customer site running thousands of calls every day. In addition, many many many many bugtracker users have tested this, too. (closes issue #8824) Reported by: gareth Review: http://reviewboard.digium.com/r/201 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/dial.c')
-rw-r--r--main/dial.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/main/dial.c b/main/dial.c
index e8c9ca221..d38b4829d 100644
--- a/main/dial.c
+++ b/main/dial.c
@@ -274,10 +274,12 @@ static int begin_dial_channel(struct ast_dial_channel *channel, struct ast_chann
ast_channel_datastore_inherit(chan, channel->owner);
/* Copy over callerid information */
- S_REPLACE(channel->owner->cid.cid_num, ast_strdup(chan->cid.cid_num));
- S_REPLACE(channel->owner->cid.cid_name, ast_strdup(chan->cid.cid_name));
- S_REPLACE(channel->owner->cid.cid_ani, ast_strdup(chan->cid.cid_ani));
S_REPLACE(channel->owner->cid.cid_rdnis, ast_strdup(chan->cid.cid_rdnis));
+ ast_party_redirecting_copy(&channel->owner->redirecting, &chan->redirecting);
+
+ channel->owner->cid.cid_tns = chan->cid.cid_tns;
+
+ ast_connected_line_copy_from_caller(&channel->owner->connected, &chan->cid);
ast_string_field_set(channel->owner, language, chan->language);
ast_string_field_set(channel->owner, accountcode, chan->accountcode);
@@ -285,9 +287,6 @@ static int begin_dial_channel(struct ast_dial_channel *channel, struct ast_chann
if (ast_strlen_zero(channel->owner->musicclass))
ast_string_field_set(channel->owner, musicclass, chan->musicclass);
- channel->owner->cid.cid_pres = chan->cid.cid_pres;
- channel->owner->cid.cid_ton = chan->cid.cid_ton;
- channel->owner->cid.cid_tns = chan->cid.cid_tns;
channel->owner->adsicpe = chan->adsicpe;
channel->owner->transfercapability = chan->transfercapability;
}
@@ -429,6 +428,14 @@ static void handle_frame(struct ast_dial *dial, struct ast_dial_channel *channel
ast_verbose (VERBOSE_PREFIX_3 "%s requested a source update, passing it to %s\n", channel->owner->name, chan->name);
ast_indicate(chan, AST_CONTROL_SRCUPDATE);
break;
+ case AST_CONTROL_CONNECTED_LINE:
+ ast_verb(3, "%s connected line has changed, passing it to %s\n", channel->owner->name, chan->name);
+ ast_indicate_data(chan, AST_CONTROL_CONNECTED_LINE, fr->data.ptr, fr->datalen);
+ break;
+ case AST_CONTROL_REDIRECTING:
+ ast_verb(3, "%s redirecting info has changed, passing it to %s\n", channel->owner->name, chan->name);
+ ast_indicate_data(chan, AST_CONTROL_REDIRECTING, fr->data.ptr, fr->datalen);
+ break;
case AST_CONTROL_PROCEEDING:
ast_verb(3, "%s is proceeding, passing it to %s\n", channel->owner->name, chan->name);
ast_indicate(chan, AST_CONTROL_PROCEEDING);