コード例 #1
0
 }
 //Tell the system who we are and were to find the data.
 $http_provisioner->provisioner_libary->root_dir = PHONE_MODULES_PATH;
 $http_provisioner->provisioner_libary->engine = 'asterisk';
 $http_provisioner->provisioner_libary->engine_location = $endpoint->global_cfg['asterisk_location'];
 $http_provisioner->provisioner_libary->system = 'unix';
 //have to because of versions less than php5.3
 $http_provisioner->provisioner_libary->brand_name = $phone_info['directory'];
 $http_provisioner->provisioner_libary->family_line = $phone_info['cfg_dir'];
 //Mac Address
 $http_provisioner->provisioner_libary->mac = $phone_info['mac'];
 //Phone Model (Please reference family_data.xml in the family directory for a list of recognized models)
 //This has to match word for word. I really need to fix this....
 $http_provisioner->provisioner_libary->model = $phone_info['model'];
 //Timezone
 $timezone_array = $endpoint->timezone_array();
 $tz = explode(".", $settings['tz']);
 $tz_key = $tz[0];
 $tz_subkey = $tz[1];
 $http_provisioner->provisioner_libary->timezone = $timezone_array[$tz_key]['offset'];
 //Network Time Server
 $http_provisioner->provisioner_libary->ntp = $settings['ntp'];
 //Server IP
 $http_provisioner->provisioner_libary->server[1]['ip'] = $settings['srvip'];
 $http_provisioner->provisioner_libary->server[1]['port'] = 5060;
 $temp = "";
 $template_data = unserialize($phone_info['template_data']);
 $global_user_cfg_data = unserialize($phone_info['global_user_cfg_data']);
 if ($phone_info['template_id'] > 0) {
     $global_custom_cfg_data = unserialize($phone_info['template_data_info']['global_custom_cfg_data']);
     //Provide alternate Configuration file instead of the one from the hard drive