From: Sven Schöling Date: Wed, 28 Sep 2016 16:12:46 +0000 (+0200) Subject: CTI: wenn kein dial_command vorhanden callto: links rendern X-Git-Tag: release-3.5.4~1808 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=cfb460aac;p=kivitendo-erp.git CTI: wenn kein dial_command vorhanden callto: links rendern --- diff --git a/SL/CTI.pm b/SL/CTI.pm index 3bc13860e..6989e7ebd 100644 --- a/SL/CTI.pm +++ b/SL/CTI.pm @@ -30,7 +30,13 @@ sub call { sub call_link { my ($class, %params) = @_; - return "controller.pl?action=CTI/call&number=" . uri_encode($class->sanitize_number(number => $params{number})) . ($params{internal} ? '&internal=1' : ''); + my $config = $::lx_office_conf{cti} || {}; + + if ($config->{dial_command}) { + return "controller.pl?action=CTI/call&number=" . uri_encode($class->sanitize_number(number => $params{number})) . ($params{internal} ? '&internal=1' : ''); + } else { + return 'callto://' . uri_encode($class->sanitize_number(number => $params{number})); + } } sub sanitize_number {