mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-17 15:29:05 +00:00
Publish the outbound channel's application/data when dialing
This patch does two things: * It fixes a bug where the outbound channel's application/data set by the dialing API/app_dial is not communicated until the channel is hung up. If that happens, AMI would incorrectly send a NewExten event immediately after a Hangup. This isn't really AMI's fault, as the dialing APIs never communicated the 'helpful' app/data on the outbound channel until it was hungup. * It makes public sending a stasis message about a change in channel state. This is useful enough that - for now at least - it should be public. If operations on a channel go to being more coarse-grained, this function could be made private again. Review: https://reviewboard.asterisk.org/r/2548 Note that this problem was found and reported by Matt DiMeo. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388976 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -972,6 +972,7 @@ static void do_forward(struct chanlist *o, struct cause_args *num,
|
||||
|
||||
ast_channel_appl_set(c, "AppDial");
|
||||
ast_channel_data_set(c, "(Outgoing Line)");
|
||||
ast_publish_channel_state(c);
|
||||
|
||||
ast_channel_unlock(in);
|
||||
if (single && !ast_test_flag64(o, OPT_IGNORE_CONNECTEDLINE)) {
|
||||
@@ -2453,6 +2454,8 @@ static int dial_exec_full(struct ast_channel *chan, const char *data, struct ast
|
||||
|
||||
ast_channel_appl_set(tc, "AppDial");
|
||||
ast_channel_data_set(tc, "(Outgoing Line)");
|
||||
ast_publish_channel_state(tc);
|
||||
|
||||
memset(ast_channel_whentohangup(tc), 0, sizeof(*ast_channel_whentohangup(tc)));
|
||||
|
||||
/* Determine CallerID to store in outgoing channel. */
|
||||
|
||||
Reference in New Issue
Block a user