mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-09 09:17:34 +00:00
Merge pull request #1157 in FS/freeswitch from ~LAZEDO/freeswitch:feature/fs-9955 to master
* commit '606d5354788c2c78e5e87f772e0069cbefe6ba93': FS-9955 [mod_kazoo] set profile var when setting channel var
This commit is contained in:
commit
f16a71e6ff
@ -121,6 +121,16 @@ SWITCH_STANDARD_API(uuid_setvar_multi_function) {
|
|||||||
stream->write_function(stream, "-ERR No variable specified\n");
|
stream->write_function(stream, "-ERR No variable specified\n");
|
||||||
} else {
|
} else {
|
||||||
switch_channel_set_variable(channel, var_name, var_value);
|
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++;
|
y++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -82,6 +82,17 @@ static void base_set (switch_core_session_t *session, const char *data, switch_s
|
|||||||
expanded ? expanded : "UNDEF");
|
expanded ? expanded : "UNDEF");
|
||||||
switch_channel_add_variable_var_check(channel, var, expanded, SWITCH_FALSE, stack);
|
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) {
|
if (expanded && expanded != val) {
|
||||||
switch_safe_free(expanded);
|
switch_safe_free(expanded);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user