diff options
author | Mark Michelson <mmichelson@digium.com> | 2009-06-01 20:57:31 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2009-06-01 20:57:31 +0000 |
commit | 298d745fb4cf56cfe76cf89d4d5ae4dcb134d2bd (patch) | |
tree | 22c7cb967cc375a45f8cabb0f6c6998b7b5f674a /main/dial.c | |
parent | 0fb1700522fb5eac568c2144fb714cc3563b392f (diff) |
Add the ability to execute connected line interception macros.
When connected line updates are received or generated in the middle
of an application call, it is now possible to execute a macro to
manipulate the connected line data. This way, phone numbers may be
manipulated to be more presentable to users, names may be changed
for...whatever reason, or whatever else needs to be done may be.
Review: https://reviewboard.asterisk.org/r/256
AST-165
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198727 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/dial.c')
-rw-r--r-- | main/dial.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/main/dial.c b/main/dial.c index d38b4829d..1f65f50c7 100644 --- a/main/dial.c +++ b/main/dial.c @@ -37,6 +37,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/dial.h" #include "asterisk/pbx.h" #include "asterisk/musiconhold.h" +#include "asterisk/app.h" /*! \brief Main dialing structure. Contains global options, channels being dialed, and more! */ struct ast_dial { @@ -430,7 +431,9 @@ static void handle_frame(struct ast_dial *dial, struct ast_dial_channel *channel 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); + if (ast_channel_connected_line_macro(channel->owner, chan, fr, 1, 1)) { + 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); |