This is happening as your php has enabled the strict mode and any message (error or a warning - your case) stops it execution.
PHP Notice: Undefined variable: chon in /var/www/html/monitor_dahdi.php on line 116
A normal user would have the PHP configuration a bit more flexible, ignoring these messages. However, it is good to be strict, so the script can be solved adding the definition of $chon variable.
Existing code:
$totalChann=sendcomando($mng,"core show channels");
for ($t=0; $t<count($totalChann); $t++){
list($chan)=explode(" ",$totalChann[$t]);
list($chan)=explode("-",$chan);
if (strpos($chan,strtoupper($tech)) !== false){
$chon[]=$chan;
}
}
Change it to:
$totalChann=sendcomando($mng,"core show channels");
no more error in apache log file. but still, (i have 2 dahdi fxo), only 2 dahdi channel red icon shown, not monitoring.
i have added a user (web) in /etc/asterisk/manager_additional.conf acccordingly, and is shown in asterisk cli. but when i tried,
sip*CLI> manager show connected
user 'web' never shown. is there anything else i can look into it?
Getting Started
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: