mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-26 19:57:42 +00:00
fix origination_privacy var
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12603 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
c80fd5efc4
commit
8b6aeebdbc
@ -1305,6 +1305,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
|||||||
char *vdata;
|
char *vdata;
|
||||||
end = NULL;
|
end = NULL;
|
||||||
chan_type = peer_names[i];
|
chan_type = peer_names[i];
|
||||||
|
const char *privacy_str = NULL;
|
||||||
|
|
||||||
while (chan_type && *chan_type && *chan_type == ' ') {
|
while (chan_type && *chan_type && *chan_type == ' ') {
|
||||||
chan_type++;
|
chan_type++;
|
||||||
@ -1433,26 +1434,26 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
|||||||
strncpy(tmp, var_begin, strlen(var_begin));
|
strncpy(tmp, var_begin, strlen(var_begin));
|
||||||
}
|
}
|
||||||
|
|
||||||
new_profile->flags = SWITCH_CPF_NONE;
|
|
||||||
|
|
||||||
if (switch_stristr("screen", tmp)) {
|
|
||||||
switch_set_flag(new_profile, SWITCH_CPF_SCREEN);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (switch_stristr("hide_name", tmp)) {
|
|
||||||
switch_set_flag(new_profile, SWITCH_CPF_HIDE_NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (switch_stristr("hide_number", tmp)) {
|
|
||||||
switch_set_flag(new_profile, SWITCH_CPF_HIDE_NUMBER);
|
|
||||||
}
|
|
||||||
|
|
||||||
new_profile->caller_id_name = switch_core_strdup(new_profile->pool, tmp);
|
|
||||||
switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "origination_privacy", tmp);
|
switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "origination_privacy", tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "originate_early_media", oglobals.early_ok ? "true" : "false");
|
switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "originate_early_media", oglobals.early_ok ? "true" : "false");
|
||||||
|
|
||||||
|
if ((privacy_str = switch_event_get_header(var_event, "origination_privacy"))) {
|
||||||
|
new_profile->flags = SWITCH_CPF_NONE;
|
||||||
|
|
||||||
|
if (switch_stristr("screen", privacy_str)) {
|
||||||
|
switch_set_flag(new_profile, SWITCH_CPF_SCREEN);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (switch_stristr("hide_name", privacy_str)) {
|
||||||
|
switch_set_flag(new_profile, SWITCH_CPF_HIDE_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (switch_stristr("hide_number", privacy_str)) {
|
||||||
|
switch_set_flag(new_profile, SWITCH_CPF_HIDE_NUMBER);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ((reason = switch_core_session_outgoing_channel(oglobals.session, var_event, chan_type,
|
if ((reason = switch_core_session_outgoing_channel(oglobals.session, var_event, chan_type,
|
||||||
new_profile, &new_session, &pool, myflags)) != SWITCH_CAUSE_SUCCESS) {
|
new_profile, &new_session, &pool, myflags)) != SWITCH_CAUSE_SUCCESS) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user