Hi,

I'm trying to set up a provision script to run only on bootstrap. This works 
fine, if there is no entry for the in the genie DB.
How-ever, the second time we receive a bootstrap for the same device, the 
provision script runs, but genie does not set any device parameters. I presume 
this is because the values in the DB are the same as the values I want to set.

So I tried adding a clear("InternetGatewayDevice", Date.now()); statement as 
per the documentation. The next time we receive
a bootstrap, I get an error..
Channel has faulted; channel="default" retries=0 
faultCode="script.ReferenceError" faultMessage="maxRevision is not defined"
And subsequent bootstraps the provision does not run at all

My provision script looks like this;
let serial = declare("InternetGatewayDevice.DeviceInfo.SerialNumber", {value: 
1});
log("provision with "+serial.value[0]);
let resp = ext("testext", "getSIP", serial.value[0]);
log("provision back from extension with "+resp.username);
clear("InternetGatewayDevice", Date.now());
declare("InternetGatewayDevice.ManagementServer.Username", null,
  {value: resp.username});
declare("InternetGatewayDevice.ManagementServer.Password", null,
  {value: resp.password});
declare("InternetGatewayDevice.ManagementServer.PeriodicInformEnable", null,
  {value: true});
declare("InternetGatewayDevice.ManagementServer.PeriodicInformInterval", null,
  {value: 300});

Marc


This communication, including any attachments, is confidential. If you are not 
the intended recipient, you should not read it - please contact me immediately, 
destroy it, and do not copy or use any part of this communication or disclose 
anything about it. Thank you. Please note that this communication does not 
designate an information system for the purposes of the Electronic Transactions 
Act 2002.

_______________________________________________
Users mailing list
[email protected]
http://lists.genieacs.com/mailman/listinfo/users

Reply via email to