mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
72_FB_CALLMONITOR: create reading "internal_connection" also for unknown connection type values (Forum: #125524)
git-svn-id: https://svn.fhem.de/fhem/trunk@25908 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
3a6f1449a1
commit
befe74cc81
@ -1,5 +1,7 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# 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.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- bugfix: 72_FB_CALLMONITOR: create reading "internal_connection" also
|
||||||
|
for unknown connection type values
|
||||||
- bugfix: 73_GasCalculator: German CommandRef fixed
|
- bugfix: 73_GasCalculator: German CommandRef fixed
|
||||||
- bugfix: 82_LGTV_WebOS: Close socket then catch exception
|
- bugfix: 82_LGTV_WebOS: Close socket then catch exception
|
||||||
- bugfix: 82_LGTV_WebOS: fix crash in filehandle
|
- bugfix: 82_LGTV_WebOS: fix crash in filehandle
|
||||||
|
@ -505,7 +505,7 @@ FB_CALLMONITOR_Read($)
|
|||||||
if($array[1] eq "CALL")
|
if($array[1] eq "CALL")
|
||||||
{
|
{
|
||||||
$hash->{helper}{TEMP}{$array[2]}{external_connection} = $array[6];
|
$hash->{helper}{TEMP}{$array[2]}{external_connection} = $array[6];
|
||||||
$hash->{helper}{TEMP}{$array[2]}{internal_connection} = $connection_type{$array[3]} if(defined($connection_type{$array[3]}));
|
$hash->{helper}{TEMP}{$array[2]}{".internal_connection_id"} = $array[3];
|
||||||
$hash->{helper}{TEMP}{$array[2]}{direction} = "outgoing";
|
$hash->{helper}{TEMP}{$array[2]}{direction} = "outgoing";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -516,10 +516,9 @@ FB_CALLMONITOR_Read($)
|
|||||||
$hash->{helper}{TEMP}{$array[2]}{".deflected"} = FB_CALLMONITOR_checkNumberForDeflection($hash, $external_number);
|
$hash->{helper}{TEMP}{$array[2]}{".deflected"} = FB_CALLMONITOR_checkNumberForDeflection($hash, $external_number);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($array[1] eq "CONNECT" and not exists($hash->{helper}{TEMP}{$array[2]}{internal_connection}))
|
if($array[1] eq "CONNECT" and not exists($hash->{helper}{TEMP}{$array[2]}{".internal_connection_id"}))
|
||||||
{
|
{
|
||||||
$hash->{helper}{TEMP}{$array[2]}{internal_connection} = $connection_type{$array[3]} if(defined($connection_type{$array[3]}));
|
$hash->{helper}{TEMP}{$array[2]}{".internal_connection_id"} = $array[3];
|
||||||
$hash->{helper}{TEMP}{$array[2]}{".internal_connection_id"} = $array[3] if(defined($connection_type{$array[3]}));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($array[1] eq "DISCONNECT")
|
if($array[1] eq "DISCONNECT")
|
||||||
@ -535,6 +534,20 @@ FB_CALLMONITOR_Read($)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($array[1] eq "CONNECT" or $array[1] eq "CALL")
|
||||||
|
{
|
||||||
|
my $connection_id = $hash->{helper}{TEMP}{$array[2]}{".internal_connection_id"};
|
||||||
|
|
||||||
|
if(defined($connection_type{$connection_id})) {
|
||||||
|
$hash->{helper}{TEMP}{$array[2]}{internal_connection} = $connection_type{$connection_id}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$hash->{helper}{TEMP}{$array[2]}{internal_connection} = $connection_id;
|
||||||
|
Log3 $name, 3 , "FB_CALLMONITOR ($name) - internal connection value '".$connection_id."' not known. Please report this value to FHEM community together with a description how exactly you have taken this call (via VoIP/ISDN/FON/DECT/...)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$hash->{helper}{TEMP}{$array[2]}{".last-event"} = $array[1];
|
$hash->{helper}{TEMP}{$array[2]}{".last-event"} = $array[1];
|
||||||
|
|
||||||
# skip readings/event generation if call does not matched a configured internal number filter
|
# skip readings/event generation if call does not matched a configured internal number filter
|
||||||
|
Loading…
Reference in New Issue
Block a user