From f1036f40dc22c4d4b30cc2ab36199cd749ead9c5 Mon Sep 17 00:00:00 2001 From: Kinsey Moore Date: Wed, 6 Aug 2014 12:55:28 +0000 Subject: Stasis: Allow message types to be blocked This introduces stasis.conf and a mechanism to prevent certain message types from being published. Internally, this works by preventing the chosen message types from being created which ensures that those message types can never be published. This patch also adjusts message publishers such that message payloads are not created if the related message type is not available. ASTERISK-23943 #close Review: https://reviewboard.asterisk.org/r/3823/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@420124 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/pickup.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'main/pickup.c') diff --git a/main/pickup.c b/main/pickup.c index 5be0c03ab..125ec9359 100644 --- a/main/pickup.c +++ b/main/pickup.c @@ -282,6 +282,10 @@ static int send_call_pickup_stasis_message(struct ast_channel *picking_up, struc RAII_VAR(struct ast_multi_channel_blob *, pickup_payload, NULL, ao2_cleanup); RAII_VAR(struct stasis_message *, msg, NULL, ao2_cleanup); + if (!ast_call_pickup_type()) { + return -1; + } + if (!(pickup_payload = ast_multi_channel_blob_create(ast_json_null()))) { return -1; } -- cgit v1.2.3