From cfb460aac1ea0c6bf4eb67748a661696d225fcf0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Wed, 28 Sep 2016 18:12:46 +0200 Subject: [PATCH] CTI: wenn kein dial_command vorhanden callto: links rendern --- SL/CTI.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 { -- 2.20.1