diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_agent_pool.c | 15 | ||||
-rw-r--r-- | apps/app_bridgewait.c | 2 |
2 files changed, 12 insertions, 5 deletions
diff --git a/apps/app_agent_pool.c b/apps/app_agent_pool.c index 286a937d0..d4446ceb5 100644 --- a/apps/app_agent_pool.c +++ b/apps/app_agent_pool.c @@ -1202,7 +1202,7 @@ static int bridge_agent_hold_push(struct ast_bridge *self, struct ast_bridge_cha /* Add heartbeat interval hook. */ ao2_ref(agent, +1); - if (ast_bridge_interval_hook(bridge_channel->features, 1000, + if (ast_bridge_interval_hook(bridge_channel->features, 0, 1000, bridge_agent_hold_heartbeat, agent, __ao2_cleanup, AST_BRIDGE_HOOK_REMOVE_ON_PULL)) { ao2_ref(agent, -1); res = -1; @@ -1696,6 +1696,13 @@ static void agent_alert(struct ast_bridge_channel *bridge_channel, const void *p return; } + /* Change holding bridge participant role's idle mode to silence */ + ast_bridge_channel_lock_bridge(bridge_channel); + ast_bridge_channel_clear_roles(bridge_channel); + ast_channel_set_bridge_role_option(bridge_channel->chan, "holding_participant", "idle_mode", "silence"); + ast_bridge_channel_establish_roles(bridge_channel); + ast_bridge_unlock(bridge_channel->bridge); + /* Alert the agent. */ agent_lock(agent); playfile = ast_strdupa(agent->cfg->beep_sound); @@ -1724,8 +1731,8 @@ static void agent_alert(struct ast_bridge_channel *bridge_channel, const void *p static int send_alert_to_agent(struct ast_bridge_channel *bridge_channel, const char *agent_id) { - return ast_bridge_channel_queue_callback(bridge_channel, agent_alert, agent_id, - strlen(agent_id) + 1); + return ast_bridge_channel_queue_callback(bridge_channel, + AST_BRIDGE_CHANNEL_CB_OPTION_MEDIA, agent_alert, agent_id, strlen(agent_id) + 1); } static int send_colp_to_agent(struct ast_bridge_channel *bridge_channel, struct ast_party_connected_line *connected) @@ -1797,7 +1804,7 @@ static int agent_request_exec(struct ast_channel *chan, const char *data) /* Add safety timeout hook. */ ao2_ref(agent, +1); - if (ast_bridge_interval_hook(&caller_features, CALLER_SAFETY_TIMEOUT_TIME, + if (ast_bridge_interval_hook(&caller_features, 0, CALLER_SAFETY_TIMEOUT_TIME, caller_safety_timeout, agent, __ao2_cleanup, AST_BRIDGE_HOOK_REMOVE_ON_PULL)) { ao2_ref(agent, -1); ast_bridge_features_cleanup(&caller_features); diff --git a/apps/app_bridgewait.c b/apps/app_bridgewait.c index f97f5f977..36747056e 100644 --- a/apps/app_bridgewait.c +++ b/apps/app_bridgewait.c @@ -223,7 +223,7 @@ static int apply_option_timeout(struct ast_bridge_features *features, char *dura } duration *= 1000; - if (ast_bridge_interval_hook(features, duration, bridgewait_timeout_callback, + if (ast_bridge_interval_hook(features, 0, duration, bridgewait_timeout_callback, NULL, NULL, AST_BRIDGE_HOOK_REMOVE_ON_PULL)) { ast_log(LOG_ERROR, "Timeout option 'S': Could not create timer.\n"); return -1; |