mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 00:04:53 +00:00
app_confbridge: Attended transfer event fixup
When a channel already in a conference bridge is attended transfered to another extension, or when an existing call is attended transferred into a conference bridge, we now generate ConfbridgeJoin and ConfbridgeLeave events for the entering and departing channels. Change-Id: Id7709cfbceb26fbcb828b2d0d2a6b2fbeaf028e1
This commit is contained in:
@@ -485,6 +485,42 @@ struct stasis_message *ast_bridge_blob_create(
|
||||
return msg;
|
||||
}
|
||||
|
||||
struct stasis_message *ast_bridge_blob_create_from_snapshots(
|
||||
struct stasis_message_type *message_type,
|
||||
struct ast_bridge_snapshot *bridge_snapshot,
|
||||
struct ast_channel_snapshot *chan_snapshot,
|
||||
struct ast_json *blob)
|
||||
{
|
||||
struct ast_bridge_blob *obj;
|
||||
struct stasis_message *msg;
|
||||
|
||||
if (!message_type) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
obj = ao2_alloc(sizeof(*obj), bridge_blob_dtor);
|
||||
if (!obj) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (bridge_snapshot) {
|
||||
obj->bridge = ao2_bump(bridge_snapshot);
|
||||
}
|
||||
|
||||
if (chan_snapshot) {
|
||||
obj->channel = ao2_bump(chan_snapshot);
|
||||
}
|
||||
|
||||
if (blob) {
|
||||
obj->blob = ast_json_ref(blob);
|
||||
}
|
||||
|
||||
msg = stasis_message_create(message_type, obj);
|
||||
ao2_ref(obj, -1);
|
||||
|
||||
return msg;
|
||||
}
|
||||
|
||||
void ast_bridge_publish_enter(struct ast_bridge *bridge, struct ast_channel *chan,
|
||||
struct ast_channel *swap)
|
||||
{
|
||||
|
Reference in New Issue
Block a user