diff options
Diffstat (limited to 'main/core_local.c')
-rw-r--r-- | main/core_local.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/main/core_local.c b/main/core_local.c index e1b66d0a7..54915ecfe 100644 --- a/main/core_local.c +++ b/main/core_local.c @@ -357,6 +357,10 @@ static void local_optimization_started_cb(struct ast_unreal_pvt *base, struct as RAII_VAR(struct stasis_message *, msg, NULL, ao2_cleanup); struct local_pvt *p = (struct local_pvt *)base; + if (!ast_local_optimization_begin_type()) { + return; + } + json_object = ast_json_pack("{s: i, s: i}", "dest", dest, "id", id); @@ -395,6 +399,10 @@ static void local_optimization_finished_cb(struct ast_unreal_pvt *base, int succ RAII_VAR(struct stasis_message *, msg, NULL, ao2_cleanup); struct local_pvt *p = (struct local_pvt *)base; + if (!ast_local_optimization_end_type()) { + return; + } + json_object = ast_json_pack("{s: i, s: i}", "success", success, "id", id); if (!json_object) { @@ -501,6 +509,10 @@ static void publish_local_bridge_message(struct local_pvt *p) struct ast_channel *owner; struct ast_channel *chan; + if (!ast_local_bridge_type()) { + return; + } + ast_unreal_lock_all(&p->base, &chan, &owner); blob = ast_json_pack("{s: s, s: s, s: b}", |