mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
FB_CALLMONITOR: generate call_id at last as it was before
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@6283 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
74b8225091
commit
33d4509fc8
@ -237,15 +237,7 @@ FB_CALLMONITOR_Read($)
|
||||
if($array[1] eq "CALL" or $array[1] eq "RING")
|
||||
{
|
||||
delete($hash->{helper}{TEMP}{$array[2]}) if(exists($hash->{helper}{TEMP}{$array[2]}));
|
||||
|
||||
if(AttrVal($name, "unique-call-ids", "0") eq "1")
|
||||
{
|
||||
$hash->{helper}{TEMP}{$array[2]}{call_id}= Digest::MD5::md5_hex($data);
|
||||
}
|
||||
else
|
||||
{
|
||||
$hash->{helper}{TEMP}{$array[2]}{call_id} = $array[2];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if($array[1] eq "CALL")
|
||||
@ -296,6 +288,15 @@ FB_CALLMONITOR_Read($)
|
||||
delete($hash->{helper}{TEMP}{$array[2]}) if(exists($hash->{helper}{TEMP}{$array[2]}));
|
||||
}
|
||||
|
||||
if(AttrVal($name, "unique-call-ids", "0") eq "1")
|
||||
{
|
||||
readingsBulkUpdate($hash, "call_id" ,Digest::MD5::md5_hex($data));
|
||||
}
|
||||
else
|
||||
{
|
||||
readingsBulkUpdate($hash, "call_id", $array[2]);
|
||||
}
|
||||
|
||||
readingsEndUpdate($hash, 1);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user