diff --git a/fhem/CHANGED b/fhem/CHANGED
index b32114bec..204014238 100644
--- a/fhem/CHANGED
+++ b/fhem/CHANGED
@@ -1,5 +1,8 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it.
+ - feature: FB_CALLLIST: new attribute number-cmd to execute a FHEM command
+ when clicking on a external number within the calllist. Can be any
+ valid FHEM command or Perl code. For details see commandref
- change: 49_SSCAM: a little bit code optimization
- bugfix: 31_MilightDevice: Queue length correction for long transitions
- feature: 31_MilightDevice: Color changes during dim on lower brightness
diff --git a/fhem/FHEM/72_FB_CALLLIST.pm b/fhem/FHEM/72_FB_CALLLIST.pm
index 8381f3c10..c761e8f9c 100755
--- a/fhem/FHEM/72_FB_CALLLIST.pm
+++ b/fhem/FHEM/72_FB_CALLLIST.pm
@@ -31,6 +31,7 @@ use warnings;
use MIME::Base64;
use Data::Dumper;
+use HttpUtils;
sub
FB_CALLLIST_Initialize($)
@@ -57,6 +58,7 @@ FB_CALLLIST_Initialize($)
"answMachine-is-missed-call:0,1 ".
"language:de,en ".
"disable:0,1 ".
+ "number-cmd ".
"disabledForIntervals ".
"do_not_notify:0,1 ".
"no-heading:0,1 ".
@@ -656,6 +658,16 @@ sub FB_CALLLIST_list2html($;$)
{
my $data = \%{$hash->{helper}{DATA}{$index}};
+ my $number = $data->{external_number};
+
+ if(defined(my $cmd = AttrVal($name, "number-cmd", undef)))
+ {
+ $cmd =~ s/\$NUMBER/$number/g;
+
+ $number = ''.$number."";
+ }
+
+
$line = {
index => $index,
line => $count,
@@ -663,7 +675,7 @@ sub FB_CALLLIST_list2html($;$)
state => FB_CALLLIST_returnCallState($hash, $index),
timestamp => strftime(AttrVal($name, "time-format-string", "%a, %d %b %Y %H:%M:%S"), localtime($index)),
name => ($data->{external_name} eq "unknown" ? "-" : $data->{external_name}),
- number => $data->{external_number},
+ number => $number,
external => ($data->{external_connection} ? ((exists($hash->{helper}{EXTERNAL_MAP}) and exists($hash->{helper}{EXTERNAL_MAP}{$data->{external_connection}})) ? $hash->{helper}{EXTERNAL_MAP}{$data->{external_connection}} : $data->{external_connection} ) : "-"),
internal => ((exists($hash->{helper}{INTERNAL_FILTER}) and exists($hash->{helper}{INTERNAL_FILTER}{$data->{internal_number}})) ? $hash->{helper}{INTERNAL_FILTER}{$data->{internal_number}} : $data->{internal_number} ),
connection => ($data->{internal_connection} ? ((exists($hash->{helper}{CONNECTION_MAP}) and exists($hash->{helper}{CONNECTION_MAP}{$data->{internal_connection}})) ? $hash->{helper}{CONNECTION_MAP}{$data->{internal_connection}} : $data->{internal_connection} ) : "-"),
@@ -1194,6 +1206,18 @@ sub FB_CALLLIST_returnTableHeader($)
Defines the language of the table header, some keywords and the timestamp format. You need to have the selected locale installed and available in your operating system.
Possible values: en => English , de => German
Default Value is en (English)
+
$NUMBER
will be replaced with the current external number of each row.
+ set FRITZBOX call $NUMBER
{dialNumber("$NUMBER")}
$NUMBER
wird dabei mit der entsprechenden Rufnummer der jeweiligen Zeile ersetzt.
+ set FRITZBOX call $NUMBER
{dialNumber("$NUMBER")}