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:
Matthew Jordan
2013-05-17 17:43:58 +00:00
parent b90bba7a30
commit d04f1fd60a
5 changed files with 43 additions and 26 deletions

View File

@@ -297,6 +297,15 @@ void ast_channel_publish_dial(struct ast_channel *caller,
const char *dialstring,
const char *dialstatus);
/*!
* \since 12
* \brief Publish in the \ref ast_channel_topic a \ref ast_channel_snapshot
* message indicating a change in channel state
*
* \param chan The channel whose state has changed
*/
void ast_publish_channel_state(struct ast_channel *chan);
/*! @} */
/*!