Default Gateway: X.X.0.1 – input the default gateway
second, i must do route configuration: add previous section WAN as default route
third voice basic profile configuration
and last step, voip user configuration
i want to do all steps by genieacs, and provision script or every thing else in genieacs
please help me how to do every step, and use crated variable in that step in next steps.
thanks in advance
thank you @Figaro
many question:
what is the mean of “null” in timestamps parameter?
what is the mean of “{path:3}” for values parameter? as i know it shows that we have 3 types of WANConnectionDevice, but why 3 types?
why we check for existing one WANIPConnectionin in 2th declare call? or we create a WANIPConnection here?
what is the meaning of “{path:now}” in 3th declare call?
hi @akcoder
thnk you for your reply, this document if is not ambigious its absoulutly short, stilled, and abstract. without example.
for example as mentioned in documents about “path attribute”:
"This attribute is special in that it’s not a parameter attribute per se, but it refers to the presence of parameters matching the given path. For example, given the following wildcard path:
as I understand from above, “path attribute” is number of parameter names in CPE that conform this path: “InternetGatewayDevice.LANDevice.1.Hosts.Host.*.MACAddress”
for example result of path maybe 0, 1, 2 , 3 , … or any acceptable integer.
now, i cant understand whats the mean of “{path:now}”
“now” in millisecond from 1970
“path” is a short integer
This function is for declaring parameter values to be set, as well as specify constraints on how recent you’d like the parameter value (or other attributes) to have been refreshed from the device. If the given timestamp is lower than the timestamp of the last refresh from the device, then this function will return the last known value. Otherwise, the value will be fetched from the device before being returned to the caller.
I.e., if the path value of the timestamps argument is Date.now() then you are telling GenieACS that you want it to refresh the path. Same goes with the timestamp value of the timestamps argument.
Example, declare('Some.Path", {timestamp: 1}); Tells GenieACS to return the value for that param if present. If the value isn’t present, then GenieACS will refresh it. Why would you not want to always have the “latest” value? Some values do not change. Things like Model, ProductClass, SerialNumber, etc are static values and will never change (provided your CPE vendor isn’t doing really stupid stuff). So there is no reason to have GenieACS pull the latest value from the CPE.
as menstion in document we cant have {timestamp: 1} as second arguman for declare, we can use one attribute(value,writable,object, and path) of second arguman of declare
then as document said we can have “{value:1}” or “{writable:1}” or “{object:1}” or “{path:1}”
its ok?
@akcoder
or in this example:
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.*.Enable”, {path: now, value: now}, {value: false});
i know when this condition “{path: now, value: now}” is true, then declare function set wanipconnection.enable to false or disable it.
but i dont know whats the mean of “{path: now, value: now}”?
i can interpret “{value: now}” as its mean “refresh the value of first arguman from CPE”
but i dont know mean of “{path: now}”
ofcourse now is Date.now()
You absolutely can. I have probably 20-30 declare statements with a timestamp value of 1.
The docs even show you that you can:
// Example: Setting the SSID as the last 6 characters of the serial number
let serial = declare("Device.DeviceInfo.SerialNumber", {value: 1});
declare("Device.LANDevice.1.WLANConfiguration.1.SSID", null, {value: serial.value[0]});
Think about it like this:
declare("Some.Path") will return what ever parameter value exists for that path. If that path doesn’t exist, then GenieACS will refresh the path.
const now = Date.now();
const fiveMinutesAgo = now - (60 * 5 * 1000);
declare("Some.Path", {value: fiveMinutesAgo});
Will return the value at Some.Path. If Some.Path was refreshed within the previous 5 minutes, then the cached value will be returned.
declare("Some.Path.*.*", {path: Date.now()}) will cause GenieACS to refresh the pathsunder Some.Path.*.*
declare("Some.Path", null, {value: 'SomeValue'}) will cause GenieACS to update the param Some.Path
The documentation about object and writable are advanced use cases.
it is answer for “path role” in second arguman
then when we use path in second arguman of declare, its mean we want to refresh all pathes included wildcard and alias in first arguman
thank you @akcoder