add temp_hold_music var that is only valid until you transfer the call and finishing touches on bind meta to A-D

This commit is contained in:
Anthony Minessale
2011-01-05 18:58:56 -06:00
parent 27869d7a26
commit b262f44ce2
11 changed files with 21 additions and 18 deletions
@@ -2531,7 +2531,7 @@ SWITCH_STANDARD_APP(audio_bridge_function)
camp_data = (char *) data;
}
if (!(moh = switch_channel_get_variable(caller_channel, SWITCH_HOLD_MUSIC_VARIABLE))) {
if (!(moh = switch_channel_get_hold_music(caller_channel))) {
moh = switch_channel_get_variable(caller_channel, "campon_hold_music");
}
+2 -2
View File
@@ -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, SWITCH_HOLD_MUSIC_VARIABLE);
moh_b = switch_channel_get_hold_music(bchan);
}
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, SWITCH_HOLD_MUSIC_VARIABLE);
moh_a = switch_channel_get_hold_music(channel);
}
}
+1 -1
View File
@@ -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, SWITCH_HOLD_MUSIC_VARIABLE);
const char *moh = switch_channel_get_hold_music(channel);
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, SWITCH_HOLD_MUSIC_VARIABLE);
tmp = switch_channel_get_hold_music(channel);
}
if (tmp)
music = tmp;
@@ -2744,7 +2744,7 @@ bool BoardE1::KhompPvtFXS::transfer(std::string & context, bool blind)
callFXS()->_uuid_other_session = getUUID(peer_session);
const char *stream = NULL;
if (!(stream = switch_channel_get_variable(peer_channel, SWITCH_HOLD_MUSIC_VARIABLE)))
if (!(stream = switch_channel_get_hold_music(peer_channel)))
{
stream = "silence";
}
+1 -1
View File
@@ -5560,7 +5560,7 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t
switch_core_event_hook_add_state_change(a_session, xfer_hanguphook);
switch_channel_set_variable(a_channel, "att_xfer_kill_uuid", switch_core_session_get_uuid(b_session));
if ((tmp = switch_channel_get_variable(a_channel, SWITCH_HOLD_MUSIC_VARIABLE))) {
if ((tmp = switch_channel_get_hold_music(a_channel))) {
moh = tmp;
}
+1 -1
View File
@@ -3663,7 +3663,7 @@ void sofia_glue_toggle_hold(private_object_t *tech_pvt, int sendonly)
switch_rtp_set_max_missed_packets(tech_pvt->rtp_session, tech_pvt->max_missed_hold_packets);
}
if (!(stream = switch_channel_get_variable(tech_pvt->channel, SWITCH_HOLD_MUSIC_VARIABLE))) {
if (!(stream = switch_channel_get_hold_music(tech_pvt->channel))) {
stream = tech_pvt->profile->hold_music;
}