Skip to content

Loading…

KAZOO-661: correct continue to conditionally import hold_music as the ramificati... #13

Merged
merged 1 commit into from

2 participants

@k-anderson
2600hz Kazoo and blue.box member

...ons of not doing so are unclear

@macpie macpie merged commit 8c32bd1 into master
@macpie
2600hz Kazoo and blue.box member

Bad karl Bad !!!
Please fix all the warnings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 3, 2013
  1. @k-anderson

    KAZOO-661: continue to conditionally import hold_music as the ramific…

    k-anderson committed
    …ations of not doing so are unclear
This page is out of date. Refresh to see the latest.
Showing with 10 additions and 10 deletions.
  1. +10 −10 ecallmgr/src/ecallmgr_call_command.erl
View
20 ecallmgr/src/ecallmgr_call_command.erl
@@ -675,15 +675,7 @@ bridge_handle_ringback(Node, UUID, JObj) ->
case wh_json:get_value(<<"Ringback">>, JObj) of
'undefined' ->
case wh_json:get_value([<<"Custom-Channel-Vars">>, <<"Ringback">>], JObj) of
- 'undefined' ->
- case ecallmgr_fs_channel:import_moh(UUID) of
- 'true' ->
- [{"application", "export hold_music=${hold_music}"}
- ,{"application", "set import=hold_music"}
- |DP
- ];
- 'false' -> DP
- end;
+ 'undefined' -> 'ok';
Media ->
Stream = ecallmgr_util:media_path(Media, extant, UUID, JObj),
lager:debug("bridge has custom ringback in channel vars: ~s", [Stream]),
@@ -712,7 +704,15 @@ bridge_handle_hold_media(DP, Node, UUID, JObj) ->
case wh_json:get_value(<<"Hold-Media">>, JObj) of
'undefined' ->
case wh_json:get_value([<<"Custom-Channel-Vars">>, <<"Hold-Media">>], JObj) of
- 'undefined' -> DP;
+ 'undefined' ->
+ case ecallmgr_fs_channel:import_moh(UUID) of
+ 'true' ->
+ [{"application", "export hold_music=${hold_music}"}
+ ,{"application", "set import=hold_music"}
+ |DP
+ ];
+ 'false' -> DP
+ end;
Media ->
Stream = ecallmgr_util:media_path(Media, extant, UUID, JObj),
lager:debug("bridge has custom music-on-hold in channel vars: ~s", [Stream]),
Something went wrong with that request. Please try again.