mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-19 08:11:21 +00:00
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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user