cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2335
Views
0
Helpful
4
Comments
Alberto Montilla
Cisco Employee
Cisco Employee

Analog and ISDN lines monitoring

This application allows monitoring of analog and ISDN lines (DAHDI) in  Asterisk

Comments
terrywongkl
Community Member

installed in 2 centos 5 box to test (elastix based asterisk).

in browser only shows image with dahdi channels in red, no status monitored. the clock is running.

apache log file show the followong error,

PHP Notice:  Undefined variable: chon in /var/www/html/monitor_dahdi.php on line 116

any suggestion?

Alberto Montilla
Cisco Employee
Cisco Employee

Hi Terry;

Let me check, will get back to you.

Regards
Alberto

Alberto Montilla
Cisco Employee
Cisco Employee

Here is the suggestion from the expert:

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");

   $chon=array();

    for ($t=0; $t<count($totalChann); $t++){

list($chan)=explode(" ",$totalChann[$t]);

list($chan)=explode("-",$chan);

if (strpos($chan,strtoupper($tech)) !== false){

    $chon[]=$chan;

}

    }

Regards;
Alberto

terrywongkl
Community Member

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: