Refactor CEL bridge events on top of Stasis-Core

This pulls bridge-related CEL event triggers out of the code in which
they were residing and pulls them into cel.c where they are now
triggered by changes in bridge snapshots. To get access to the
Stasis-Core parking topic in cel.c, the Stasis-Core portions of parking
init have been pulled into core Asterisk init.

This also adds a new CEL event (AST_CEL_BRIDGE_TO_CONF) that indicates
a two-party bridge has transitioned to a multi-party conference. The
reverse cannot occur in CEL terms even though it may occur in actuality
and two party bridges which receive a AST_CEL_BRIDGE_TO_CONF will be
treated as multi-party conferences for the duration of the bridge.

Review: https://reviewboard.asterisk.org/r/2563/
(closes issue ASTERISK-21564)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kinsey Moore
2013-06-13 13:46:40 +00:00
parent 4f84e48028
commit b51b437bf3
8 changed files with 253 additions and 89 deletions

View File

@@ -1425,7 +1425,6 @@ static int park_call_full(struct ast_channel *chan, struct ast_channel *peer, st
ast_channel_name(chan), pu->parkingnum, pu->parkinglot->name,
pu->context, pu->exten, pu->priority, (pu->parkingtime / 1000));
ast_cel_report_event(chan, AST_CEL_PARK_START, NULL, pu->parkinglot->name, peer);
/*** DOCUMENTATION
<managerEventInstance>
<synopsis>Raised when a call has been parked.</synopsis>
@@ -3969,7 +3968,6 @@ static int manage_parked_call(struct parkeduser *pu, const struct pollfd *pfds,
set_c_e_p(chan, pu->context, pu->exten, pu->priority);
}
post_manager_event("ParkedCallTimeOut", pu);
ast_cel_report_event(pu->chan, AST_CEL_PARK_END, NULL, "ParkedCallTimeOut", NULL);
ast_verb(2, "Timeout for %s parked on %d (%s). Returning to %s,%s,%d\n",
ast_channel_name(pu->chan), pu->parkingnum, pu->parkinglot->name, ast_channel_context(pu->chan),
@@ -4029,8 +4027,6 @@ static int manage_parked_call(struct parkeduser *pu, const struct pollfd *pfds,
ast_frfree(f);
}
post_manager_event("ParkedCallGiveUp", pu);
ast_cel_report_event(pu->chan, AST_CEL_PARK_END, NULL, "ParkedCallGiveUp",
NULL);
/* There's a problem, hang them up */
ast_verb(2, "%s got tired of being parked\n", ast_channel_name(chan));