Connect. Communicate. Collaborate. Securely.

Home » Kerio User Forums » Kerio Operator » Custom provisioning modules problem (Custom provisioning modules from example - does it work in the current version of Operator?)
  •  
Tomas

Messages: 7
Karma: 0
Send a private message to this user
Hi
I downloaded your sample of provisioning modules from here h**p://cdn.kerio.com/dwn/operator/operator-2.5.2-6404/kerio- operator-provisioning-docs-2.5.2-6404.zip

I've simply inserted "example-2.zip" module into Kerio Operator 2.5.2 build 6404
I didn't touch anything in the zip file so access rights etc should be correct.

But unfortunately every time I look at h**p://operator_IP/Cisco/SPA504G/112233445566.cfg or h**ps://operator_IP/Cisco/SPA504G/112233445566.cfg
I get 404 error.

If I try FTP I get error 500.
ftp> get Cisco/SPA504G/112233445566.cfg
200 Operation successful
550 Error
ftp>

Is there some step I'm overlooking? I tried to disable official Cisco Linksys SPA and Cisco 79xx modules but the result hasn't changed.

In Error log I see
[10/Jan/2017 13:34:40] prov-generate[9152][prov-generate:158:]: exited with status 255
error.

I see the module in Kerio's directory
root@Operator:/var/lib/operator/provisioning/modules/1005# ls -lh
total 20K
drwxr-xr-x 2 root root 4.0K Jan 10 13:22 dialplans
-rw-r--r-- 1 root root 1.8K Jan 10 13:22 info
-rw-r--r-- 1 root root 397 Jan 10 13:22 phone_types
drwxr-xr-x 2 root root 4.0K Jan 10 13:22 providers
drwxr-xr-x 2 root root 4.0K Jan 10 13:22 templates

What can I do?
Alternatively what I want to do is to make a provisioning module for Panasonic SIP phones. The template for Panasonic is extremely easy and can be downloaded from Panasonic web pages. Is Kerio planning to add Panasonic to the list of phones supported for provisioning?

(sorry I had to use hxxp instead of htttp because I'm not allowed to post links)
  •  
Filip Jenicek (Kerio)

Messages: 1094
Karma: 80
Send a private message to this user
Your FTP command is probably missing the root slash. Try "get /Cisco/SPA...."

I just tried the example-5.zip in the same Operator version. I disabled the built-in spa template and I was able to download the config file using all three commands:
curl tftp://192.168.12.92/Cisco/SPA504G/001122334455.cfg
curl ftp://192.168.12.92/Cisco/SPA504G/001122334455.cfg
curl http://192.168.12.92/Cisco/SPA504G/001122334455.cfg

(https is not supported)

Please enable provisioning debug logs and try to download the file again. Once done, generate a supportinfo file (link at the System Health screen) and send it to me <fjenicek<_at_>kerio.com> for analysis.


We currently don't plan to add support for Panasonic phones, feel free to use uservoice to vote for them.

Filip
  •  
Tomas

Messages: 7
Karma: 0
Send a private message to this user
Thank you for your suggestion with the debug log.

{provisioning} prov-generate[18206]: PHP Parse error: syntax error, unexpected '}' in /var/lib/operator/provisioning/modules/1005/providers/spa.ph p on line 37

There's an error in your examples.
'}' character at line 38 should be deleted.

The correct version of the code of spa.php is here:
<?php
/**
 *  This is the example SPA provider, version 1.
 */

/**
 * Convert the UTC offset in seconds to a string that the phone will understand.
 *
 * Supported values are:
 *   GMT-12:00, GMT-11:00, ..., GMT, GMT+01:00, GMT+02:00, ..., GMT+13:00
 */
function spaTimezone($offset) {
	if ($offset === 0) {
		return "GMT";
	}

	$offset = intval($offset / 60);
	$offsetH = intval($offset / 60);
	$offsetM = abs($offset) % 60;

	return sprintf("GMT%+03d:%02d", $offsetH, $offsetM);
}

$model = null;
$matches = array();

// Determine whether we are interested in the request

if (preg_match('~^/Cisco/SPA3[0-9A-Z_-]+/([0-9a-f]{12})\\.cfg$~i', $PATH, $matches)) {
	$model = 'spa3xx';
	$mac = normalizeMac($matches[1]);
}
else if (preg_match('~^/Cisco/SPA5[0-9A-Z_-]+/([0-9a-f]{12})\\.cfg$~i', $PATH, $matches)) {
	$model = 'spa5xx';
	$mac = normalizeMac($matches[1]);
}
} else {
	// We don't know this file; let other modules handle it.
	passNext();
}

// v--- This variable will be used later in the template.
$timezoneString = spaTimezone($TIMEZONE_OFFSET);
  •  
Filip Jenicek (Kerio)

Messages: 1094
Karma: 80
Send a private message to this user
I see, thank you for finding the mistake. I have always tried and tested the final example-5, which is fine.
Previous Topic: Database Error
Next Topic: Kerio Softphone app & Call Queues
Goto Forum:
  


Disclaimer:
Kerio discussion forums are intended for open communication between forum members and may contain information and material posted by members which may be useful in learning about Kerio products. The discussion forums are not intended to provide technical support for any specific product. Any information implied or expressed in the discussion forums is that of the posting member. Kerio is in no way responsible for the information posted in the forums, or its accuracy. Kerio employees may participate in the discussions, but their postings do not represent an offical position of the company on any issues raised or discussed. Kerio reserves the right to monitor and maintain the forums to promote free and accurate exchange of information.

Current Time: Sat Mar 25 14:27:11 CET 2017

Total time taken to generate the page: 0.00794 seconds
.:: Contact :: Home ::.
Powered by: FUDforum 3.0.4.