FS-9955 [mod_kazoo] set profile var when setting channel var
This commit is contained in:
parent
b7578ecd98
commit
606d535478
|
@ -121,6 +121,16 @@ SWITCH_STANDARD_API(uuid_setvar_multi_function) {
|
|||
stream->write_function(stream, "-ERR No variable specified\n");
|
||||
} else {
|
||||
switch_channel_set_variable(channel, var_name, var_value);
|
||||
if (!strcasecmp(var_name, "effective_callee_id_number")) {
|
||||
switch_channel_set_profile_var(channel, "callee_id_number", var_value);
|
||||
} else if (!strcasecmp(var_name, "effective_callee_id_name")) {
|
||||
switch_channel_set_profile_var(channel, "callee_id_name", var_value);
|
||||
} else if (!strcasecmp(var_name, "effective_caller_id_number")) {
|
||||
switch_channel_set_profile_var(channel, "caller_id_number", var_value);
|
||||
} else if (!strcasecmp(var_name, "effective_caller_id_name")) {
|
||||
switch_channel_set_profile_var(channel, "caller_id_name", var_value);
|
||||
};
|
||||
|
||||
y++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,6 +82,17 @@ static void base_set (switch_core_session_t *session, const char *data, switch_s
|
|||
expanded ? expanded : "UNDEF");
|
||||
switch_channel_add_variable_var_check(channel, var, expanded, SWITCH_FALSE, stack);
|
||||
|
||||
if (!strcasecmp(var, "effective_callee_id_number")) {
|
||||
switch_channel_set_profile_var(channel, "callee_id_number", expanded);
|
||||
} else if (!strcasecmp(var, "effective_callee_id_name")) {
|
||||
switch_channel_set_profile_var(channel, "callee_id_name", expanded);
|
||||
} else if (!strcasecmp(var, "effective_caller_id_number")) {
|
||||
switch_channel_set_profile_var(channel, "caller_id_number", expanded);
|
||||
} else if (!strcasecmp(var, "effective_caller_id_name")) {
|
||||
switch_channel_set_profile_var(channel, "caller_id_name", expanded);
|
||||
};
|
||||
|
||||
|
||||
if (expanded && expanded != val) {
|
||||
switch_safe_free(expanded);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue