cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
Please be advised, the GuideMe Wizard is no longer available on the Small Business Support Community. For search capability please use the community search field to find content related to Cisco Small Business documents, videos, and discussions.

Analog and ISDN Lines Monitoring.zip

1662
Views
0
Helpful
4
Comments

Analog and ISDN lines monitoring

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

Comments
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?

Cisco Employee

Hi Terry;

Let me check, will get back to you.

Regards
Alberto

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

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?