OSS Endpoint Manager and Grandstream

Hello,

I thought that i try the OSS version of the Endpoint Manager. We have Grandstream GXP 2130 phones in our office and the Installation as well as downloading of the product / firmware appears to have worked smoothly. I could easily detect all the Phones and add them to the device list. However when i tried to reboot one or more phones for testing purposes, it did not work. Instead i got the following error.

preg_match() expects parameter 2 to be string, array given

            }
        }
    }
 
    function reboot() {
        if (($this->engine == "asterisk") AND ($this->system == "unix")) {
            exec($this->engine_location . " -rx 'sip show peers like " . $this->settings['line'][0]['username'] . "'", $output);
            if (preg_match("/\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b/", $output, $matches)) {
                $ip = $matches[0];
                $pass = (isset($this->options['admin_pass']) ? $this->options['admin_pass'] : 'admin');

Is that something others have encountered too?

Is this something grandstream specific or does this happen to more phones?

Thank you for your help and sorry for the bad english

Yes Im am having the same error using Grandstream GXP2100
Whoops\Exception\ErrorException
/var/www/html/admin/modules/_ep_phone_modules/endpoint/grandstream/gxphd/phone.php70

/var/www/html/admin/modules/_ep_phone_modules/endpoint/grandstream/gxphd/phone.php
}
}

    if (isset($this->settings['loops']['ext2'])) {
        foreach ($this->settings['loops']['ext2'] as $key => $data) {
            if ($this->settings['loops']['ext2'][$key]['mode'] == '999') {
                $this->settings['loops']['ext2'][$key]['account'] = '';
                $this->settings['loops']['ext2'][$key]['name'] = '';
                $this->settings['loops']['ext2'][$key]['uid'] = '';
                $this->settings['loops']['ext2'][$key]['mode'] = '';
            }
            $this->settings['loops']['ext2'][$key]['pnum'] = (strlen($key) == '1') ? '0' . $key : $key;
        }
    }
}

function reboot() {
    if (($this->engine == "asterisk") AND ($this->system == "unix")) {
        exec($this->engine_location . " -rx 'sip show peers like " . $this->settings['line'][0]['username'] . "'", $output);

if (preg_match("/\b\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}\b/", $output, $matches)) {

$ip = $matches[0];
$pass = (isset($this->options[‘admin_pass’]) ? $this->options[‘admin_pass’] : ‘admin’);

            if (function_exists('curl_init')) {
                $ckfile = tempnam($this->sys_get_temp_dir(), "GSCURLCOOKIE");
                $ch = curl_init('http://' . $ip . '/cgi-bin/dologin');
                curl_setopt($ch, CURLOPT_COOKIEJAR, $ckfile);
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                curl_setopt($ch, CURLOPT_POST, true);

Current later versions of the OSS EPM are pretty broken. I suggest you read all the other threads about it.