From 0feebeb8a5d60f952035f8350cf695bc01aadad5 Mon Sep 17 00:00:00 2001 From: Andreas Granig Date: Fri, 18 Oct 2013 17:58:25 +0200 Subject: [PATCH] MT#4533 Don't transcode MOH files for PBX. --- lib/NGCP/Panel/Controller/Sound.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/NGCP/Panel/Controller/Sound.pm b/lib/NGCP/Panel/Controller/Sound.pm index 93350b9120..aa1029040b 100644 --- a/lib/NGCP/Panel/Controller/Sound.pm +++ b/lib/NGCP/Panel/Controller/Sound.pm @@ -299,7 +299,7 @@ sub handles_list :Chained('base') :PathPart('handles') :CaptureArgs(0) { }); if($c->stash->{set_result}->contract_id) { - $handles_rs = $handles_rs->search({ 'groups.name' => { '=' => 'pbx' } }); + $handles_rs = $handles_rs->search({ 'groups.name' => { '-in' => ['pbx', 'music_on_hold'] } }); } else { $handles_rs = $handles_rs->search({ 'groups.name' => { '!=' => 'pbx' } }); } @@ -404,7 +404,7 @@ sub handles_edit :Chained('handles_base') :PathPart('edit') { } } - if ($file_result->handle->name eq 'music_on_hold') { + if ($file_result->handle->name eq 'music_on_hold' && !$file_result->set->contract_id) { $target_codec = 'PCMA'; $filename =~ s/\.[^.]+$/.pcma/; }