blacksenator / fbcallrouter

Spamfilter for FRITZ!Box listen to call monitor as background service
MIT License
32 stars 4 forks source link

Beim Testrun einen Fehler erkannt #11

Closed binderth closed 1 year ago

binderth commented 1 year ago

Erstmal danke für das tolle Tool - verspricht dem Telefonterror ein Ende setzen zu können. Ich habe es nun installieren können und ich kann auch im "normalen" Lauf bei eingehenden Telefonaten (habe erstmal nur mein Handy zum testen) sehen, dass er die Whitelist meines Handys erkennt oder bei Rufunterdrücken CLIR erkennt.

Ich wollte dann testen ausprobieren run fbcallrouter run -t

dabei kommt dann dieses in der Konsole (läuft auf einem PHP8-cli docker):

root@PHP8-Cli:/home/fbcallrouter# php fbcallrouter run -t                                                                    

Deprecated: Return type of Symfony\Component\Console\Helper\HelperSet::getIterator() should either be compatible with Iterato
rAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the 
notice in /home/fbcallrouter/vendor/symfony/console/Helper/HelperSet.php on line 104                                         
Starting FRITZ!Box call router...                                                                                            
On guard...                                                                                                                  
Running test case 1 of 5                                                                                                     

Warning: Array to string conversion in /home/fbcallrouter/src/functions.php on line 94                                       

Warning: Undefined variable $Array in /home/fbcallrouter/src/functions.php on line 94                                        

Fatal error: Uncaught TypeError: blacksenator\callrouter\dialercheck::proofRating(): Argument #1 ($rating) must be of type ar
ray, null given, called in /home/fbcallrouter/src/functions.php on line 94 and defined in /home/fbcallrouter/src/callrouter/d
ialercheck.php:166                                                                                                           
Stack trace:                                                                                                                 
#0 /home/fbcallrouter/src/functions.php(94): blacksenator\callrouter\dialercheck->proofRating(NULL)                          
#1 /home/fbcallrouter/src/RunCommand.php(32): blacksenator\callRouter(Array, Array)                                          
#2 /home/fbcallrouter/vendor/symfony/console/Command/Command.php(255): blacksenator\RunCommand->execute(Object(Symfony\Compon
ent\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))                                        
#3 /home/fbcallrouter/vendor/symfony/console/Application.php(992): Symfony\Component\Console\Command\Command->run(Object(Symf
ony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))                              
#4 /home/fbcallrouter/vendor/symfony/console/Application.php(255): Symfony\Component\Console\Application->doRunCommand(Object
(blacksenator\RunCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\Console
Output))                                                                                                                     
#5 /home/fbcallrouter/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfon
y\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))                                
#6 /home/fbcallrouter/fbcallrouter(16): Symfony\Component\Console\Application->run()                                         
#7 {main}                                                                                                                    
  thrown in /home/fbcallrouter/src/callrouter/dialercheck.php on line 166                                                                                                     

meine config.php ist noch kaum angepasst, habe dies hier:

<?php

$config = [
    'fritzbox' => [
        'url'      => 'fritz.box',          // your Fritz!Box IP
        'user'     => 'FBCallMonitor',           // your Fritz!Box user
        'password' => '****',         // your Fritz!Box user password
    ],
    'phonebook' => [
        'whitelist' => [0], // phonebooks to check against if this number is already known (first = 0!)
        'blacklist' => 1,   // phonebook in which the spam number should be recorded
        'newlist'   => 2,   // optional: phonebook in which the reverse searchable entries should be recorded
        'refresh'   => 1,   // after how many days the whitelist should be read again
    ],
    'contact' => [
        'caller'    => 'autom. gesperrt',   // alias for the new unknown caller
        'timestamp' => true,    // adding timestamp to the caller: "[caller] ([timestamp])"
        'type'      => 'other',     // type of phone line (home, work, mobil, fax etc.); 'other' = 'sonstige'
    ],
    'filter' => [
        'blockForeign' => false, // block unknown foreign numbers
        'score'        => 6,    // 5 = neutral, increase the value to be less sensitive (max. 9)
        'comments'     => 3,    // decrease the value to be less sensitive (min 3)
    ],
    'logging' => [
        'log'     => true,
        'logPath' => '',    // were callrouter_logging.txt schould be saved (default value is = './')
    ],
    'test' => [                 // if program is started with the -t option...
        'numbers' => [          // ...the numbers are injected into the following calls
            '03681443300750',   // tellows score > 5, comments > 3
            '0207565747377',    // not existing NDC/STD (OKNz)
            '0618107162530',    // valid NDC/STD, but invalid subscriber number
            '004433456778',     // foreign number
            '',                 // unknown caler (uses CLIR)
        ],
    ],
];

Hab ich was übersehen?