summaryrefslogtreecommitdiff
path: root/main/channel_internal_api.c
diff options
context:
space:
mode:
authorDavid M. Lee <dlee@digium.com>2013-03-25 16:19:55 +0000
committerDavid M. Lee <dlee@digium.com>2013-03-25 16:19:55 +0000
commit4a6237b231df34494e420b577be320cde00d2619 (patch)
tree835d1fa72267de7face0d602c945b21ff59639ac /main/channel_internal_api.c
parentd484f366f5e2f4a54d760cb39a10391f9ab94f52 (diff)
Move NewCallerid, HangupRequest and SoftHangupRequest to Stasis
HangupRequest and SoftHangupRequest are now ast_channel_blob Stasis messages, with the cause code as an optional field in the blob. NewCallerid now simply watches for changes in the callerid information in channel snapshots, and creates the AMI event appropriately. Since the original NewCallerid event honored the channelvars setting in manager.conf, the channel variables configured there had to become a part of the channel snapshot. These are now a part of every snapshot based event, making the configuration description "every time a channel-oriented event is emitted" less of a lie. There a a few other changes wrapped up in here as well. * When ast_channel_topic() is given NULL for a channel, it returns the ast_channel_topic_all() topic instead of NULL. This can clean up a lot of NULL checking we're doing currently. * The fields Cause and Cause-txt were removed from the base channel information and put only on the Hangup events, since those fields are meaningless outside of a Hangup event. * Removed the pipe-delimiter processing of the channelvars field, since that's been deprecated forever. (closes issue ASTERISK-21096) Review: https://reviewboard.asterisk.org/r/2405/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/channel_internal_api.c')
-rw-r--r--main/channel_internal_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/channel_internal_api.c b/main/channel_internal_api.c
index 0867524d6..d635b46a0 100644
--- a/main/channel_internal_api.c
+++ b/main/channel_internal_api.c
@@ -1385,7 +1385,7 @@ int ast_channel_internal_is_finalized(struct ast_channel *chan)
struct stasis_topic *ast_channel_topic(struct ast_channel *chan)
{
- return chan->topic;
+ return chan ? chan->topic : ast_channel_topic_all();
}
void ast_channel_internal_setup_topics(struct ast_channel *chan)