Direct Remote Procedure Calls (RPC)
In addition to the API calls documented above the Mosaic Device Manager Scripting Engine supports direct access to all of the RPC calls defined in Appendix A of the Broadband Forum CPE WAN Management Protocol – TR-069 standard. For the most part you don’t need to use direct RPC calls but, should you encounter an RPC call for which an API function doesn’t exist, direct RPC access to the device is available.
The format of a direct RPC call consists of:
- Arguments are formatted in XML
- The RPC method call is formatted as: var returnVals = acs.rpc.rpcFunctionName(arguments);
See the example below for details:
Direct RPC Call Example - Download Default Configuration
/////////////////////////////////////////////////////////////////////////////////
// Script: Download Default Config
// Description: This script sends a default config file to the CPE. This config
// will be copied into the running settings when the gateway is defaulted
// (6 sec reset)
//
// Instructions:
// - Host the target default config file on a publicly accessible server
// - Modify the <URL> value with the URL of the config
// - Modify the <Username> and <Password> values to the authentication values
// required by the hosting server
//
// Author: Adtran
/////////////////////////////////////////////////////////////////////////////////
var arguments = <Download>
<CommandKey>AnyCommandKey</CommandKey>
<FileType>6 Default ConfigurationFile</FileType>
<URL>http://IP_ADDRESS/PATH_TO_CONFIGS/CONFIG_FILE.conf</URL>
<Username></Username>
<Password></Password>
<DelaySeconds>3</DelaySeconds></Download>;
var response = acs.rpc.Download(arguments);