michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef _CONFIG_API_H_ michael@0: #define _CONFIG_API_H_ michael@0: michael@0: #include "cc_types.h" michael@0: michael@0: michael@0: /** michael@0: * configFetchReq michael@0: * michael@0: * This function tells the config manager to fetch the CTL file michael@0: * and then fetch the config from the CUCM. It is expected that michael@0: * this will result in processing of michael@0: * the config file after the config managers response is received. michael@0: * michael@0: * The response received for this request is asynchronous and michael@0: * should be handled via event provided by config manager. michael@0: * The CCAPI_Config_reponse api needs to be called for the michael@0: * handling of the response to the fetch request michael@0: * michael@0: */ michael@0: void configFetchReq(int device_handle); michael@0: michael@0: /** michael@0: * configParserError michael@0: * michael@0: * Notify the config manager that the config file has an error michael@0: * and a new config file needs to be downloaded. michael@0: * michael@0: * The error could be XML format error or minimum config not being michael@0: * present in the config file. It is expected that michael@0: * this will result in processing of michael@0: * the config file after the config managers response is received. michael@0: * michael@0: */ michael@0: void configParserError(void); michael@0: michael@0: /** michael@0: * When called this function should register with CUCM without prior device file download. michael@0: */ michael@0: void CCAPI_Start_response(int device_handle, const char *device_name, const char *sipUser, const char *sipPassword, const char *sipDomain); michael@0: michael@0: /** michael@0: * Inform application that pSipcc stack has receive a NOTIFY message of event michael@0: * type "service-control" and action=apply-config. The arguments passed to this michael@0: * function contains the parameter values received in the message. michael@0: * michael@0: * @param config_version [in] latest version stamp of phone configuration. michael@0: * @param dial_plan_version [in] latest version stamp of the dial plan. michael@0: * @param fcp_version [in] latest version stamp of feature policy control. michael@0: * @param cucm_result [in] action taken by the cucm for the changes applied by the michael@0: * user to the phone configuration. cucm result could be michael@0: * @li "no_change" - the new phone configuration changes do not impact Unified CM, michael@0: * @li "config_applied" - The Unified CM Administration applied the michael@0: * configuration changes dynamically without requiring phone to re-register, michael@0: * @li "reregister_needed" - The Unified CM Administration applied the michael@0: * configuration changes and required the phone to re-register to make them michael@0: * effective. michael@0: * @param load_id [in] - firmware image name that phone should be running with michael@0: * @param inactive_load_id [in] - firmware image name that phone should be in inactive partition. michael@0: * @param load_server [in] - address of load server to download the firmware michael@0: * image load_id. michael@0: * @param log_server [in] - log server address where error report need to be michael@0: * sent. Error report, for example, could be related to image download failure michael@0: * or phone configuration file download failure. michael@0: * @param ppid [in] whether peer to peer upgrade is available michael@0: * @return void michael@0: */ michael@0: void configApplyConfigNotify(cc_string_t config_version, michael@0: cc_string_t dial_plan_version, michael@0: cc_string_t fcp_version, michael@0: cc_string_t cucm_result, michael@0: cc_string_t load_id, michael@0: cc_string_t inactive_load_id, michael@0: cc_string_t load_server, michael@0: cc_string_t log_server, michael@0: cc_boolean ppid); michael@0: michael@0: /** michael@0: * dialPlanFetchReq michael@0: * michael@0: * This function tells the get file request service to fetch the latest dial michael@0: * plan from the CUCM. michael@0: * michael@0: * @param device_handle [in] handle of the device, the response is for michael@0: * @param dialPlanFileName [in] the name of dialplan file to retrieve michael@0: * @return cc_boolean indicating success/failure michael@0: * michael@0: */ michael@0: cc_boolean dialPlanFetchReq(int device_handle, char* dialPlanFileName); michael@0: michael@0: /** michael@0: * fcpFetchReq michael@0: * michael@0: * This function tells the get file request service to fetch the latest fcp michael@0: * file from the CUCM. michael@0: * michael@0: * @param device_handle [in] handle of the device, the response is for michael@0: * @param dialPlanFileName [in] the name of fcp file to retrieve michael@0: * @return cc_boolean indicating success/failure michael@0: * michael@0: */ michael@0: cc_boolean fcpFetchReq(int device_handle, char* fcpFileName); michael@0: michael@0: michael@0: cc_boolean CCAPI_Config_set_server_address(const char *ip_address); michael@0: cc_boolean CCAPI_Config_set_transport_udp(const cc_boolean is_udp); michael@0: cc_boolean CCAPI_Config_set_local_voip_port(const int port); michael@0: cc_boolean CCAPI_Config_set_remote_voip_port(const int port); michael@0: int CCAPI_Config_get_local_voip_port(); michael@0: int CCAPI_Config_get_remote_voip_port(); michael@0: const char* CCAPI_Config_get_version(); michael@0: cc_boolean CCAPI_Config_set_p2p_mode(const cc_boolean is_p2p); michael@0: cc_boolean CCAPI_Config_set_sdp_mode(const cc_boolean is_sdp); michael@0: cc_boolean CCAPI_Config_set_avp_mode(const cc_boolean is_rtpsavpf); michael@0: michael@0: #endif /* _CONFIG_API_H_ */