Skip to content

Commit

Permalink
KAZOO-661: continue to conditionally import hold_music as the ramific…
Browse files Browse the repository at this point in the history
…ations of not doing so are unclear
  • Loading branch information
k-anderson authored and Peter Defebvre committed Apr 5, 2013
1 parent d6f33c8 commit c9769de
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions ecallmgr/src/ecallmgr_call_command.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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]),
Expand Down Expand Up @@ -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]),
Expand Down

0 comments on commit c9769de

Please sign in to comment.