diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-06-01 20:57:31 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-06-01 20:57:31 +0000 |
commit | ce47d41510edcdf1f7d36852350df02afc5f6014 (patch) | |
tree | 22c7cb967cc375a45f8cabb0f6c6998b7b5f674a /main/dial.c | |
parent | d79b32623f5a7917a0e2feef2cc14ef894104431 (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: http://svn.digium.com/svn/asterisk/trunk@198727 f38db490-d61c-443f-a65b-d21fe96a405b
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); |