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 /apps/app_directed_pickup.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 'apps/app_directed_pickup.c')
-rw-r--r-- | apps/app_directed_pickup.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/app_directed_pickup.c b/apps/app_directed_pickup.c index 2696b4440..2e196a7d8 100644 --- a/apps/app_directed_pickup.c +++ b/apps/app_directed_pickup.c @@ -98,7 +98,9 @@ static int pickup_do(struct ast_channel *chan, struct ast_channel *target) connected_caller = target->connected; connected_caller.source = AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER; - ast_channel_update_connected_line(chan, &connected_caller); + if (ast_channel_connected_line_macro(NULL, chan, &connected_caller, 0, 0)) { + ast_channel_update_connected_line(chan, &connected_caller); + } ast_channel_lock(chan); ast_connected_line_copy_from_caller(&connected_caller, &chan->cid); |