From 886f2cab232e1dca65a90036aef39eda27443f4e Mon Sep 17 00:00:00 2001 From: George Joseph Date: Mon, 11 Jul 2016 19:07:20 -0600 Subject: rest_api/channels: Fix multiple issues with create and dial * We weren't properly subscribing to the channel and it's originator on create. * We weren't doing a publish_dial after calling ast_call on dial. * We weren't calling depart_bridge when a channel left the dial bridge. The first 2 issues were causing events to not be generated and the third was actually causing channels to not get properly destroyed when hung up. Together these 3 issues were causing the new rest_apichannels/create_dial_bridge tests to fail. As a result of the fixes, the cdr state machine had to be slightly tweaked to allow bridge leave events without asserting and the tests themselves had to be updated to account for the channels now cleaning themselves up. Change-Id: Ibf23abf5a62de76e82afb4461af5099c961b97d8 --- main/cdr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'main') diff --git a/main/cdr.c b/main/cdr.c index 586a10684..e2f9b764c 100644 --- a/main/cdr.c +++ b/main/cdr.c @@ -1409,9 +1409,7 @@ static int base_process_party_a(struct cdr_object *cdr, struct ast_channel_snaps static int base_process_bridge_leave(struct cdr_object *cdr, struct ast_bridge_snapshot *bridge, struct ast_channel_snapshot *channel) { - /* In general, most things shouldn't get a bridge leave */ - ast_assert(0); - return 1; + return 0; } static int base_process_dial_end(struct cdr_object *cdr, struct ast_channel_snapshot *caller, struct ast_channel_snapshot *peer, const char *dial_status) -- cgit v1.2.3