mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 03:06:37 +00:00
96_SIP : add support for Text2Speech (Forum #60411)
git-svn-id: https://svn.fhem.de/fhem/trunk@13695 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
1262f26d08
commit
469c27bced
@ -140,19 +140,20 @@ sub SIP_Attr (@)
|
||||
|
||||
my ($cmd, $name, $attrName, $attrVal) = @_;
|
||||
my $hash = $defs{$name};
|
||||
#Log3 $name,5,"$name , SIP_Attr : $cmd, $attrName, $attrVal";
|
||||
|
||||
if ($cmd eq "set")
|
||||
{
|
||||
if (substr($attrName ,0.4) eq "sip_")
|
||||
if (substr($attrName ,0,4) eq "sip_")
|
||||
{
|
||||
$_[3] = $attrVal;
|
||||
$hash->{".reset"} = 1 if ($hash->{LPID} && ($attrName ne "sip_audiofile_call") && ($attrName ne "sip_dtmf_send"));
|
||||
$hash->{".reset"} = 1 if defined($hash->{LPID});
|
||||
}
|
||||
elsif (($attrName eq "disable") && ($attrVal == 1))
|
||||
{
|
||||
readingsSingleUpdate($hash,"state","disabled",1);
|
||||
$_[3] = $attrVal;
|
||||
$hash->{".reset"} = 1 if $hash->{LPID};
|
||||
$hash->{".reset"} = 1 if defined($hash->{LPID});
|
||||
}
|
||||
elsif ($attrName eq "audio_converter")
|
||||
{
|
||||
@ -169,10 +170,10 @@ sub SIP_Attr (@)
|
||||
}
|
||||
elsif ($cmd eq "del")
|
||||
{
|
||||
if (substr($attrName,0.4) eq "sip_")
|
||||
if (substr($attrName,0,4) eq "sip_")
|
||||
{
|
||||
$_[3] = $attrVal;
|
||||
$hash->{".reset"} = 1 if ($hash->{LPID} && ($attrName ne "sip_audiofile_call") && ($attrName ne "sip_dtmf_send"));
|
||||
$hash->{".reset"} = 1 if defined($hash->{LPID});
|
||||
}
|
||||
elsif ($attrName eq "audio_converter")
|
||||
{
|
||||
@ -187,7 +188,11 @@ sub SIP_Attr (@)
|
||||
|
||||
}
|
||||
|
||||
SIP_updateConfig($hash) if ($hash->{".reset"});
|
||||
if ($hash->{".reset"})
|
||||
{
|
||||
Log3 $name,5,"$name , SIP_Attr : reset";
|
||||
SIP_updateConfig($hash);
|
||||
}
|
||||
return undef;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user