Ticket #1520: freepbx-core-show-version.diff

File freepbx-core-show-version.diff, 0.6 kB (added by julianjm, 5 years ago)
  • functions.inc.php

    old new  
    183183      if ($astman) { 
    184184        //get version 
    185185        $response = $astman->send_request('Command', array('Command'=>'show version')); 
     186        if (preg_match('/No such command/',$response['data'])) { 
     187          $response = $astman->send_request('Command', array('Command'=>'core show version')); 
     188        } 
    186189        $verinfo = $response['data']; 
    187190      } else { 
    188191        // could not connect to asterisk manager