a few changes

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11011 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2008-12-31 01:08:51 +00:00
1 parent e8c73cdf2d
commit 2a90a43fd4
8 files changed
+88 -16

No files matched your search

@@ -1790,8 +1790,9 @@ static void conference_loop_output(conference_member_t *member)
const char *toval = switch_channel_get_variable(channel, "conference_auto_outcall_timeout");
const char *flags = switch_channel_get_variable(channel, "conference_auto_outcall_flags");
const char *ann = switch_channel_get_variable(channel, "conference_auto_outcall_announce");
const char *prefix = switch_channel_get_variable(channel, "conference_auto_outcall_prefix");
int to = 60;
if (ann) {
member->conference->special_announce = switch_core_strdup(member->conference->pool, ann);
}
@@ -1806,7 +1807,20 @@ static void conference_loop_output(conference_member_t *member)
}
for (cp = call_list; cp; cp = cp->next) {
conference_outcall_bg(member->conference, NULL, NULL, cp->string, to, switch_str_nil(flags), cid_name, cid_num);
int argc;
char *argv[512] = { 0 };
char *cpstr = strdup(cp->string);
int x = 0;
switch_assert(cpstr);
argc = switch_separate_string(cpstr, ',', argv, (sizeof(argv) / sizeof(argv[0])));
for (x = 0; x < argc; x++) {
char *dial_str = switch_mprintf("%s%s", switch_str_nil(prefix), argv[x]);
switch_assert(dial_str);
conference_outcall_bg(member->conference, NULL, NULL, dial_str, to, switch_str_nil(flags), cid_name, cid_num);
switch_safe_free(dial_str);
}
switch_safe_free(cpstr);
}
}
/* Fair WARNING, If you expect the caller to hear anything or for digit handling to be processed, */
@@ -3881,7 +3895,7 @@ static switch_status_t conference_outcall(conference_obj_t *conference,
goto done;
}
/* add them to the conference */
if (flags && !strcasecmp(flags, "none")) {
if (flags && strcasecmp(flags, "none")) {
switch_snprintf(appdata, sizeof(appdata), "%s+flags{%s}", conference_name, flags);
switch_caller_extension_add_application(peer_session, extension, (char *) global_app_name, appdata);
} else {
@@ -4059,15 +4073,20 @@ static void set_mflags(char *flags, member_flag_t *f)
if (flags) {
if (strstr(flags, "mute")) {
*f &= ~MFLAG_CAN_SPEAK;
} else if (strstr(flags, "deaf")) {
}
if (strstr(flags, "deaf")) {
*f &= ~MFLAG_CAN_HEAR;
} else if (strstr(flags, "waste")) {
}
if (strstr(flags, "waste")) {
*f |= MFLAG_WASTE_BANDWIDTH;
} else if (strstr(flags, "endconf")) {
}
if (strstr(flags, "endconf")) {
*f |= MFLAG_ENDCONF;
}
}
}
static void clear_eflags(char *events, uint32_t *f)
+21 -1
View File
@@ -148,7 +148,21 @@ SWITCH_STANDARD_APP(soft_hold_function)
}
}
#define BIND_SYNTAX "<key> [a|b|ab] [a|b|o|s] <app>"
#define UNBIND_SYNTAX "[<key>]"
SWITCH_STANDARD_APP(dtmf_unbind_function)
{
char *key = (char *) data;
int kval = 0;
if (key) {
kval = atoi(key);
}
switch_ivr_unbind_dtmf_meta_session(session, kval);
}
#define BIND_SYNTAX "<key> [a|b|ab] [a|b|o|s|1] <app>"
SWITCH_STANDARD_APP(dtmf_bind_function)
{
char *argv[4] = { 0 };
@@ -208,6 +222,10 @@ SWITCH_STANDARD_APP(dtmf_bind_function)
}
}
if (strchr(argv[2], '1')) {
bind_flags |= SBF_ONCE;
}
if (switch_ivr_bind_dtmf_meta_session(session, kval, bind_flags, argv[3]) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Bind Error!\n");
}
@@ -2514,6 +2532,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_dptools_load)
SAF_NONE);
SWITCH_ADD_APP(app_interface, "bind_meta_app", "Bind a key to an application", "Bind a key to an application", dtmf_bind_function, BIND_SYNTAX,
SAF_SUPPORT_NOMEDIA);
SWITCH_ADD_APP(app_interface, "unbind_meta_app", "Unbind a key from an application", "Unbind a key from an application", dtmf_unbind_function,
UNBIND_SYNTAX, SAF_SUPPORT_NOMEDIA);
SWITCH_ADD_APP(app_interface, "intercept", "intercept", "intercept", intercept_function, INTERCEPT_SYNTAX, SAF_NONE);
SWITCH_ADD_APP(app_interface, "eavesdrop", "eavesdrop on a uuid", "eavesdrop on a uuid", eavesdrop_function, eavesdrop_SYNTAX, SAF_NONE);
SWITCH_ADD_APP(app_interface, "three_way", "three way call with a uuid", "three way call with a uuid", three_way_function, threeway_SYNTAX, SAF_NONE);
+6
View File
@@ -2316,6 +2316,7 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
private_object_t *tech_pvt = NULL;
switch_channel_t *nchannel;
char *host = NULL, *dest_to = NULL;
const char *hval = NULL;
*new_session = NULL;
@@ -2520,6 +2521,11 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
*new_session = nsession;
cause = SWITCH_CAUSE_SUCCESS;
if ((hval = switch_event_get_header(var_event, "sip_auto_answer")) && switch_true(hval)) {
switch_channel_set_variable_printf(nchannel, "sip_h_Call-Info", "<sip:%s>;answer-after=0", profile->sipip);
switch_channel_set_variable(nchannel, "sip_invite_params", "intercom=true");
}
if (session) {
switch_channel_t *o_channel = switch_core_session_get_channel(session);