Merge pull request #182 in FS/freeswitch from ~CXREG/freeswitch-memcache-file:eavesdrop_bridge_single_leg to master

* commit '2890afc9184b142c931a98fff267d408e807b862':
  FS-7285 allow eavesdrop to bridge only one leg
This commit is contained in:
Mike Jerris committed 2015-02-20 11:27:12 -06:00
commit 1c3f3e2d39
3 files changed
+27 -3

No files matched your search

@@ -818,11 +818,21 @@ SWITCH_STANDARD_APP(eavesdrop_function)
switch_channel_t *channel = switch_core_session_get_channel(session);
const char *require_group = switch_channel_get_variable(channel, "eavesdrop_require_group");
const char *enable_dtmf = switch_channel_get_variable(channel, "eavesdrop_enable_dtmf");
const char *bridge_aleg = switch_channel_get_variable(channel, "eavesdrop_bridge_aleg");
const char *bridge_bleg = switch_channel_get_variable(channel, "eavesdrop_bridge_bleg");
if (enable_dtmf) {
flags = switch_true(enable_dtmf) ? ED_DTMF : ED_NONE;
}
/* Defaults to both, if neither is set */
if (switch_true(bridge_aleg)) {
flags |= ED_BRIDGE_READ;
}
if (switch_true(bridge_bleg)) {
flags |= ED_BRIDGE_WRITE;
}
if (!strcasecmp((char *) data, "all")) {
switch_cache_db_handle_t *db = NULL;
char *errmsg = NULL;