mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 13:12:03 +00:00
add bind meta on A-D and refactor
This commit is contained in:
@@ -389,7 +389,7 @@ SWITCH_STANDARD_APP(dtmf_unbind_function)
|
||||
int kval = 0;
|
||||
|
||||
if (key) {
|
||||
kval = atoi(key);
|
||||
kval = switch_dtmftoi(key);
|
||||
}
|
||||
|
||||
switch_ivr_unbind_dtmf_meta_session(session, kval);
|
||||
@@ -405,7 +405,7 @@ SWITCH_STANDARD_APP(dtmf_bind_function)
|
||||
|
||||
if (!zstr(data) && (lbuf = switch_core_session_strdup(session, data))
|
||||
&& (argc = switch_separate_string(lbuf, ' ', argv, (sizeof(argv) / sizeof(argv[0])))) == 4) {
|
||||
int kval = atoi(argv[0]);
|
||||
int kval = switch_dtmftoi(argv[0]);
|
||||
switch_bind_flag_t bind_flags = 0;
|
||||
|
||||
if (strchr(argv[1], 'a')) {
|
||||
@@ -2531,7 +2531,7 @@ SWITCH_STANDARD_APP(audio_bridge_function)
|
||||
camp_data = (char *) data;
|
||||
}
|
||||
|
||||
if (!(moh = switch_channel_get_variable(caller_channel, "hold_music"))) {
|
||||
if (!(moh = switch_channel_get_variable(caller_channel, SWITCH_HOLD_MUSIC_VARIABLE))) {
|
||||
moh = switch_channel_get_variable(caller_channel, "campon_hold_music");
|
||||
}
|
||||
|
||||
|
||||
@@ -397,12 +397,12 @@ static switch_status_t on_dtmf(switch_core_session_t *session, void *input, swit
|
||||
const char *moh_a = NULL, *moh_b = NULL;
|
||||
|
||||
if (!(moh_b = switch_channel_get_variable(bchan, "fifo_music"))) {
|
||||
moh_b = switch_channel_get_variable(bchan, "hold_music");
|
||||
moh_b = switch_channel_get_variable(bchan, SWITCH_HOLD_MUSIC_VARIABLE);
|
||||
}
|
||||
|
||||
if (!(moh_a = switch_channel_get_variable(channel, "fifo_hold_music"))) {
|
||||
if (!(moh_a = switch_channel_get_variable(channel, "fifo_music"))) {
|
||||
moh_a = switch_channel_get_variable(channel, "hold_music");
|
||||
moh_a = switch_channel_get_variable(channel, SWITCH_HOLD_MUSIC_VARIABLE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ static switch_status_t spy_on_exchange_media(switch_core_session_t *session)
|
||||
static switch_status_t spy_on_park(switch_core_session_t *session)
|
||||
{
|
||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||
const char *moh = switch_channel_get_variable(channel, "hold_music");
|
||||
const char *moh = switch_channel_get_variable(channel, SWITCH_HOLD_MUSIC_VARIABLE);
|
||||
|
||||
while (switch_channel_ready(channel) && switch_channel_get_state(channel) == CS_PARK) {
|
||||
if (moh) {
|
||||
|
||||
@@ -234,7 +234,7 @@ SWITCH_STANDARD_APP(valet_parking_function)
|
||||
}
|
||||
|
||||
if (!(tmp = switch_channel_get_variable(channel, "valet_hold_music"))) {
|
||||
tmp = switch_channel_get_variable(channel, "hold_music");
|
||||
tmp = switch_channel_get_variable(channel, SWITCH_HOLD_MUSIC_VARIABLE);
|
||||
}
|
||||
if (tmp)
|
||||
music = tmp;
|
||||
|
||||
@@ -1512,7 +1512,7 @@ static switch_status_t load_config(int reload_type)
|
||||
hotline = val;
|
||||
} else if (!strcasecmp(var, "dial_regex")) {
|
||||
dial_regex = val;
|
||||
} else if (!strcasecmp(var, "hold_music")) {
|
||||
} else if (!strcasecmp(var, SWITCH_HOLD_MUSIC_VARIABLE)) {
|
||||
hold_music = val;
|
||||
} else if (!strcasecmp(var, "fail_dial_regex")) {
|
||||
fail_dial_regex = val;
|
||||
|
||||
Reference in New Issue
Block a user