mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-16 22:38:38 +00:00
add sipcc to tree for sdp parser
This commit is contained in:
1 parent
36f89c8b7c
commit
0f00946782
369 files changed
+183596
No files matched your search
@@ -0,0 +1,44 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _CC_BLF_H_
|
||||
#define _CC_BLF_H_
|
||||
#include "cc_constants.h"
|
||||
|
||||
/**
|
||||
* Initialize the BLF stack
|
||||
* @return
|
||||
*/
|
||||
int CC_BLF_init();
|
||||
/**
|
||||
* Start BLF subscription
|
||||
* @param request_id the request id
|
||||
* @param duration the subscription duration
|
||||
* @param watcher the DN of subscription watcher
|
||||
* @param presentity the DN that is watched/monitored.
|
||||
* @param app_id the application id for the BLF
|
||||
* @param feature_mask please refer to cc_blf_feature_mask_t
|
||||
* @return void
|
||||
*/
|
||||
void CC_BLF_subscribe(int request_id,
|
||||
int duration,
|
||||
const char *watcher,
|
||||
const char *presentity,
|
||||
int app_id,
|
||||
cc_blf_feature_mask_t feature_mask);
|
||||
/**
|
||||
* Unsubscribe the BLF subscription
|
||||
* @param request_id the request id
|
||||
* @return void
|
||||
*/
|
||||
void CC_BLF_unsubscribe(int request_id);
|
||||
|
||||
/**
|
||||
* Unsubscribe all BLF subscription
|
||||
* @return void
|
||||
*/
|
||||
void CC_BLF_unsubscribe_All();
|
||||
|
||||
#endif /* _CC_BLF_H_ */
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _CC_BLF_LISTENER_H_
|
||||
#define _CC_BLF_LISTENER_H_
|
||||
|
||||
#include "cc_constants.h"
|
||||
|
||||
/**
|
||||
* Update BLF notification
|
||||
* @param request_id
|
||||
* @param blf_state the BLF state, it depends on app_id (0 for call list) or line features (speeddial blf
|
||||
* @param app_id
|
||||
* @return void
|
||||
*/
|
||||
void CC_BLF_notification(int request_id, cc_blf_state_t blf_state, int app_id);
|
||||
|
||||
#endif /* _CC_BLF_LISTENER_H_ */
|
||||
|
||||
@@ -0,0 +1,340 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/**
|
||||
* @mainpage Portable SIP Stack API
|
||||
*
|
||||
* @section intro_sec Introduction
|
||||
* The portable SIP stack is used in multiple SIP endpoints. This document
|
||||
* describes the API's provided by the portable SIP stack that third party
|
||||
* vendors must implement to use the stack.
|
||||
*
|
||||
*
|
||||
* @section sub_sec Functionality
|
||||
* The SIP stack can be viewed as composed of different components each
|
||||
* dealing with a specific functionality.
|
||||
* functional modules in SIP stack
|
||||
*
|
||||
* @subsection Management Management
|
||||
* This section covers the API that deals with managing the sip stack
|
||||
* initialization, shutdown and state management.
|
||||
* @li cc_types.h @par
|
||||
* Type definitions used by SIP stack
|
||||
* @li cc_constants.h @par
|
||||
* Constant definitions used by call control
|
||||
* @li cc_config.h @par
|
||||
* This section covers API to set config data for the SIP stack
|
||||
* @li cc_service.h @par
|
||||
* Commands to initialize, restart, shutdown sipstack
|
||||
* @li cc_service_listener.h @par
|
||||
* Callbacks from SIP stack for SIP stack and registration status updates
|
||||
*
|
||||
* @subsection cf Call Features
|
||||
* Call Control features and calls related APIs
|
||||
* @li cc_call_feature.h @par
|
||||
* APIs to create/terminate calls and invoke call features on them
|
||||
* @li cc_call_listener.h @par
|
||||
* Callbacks for call states and call related data updates
|
||||
* @li cc_info.h @par
|
||||
* API to send a SIP INFO info Message in the context of a call
|
||||
* @li cc_info_listener.h @par
|
||||
* Callback on receipt of SIP INFO Message in the context of a call
|
||||
*
|
||||
* @subsection df Device Features
|
||||
* Device based features related APIs
|
||||
* @li cc_device_feature.h @par
|
||||
* APIs to invoke device specific features
|
||||
* @li cc_device_listener.h @par
|
||||
* Callbacks for device specific feature/data updates
|
||||
*
|
||||
* @subsection blf BLF APIs
|
||||
* This covers Busy Lamp Field subscription and state notifications
|
||||
* @li cc_blf.h @par
|
||||
* BLF subscription and unsubscription APIs
|
||||
* @li cc_blf_listener.h @par
|
||||
* BLF state change notification call backs
|
||||
*
|
||||
* @subsection vcm Media APIs
|
||||
* Media related APIs
|
||||
* @li vcm.h @par
|
||||
* This file contains API that interface to the media layer on the platform.
|
||||
* The following APIs need to be implemented to have the sip stack interact
|
||||
* and issue commands to the media layer.
|
||||
* @li ccsdp.h @par
|
||||
* Contains helper methods to peek and set video SDP attributes as the SDP negotiation for m lines needs
|
||||
* to be confirmed by the application after examining the SDP attributes. See vcmCheckAttribs and
|
||||
* vcmPopulateAttribs methods in vcm.h
|
||||
*
|
||||
* @subsection xml XML
|
||||
* This section covers the XML Parser API that are invoked by the SIP stack to parse and encode XML bodies
|
||||
* @li xml_parser.h @par
|
||||
* Methods to be implemented by platform for XML enoced and decode operations
|
||||
* @li xml_parser_defines.h @par
|
||||
* Type definitons and data structures used by the XML APIs
|
||||
*
|
||||
* @subsection util Utilities
|
||||
* Misc utilities
|
||||
* @li sll_lite.h @par
|
||||
* Simple linked list implementation bundled with SIP stack to be used in xml_parser apis
|
||||
* @li dns_util.h @par
|
||||
* DNS query methods to be implemented by the platform code
|
||||
* @li plat_api.h @par
|
||||
* APIs that must be implemented by the platform for platform specific functionality
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _CC_CALL_FEATURE_H_
|
||||
#define _CC_CALL_FEATURE_H_
|
||||
|
||||
#include "cc_constants.h"
|
||||
|
||||
/***********************************Basic Call Feature Control Methods************************************
|
||||
* This section defines all the call related methods that an upper layer can use to control
|
||||
* a call in progress.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Used to create any outgoing call regular call. The incoming/reverting/consultation call will be
|
||||
* created by the stack. It creates a call place holder and initialize the memory for a call. An user needs
|
||||
* other methods to start the call, such as the method OriginateCall, etc
|
||||
* @param line line number that is invoked and is assigned
|
||||
* @return call handle wich includes the assigned line and call id
|
||||
*/
|
||||
cc_call_handle_t CC_createCall(cc_lineid_t line);
|
||||
|
||||
/**
|
||||
* Start the call that was created.
|
||||
* @param call_handle the call handle
|
||||
* @param video_pref the sdp direction
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
/*move it up...*/
|
||||
cc_return_t CC_CallFeature_originateCall(cc_call_handle_t call_handle, cc_sdp_direction_t video_pref);
|
||||
|
||||
/**
|
||||
* Terminate or end a normal call.
|
||||
* @param call_handle call handle
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CC_CallFeature_terminateCall(cc_call_handle_t call_handle);
|
||||
|
||||
/**
|
||||
* Answer an incoming or reverting call.
|
||||
* @param call_handle call handle
|
||||
* @param video_pref the sdp direction
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CC_CallFeature_answerCall(cc_call_handle_t call_handle, cc_sdp_direction_t video_pref);
|
||||
|
||||
/**
|
||||
* Send a keypress to a call, it could be a single digit.
|
||||
* @param call_handle call handle
|
||||
* @param cc_digit digit pressed
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CC_CallFeature_sendDigit(cc_call_handle_t call_handle, cc_digit_t cc_digit);
|
||||
|
||||
/**
|
||||
* Send a backspace action.
|
||||
* @param call_handle call handle
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CC_CallFeature_backSpace(cc_call_handle_t call_handle);
|
||||
|
||||
/**
|
||||
* Send a dial digit string on an active call, e.g."9191234567".
|
||||
* @param call_handle call handle
|
||||
* @param video_pref the sdp direction
|
||||
* @param numbers dialed string
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CC_CallFeature_dial(cc_call_handle_t call_handle, cc_sdp_direction_t video_pref, const cc_string_t numbers);
|
||||
|
||||
cc_return_t CC_CallFeature_CreateOffer(cc_call_handle_t call_handle, const cc_media_constraints_t *constraints);
|
||||
|
||||
cc_return_t CC_CallFeature_CreateAnswer(cc_call_handle_t call_handle, const cc_media_constraints_t *constraints);
|
||||
|
||||
cc_return_t CC_CallFeature_SetLocalDescription(cc_call_handle_t call_handle, cc_jsep_action_t action, const char* sdp);
|
||||
|
||||
cc_return_t CC_CallFeature_SetRemoteDescription(cc_call_handle_t call_handle, cc_jsep_action_t action, const char* sdp);
|
||||
|
||||
cc_return_t CC_CallFeature_SetPeerConnection(cc_call_handle_t call_handle, cc_peerconnection_t pc);
|
||||
|
||||
cc_return_t CC_CallFeature_AddStream(cc_call_handle_t call_handle, cc_media_stream_id_t stream_id, cc_media_track_id_t id, cc_media_type_t media_type);
|
||||
|
||||
cc_return_t CC_CallFeature_RemoveStream(cc_call_handle_t call_handle, cc_media_stream_id_t stream_id, cc_media_track_id_t id, cc_media_type_t media_type);
|
||||
|
||||
cc_return_t CC_CallFeature_AddICECandidate(cc_call_handle_t call_handle, const char* candidate, const char *mid, cc_level_t level);
|
||||
|
||||
/**
|
||||
* Initiate a speed dial.
|
||||
* @param call_handle call handle
|
||||
* @param speed_dial_number speed dial number to be dialed.
|
||||
* @param video_pref the sdp direction
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CC_CallFeature_speedDial(cc_call_handle_t call_handle, cc_sdp_direction_t video_pref, const cc_string_t speed_dial_number);
|
||||
|
||||
/**
|
||||
* Initiate a BLF call pickup.
|
||||
* @param call_handle call handle
|
||||
* @param speed_dial_number speed dial number configured.
|
||||
* @param video_pref the sdp direction
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CC_CallFeature_blfCallPickup(cc_call_handle_t call_handle, cc_sdp_direction_t video_pref, const cc_string_t speed_dial_number);
|
||||
|
||||
/**
|
||||
* Redial the last dial numbers.
|
||||
* @param call_handle call handle
|
||||
* @param video_pref the sdp direction
|
||||
* @return SUCCESS or FAILURE
|
||||
* @note: if there is no active dial made, this method should not be called.
|
||||
*/
|
||||
cc_return_t CC_CallFeature_redial(cc_call_handle_t call_handle, cc_sdp_direction_t video_pref);
|
||||
|
||||
/**
|
||||
* Update a video media capability for a call. To be used to escalate deescalate video on a specified call
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CC_CallFeature_updateCallMediaCapability(cc_call_handle_t call_handle, cc_sdp_direction_t video_pref);
|
||||
|
||||
/**
|
||||
* Make a call forward all on the line identified by the call_handle.
|
||||
* @param call_handle call handle
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CC_CallFeature_callForwardAll(cc_call_handle_t call_handle);
|
||||
|
||||
/**
|
||||
* Resume a held call.
|
||||
* @param call_handle call handle
|
||||
* @param video_pref the sdp direction
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CC_CallFeature_resume(cc_call_handle_t call_handle, cc_sdp_direction_t video_pref);
|
||||
|
||||
/**
|
||||
* End a consultation call.
|
||||
* @param call_handle call handle
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CC_CallFeature_endConsultativeCall(cc_call_handle_t call_handle);
|
||||
|
||||
/**
|
||||
* Initiate a conference. Steps to make a conference or transfer:
|
||||
* @li Step1 Create a call handle, e.g. chandle1.
|
||||
* @li Step2 Start the call on this call handle.
|
||||
* @li Step3 When the call is answered, invoke:
|
||||
* CC_CallFeature_conference(chandle1, FALSE, CC_EMPTY_CALL_HANDLE) to start a conference operation.
|
||||
* @li Step4 Upon receiving the consultative call (cHandle2) created from pSipcc system,
|
||||
* invoke:
|
||||
* CC_CallFeature_dial(cHandle2)
|
||||
* to dial the consultative call.
|
||||
* @li Step5 When the consultative call is in ringout or connected state, invoke:
|
||||
* CC_CallFeature_conference(cHandle2, FALSE, CC_EMPTY_CALL_HANDLE) to
|
||||
* finish the conference.
|
||||
* Note: @li in the step 4, a user could kill the consultative call and pickup a hold call (not the parent call that
|
||||
* initiated the conference). In this scenario, a parent call handle should be supplied.
|
||||
* For instance,
|
||||
* CC_CallFeature_conference(cHandle2, FALSE, cHandle1)
|
||||
* @li If it's a B2bConf, substitute the "FALSE" with "TRUE"
|
||||
*
|
||||
* @param call_handle the call handle for
|
||||
* @li the original connected call.
|
||||
* @li the consultative call or a held call besides the parent call initiated the transfer. This is used
|
||||
* on the second time to finish the transfer.
|
||||
* @param is_local Local conference or not. If it's a local conference, it's a b2bconf.
|
||||
* @param parent_call_handle if supplied, it will be the targeted parent call handle, which initiated the conference.
|
||||
* @param video_pref the sdp direction
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CC_CallFeature_conference(cc_call_handle_t call_handle, cc_boolean is_local,
|
||||
cc_call_handle_t parent_call_handle, cc_sdp_direction_t video_pref);
|
||||
|
||||
/**
|
||||
* Initiate a call transfer. Please refer to Conference feature.
|
||||
* @param call_handle the call handle for
|
||||
* @li the original connected call.
|
||||
* @li the consultative call or a held call besides the parent call initiated the transfer. This is used
|
||||
* on the second time to finish the transfer.
|
||||
* @param parent_call_handle if supplied, it will be the parent call handle, which initiated the transfer.
|
||||
* @param video_pref video preference for the consult call as specified by direction
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CC_CallFeature_transfer(cc_call_handle_t call_handle, cc_call_handle_t parent_call_handle, cc_sdp_direction_t video_pref);
|
||||
|
||||
|
||||
/**
|
||||
* Initiate a direct transfer
|
||||
* @param call_handle the call handle for the call to initialize a transfer
|
||||
* @param target_call_handle the call handle for the target transfer call.
|
||||
* @retrun SUCCESS or FAILURE. If the target call handle is empty, a FAILURE will be returned.
|
||||
*/
|
||||
cc_return_t CC_CallFeature_directTransfer(cc_call_handle_t call_handle, cc_call_handle_t target_call_handle);
|
||||
|
||||
/**
|
||||
* Initiate a join across line
|
||||
* @param call_handle the call handle for the call that initializes a join across line (conference).
|
||||
* @param target_call_handle the call handle for the call will be joined.
|
||||
*/
|
||||
cc_return_t CC_CallFeature_joinAcrossLine(cc_call_handle_t call_handle, cc_call_handle_t target_call_handle);
|
||||
|
||||
/**
|
||||
* Put a connected call on hold.
|
||||
* @param call_handle call handle
|
||||
* @param reason the reason to hold. The following values should be used.
|
||||
* CC_HOLD_REASON_NONE,
|
||||
* CC_HOLD_REASON_XFER, //Hold for transfer
|
||||
* CC_HOLD_REASON_CONF, //Hold for conference
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CC_CallFeature_holdCall(cc_call_handle_t call_handle, cc_hold_reason_t reason);
|
||||
|
||||
/********************************End of basic call feature methods******************************************/
|
||||
|
||||
/*************************************Additional call feature methods***************************************
|
||||
*
|
||||
*/
|
||||
/** @todo if needed
|
||||
* Direct transfer a call.
|
||||
* @param call_handle call handle
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
//cc_return_t CC_CallFeature_directTransfer(cc_call_handle_t call_handle);
|
||||
|
||||
/**
|
||||
* Select or locked a call.
|
||||
* @param call_handle call handle
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CC_CallFeature_select(cc_call_handle_t call_handle);
|
||||
|
||||
/**
|
||||
* Cancel a call feature, e.g. when the consultative call is connected and the
|
||||
* user wishes not to make the conference, thie method can be invoked.
|
||||
* @param call_handle call handle
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CC_CallFeature_cancelXfrerCnf(cc_call_handle_t call_handle);
|
||||
|
||||
/**
|
||||
* Indicate the mute state on the device
|
||||
* Used to send a mute state across over CAST to the PC
|
||||
*/
|
||||
void CC_CallFeature_mute(cc_boolean mute);
|
||||
|
||||
/**
|
||||
* Indicate the speaker state on the device
|
||||
* Used to send a speaker state across over CAST to the PC
|
||||
*/
|
||||
void CC_CallFeature_speaker(cc_boolean mute);
|
||||
|
||||
/**
|
||||
* Returns the call id of the connected call
|
||||
*/
|
||||
|
||||
cc_call_handle_t CC_CallFeature_getConnectedCall();
|
||||
|
||||
#endif /* _CC_CALL_FEATURE_H_ */
|
||||
@@ -0,0 +1,201 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _CC_CALL_LISTENER_H_
|
||||
#define _CC_CALL_LISTENER_H_
|
||||
|
||||
#include "cc_constants.h"
|
||||
|
||||
/*****************************************************************************************************
|
||||
* Call Control: provides the methods to process a call or calls.
|
||||
*****************************************************************************************************/
|
||||
|
||||
/****************************************Call Listener Methods****************************************
|
||||
* This section defines all call related methods that will invoke an application about a call.
|
||||
* All input parameters please see their definition in cc_constancts.h file.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Notification for the creation of a new call
|
||||
* @param call_handle call handle that is created.
|
||||
* @param call_state the call state
|
||||
* @param cc_cause cause that the call is created
|
||||
* @param cc_attr attr of the call created
|
||||
* @return void
|
||||
*/
|
||||
void CC_CallListener_callCreated(cc_call_handle_t call_handle,
|
||||
cc_call_state_t call_state,
|
||||
cc_cause_t cc_cause,
|
||||
cc_call_attr_t cc_attr);
|
||||
|
||||
/**
|
||||
* Update a call state, e.g. offhook.
|
||||
* Description: the first CallStateChanged after the CallCreated will have included
|
||||
* call_attr and call_instance. The consective CallStateChanged should ignore the
|
||||
* call_attr and call instance.
|
||||
* @param call_handle call handle
|
||||
* @param call_state call state
|
||||
* @param call_attr call attribute
|
||||
* @param call_cause cause that the call state changed
|
||||
* @param call_instance call instance id
|
||||
* @return void
|
||||
*/
|
||||
void CC_CallListener_callStateChanged(cc_call_handle_t call_handle,
|
||||
cc_call_state_t call_state,
|
||||
cc_call_attr_t call_attr,
|
||||
cc_cause_t call_cause,
|
||||
cc_call_instance_t call_instance);
|
||||
|
||||
/**
|
||||
* Inform the upper layer call control that the call attribute changed.
|
||||
* @param call_handle call handle
|
||||
* @param call_attr the call attr
|
||||
* @return void
|
||||
*/
|
||||
void CC_CallListener_callAttributeChanged(cc_call_handle_t call_handle,
|
||||
cc_call_attr_t call_attr);
|
||||
|
||||
/**
|
||||
* Inform the upper layer call control that a new call comes.
|
||||
* @param call_handle
|
||||
* @param call_security call security attribute
|
||||
* @return void
|
||||
*/
|
||||
void CC_CallListener_callSecurityChanged(cc_call_handle_t call_handle,
|
||||
cc_call_security_t call_security);
|
||||
|
||||
/**
|
||||
* Cancel a conference or Transfer feature. This is usually coming
|
||||
* from the CTI application to cancel the ongoing Xfer or Cnf calls.
|
||||
* @param call_handle call handle
|
||||
* @param other_call_handle the other call id that was cancelled
|
||||
* @return void
|
||||
*/
|
||||
void CC_CallListener_xferCnfCancelled(cc_call_handle_t call_handle,
|
||||
cc_call_handle_t other_call_handle);
|
||||
|
||||
/**
|
||||
* Update a call information about the call names or numbers.
|
||||
* @param call_handle call handle
|
||||
* @param clg_name calling party name
|
||||
* @param clg_number calling party number
|
||||
* @param cld_name called party name
|
||||
* @param cld_number called party number
|
||||
* @param alt_clg_number alternative calling party number
|
||||
* @param orig_name original name
|
||||
* @param orig_number original number
|
||||
* @param redir_name redirect name
|
||||
* @param redir_number redirect number
|
||||
* @param call_security call security
|
||||
* @param call_policy call policy
|
||||
* @param call_instance call instance
|
||||
* @param call_type
|
||||
* @return void
|
||||
*/
|
||||
void CC_CallListener_callInfoChanged(cc_call_handle_t call_handle,
|
||||
cc_string_t clg_name, cc_string_t clg_number,
|
||||
cc_string_t cld_name, cc_string_t cld_number,
|
||||
cc_string_t alt_clg_number,
|
||||
cc_string_t orig_name, cc_string_t orig_number,
|
||||
cc_string_t redir_name, cc_string_t redir_number,
|
||||
cc_call_security_t call_security,
|
||||
cc_call_policy_t call_policy,
|
||||
cc_call_instance_t call_instance,
|
||||
cc_call_type_t call_type);
|
||||
|
||||
/**
|
||||
* Update Global Call Identification for a call. GCID can be used to collapse
|
||||
* multiple call bubbles for the same call to a single call bubble. Please refer
|
||||
* to the collpased call bubble as specified by the roundtable UI Spec.
|
||||
* @param call_handle
|
||||
* @param gcid global call identification
|
||||
* @return void
|
||||
*/
|
||||
void CC_CallListener_callGCIDChanged(cc_call_handle_t call_handle, char* gcid);
|
||||
|
||||
/**
|
||||
* Update the placed call information. This API reports the dialed digits for the
|
||||
* placed call. The number specified by this API should be logged in the placed call information.
|
||||
* @param call_handle call_handle
|
||||
* @param cld_name called party name
|
||||
* @param cld_number called party number
|
||||
* @return void
|
||||
*/
|
||||
void CC_CallListener_callPlacedInfoChanged(cc_call_handle_t call_handle,
|
||||
cc_string_t cld_name,
|
||||
cc_string_t cld_number);
|
||||
|
||||
/**
|
||||
* Send call status to the upper layer for literally display purpose,
|
||||
* e.g., "HOLD" for a call was placed on held state.
|
||||
* @param call_handle call handle
|
||||
* @param status call status display string
|
||||
* @param timeout the time interval in seconds to display the status message on a call bubble if there is one.
|
||||
* @param prioroty the priority of display message.
|
||||
* @return void
|
||||
*/
|
||||
void CC_CallListener_callStatusChanged(cc_call_handle_t call_handle, cc_string_t status, int timeout, char priority);
|
||||
|
||||
/**
|
||||
* Inform the upper layer call control whether it is able to to delete the last dialed digit now.
|
||||
* @param call_handle call handle
|
||||
* @param state true or false whether it can delete last dialed digit.
|
||||
* @return void
|
||||
*/
|
||||
void CC_CallListener_backSpaceEnabled(cc_call_handle_t call_handle, cc_boolean state);
|
||||
|
||||
/**
|
||||
* Imform the upper layer that a call is locked remotely or not.
|
||||
* @param call_handle call handle
|
||||
* @param call_selection if the call is locked or not
|
||||
* @return void
|
||||
*/
|
||||
void CC_CallListener_callSelected(cc_call_handle_t call_handle,
|
||||
cc_call_selection_t call_selection);
|
||||
|
||||
/**
|
||||
* Inform the upper layer the log disposition
|
||||
* @param call_handle call handle
|
||||
* @param log_disp the log disposition
|
||||
* @return void
|
||||
*/
|
||||
void CC_CallListener_logDispositionUpdated(cc_call_handle_t call_handle,
|
||||
cc_log_disposition_t log_disp);
|
||||
|
||||
/**
|
||||
* Inform the upper layer that the last dialed digit was deleted.
|
||||
* @param call_handle call handle
|
||||
* @return void
|
||||
*/
|
||||
void CC_CallListener_lastDigitDeleted(cc_call_handle_t call_handle);
|
||||
|
||||
/**
|
||||
* Inform the upper layer that the call is in preservation state,
|
||||
* which means all features are disabled except to end the call.
|
||||
* e.g., "HOLD" for a call was placed on held state.
|
||||
* @param call_handle call handle
|
||||
* @return void
|
||||
*/
|
||||
void CC_CallListener_callPreserved(cc_call_handle_t call_handle);
|
||||
|
||||
/**
|
||||
* Inform the upper layer whether the video is available or not.
|
||||
* @param call_handle call handle
|
||||
* @param state video direction NONE => no video
|
||||
* @return void
|
||||
*/
|
||||
void CC_CallListener_videoAvailable(cc_call_handle_t call_handle, cc_int32_t state);
|
||||
|
||||
/**
|
||||
* Inform the upper layer that the remote has offered video capability.
|
||||
* @param call_handle call handle
|
||||
* @param direction the media direction
|
||||
* @return void
|
||||
*/
|
||||
void CC_CallListener_remoteVideoOffered(cc_call_handle_t call_handle, cc_sdp_direction_t direction);
|
||||
|
||||
/**************************END of Call Listener Methods***********************************/
|
||||
|
||||
|
||||
#endif /* _CC_CALL_LISTENER_H_ */
|
||||
@@ -0,0 +1,289 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _CC_CONFIG_H_
|
||||
#define _CC_CONFIG_H_
|
||||
|
||||
/* Keep non line specific params here */
|
||||
#include "cc_constants.h"
|
||||
|
||||
#define CC_MAX_CONFIG_LINES MAX_CONFIG_LINES
|
||||
|
||||
#define CFGID_BEGIN_INDEX 0
|
||||
#define CFGID_MEDIA_PORT_RANGE_START_INT CFGID_BEGIN_INDEX //tag:startMediaPort
|
||||
#define CFGID_MEDIA_PORT_RANGE_END_INT CFGID_BEGIN_INDEX + 1 //tag:stopMediaPort
|
||||
#define CFGID_CALLERID_BLOCKING_BOOL CFGID_BEGIN_INDEX + 2 //tag:callIdBlocking
|
||||
#define CFGID_ANONYMOUS_CALL_BLOCK_BOOL CFGID_BEGIN_INDEX + 3 //tag:anonymousCallBlock
|
||||
#define CFGID_PREFERRED_CODEC_STRING CFGID_BEGIN_INDEX + 6 //tag:preferredCodec
|
||||
#define CFGID_DTMF_OUTOFBAND_STRING CFGID_BEGIN_INDEX + 7 //tag:dtmfOutofBand
|
||||
#define CFGID_DTMF_AVT_PAYLOAD_INT CFGID_BEGIN_INDEX + 8 //tag:dtmfAvtPayload
|
||||
#define CFGID_DTMF_DB_LEVEL_INT CFGID_BEGIN_INDEX + 9 //tag:dtmfDbLevel
|
||||
|
||||
#define CFGID_SIP_RETX_INT CFGID_BEGIN_INDEX + 10 //tag:sipRetx
|
||||
#define CFGID_SIP_INVITE_RETX_INT CFGID_BEGIN_INDEX + 11 //tag:sipInviteRetx
|
||||
#define CFGID_TIMER_T1_INT CFGID_BEGIN_INDEX + 12 //tag:timerT1
|
||||
#define CFGID_TIMER_T2_INT CFGID_BEGIN_INDEX + 13 //tag:timerT2
|
||||
#define CFGID_TIMER_INVITE_EXPIRES_INT CFGID_BEGIN_INDEX + 14 //tag:timerInviteExpires
|
||||
#define CFGID_TIMER_REGISTER_EXPIRES_INT CFGID_BEGIN_INDEX + 15 //tag:timerRegisterExpires
|
||||
|
||||
#define CFGID_PROXY_REGISTER_BOOL CFGID_BEGIN_INDEX + 16 //tag:proxy
|
||||
#define CFGID_PROXY_BACKUP_STRING CFGID_BEGIN_INDEX + 17 //tag:backupProxy
|
||||
#define CFGID_PROXY_BACKUP_PORT_INT CFGID_BEGIN_INDEX + 18 //tag:backupProxyPort
|
||||
#define CFGID_PROXY_EMERGENCY_STRING CFGID_BEGIN_INDEX + 19 //tag:emergencyProxy
|
||||
#define CFGID_PROXY_EMERGENCY_PORT_INT CFGID_BEGIN_INDEX + 20 //tag:emergencyProxyPort
|
||||
#define CFGID_OUTBOUND_PROXY_STRING CFGID_BEGIN_INDEX + 21 //tag:outboundProxy
|
||||
#define CFGID_OUTBOUND_PROXY_PORT_INT CFGID_BEGIN_INDEX + 22 //tag:outboundProxyPort
|
||||
|
||||
#define CFGID_NAT_RECEIVED_PROCESSING_BOOL CFGID_BEGIN_INDEX + 23 //tag:natRecievedProcessing
|
||||
#define CFGID_REG_USER_INFO_STRING CFGID_BEGIN_INDEX + 24 //tag:userInfo
|
||||
#define CFGID_CNF_JOIN_ENABLE_BOOL CFGID_BEGIN_INDEX + 25 //tag:cnfJoinEnable
|
||||
#define CFGID_REMOTE_PARTY_ID_BOOL CFGID_BEGIN_INDEX + 26 //tag:remotePartyID
|
||||
#define CFGID_SEMI_XFER_BOOL CFGID_BEGIN_INDEX + 27 //tag:semiAttendedTransfer
|
||||
#define CFGID_CALL_HOLD_RINGBACK_BOOL CFGID_BEGIN_INDEX + 28 //tag:callHoldRingback
|
||||
#define CFGID_STUTTER_MSG_WAITING_BOOL CFGID_BEGIN_INDEX + 29 //tag:stutterMsgWaiting
|
||||
#define CFGID_CFWD_URL_STRING CFGID_BEGIN_INDEX + 30 //tag:callForwardURI
|
||||
#define CFGID_CALL_STATS_BOOL CFGID_BEGIN_INDEX + 31 //tag:callStats
|
||||
#define CFGID_AUTO_ANSWER_BOOL CFGID_BEGIN_INDEX + 32 //tag:autoAnswerEnabled
|
||||
#define CFGID_LOCAL_CFWD_ENABLE_BOOL CFGID_BEGIN_INDEX + 33 //tag:localCfwdEnable
|
||||
#define CFGID_TIMER_REGISTER_DELTA_INT CFGID_BEGIN_INDEX + 34 //tag:timerRegisterDelta
|
||||
#define CFGID_SIP_MAX_FORWARDS_INT CFGID_BEGIN_INDEX + 35 //tag:maxRedirects
|
||||
#define CFGID_2543_HOLD_BOOL CFGID_BEGIN_INDEX + 36 //tag:rfc2543Hold
|
||||
|
||||
#define CFGID_CCM1_ADDRESS_STRING CFGID_BEGIN_INDEX + 37 //tag:processNodeName
|
||||
#define CFGID_CCM2_ADDRESS_STRING CFGID_BEGIN_INDEX + 38 //tag:processNodeName
|
||||
#define CFGID_CCM3_ADDRESS_STRING CFGID_BEGIN_INDEX + 39 //tag:processNodeName
|
||||
|
||||
#define CFGID_CCM1_IPV6_ADDRESS_STRING CFGID_BEGIN_INDEX + 40 //tag:ipv6Addr, Not used
|
||||
#define CFGID_CCM2_IPV6_ADDRESS_STRING CFGID_BEGIN_INDEX + 41 //tag:ipv6Addr
|
||||
#define CFGID_CCM3_IPV6_ADDRESS_STRING CFGID_BEGIN_INDEX + 42 //tag:ipv6Addr
|
||||
|
||||
#define CFGID_CCM1_SIP_PORT_INT CFGID_BEGIN_INDEX + 43 //tag:sipPort
|
||||
#define CFGID_CCM2_SIP_PORT_INT CFGID_BEGIN_INDEX + 44 //tag:sipPort
|
||||
#define CFGID_CCM3_SIP_PORT_INT CFGID_BEGIN_INDEX + 45 //tag:sipPort
|
||||
|
||||
#define CFGID_CCM1_SEC_LEVEL_INT CFGID_BEGIN_INDEX + 46 //not from configuration
|
||||
#define CFGID_CCM2_SEC_LEVEL_INT CFGID_BEGIN_INDEX + 47 //not from configuration
|
||||
#define CFGID_CCM3_SEC_LEVEL_INT CFGID_BEGIN_INDEX + 48 //not from configuration
|
||||
|
||||
#define CFGID_CCM1_IS_VALID_BOOL CFGID_BEGIN_INDEX + 49 //not from configuration
|
||||
#define CFGID_CCM2_IS_VALID_BOOL CFGID_BEGIN_INDEX + 50 //not from configuration
|
||||
#define CFGID_CCM3_IS_VALID_BOOL CFGID_BEGIN_INDEX + 51 //not from configuration
|
||||
|
||||
#define CFGID_CCM_TFTP_IP_ADDR_STRING CFGID_BEGIN_INDEX + 52 //not from configuration
|
||||
#define CFGID_CCM_TFTP_PORT_INT CFGID_BEGIN_INDEX + 53 //not from configuration
|
||||
#define CFGID_CCM_TFTP_IS_VALID_BOOL CFGID_BEGIN_INDEX + 54 //not from configuration
|
||||
#define CFGID_CCM_TFTP_SEC_LEVEL_INT CFGID_BEGIN_INDEX + 55 //not from configuration
|
||||
|
||||
#define CFGID_CONN_MONITOR_DURATION_INT CFGID_BEGIN_INDEX + 60 //tag:connectionMonitorDuration
|
||||
#define CFGID_CALL_PICKUP_URI_STRING CFGID_BEGIN_INDEX + 61 //tag:callPickupURI
|
||||
#define CFGID_CALL_PICKUP_LIST_URI_STRING CFGID_BEGIN_INDEX + 62 //tag:callPickupListURI
|
||||
#define CFGID_CALL_PICKUP_GROUP_URI_STRING CFGID_BEGIN_INDEX + 63 //tag:callPickupGroupURI
|
||||
#define CFGID_CALL_FORWARD_URI_STRING CFGID_BEGIN_INDEX + 65 //tag:callForwardURI
|
||||
#define CFGID_ABBREVIATED_DIAL_URI_STRING CFGID_BEGIN_INDEX + 66 //tag:abbreviatedDialURI
|
||||
#define CFGID_CALL_LOG_BLF_ENABLED_BOOL CFGID_BEGIN_INDEX + 67 //tag:callLogBlfEnabled
|
||||
#define CFGID_REMOTE_CC_ENABLED_BOOL CFGID_BEGIN_INDEX + 68 //tag:remoteCcEnable
|
||||
#define CFGID_RETAIN_FORWARD_INFORMATION_BOOL CFGID_BEGIN_INDEX + 69 //tag:retainForwardInformation
|
||||
|
||||
#define CFGID_TIMER_KEEPALIVE_EXPIRES_INT CFGID_BEGIN_INDEX + 70 //tag:timerKeepAliveExpires
|
||||
#define CFGID_TIMER_SUBSCRIBE_EXPIRES_INT CFGID_BEGIN_INDEX + 71 //tag:timerSubscribeExpires
|
||||
#define CFGID_TIMER_SUBSCRIBE_DELTA_INT CFGID_BEGIN_INDEX + 72 //tag:timerSubscribeDelta
|
||||
#define CFGID_TRANSPORT_LAYER_PROT_INT CFGID_BEGIN_INDEX + 73 //tag:transportLayerProtocol
|
||||
#define CFGID_KPML_ENABLED_INT CFGID_BEGIN_INDEX + 74 //tag:kpml
|
||||
|
||||
#define CFGID_NAT_ENABLE_BOOL CFGID_BEGIN_INDEX + 75 //tag:natEnabled
|
||||
#define CFGID_NAT_ADDRESS_STRING CFGID_BEGIN_INDEX + 76 //tag:natAddress
|
||||
#define CFGID_VOIP_CONTROL_PORT_INT CFGID_BEGIN_INDEX + 77 //tag:voipControlPort
|
||||
#define CFGID_MY_IP_ADDR_STRING CFGID_BEGIN_INDEX + 78 //not applicable
|
||||
#define CFGID_MY_MAC_ADDR_STRING CFGID_BEGIN_INDEX + 79 //not applicable
|
||||
#define CFGID_ENABLE_VAD_BOOL CFGID_BEGIN_INDEX + 80 //tag:enableVad
|
||||
|
||||
#define CFGID_AUTOANSWER_IDLE_ALTERNATE_BOOL CFGID_BEGIN_INDEX + 81 //tag:autoAnswerAltBehavior
|
||||
#define CFGID_AUTOANSWER_TIMER_INT CFGID_BEGIN_INDEX + 82 //tag:autoAnswerTimer
|
||||
#define CFGID_AUTOANSWER_OVERRIDE_BOOL CFGID_BEGIN_INDEX + 83 //tag:autoAnswerOverride
|
||||
|
||||
#define CFGID_OFFHOOK_TO_FIRST_DIGIT_TIMER_INT CFGID_BEGIN_INDEX + 84 //tag:offhookToFirstDigitTimer
|
||||
#define CFGID_CALL_WAITING_SILENT_PERIOD_INT CFGID_BEGIN_INDEX + 85 //tag:silentPeriodBetweenCallWaitingBursts
|
||||
#define CFGID_RING_SETTING_BUSY_POLICY_INT CFGID_BEGIN_INDEX + 86 //tag:ringSettingBusyStationPolicy
|
||||
#define CFGID_DSCP_FOR_CALL_CONTROL_INT CFGID_BEGIN_INDEX + 87 //tag:dscpForCm2Dvce
|
||||
#define CFGID_SPEAKER_ENABLED_BOOL CFGID_BEGIN_INDEX + 88 //tag:disableSpeaker
|
||||
#define CFGID_XFR_ONHOOK_ENABLED_BOOL CFGID_BEGIN_INDEX + 89 //tag:disableSpeaker
|
||||
#define CFGID_ROLLOVER_INT CFGID_BEGIN_INDEX + 90 //tag:rollover
|
||||
#define CFGID_LOAD_FILE_STRING CFGID_BEGIN_INDEX + 91 //not from config file
|
||||
|
||||
#define CFGID_BLF_ALERT_TONE_IDLE_INT CFGID_BEGIN_INDEX + 92 //tag:blfAudibleAlertSettingOfIdleStation
|
||||
#define CFGID_BLF_ALERT_TONE_BUSY_INT CFGID_BEGIN_INDEX + 93 //tag:blfAudibleAlertSettingOfBusyStation
|
||||
#define CFGID_AUTO_PICKUP_ENABLED_BOOL CFGID_BEGIN_INDEX + 94 //tag:autoCallPickupEnable
|
||||
|
||||
#define CFGID_JOIN_ACROSS_LINES_INT CFGID_BEGIN_INDEX + 95 //tag:joinAcrossLines
|
||||
|
||||
#if defined(_TNP_)
|
||||
#define ROUNDTABLE_INDEX_OFFSET 0
|
||||
#else
|
||||
#define CFGID_MY_ACTIVE_MAC_ADDR_STRING CFGID_BEGIN_INDEX + 96 //not from configuration
|
||||
#define CFGID_DSCP_AUDIO_INT CFGID_BEGIN_INDEX + 97 //tag:dscpForAudio
|
||||
#define CFGID_DEVICE_NAME_STRING CFGID_BEGIN_INDEX + 98 //not applicable
|
||||
#define CFGID_USER_AGENT_STRING CFGID_BEGIN_INDEX + 99 //not from config file
|
||||
#define CFGID_MODEL_NUMBER_STRING CFGID_BEGIN_INDEX + 100 //not from config file
|
||||
#define CFGID_DSCP_VIDEO_INT CFGID_BEGIN_INDEX + 101 //tag:dscpVideo
|
||||
#define ROUNDTABLE_INDEX_OFFSET 6
|
||||
#endif
|
||||
|
||||
#define CFGID_IP_ADDR_MODE_INT CFGID_BEGIN_INDEX + ROUNDTABLE_INDEX_OFFSET + 96 //Not used
|
||||
#define CFGID_INTER_DIGIT_TIMER_INT CFGID_BEGIN_INDEX + ROUNDTABLE_INDEX_OFFSET + 97 //tag:t302
|
||||
|
||||
#define CFGID_EMCC_MODE_BOOL CFGID_BEGIN_INDEX + ROUNDTABLE_INDEX_OFFSET + 98 // Not from config file
|
||||
#define CFGID_VISITING_EM_PORT_INT CFGID_BEGIN_INDEX + ROUNDTABLE_INDEX_OFFSET + 99 // Not from config file
|
||||
#define CFGID_VISITING_EM_IP_STRING CFGID_BEGIN_INDEX + ROUNDTABLE_INDEX_OFFSET + 100 // Not from config file
|
||||
|
||||
#define CFGID_JOIN_DXFER_POLICY_STRING CFGID_BEGIN_INDEX + ROUNDTABLE_INDEX_OFFSET + 102 //tag:<join-dxfer-policy>used only for RTLite CTI appliation
|
||||
#define CFGID_CCM_EXTERNAL_NUMBER_MASK_STRING CFGID_BEGIN_INDEX + ROUNDTABLE_INDEX_OFFSET + 103 //tag:<externalNumberMask>
|
||||
#define CFGID_MEDIA_IP_ADDR_STRING CFGID_BEGIN_INDEX + ROUNDTABLE_INDEX_OFFSET + 104 //tag:<videoCapability>
|
||||
#define CFGID_P2PSIP_BOOL CFGID_BEGIN_INDEX + ROUNDTABLE_INDEX_OFFSET + 105
|
||||
#define CFGID_VERSION_STRING CFGID_BEGIN_INDEX + ROUNDTABLE_INDEX_OFFSET + 106
|
||||
#define CFGID_SDPMODE_BOOL CFGID_BEGIN_INDEX + ROUNDTABLE_INDEX_OFFSET + 107
|
||||
#define CFGID_RTCPMUX_BOOL CFGID_BEGIN_INDEX + ROUNDTABLE_INDEX_OFFSET + 108
|
||||
#define CFGID_RTPSAVPF_BOOL CFGID_BEGIN_INDEX + ROUNDTABLE_INDEX_OFFSET + 109
|
||||
#define CFGID_MAXAVBITRATE_BOOL CFGID_BEGIN_INDEX + ROUNDTABLE_INDEX_OFFSET + 110
|
||||
#define CFGID_MAXCODEDAUDIOBW_BOOL CFGID_BEGIN_INDEX + ROUNDTABLE_INDEX_OFFSET + 111
|
||||
#define CFGID_USEDTX_BOOL CFGID_BEGIN_INDEX + ROUNDTABLE_INDEX_OFFSET + 112
|
||||
#define CFGID_STEREO_BOOL CFGID_BEGIN_INDEX + ROUNDTABLE_INDEX_OFFSET + 113
|
||||
#define CFGID_USEINBANDFEC_BOOL CFGID_BEGIN_INDEX + ROUNDTABLE_INDEX_OFFSET + 114
|
||||
#define CFGID_CBR_BOOL CFGID_BEGIN_INDEX + ROUNDTABLE_INDEX_OFFSET + 115
|
||||
#define CFGID_MAXPTIME_BOOL CFGID_BEGIN_INDEX + ROUNDTABLE_INDEX_OFFSET + 116
|
||||
#define CFGID_SCTP_PORT_INT CFGID_BEGIN_INDEX + ROUNDTABLE_INDEX_OFFSET + 117
|
||||
#define CFGID_NUM_DATA_STREAMS_INT CFGID_BEGIN_INDEX + ROUNDTABLE_INDEX_OFFSET + 118
|
||||
|
||||
/* All non Line specific params should be added above */
|
||||
/* All Line specific params should be added below */
|
||||
/*
|
||||
Following configuration settings are coming from the <line> element in the configuration file.
|
||||
The line configuration is block based. Each configuration item has a block, e.g., the CFGID_LINE_FEATURE_INT
|
||||
has a block with the size equal to the maxinum number of line that a type of phone can be configured with.
|
||||
The following depicts the structure of line feature configuration.
|
||||
config_table[
|
||||
...
|
||||
cfgid_line_feature_id_line_1,//line feature id block start
|
||||
...
|
||||
cfgid_line_feature_id_line_max,//line feature id block end
|
||||
cfgid_line_index_id_line_1, //line index block start
|
||||
...
|
||||
cfgid_line_index_id_line_max,//line index block end
|
||||
...CFGID_LINE_CFWDALL_STRING
|
||||
cfgid_line_cfwdall_string_line_max //line cfwd all string block end
|
||||
];
|
||||
|
||||
Based on this, when setting directory name (DN, line name) for the line 3 (line_id = 3),
|
||||
the config id should be CFGID_LINE_NAME_STRING + (line_id -1), or CFGID_LINE_NAME_STRING + 2.
|
||||
Keep in mind the following config ids are defined for the first line.
|
||||
*/
|
||||
|
||||
#define CFGID_LINE_FEATURE_INT CFGID_NUM_DATA_STREAMS_INT + 1 //tag:featureID
|
||||
#define CFGID_LINE_INDEX_INT CFGID_LINE_FEATURE_INT + CC_MAX_CONFIG_LINES //tag:lineIndex
|
||||
#define CFGID_LINE_MAXNUMCALLS_INT CFGID_LINE_INDEX_INT + CC_MAX_CONFIG_LINES //tag:maxNumCalls
|
||||
#define CFGID_LINE_NAME_STRING CFGID_LINE_MAXNUMCALLS_INT + CC_MAX_CONFIG_LINES //tag:name
|
||||
#define CFGID_LINE_AUTHNAME_STRING CFGID_LINE_NAME_STRING + CC_MAX_CONFIG_LINES //tag:authName
|
||||
#define CFGID_LINE_PASSWORD_STRING CFGID_LINE_AUTHNAME_STRING + CC_MAX_CONFIG_LINES //tag:authPassword
|
||||
#define CFGID_LINE_DISPLAYNAME_STRING CFGID_LINE_PASSWORD_STRING + CC_MAX_CONFIG_LINES //tag:displayName
|
||||
#define CFGID_LINE_CONTACT_STRING CFGID_LINE_DISPLAYNAME_STRING + CC_MAX_CONFIG_LINES //tag:contact
|
||||
#define CFGID_PROXY_ADDRESS_STRING CFGID_LINE_CONTACT_STRING + CC_MAX_CONFIG_LINES //tag:proxy
|
||||
#define CFGID_PROXY_PORT_INT CFGID_PROXY_ADDRESS_STRING + CC_MAX_CONFIG_LINES //tag:port
|
||||
#define CFGID_LINE_AUTOANSWER_ENABLED_BYTE CFGID_PROXY_PORT_INT + CC_MAX_CONFIG_LINES //tag:autoAnswerEnabled
|
||||
#define CFGID_LINE_AUTOANSWER_MODE_STRING CFGID_LINE_AUTOANSWER_ENABLED_BYTE + CC_MAX_CONFIG_LINES //tag:autoAnswerMode
|
||||
#define CFGID_LINE_CALL_WAITING_BYTE CFGID_LINE_AUTOANSWER_MODE_STRING + CC_MAX_CONFIG_LINES //tag:callWaiting
|
||||
#define CFGID_LINE_SHARED_LINE_BOOL CFGID_LINE_CALL_WAITING_BYTE + CC_MAX_CONFIG_LINES //tag:sharedLine
|
||||
#define CFGID_LINE_MSG_WAITING_LAMP_BYTE CFGID_LINE_SHARED_LINE_BOOL + CC_MAX_CONFIG_LINES //tag:messageWaitingLampPolicy
|
||||
#define CFGID_LINE_MESSAGE_WAITING_AMWI_BYTE CFGID_LINE_MSG_WAITING_LAMP_BYTE + CC_MAX_CONFIG_LINES //tag:messageWaitingAMWI
|
||||
#define CFGID_LINE_RING_SETTING_IDLE_BYTE CFGID_LINE_MESSAGE_WAITING_AMWI_BYTE + CC_MAX_CONFIG_LINES //tag:ringSettingIdle
|
||||
#define CFGID_LINE_RING_SETTING_ACTIVE_BYTE CFGID_LINE_RING_SETTING_IDLE_BYTE + CC_MAX_CONFIG_LINES //tag:ringSettingActive
|
||||
#define CFGID_LINE_BUSY_TRIGGER_INT CFGID_LINE_RING_SETTING_ACTIVE_BYTE + CC_MAX_CONFIG_LINES //tag:busyTrigger
|
||||
#define CFGID_LINE_CFWDALL_STRING CFGID_LINE_BUSY_TRIGGER_INT + CC_MAX_CONFIG_LINES //not from configuration
|
||||
|
||||
#define CFGID_LINE_SPEEDDIAL_NUMBER_STRING CFGID_LINE_CFWDALL_STRING + MAX_CONFIG_LINES
|
||||
#define CFGID_LINE_RETRIEVAL_PREFIX_STRING CFGID_LINE_SPEEDDIAL_NUMBER_STRING + MAX_CONFIG_LINES
|
||||
#define CFGID_LINE_MESSAGES_NUMBER_STRING CFGID_LINE_RETRIEVAL_PREFIX_STRING + MAX_CONFIG_LINES
|
||||
#define CFGID_LINE_FWD_CALLER_NAME_DIPLAY_BOOL CFGID_LINE_MESSAGES_NUMBER_STRING + MAX_CONFIG_LINES
|
||||
#define CFGID_LINE_FWD_CALLER_NUMBER_DIPLAY_BOOL CFGID_LINE_FWD_CALLER_NAME_DIPLAY_BOOL + MAX_CONFIG_LINES
|
||||
#define CFGID_LINE_FWD_REDIRECTED_NUMBER_DIPLAY_BOOL CFGID_LINE_FWD_CALLER_NUMBER_DIPLAY_BOOL + MAX_CONFIG_LINES
|
||||
#define CFGID_LINE_FWD_DIALED_NUMBER_DIPLAY_BOOL CFGID_LINE_FWD_REDIRECTED_NUMBER_DIPLAY_BOOL + MAX_CONFIG_LINES
|
||||
#define CFGID_LINE_FEATURE_OPTION_MASK_INT CFGID_LINE_FWD_DIALED_NUMBER_DIPLAY_BOOL + MAX_CONFIG_LINES
|
||||
#define HLAPI_INDEX_OFFSET CFGID_LINE_FEATURE_OPTION_MASK_INT
|
||||
|
||||
#define CFGID_PROTOCOL_MAX HLAPI_INDEX_OFFSET + MAX_CONFIG_LINES //For notation only.
|
||||
|
||||
|
||||
#define CFGID_CONFIG_FILE 1001
|
||||
|
||||
/*********************************************************
|
||||
*
|
||||
* Value Definitions
|
||||
*
|
||||
*********************************************************/
|
||||
// Line feature
|
||||
|
||||
/**
|
||||
* Set the maximum line available for registration
|
||||
* @param lines the maximum line could be configured.
|
||||
* @return
|
||||
*/
|
||||
int CC_Config_SetAvailableLines(cc_lineid_t lines);
|
||||
|
||||
/**
|
||||
* Sets the integer value for the config property.
|
||||
* @param [in] cfgid - config property identifier
|
||||
* @param [in] value - integer value to be set.
|
||||
* @return
|
||||
*/
|
||||
void CC_Config_setIntValue(int cfgid, int value);
|
||||
|
||||
/**
|
||||
* Sets the boolean value for the config property.
|
||||
* @param [in] cfgid - config property identifier
|
||||
* @param [in] value - boolean value to be set.
|
||||
* @return
|
||||
*/
|
||||
void CC_Config_setBooleanValue(int cfgid, cc_boolean value);
|
||||
|
||||
/**
|
||||
* Sets the string value for the config property.
|
||||
* @param [in] cfgid - config property identifier
|
||||
* @param [in] value - string value to be set.
|
||||
* @return
|
||||
*/
|
||||
void CC_Config_setStringValue(int cfgid, const char* value);
|
||||
|
||||
/**
|
||||
* Sets the byte value for the config property.
|
||||
* @param [in] cfgid - config property identifier
|
||||
* @param [in] value - byte value to be set.
|
||||
* @return
|
||||
*/
|
||||
void CC_Config_setByteValue(int cfgid, unsigned char value);
|
||||
|
||||
/**
|
||||
* Sets the byte array value for the config property.
|
||||
* @param [in] cfgid - config property identifier
|
||||
* @param [in] byte_array - byte array value to be set.
|
||||
* @param [in] length - lenght of array.
|
||||
* @return
|
||||
*/
|
||||
void CC_Config_setArrayValue(int cfgid, char *byte_array, int length);
|
||||
|
||||
/**
|
||||
* Set the dialplan file
|
||||
* @param dial_plan_string the dial plan content string
|
||||
* @param length the length of dial plan string, the maximum size will be 0x2000.
|
||||
* @return string dial plan version stamp
|
||||
*/
|
||||
char* CC_Config_setDialPlan(const char *dial_plan_string, int len);
|
||||
|
||||
/**
|
||||
* Set the fcp file
|
||||
* @param fcp_plan_)string - path to the fcp plan)
|
||||
* @param len - length, the maximum size will be 0xXXXX (tbd- pfg))
|
||||
* @return string - fcp plan version stamp
|
||||
*/
|
||||
|
||||
char* CC_Config_setFcp(const char *fcp_plan_string, int len);
|
||||
|
||||
#endif /* _CC_CONFIG_H_ */
|
||||
@@ -0,0 +1,563 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _CC_CONSTANTS_H_
|
||||
#define _CC_CONSTANTS_H_
|
||||
#include "cc_types.h"
|
||||
|
||||
#define PC_HANDLE_SIZE 17 /* 8 random bytes in hex plus null */
|
||||
|
||||
/**
|
||||
* Max call servers
|
||||
*/
|
||||
#define MAX_CALL_SERVERS 4
|
||||
|
||||
/**
|
||||
* Define notification priority
|
||||
*/
|
||||
#define CC_DEF_NOTIFY_PRI 20
|
||||
#define CC_HR_NOTIFY_PRI 1
|
||||
|
||||
#define CC_ALL_LINES 255
|
||||
#define SID_LINE_SHIFT 16
|
||||
#define CC_NO_CALL_ID (0)
|
||||
#define CC_NO_LINE (0)
|
||||
#define CC_NO_CALL_INSTANCE (0)
|
||||
|
||||
#define CC_MAX_LEN_REQ_SUPP_PARAM_CISCO_SISTAG 64
|
||||
|
||||
/**
|
||||
* Attrib bit in video available direction byte to indicate if the video is over CAST
|
||||
*/
|
||||
#define CC_ATTRIB_CAST 0x8
|
||||
|
||||
/**
|
||||
* Define the line id. The value 0 (CC_NO_LINE) means not set, it will be set by pSipcc system.
|
||||
*/
|
||||
typedef unsigned short cc_lineid_t;
|
||||
|
||||
/**
|
||||
* Define the call id. The value 0 (CC_NO_CALL_ID) means not set, it will be set by pSipcc system.
|
||||
*/
|
||||
typedef unsigned short cc_callid_t;
|
||||
|
||||
typedef unsigned short cc_streamid_t;
|
||||
typedef unsigned short cc_mcapid_t;
|
||||
typedef unsigned short cc_groupid_t;
|
||||
typedef unsigned short cc_level_t;
|
||||
|
||||
/**
|
||||
* Define the call instance id
|
||||
*/
|
||||
|
||||
typedef unsigned short cc_call_instance_t;
|
||||
|
||||
/**
|
||||
* Define string char
|
||||
*/
|
||||
typedef const char *cc_string_t;
|
||||
|
||||
/**
|
||||
* Define an empty call handle
|
||||
*/
|
||||
#define CC_EMPTY_CALL_HANDLE (0)
|
||||
|
||||
/**
|
||||
* This will be returned by pSipcc system, a user/application should use the following two methods to get the selected or
|
||||
* assinged line id and call id.
|
||||
* When a user or an application doesn't select a line (user passes 0 to pSipcc),, the pSipcc will assign it with the first available
|
||||
* line to it based on the maximum call per line that is configured.
|
||||
*/
|
||||
typedef unsigned int cc_call_handle_t;
|
||||
#define CC_SID_TYPE_SHIFT 28
|
||||
#define CC_SID_LINE_SHIFT 16
|
||||
#define CC_SESSIONTYPE_CALLCONTROL 1
|
||||
#define GET_LINE_ID(call_handle) (cc_lineid_t)((call_handle & 0xFFF0000) >> CC_SID_LINE_SHIFT )
|
||||
#define GET_CALL_ID(call_handle) (cc_callid_t)(call_handle & 0xFFFF)
|
||||
#define CREATE_CALL_HANDLE(line, callid) (cc_call_handle_t)(((line & 0xFFF) << CC_SID_LINE_SHIFT) + (callid & 0xFFFF))
|
||||
#define CREATE_CALL_HANDLE_FROM_SESSION_ID(session_id) (session_id & 0xFFFFFFF)
|
||||
#define CREATE_SESSION_ID_FROM_CALL_HANDLE(call_handle) ((CC_SESSIONTYPE_CALLCONTROL << CC_SID_TYPE_SHIFT) + call_handle)
|
||||
|
||||
/**
|
||||
* Define return codes
|
||||
*/
|
||||
typedef enum {
|
||||
CC_FAILURE = -1,
|
||||
CC_SUCCESS
|
||||
} cc_return_t;
|
||||
|
||||
/**
|
||||
* Define valid number digits for SendDigit method
|
||||
*/
|
||||
typedef enum {
|
||||
KEY_1 = '1',
|
||||
KEY_2 = '2',
|
||||
KEY_3 = '3',
|
||||
KEY_4 = '4',
|
||||
KEY_5 = '5',
|
||||
KEY_6 = '6',
|
||||
KEY_7 = '7',
|
||||
KEY_8 = '8',
|
||||
KEY_9 = '9',
|
||||
KEY_0 = '0',
|
||||
KEY_STAR = '*',
|
||||
KEY_POUND = '#',
|
||||
KEY_A = 'A',
|
||||
KEY_B = 'B',
|
||||
KEY_C = 'C',
|
||||
KEY_D = 'D',
|
||||
KEY_PLUS = '+'
|
||||
} cc_digit_t;
|
||||
|
||||
|
||||
/**
|
||||
* Defines cucm mode of the call manager to which device is connected.
|
||||
*/
|
||||
typedef enum {
|
||||
CC_MODE_INVALID = -1,
|
||||
CC_MODE_CCM,
|
||||
CC_MODE_NONCCM
|
||||
} cc_cucm_mode_t;
|
||||
|
||||
// Line feature
|
||||
typedef enum {
|
||||
CC_LINE_FEATURE_NONE = 0,
|
||||
CC_LINE_FEATURE_REDIAL = 1,
|
||||
CC_LINE_FEATURE_SPEEDDIAL = 2,
|
||||
CC_LINE_FEATURE_DN = 9,
|
||||
CC_LINE_FEATURE_SERVICE = 20,
|
||||
CC_LINE_FEATURE_SPEEDDIALBLF = 21,
|
||||
CC_LINE_FEATURE_MALICIOUSCALLID = 27,
|
||||
CC_LINE_FEATURE_CALLPICKUP = 127,
|
||||
CC_LINE_FEATURE_GROUPCALLPICKUP = 128,
|
||||
CC_LINE_FEATURE_QUALREPORTTOOL = 133,
|
||||
CC_LINE_FEATURE_OTHERPICKUP = 135,
|
||||
CC_LINE_FEATURE_ALLCALLS = 140,
|
||||
CC_LINE_FEATURE_ANSWEROLDEST = 141,
|
||||
CC_LINE_FEATURE_SERVICES = 192,
|
||||
CC_LINE_FEATURE_BLF = 255
|
||||
} cc_line_feature_t;
|
||||
|
||||
/**
|
||||
* Define feature option mask
|
||||
*/
|
||||
typedef enum {
|
||||
CC_FEATUREOPTIONMASK_NONE,
|
||||
CC_FEATUREOPTIONMASK_BLF_PICKUP
|
||||
} cc_feature_option_mask_t;
|
||||
|
||||
/**
|
||||
* Defines cucm secure levels
|
||||
*/
|
||||
typedef enum {
|
||||
CC_CUCM_NONSECURE,
|
||||
CC_CUCM_AUTHENTICATED,
|
||||
CC_CUCM_ENCRYPTED,
|
||||
CC_CUCM_NOT_IN_CTL
|
||||
} cc_cucm_sec_level_t;
|
||||
|
||||
/**
|
||||
* Defines cc events causing registration state change
|
||||
*/
|
||||
typedef enum {
|
||||
CC_CAUSE_NONE,
|
||||
CC_CAUSE_FAILOVER,
|
||||
CC_CAUSE_FALLBACK,
|
||||
CC_CAUSE_REG_ALL_FAILED,
|
||||
CC_CAUSE_SHUTDOWN,
|
||||
CC_CAUSE_UNREG_ALL,
|
||||
CC_CAUSE_LOGOUT_RESET
|
||||
} cc_service_cause_t;
|
||||
|
||||
/**
|
||||
* Defines cc service state
|
||||
*/
|
||||
typedef enum {
|
||||
CC_STATE_IDLE = 0,
|
||||
CC_STATE_INS,
|
||||
CC_STATE_OOS,
|
||||
CC_STATE_PRO_BASE
|
||||
} cc_service_state_t;
|
||||
|
||||
/**
|
||||
* Define cucm connection status.
|
||||
*/
|
||||
typedef enum {
|
||||
CC_CCM_STATUS_NONE = 0,
|
||||
CC_CCM_STATUS_STANDBY,
|
||||
CC_CCM_STATUS_ACTIVE
|
||||
} cc_ccm_status_t;
|
||||
|
||||
/**
|
||||
* Define line registration state
|
||||
*/
|
||||
typedef enum {
|
||||
CC_UNREGISTERED,
|
||||
CC_REGISTERED
|
||||
}cc_line_reg_state_t;
|
||||
|
||||
/**
|
||||
* Defines pSipcc shutdown reason code
|
||||
*/
|
||||
typedef enum {
|
||||
CC_SHUTDOWN_NORMAL,
|
||||
CC_SHUTDOWN_UNSPECIFIED,
|
||||
CC_SHUTDOWN_VERMISMATCH
|
||||
} cc_shutdown_reason_t;
|
||||
|
||||
/**
|
||||
* Defines kpml value
|
||||
*/
|
||||
typedef enum {
|
||||
CC_KPML_NONE = 0x0,
|
||||
CC_KPML_SIGNAL_ONLY = 0x1,
|
||||
CC_KPML_DTMF_ONLY = 0x2,
|
||||
CC_KPML_BOTH = 0x3
|
||||
} cc_kpml_config_t;
|
||||
|
||||
/**
|
||||
* Defines whether to upgrade now or later to recently download firmware image
|
||||
*/
|
||||
typedef enum {
|
||||
CC_UPGRADE_NONE = 0,
|
||||
CC_UPGRADE_NOW,
|
||||
CC_UPGRADE_LATER
|
||||
} cc_upgrade_t;
|
||||
|
||||
/* Media flow direction */
|
||||
typedef enum {
|
||||
CC_SDP_DIRECTION_INACTIVE,
|
||||
CC_SDP_DIRECTION_SENDONLY,
|
||||
CC_SDP_DIRECTION_RECVONLY,
|
||||
CC_SDP_DIRECTION_SENDRECV,
|
||||
CC_SDP_MAX_QOS_DIRECTIONS
|
||||
} cc_sdp_direction_t;
|
||||
|
||||
/**
|
||||
* Defines BLF state
|
||||
*/
|
||||
typedef enum {
|
||||
CC_SIP_BLF_UNKNOWN,
|
||||
CC_SIP_BLF_IDLE,
|
||||
CC_SIP_BLF_INUSE,
|
||||
CC_SIP_BLF_EXPIRED,
|
||||
CC_SIP_BLF_REJECTED,
|
||||
CC_SIP_BLF_ALERTING
|
||||
} cc_blf_state_t;
|
||||
|
||||
/**
|
||||
* Defines BLF feature mask
|
||||
*/
|
||||
typedef enum {
|
||||
CC_BLF_FEATURE_MASK_NONE = 0,
|
||||
CC_BLF_FEATURE_MASK_PICKUP
|
||||
} cc_blf_feature_mask_t;
|
||||
|
||||
/**
|
||||
* Defines call state
|
||||
*/
|
||||
typedef enum {
|
||||
OFFHOOK,
|
||||
ONHOOK,
|
||||
RINGOUT,
|
||||
RINGIN,
|
||||
PROCEED,
|
||||
CONNECTED,
|
||||
HOLD,
|
||||
REMHOLD,
|
||||
RESUME,
|
||||
BUSY,
|
||||
REORDER,
|
||||
CONFERENCE,
|
||||
DIALING,
|
||||
REMINUSE,
|
||||
HOLDREVERT,
|
||||
WHISPER,
|
||||
PRESERVATION,
|
||||
WAITINGFORDIGITS = 21,
|
||||
CREATEOFFER,
|
||||
CREATEANSWER,
|
||||
CREATEOFFERERROR,
|
||||
CREATEANSWERERROR,
|
||||
SETLOCALDESC,
|
||||
SETREMOTEDESC,
|
||||
SETLOCALDESCERROR,
|
||||
SETREMOTEDESCERROR,
|
||||
REMOTESTREAMADD,
|
||||
MAX_CALL_STATES
|
||||
} cc_call_state_t;
|
||||
|
||||
/**
|
||||
* Defines call attribute
|
||||
*/
|
||||
typedef enum {
|
||||
CC_ATTR_NOT_DEFINED = -1,
|
||||
CC_ATTR_NORMAL,
|
||||
CC_ATTR_XFR_CONSULT,
|
||||
CC_ATTR_CONF_CONSULT,
|
||||
CC_ATTR_BARGING,
|
||||
CC_ATTR_RIUHELD_LOCKED,
|
||||
CC_ATTR_LOCAL_CONF_CONSULT,
|
||||
CC_ATTR_LOCAL_XFER_CONSULT,
|
||||
CC_ATTR_CFWDALL,
|
||||
CC_ATTR_GRP_CALL_PICKUP,
|
||||
CC_ATTR_CFWD_ALL,
|
||||
CC_ATTR_MAX
|
||||
} cc_call_attr_t;
|
||||
|
||||
/**
|
||||
* Defines the hold reason
|
||||
*/
|
||||
typedef enum {
|
||||
CC_HOLD_REASON_NONE,
|
||||
CC_HOLD_REASON_XFER,
|
||||
CC_HOLD_REASON_CONF,
|
||||
CC_HOLD_REASON_SWAP,
|
||||
CC_HOLD_REASON_INTERNAL
|
||||
} cc_hold_reason_t;
|
||||
|
||||
/**
|
||||
* Defines call type
|
||||
*/
|
||||
typedef enum {
|
||||
CC_CALL_TYPE_NONE,
|
||||
CC_CALL_TYPE_INCOMING,
|
||||
CC_CALL_TYPE_OUTGOING,
|
||||
CC_CALL_TYPE_FORWARDED
|
||||
} cc_call_type_t;
|
||||
|
||||
/**
|
||||
* Defines call security
|
||||
*/
|
||||
typedef enum {
|
||||
CC_SECURITY_NONE,
|
||||
CC_SECURITY_UNKNOWN,
|
||||
CC_SECURITY_AUTHENTICATED,
|
||||
CC_SECURITY_NOT_AUTHENTICATED,
|
||||
CC_SECURITY_ENCRYPTED
|
||||
} cc_call_security_t;
|
||||
|
||||
/**
|
||||
* Defines call policy
|
||||
*/
|
||||
typedef enum {
|
||||
/* Call Policy */
|
||||
CC_POLICY_NONE,
|
||||
CC_POLICY_UNKNOWN,
|
||||
CC_POLICY_CHAPERONE
|
||||
} cc_call_policy_t;
|
||||
|
||||
/**
|
||||
* Defines Log disposition
|
||||
*/
|
||||
typedef enum {
|
||||
CC_LOGD_MISSED,
|
||||
CC_LOGD_RCVD,
|
||||
CC_LOGD_SENT,
|
||||
CC_LOGD_UNKNWN,
|
||||
CC_LOGD_DELETE
|
||||
} cc_log_disposition_t;
|
||||
|
||||
/**
|
||||
* Defines call priority
|
||||
*/
|
||||
typedef enum{
|
||||
CC_PRIORITY_NORMAL,
|
||||
CC_PRIORITY_URGENT
|
||||
} cc_call_priority_t;
|
||||
|
||||
/**
|
||||
* Defines call selection
|
||||
*/
|
||||
typedef enum {
|
||||
CC_CALL_SELECT_NONE,
|
||||
CC_CALL_SELECT_LOCKED,
|
||||
CC_CALL_SELECT_UNLOCKED,
|
||||
CC_CALL_SELECT_REMOTE_LOCKED
|
||||
} cc_call_selection_t;
|
||||
|
||||
/**
|
||||
* Defines service control request
|
||||
*/
|
||||
typedef enum {
|
||||
CC_DEVICE_RESET = 1,
|
||||
CC_DEVICE_RESTART,
|
||||
CC_DEVICE_ICMP_UNREACHABLE = 5
|
||||
} cc_srv_ctrl_req_t;
|
||||
|
||||
/**
|
||||
* Defines service control command
|
||||
*/
|
||||
typedef enum {
|
||||
CC_ACTION_RESET = 1,
|
||||
CC_ACTION_RESTART
|
||||
} cc_srv_ctrl_cmd_t;
|
||||
|
||||
/**
|
||||
* Defines messaging type
|
||||
*/
|
||||
typedef enum {
|
||||
CC_VOICE_MESSAGE = 1,
|
||||
CC_TEXT_MESSAGE
|
||||
} cc_message_type_t;
|
||||
|
||||
/**
|
||||
* Defines handset lamp state
|
||||
*/
|
||||
typedef enum {
|
||||
CC_LAMP_NONE = 0,
|
||||
CC_LAMP_ON,
|
||||
CC_LAMP_BLINK,
|
||||
CC_LAMP_FRESH
|
||||
} cc_lamp_state_t;
|
||||
|
||||
/**
|
||||
* defines call cause
|
||||
* Important: when update this enum, please update the cc_cause_name accordingly.
|
||||
*/
|
||||
typedef enum {
|
||||
CC_CAUSE_MIN = -1,
|
||||
CC_CAUSE_BASE = -1,
|
||||
CC_CAUSE_OK,
|
||||
CC_CAUSE_ERROR,
|
||||
CC_CAUSE_UNASSIGNED_NUM,
|
||||
CC_CAUSE_NO_RESOURCE,
|
||||
CC_CAUSE_NO_ROUTE,
|
||||
CC_CAUSE_NORMAL,
|
||||
CC_CAUSE_BUSY,
|
||||
CC_CAUSE_NO_USER_RESP,
|
||||
CC_CAUSE_NO_USER_ANS,
|
||||
CC_CAUSE_REJECT,
|
||||
CC_CAUSE_INVALID_NUMBER,
|
||||
CC_CAUSE_FACILITY_REJECTED,
|
||||
CC_CAUSE_CALL_ID_IN_USE,
|
||||
CC_CAUSE_XFER_LOCAL,
|
||||
CC_CAUSE_XFER_REMOTE,
|
||||
CC_CAUSE_XFER_BY_REMOTE,
|
||||
CC_CAUSE_XFER_CNF,
|
||||
CC_CAUSE_CONGESTION,
|
||||
CC_CAUSE_ANONYMOUS,
|
||||
CC_CAUSE_REDIRECT,
|
||||
CC_CAUSE_PAYLOAD_MISMATCH,
|
||||
CC_CAUSE_CONF,
|
||||
CC_CAUSE_REPLACE,
|
||||
CC_CAUSE_NO_REPLACE_CALL,
|
||||
CC_CAUSE_NO_RESUME,
|
||||
CC_CAUSE_NO_MEDIA,
|
||||
CC_CAUSE_REQUEST_PENDING,
|
||||
CC_CAUSE_INVALID_PARTICIPANT,
|
||||
CC_CAUSE_NO_CNF_BRIDE,
|
||||
CC_MAXIMUM_PARTICIPANT,
|
||||
CC_KEY_NOT_ACTIVE,
|
||||
CC_TEMP_NOT_AVAILABLE,
|
||||
CC_CAUSE_REMOTE_SERVER_ERROR,
|
||||
CC_CAUSE_BARGE,
|
||||
CC_CAUSE_CBARGE,
|
||||
CC_CAUSE_NOT_FOUND,
|
||||
CC_CAUSE_SECURITY_FAILURE,
|
||||
CC_CAUSE_MONITOR,
|
||||
CC_CAUSE_UI_STATE_BUSY,
|
||||
CC_SIP_CAUSE_ANSWERED_ELSEWHERE,
|
||||
CC_CAUSE_RETRIEVED,
|
||||
CC_CAUSE_FORWARDED,
|
||||
CC_CAUSE_ABANDONED,
|
||||
CC_CAUSE_XFER_LOCAL_WITH_DIALSTRING,
|
||||
CC_CAUSE_BW_OK,
|
||||
CC_CAUSE_XFER_COMPLETE,
|
||||
CC_CAUSE_RESP_TIMEOUT,
|
||||
CC_CAUSE_SERV_ERR_UNAVAIL,
|
||||
CC_CAUSE_REMOTE_DISCONN_REQ_PLAYTONE,
|
||||
CC_CAUSE_OUT_OF_MEM,
|
||||
CC_CAUSE_VALUE_NOT_FOUND,
|
||||
CC_CAUSE_MAX
|
||||
} cc_cause_t;
|
||||
|
||||
/**
|
||||
* defines subscription event type
|
||||
*/
|
||||
typedef enum {
|
||||
CC_SUBSCRIPTIONS_DIALOG_EXT = 2,
|
||||
CC_SUBSCRIPTIONS_KPML_EXT = 4,
|
||||
CC_SUBSCRIPTIONS_PRESENCE_EXT = 5,
|
||||
CC_SUBSCRIPTIONS_REMOTECC_EXT = 6,
|
||||
CC_SUBSCRIPTIONS_REMOTECC_OPTIONSIND_EXT = 7,
|
||||
CC_SUBSCRIPTIONS_CONFIGAPP_EXT = 8,
|
||||
CC_SUBSCRIPTIONS_MEDIA_INFO_EXT = 10
|
||||
} cc_subscriptions_ext_t;
|
||||
|
||||
typedef enum {
|
||||
APPLY_DYNAMICALLY=0,
|
||||
RESTART_NEEDED,
|
||||
APPLY_CONFIG_NONE
|
||||
} cc_apply_config_result_t;
|
||||
|
||||
|
||||
/**
|
||||
* defines ID of cucm
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
PRIMARY_CCM = 0,
|
||||
SECONDARY_CCM,
|
||||
TERTIARY_CCM,
|
||||
MAX_CCM,
|
||||
UNUSED_PARAM
|
||||
} CCM_ID;
|
||||
|
||||
typedef enum {
|
||||
CC_SIS_B2B_CONF = 0,
|
||||
CC_SIS_SWAP,
|
||||
CC_SIS_CFWD_ANY_LINE
|
||||
} cc_sis_feature_id_e;
|
||||
|
||||
/**
|
||||
* enum for conference participant status
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
CCAPI_CONFPARTICIPANT_UNKNOWN,
|
||||
CCAPI_CONFPARTICIPANT_DIALING_OUT,
|
||||
CCAPI_CONFPARTICIPANT_ALERTING,
|
||||
CCAPI_CONFPARTICIPANT_CONNECTED,
|
||||
CCAPI_CONFPARTICIPANT_ON_HOLD,
|
||||
CCAPI_CONFPARTICIPANT_DISCONNECTED
|
||||
} cc_conf_participant_status_t;
|
||||
|
||||
|
||||
typedef enum {
|
||||
JSEP_NO_ACTION = -1,
|
||||
JSEP_OFFER,
|
||||
JSEP_ANSWER,
|
||||
JSEP_PRANSWER
|
||||
} cc_jsep_action_t;
|
||||
|
||||
|
||||
typedef cc_string_t cc_peerconnection_t;
|
||||
|
||||
typedef unsigned int cc_media_stream_id_t;
|
||||
|
||||
typedef unsigned int cc_media_track_id_t;
|
||||
|
||||
|
||||
typedef enum {
|
||||
NO_STREAM = -1,
|
||||
AUDIO,
|
||||
VIDEO,
|
||||
TYPE_MAX
|
||||
} cc_media_type_t;
|
||||
|
||||
|
||||
typedef struct {
|
||||
char *name;
|
||||
char *value;
|
||||
cc_boolean mandatory;
|
||||
} cc_media_constraint_t;
|
||||
|
||||
typedef struct {
|
||||
cc_media_constraint_t** constraints;
|
||||
cc_uint16_t constraint_count;
|
||||
} cc_media_constraints_t;
|
||||
|
||||
#endif /* _CC_CONSTANTS_H_ */
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef CC_DEBUG_H_
|
||||
#define CC_DEBUG_H_
|
||||
#include "cc_types.h"
|
||||
#include <cpr_stdio.h>
|
||||
|
||||
extern cc_int32_t VCMDebug;
|
||||
extern cc_int32_t PLATDebug;
|
||||
|
||||
#define PLAT_ERROR err_msg
|
||||
#define VCM_ERR err_msg
|
||||
|
||||
#define VCM_DEBUG if (VCMDebug) buginf
|
||||
#define PLAT_DEBUG if (PLATDebug) buginf
|
||||
|
||||
//DEBUG message prefixes
|
||||
#define PLAT_F_PREFIX "PLAT : %s : "
|
||||
#define PLAT_A_F_PREFIX "PLAT : %s : %s :"
|
||||
#define PLAT_L_C_F_PREFIX "PLAT : %d/%d : %s : " // line/call/fname as arg
|
||||
#define VCM_F_PREFIX "VCM : %s : "
|
||||
#define VCM_A_F_PREFIX "VCM : %s : %s :"
|
||||
#define VCM_L_C_F_PREFIX "%s : %d/%d : %s : " // line/call/fname as arg
|
||||
#define PLAT_F_PREFIX_ARGS(msg_name, func_name) msg_name, func_name
|
||||
#define PLAT_L_C_F_PREFIX_ARGS(msg_name, line, call_id, func_name) \
|
||||
msg_name, line, call_id, func_name
|
||||
|
||||
|
||||
//
|
||||
#define PLAT_API "PLAT_API" // platform API
|
||||
#define VCM_API "VCM_API" // vcm api
|
||||
|
||||
#endif /* CC_DEBUG_H_ */
|
||||
@@ -0,0 +1,35 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _CC_DEVICE_FEATURE_H_
|
||||
#define _CC_DEVICE_FEATURE_H_
|
||||
|
||||
#include "cc_constants.h"
|
||||
|
||||
|
||||
/**
|
||||
* Enable or disable video capability of the device.
|
||||
* @param enable - a flag to indicate that application wants to enable of
|
||||
* disable video capability of the device.
|
||||
* @return void
|
||||
*/
|
||||
void CC_DeviceFeature_enableVideo(cc_boolean enable);
|
||||
|
||||
/**
|
||||
* Indicate native video support for the device
|
||||
* @param enable - a flag to indicate that device supports native video
|
||||
* @return void
|
||||
*/
|
||||
void CC_DeviceFeature_supportsVideo(cc_boolean enable);
|
||||
|
||||
/**
|
||||
* Enable or disable camera capability of the device.
|
||||
* @param enable - a flag to indicate that application wants to enable of
|
||||
* disable camera capability of the device.
|
||||
* @return void
|
||||
*/
|
||||
void CC_DeviceFeature_enableCamera(cc_boolean enable);
|
||||
|
||||
|
||||
#endif /* _CC_DEVICE_FEATURE_H_ */
|
||||
@@ -0,0 +1,76 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _CC_DEVICE_LISTENER_H_
|
||||
#define _CC_DEVICE_LISTENER_H_
|
||||
#include "cc_constants.h"
|
||||
|
||||
/***********************************Device feature listener methods**************************************/
|
||||
/**
|
||||
* Inform an application about the call forward status
|
||||
* @param line line number
|
||||
* @param is_fwd if the call forward set is a success or not.
|
||||
* @param is_local is cfwd a local configured or supportted by cucm
|
||||
* @param cfa_num call farward all number
|
||||
* @return void
|
||||
*/
|
||||
void CC_DeviceListener_callForwardAllStateChanged(cc_lineid_t line, cc_boolean is_fwd, cc_boolean is_local, cc_string_t cfa_num);
|
||||
|
||||
/**
|
||||
* Informa an application that a specifical line has message waiting.
|
||||
* @param line line number
|
||||
* @param state has message waiting or not
|
||||
* @param message_type type of message waiting, e.g. voice message, text message, etc.
|
||||
* @param new_count the count of new message waiting.
|
||||
* @param old_count the count of old message waiting.
|
||||
* @param high_priority_new_count the count of high priority message waiting.
|
||||
* @param high_priority_old_count the count of old high priority message waiting.
|
||||
* @return void
|
||||
*/
|
||||
void CC_DeviceListener_mwiStateUpdated(cc_lineid_t line, cc_boolean state,
|
||||
cc_message_type_t message_type,
|
||||
int new_count,
|
||||
int old_count,
|
||||
int high_priority_new_count,
|
||||
int high_priority_old_count);
|
||||
|
||||
/**
|
||||
* Update the handset lamp light
|
||||
* @param lamp_state lamp state
|
||||
* @return void
|
||||
*/
|
||||
void CC_DeviceListener_mwiLampUpdated(cc_lamp_state_t lamp_state);
|
||||
|
||||
/**
|
||||
* Inform application if the maximum number of call for the particular line is reached or not.
|
||||
* @param line the line is reported
|
||||
* @param state true or false
|
||||
* @return void
|
||||
*/
|
||||
void CC_DeviceListener_mncReached(cc_lineid_t line, cc_boolean state);
|
||||
|
||||
/**
|
||||
* Call Status/prompt notifications
|
||||
* @param time display duration
|
||||
* @param display_progress
|
||||
* @param priority see definition for notification priority in cc_constants.h
|
||||
* @param prompt phrase to display
|
||||
* @return void
|
||||
*/
|
||||
void CC_DeviceListener_displayNotify(int time, cc_boolean display_progress, char priority, cc_string_t prompt);
|
||||
|
||||
/**
|
||||
* Update speed dial label
|
||||
* @param line the line number
|
||||
* @param button_no the button number
|
||||
* @param speed_dial_number the speed dial number
|
||||
* @param label the label to display for the line if line visual presentation is available.
|
||||
* @return void
|
||||
*/
|
||||
void CC_DeviceListener_labelNSpeedUpdated(cc_lineid_t line,
|
||||
int button_no,
|
||||
cc_string_t speed_dial_number,
|
||||
cc_string_t label);
|
||||
|
||||
#endif /* _CC_DEVICE_LISTENER_H_ */
|
||||
@@ -0,0 +1,39 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _CC_INFO_H_
|
||||
#define _CC_INFO_H_
|
||||
|
||||
#include "cc_constants.h"
|
||||
|
||||
/**
|
||||
* Defines to be used for info_package info_type and info body in CC_Info_sendInfo()
|
||||
* to send FAST PICTURE UPDATE INFO out
|
||||
*/
|
||||
#define FAST_PIC_INFO_PACK ""
|
||||
#define FAST_PIC_CTYPE "application/media_control+xml"
|
||||
#define FAST_PIC_MSG_BODY "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>\n\
|
||||
<media_control>\n\
|
||||
<vc_primitive>\n\
|
||||
<to_encoder>\n\
|
||||
<picture_fast_update/>\n\
|
||||
</to_encoder>\n\
|
||||
</vc_primitive>\n\
|
||||
</media_control>"
|
||||
|
||||
|
||||
/**
|
||||
* Send SIP INFO message with the specified event_type and xml body
|
||||
* @param call_handle call handle
|
||||
* @param info_package the Info-Package header of the INFO message
|
||||
* @param info_type the Content-Type header of the INFO message
|
||||
* @param info_body the message body of the INFO message
|
||||
* @return void
|
||||
*/
|
||||
void CC_Info_sendInfo(cc_call_handle_t call_handle,
|
||||
cc_string_t info_package,
|
||||
cc_string_t info_type,
|
||||
cc_string_t info_body);
|
||||
|
||||
#endif /* _CC_INFO_H_ */
|
||||
@@ -0,0 +1,24 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _CC_INFO_LISTENER_H_
|
||||
#define _CC_INFO_LISTENER_H_
|
||||
|
||||
#include "cc_constants.h"
|
||||
|
||||
/**
|
||||
* Recieve SIP INFO for the specified session
|
||||
* @param call_handle call handle
|
||||
* @param pack_id the info package id number
|
||||
* @param info_package the Info-Package header of the Info Package
|
||||
* @param info_type the Content-Type header of the Info Package
|
||||
* @param info_body the message body of the Info Package
|
||||
* @return void
|
||||
*/
|
||||
void CC_InfoListener_receivedInfo(cc_call_handle_t call_handle, int pack_id,
|
||||
cc_string_t info_package,
|
||||
cc_string_t info_type,
|
||||
cc_string_t info_body);
|
||||
|
||||
#endif /* _CC_INFO_LISTENER_H_ */
|
||||
@@ -0,0 +1,77 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _CC_SERVICE_H_
|
||||
#define _CC_SERVICE_H_
|
||||
|
||||
#include "cc_constants.h"
|
||||
|
||||
/**
|
||||
* Defines the management methods.
|
||||
*/
|
||||
/**
|
||||
* The following methods are defined to bring up the pSipcc stack
|
||||
*/
|
||||
/**
|
||||
* Initialize the pSipcc stack. CC_Service_create() must be called before
|
||||
* calling this function.
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CC_Service_init();
|
||||
|
||||
/**
|
||||
* This function creates various data module needed for initialization of
|
||||
* pSipcc stack. On reboot or after CC_Service_destroy(), application must call
|
||||
* first this function followed by CC_Service_init() and then
|
||||
* CC_Service_start() to bring pSipcc stack in in-service. This function
|
||||
* need to be called only once.
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CC_Service_create();
|
||||
|
||||
/**
|
||||
* Gracefully unload the pSipcc stack. To bring up the pSipcc stack again,
|
||||
* follow the function calling sequence starting from CC_Service_create().
|
||||
* @return SUCCESS
|
||||
*/
|
||||
cc_return_t CC_Service_destroy();
|
||||
|
||||
/**
|
||||
* Bring up the pSipcc stack in service. CC_Service_init() must be called
|
||||
* before calling this function.
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CC_Service_start();
|
||||
|
||||
/**
|
||||
* Shutdown pSipcc stack for restarting
|
||||
* @param mgmt_reason the reason to shutdown pSipcc stack
|
||||
* @param reason_string literal string for shutdown
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CC_Service_shutdown(cc_shutdown_reason_t mgmt_reason, cc_string_t reason_string);
|
||||
|
||||
/**
|
||||
* Unregister all lines of a phone
|
||||
* @param mgmt_reason the reason to bring down the registration
|
||||
* @param reason_string the literal string for unregistration
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CC_Service_unregisterAllLines(cc_shutdown_reason_t mgmt_reason, cc_string_t reason_string);
|
||||
|
||||
/**
|
||||
* Register all lines for a phone.
|
||||
* @param mgmt_reason the reason of registration
|
||||
* @param reason_string the literal string of the registration
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CC_Service_registerAllLines(cc_shutdown_reason_t mgmt_reason, cc_string_t reason_string);
|
||||
|
||||
/**
|
||||
* Restart pSipcc stack
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CC_Service_restart();
|
||||
|
||||
#endif /* _CC_SERVICE_H_ */
|
||||
@@ -0,0 +1,125 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _CC_SERVICE_LISTENER_H_
|
||||
#define _CC_SERVICE_LISTENER_H_
|
||||
|
||||
#include "cc_constants.h"
|
||||
|
||||
/**
|
||||
* The following section defines all callback method that the pSipcc stack will provide
|
||||
* for configuration purpose.
|
||||
*/
|
||||
/**
|
||||
* Notify appliation that the pSipcc stack is out of service.
|
||||
* Application can, for example, use this notification to inform user that
|
||||
* device is currently out of service.
|
||||
* @param cucm_mode - the cucm mode of call manager to which device was
|
||||
* connected before device went out of service.
|
||||
* @param service_cause [out] the cause of out of service.
|
||||
* @return void
|
||||
*/
|
||||
void CC_ServiceListener_outOfService(cc_cucm_mode_t cucm_mode, cc_service_cause_t service_cause);
|
||||
|
||||
/**
|
||||
* Notify application that the pSipcc stack is up in service. Application can,
|
||||
* for example, use this notification to inform user that device is currently
|
||||
* in service.
|
||||
* @param cucm_mode - the cucm mode of call manager to which device is
|
||||
* connected.
|
||||
* @param service_cause [out] - the cause of INS
|
||||
* @param sis_ver_name version name
|
||||
* @param major_number the major version number
|
||||
* @param minor_number the minor version number
|
||||
* @param additional_number the additional version number
|
||||
* @return void
|
||||
*/
|
||||
void CC_ServiceListener_inService(cc_cucm_mode_t cucm_mode,
|
||||
cc_service_cause_t service_cause,
|
||||
cc_string_t sis_ver_name,
|
||||
cc_uint32_t major_number,
|
||||
cc_uint32_t minor_number,
|
||||
cc_uint32_t additional_number);
|
||||
|
||||
|
||||
/**
|
||||
* Inform application that pSipcc stack has receive a NOTIFY message of event
|
||||
* type "service-control" and action=apply-config. The arguments passed to this
|
||||
* function contains the parameter values received in the message.
|
||||
*
|
||||
* @param config_version [in] latest version stamp of phone configuration.
|
||||
* @param dial_plan_version [in] latest version stamp of the dial plan.
|
||||
* @param fcp_version [in] latest version stamp of feature policy control.
|
||||
* @param cucm_result [in] action taken by the cucm for the changes applied by the
|
||||
* user to the phone configuration. cucm result could be
|
||||
* @li "no_change" - the new phone configuration changes do not impact Unified CM,
|
||||
* @li "config_applied" - The Unified CM Administration applied the
|
||||
* configuration changes dynamically without requiring phone to re-register,
|
||||
* @li "reregister_needed" - The Unified CM Administration applied the
|
||||
* configuration changes and required the phone to re-register to make them
|
||||
* effective.
|
||||
* @param load_id [in] - firmware image name that phone should be running with
|
||||
* @param inactive_load_d [in] firmaware image name for the inactive load image
|
||||
* @param load_server [in] - address of load server to download the firmware
|
||||
* image load_id.
|
||||
* @param log_server [in] - log server address where error report need to be
|
||||
* sent. Error report, for example, could be related to image download failure
|
||||
* or phone configuration file download failure.
|
||||
* @param ppid [in] whether peer to peer upgrade is available
|
||||
* @return void
|
||||
*/
|
||||
void CC_ServiceListener_applyConfigNotify(cc_string_t config_version,
|
||||
cc_string_t dial_plan_version,
|
||||
cc_string_t fcp_version,
|
||||
cc_string_t cucm_result,
|
||||
cc_string_t load_id,
|
||||
cc_string_t inactive_load_id,
|
||||
cc_string_t load_server,
|
||||
cc_string_t log_server,
|
||||
cc_boolean ppid);
|
||||
|
||||
/**
|
||||
* Notify the server time. Application can use this function to adjust the
|
||||
* device time.
|
||||
* @param time - time in second
|
||||
* @return void
|
||||
*/
|
||||
void CC_ServiceListener_serverTimeNotify(long time);
|
||||
|
||||
/**
|
||||
* Update the phone registration state.
|
||||
* @param line the line
|
||||
* @param reg_state the registration state
|
||||
* @return void
|
||||
*/
|
||||
void CC_ServiceListener_registrationStateChanged(cc_lineid_t line, cc_line_reg_state_t reg_state);
|
||||
|
||||
/**
|
||||
* Update cucm connection status.
|
||||
* @param address the cucm address
|
||||
* @param reg_ccm_state the connection state for the cucm.
|
||||
* @return void
|
||||
*/
|
||||
void CC_ServiceListener_cucmConnectionStatusChanged(cc_string_t address, cc_ccm_status_t reg_ccm_state);
|
||||
|
||||
/**
|
||||
* Sync up configuration version.
|
||||
* @param config_version the configuration version
|
||||
* @param dial_plan_version the dial plan version
|
||||
* @param softkey_version the softkey set version
|
||||
* @return void
|
||||
*/
|
||||
void CC_ServiceListener_configVersionNotify(cc_string_t config_version,
|
||||
cc_string_t dial_plan_version,
|
||||
cc_string_t softkey_version);
|
||||
|
||||
/**
|
||||
* Notifies incoming service control command from CUCM
|
||||
* @param srv_ctrl_type request a reset or restart.
|
||||
* @return void
|
||||
*/
|
||||
void CC_ServiceListener_serviceControlNotify(cc_srv_ctrl_cmd_t srv_ctrl_type);
|
||||
|
||||
|
||||
#endif /* _CC_SERVICE_LISTENER_H_ */
|
||||
@@ -0,0 +1,22 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _CC_TYPES_H_
|
||||
#define _CC_TYPES_H_
|
||||
|
||||
typedef char cc_int8_t;
|
||||
typedef unsigned char cc_uint8_t;
|
||||
typedef short cc_int16_t;
|
||||
typedef unsigned short cc_uint16_t;
|
||||
typedef int cc_int32_t;
|
||||
typedef unsigned int cc_uint32_t;
|
||||
typedef unsigned long cc_uint64_t;
|
||||
|
||||
typedef unsigned long cc_ulong_t;
|
||||
typedef unsigned char cc_uchar_t;
|
||||
|
||||
typedef cc_uint8_t cc_boolean;
|
||||
typedef cc_uint32_t cc_size_t;
|
||||
|
||||
#endif /*_CC_TYPES_H_*/
|
||||
@@ -0,0 +1,246 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _CCAPI_CALL_H_
|
||||
#define _CCAPI_CALL_H_
|
||||
|
||||
#include "ccapi_types.h"
|
||||
|
||||
/**
|
||||
* Get reference to call info
|
||||
* @param [in] handle - call handle
|
||||
* @return cc_call_info_snap_t
|
||||
* NOTE: The info returned by this method must be released using CCAPI_Call_releaseCallInfo()
|
||||
*/
|
||||
cc_callinfo_ref_t CCAPI_Call_getCallInfo(cc_call_handle_t handle);
|
||||
|
||||
/**
|
||||
* Release the resources held by this call info snapshot
|
||||
* @param [in] ref - refrence to the call info to be freed
|
||||
* @return void
|
||||
*/
|
||||
void CCAPI_Call_releaseCallInfo(cc_callinfo_ref_t ref);
|
||||
|
||||
/**
|
||||
* Retain the call info reference
|
||||
* @param [in] ref - reference to the call info to be retained
|
||||
* @return void
|
||||
* NOTE: Application that has retained callInfo must call CCAPI_Call_releaseCallInfo()
|
||||
* to free memory associated with this Info.
|
||||
*/
|
||||
void CCAPI_Call_retainCallInfo(cc_callinfo_ref_t ref);
|
||||
|
||||
/**
|
||||
* get the line associated with this call
|
||||
* @param [in] handle - call handle
|
||||
* @return cc_lineid_t
|
||||
*/
|
||||
cc_lineid_t CCAPI_Call_getLine(cc_call_handle_t call_handle);
|
||||
|
||||
/**
|
||||
* Originate call - API to go offhook and dial specified digits on a given call
|
||||
* @param [in] handle - call handle
|
||||
* @param [in] video_pref - video direction desired on call
|
||||
* @param [in] digits - digits to be dialed. can be empty then this API simply goes offhook
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CCAPI_Call_originateCall(cc_call_handle_t handle, cc_sdp_direction_t video_pref, cc_string_t digits);
|
||||
|
||||
|
||||
cc_return_t CCAPI_CreateOffer(cc_call_handle_t handle, const cc_media_constraints_t *constraints);
|
||||
|
||||
cc_return_t CCAPI_CreateAnswer(cc_call_handle_t handle, const cc_media_constraints_t *constraints);
|
||||
|
||||
cc_return_t CCAPI_SetLocalDescription(cc_call_handle_t handle, cc_jsep_action_t action, cc_string_t sdp);
|
||||
|
||||
cc_return_t CCAPI_SetRemoteDescription(cc_call_handle_t handle, cc_jsep_action_t action, cc_string_t sdp);
|
||||
|
||||
cc_return_t CCAPI_SetPeerConnection(cc_call_handle_t handle, cc_peerconnection_t pc);
|
||||
|
||||
cc_return_t CCAPI_AddStream(cc_call_handle_t handle, cc_media_stream_id_t stream_id, cc_media_track_id_t track_id, cc_media_type_t media_type);
|
||||
|
||||
cc_return_t CCAPI_RemoveStream(cc_call_handle_t handle, cc_media_stream_id_t stream_id, cc_media_track_id_t track_id, cc_media_type_t media_type);
|
||||
|
||||
cc_return_t CCAPI_AddICECandidate(cc_call_handle_t handle, cc_string_t candidate, cc_string_t mid, cc_level_t level);
|
||||
|
||||
/**
|
||||
* Send digits on the call - can be invoked either to dial additional digits or send DTMF
|
||||
* @param [in] handle - call handle
|
||||
* @param [in] digit - digit to be dialed
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CCAPI_Call_sendDigit(cc_call_handle_t handle, cc_digit_t digit);
|
||||
|
||||
/**
|
||||
* Send Backspace - Delete last digit dialed.
|
||||
* @param [in] handle - call handle
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CCAPI_Call_backspace(cc_call_handle_t handle);
|
||||
|
||||
/**
|
||||
* Answer Call
|
||||
* @param [in] handle - call handle
|
||||
* @param [in] video_pref - video direction desired on call
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CCAPI_Call_answerCall(cc_call_handle_t handle, cc_sdp_direction_t video_pref);
|
||||
|
||||
/**
|
||||
* Redial
|
||||
* @param [in] handle - call handle
|
||||
* @param [in] video_pref - video direction desired on call
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CCAPI_Call_redial(cc_call_handle_t handle, cc_sdp_direction_t video_pref);
|
||||
|
||||
/**
|
||||
* Initiate Call Forward All
|
||||
* @param [in] handle - call handle
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CCAPI_Call_initiateCallForwardAll(cc_call_handle_t handle);
|
||||
/**
|
||||
* Hold
|
||||
* @param [in] handle - call handle
|
||||
* @param [in] reason - hold reason
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CCAPI_Call_hold(cc_call_handle_t handle, cc_hold_reason_t reason);
|
||||
|
||||
/**
|
||||
* Resume
|
||||
* @param [in] handle - call handle
|
||||
* @param [in] video_pref - video direction desired on call
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CCAPI_Call_resume(cc_call_handle_t handle, cc_sdp_direction_t video_pref) ;
|
||||
|
||||
/**
|
||||
* end Consult leg - used to end consult leg when the user picks active calls list for xfer/conf
|
||||
* @param [in] handle - call handle
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CCAPI_Call_endConsultativeCall(cc_call_handle_t handle);
|
||||
|
||||
/**
|
||||
* end Call
|
||||
* @param [in] handle - call handle
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CCAPI_Call_endCall(cc_call_handle_t handle);
|
||||
|
||||
/**
|
||||
* Initiate a conference
|
||||
* @param [in] handle - call handle
|
||||
* @param [in] video_pref - video direction desired on consult call
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CCAPI_Call_conferenceStart(cc_call_handle_t handle, cc_sdp_direction_t video_pref);
|
||||
|
||||
/**
|
||||
* complete conference
|
||||
* @param [in] handle - call handle
|
||||
* @param [in] phandle - call handle of the other leg
|
||||
* @param [in] video_pref - video direction desired on consult call
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CCAPI_Call_conferenceComplete(cc_call_handle_t handle, cc_call_handle_t phandle,
|
||||
cc_sdp_direction_t video_pref);
|
||||
|
||||
/**
|
||||
* start transfer
|
||||
* @param [in] handle - call handle
|
||||
* @param [in] video_pref - video direction desired on consult call
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CCAPI_Call_transferStart(cc_call_handle_t handle, cc_sdp_direction_t video_pref);
|
||||
|
||||
/**
|
||||
* complete transfer
|
||||
* @param [in] handle - call handle
|
||||
* @param [in] phandle - call handle of the other leg
|
||||
* @param [in] video_pref - video direction desired on consult call
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CCAPI_Call_transferComplete(cc_call_handle_t handle, cc_call_handle_t phandle,
|
||||
cc_sdp_direction_t video_pref);
|
||||
|
||||
/**
|
||||
* cancel conference or transfer
|
||||
* @param [in] handle - call handle
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CCAPI_Call_cancelTransferOrConferenceFeature(cc_call_handle_t handle);
|
||||
|
||||
/**
|
||||
* direct Transfer
|
||||
* @param [in] handle - call handle
|
||||
* @param [in] target - call handle for transfer target call
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CCAPI_Call_directTransfer(cc_call_handle_t handle, cc_call_handle_t target);
|
||||
|
||||
/**
|
||||
* Join Across line
|
||||
* @param [in] handle - call handle
|
||||
* @param [in] target - join target
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CCAPI_Call_joinAcrossLine(cc_call_handle_t handle, cc_call_handle_t target);
|
||||
|
||||
/**
|
||||
* BLF Call Pickup
|
||||
* @param [in] handle - call handle
|
||||
* @param [in] video_pref - video direction preference
|
||||
* @param [in] speed - speedDial Number
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CCAPI_Call_blfCallPickup(cc_call_handle_t handle, cc_sdp_direction_t video_pref, cc_string_t speed);
|
||||
|
||||
/**
|
||||
* Select a call
|
||||
* @param [in] handle - call handle
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CCAPI_Call_select(cc_call_handle_t handle);
|
||||
|
||||
/**
|
||||
* Update Video Media Cap for the call
|
||||
* @param [in] handle - call handle
|
||||
* @param [in] video_pref - video direction desired on call
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CCAPI_Call_updateVideoMediaCap(cc_call_handle_t handle, cc_sdp_direction_t video_pref);
|
||||
|
||||
/**
|
||||
* send INFO method for the call
|
||||
* @param [in] handle - call handle
|
||||
* @param [in] infopackage - Info-Package header value
|
||||
* @param [in] infotype - Content-Type header val
|
||||
* @param [in] infobody - Body of the INFO message
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CCAPI_Call_sendInfo(cc_call_handle_t handle, cc_string_t infopackage, cc_string_t infotype, cc_string_t infobody);
|
||||
|
||||
/**
|
||||
* API to mute/unmute audio
|
||||
* @param [in] val - TRUE=> mute FALSE => unmute
|
||||
* @return SUCCESS or FAILURE
|
||||
* NOTE: The mute state is persisted within the stack and shall be remembered across hold/resume.
|
||||
* This API doesn't perform the mute operation but simply caches the mute state of the session.
|
||||
*/
|
||||
cc_return_t CCAPI_Call_setAudioMute(cc_call_handle_t handle, cc_boolean val);
|
||||
|
||||
/**
|
||||
* API to mute/unmute Video
|
||||
* @param [in] val - TRUE=> mute FALSE => unmute
|
||||
* @return SUCCESS or FAILURE
|
||||
* NOTE: The mute state is persisted within the stack and shall be remembered across hold/resume
|
||||
* This API doesn't perform the mute operation but simply caches the mute state of the session.
|
||||
*/
|
||||
cc_return_t CCAPI_Call_setVideoMute(cc_call_handle_t handle, cc_boolean val);
|
||||
|
||||
|
||||
#endif // _CCAPI_CALL_H_
|
||||
@@ -0,0 +1,305 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _CCAPI_CALL_INFO_H_
|
||||
#define _CCAPI_CALL_INFO_H_
|
||||
|
||||
#include "ccapi_types.h"
|
||||
#include "peer_connection_types.h"
|
||||
|
||||
/**
|
||||
* get Line on which this call is
|
||||
* @param [in] handle - call info handle
|
||||
* @return cc_line_id_t - line ID
|
||||
*/
|
||||
cc_lineid_t CCAPI_CallInfo_getLine(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* get Call state
|
||||
* @param [in] handle - call info handle
|
||||
* @return call state
|
||||
*/
|
||||
cc_call_state_t CCAPI_CallInfo_getCallState(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* get call attributes
|
||||
* @param [in] handle - call info handle
|
||||
* @return call attributes
|
||||
*/
|
||||
cc_call_attr_t CCAPI_CallInfo_getCallAttr(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* get Call Type
|
||||
* @param [in] handle - call info handle
|
||||
* @return call type
|
||||
*/
|
||||
cc_call_type_t CCAPI_CallInfo_getCallType(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* get Called party name
|
||||
* @param [in] handle - call info handle
|
||||
* @return called party name
|
||||
* NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed
|
||||
*/
|
||||
cc_string_t CCAPI_CallInfo_getCalledPartyName(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* get Called party number
|
||||
* @param [in] handle - call info handle
|
||||
* @return called party number
|
||||
* NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed
|
||||
*/
|
||||
cc_string_t CCAPI_CallInfo_getCalledPartyNumber(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* get Calling party name
|
||||
* @param [in] handle - call info handle
|
||||
* @return calling party name
|
||||
* NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed
|
||||
*/
|
||||
cc_string_t CCAPI_CallInfo_getCallingPartyName(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* get Calling party number
|
||||
* @param [in] handle - call info handle
|
||||
* @return calling party number
|
||||
* NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed
|
||||
*/
|
||||
cc_string_t CCAPI_CallInfo_getCallingPartyNumber(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* get Calling party number
|
||||
* @param [in] handle - call info handle
|
||||
* @return calling party number
|
||||
* NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed
|
||||
*/
|
||||
cc_string_t CCAPI_CallInfo_getAlternateNumber(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* get Original Called party name
|
||||
* @param [in] handle - call info handle
|
||||
* @return original called party name
|
||||
* NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed
|
||||
*/
|
||||
cc_string_t CCAPI_CallInfo_getOriginalCalledPartyName(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* get Original Called party number
|
||||
* @param [in] handle - call info handle
|
||||
* @return original called party number
|
||||
* NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed
|
||||
*/
|
||||
cc_string_t CCAPI_CallInfo_getOriginalCalledPartyNumber(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* get last redirecting party name
|
||||
* @param [in] handle - call info handle
|
||||
* @return last redirecting party name
|
||||
* NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed
|
||||
*/
|
||||
cc_string_t CCAPI_CallInfo_getLastRedirectingPartyName(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* get past redirecting party number
|
||||
* @param [in] handle - call info handle
|
||||
* @return last redirecting party number
|
||||
* NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed
|
||||
*/
|
||||
cc_string_t CCAPI_CallInfo_getLastRedirectingPartyNumber(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* get placed call party name
|
||||
* @param [in] handle - call info handle
|
||||
* @return placed party name
|
||||
* NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed
|
||||
*/
|
||||
cc_string_t CCAPI_CallInfo_getPlacedCallPartyName(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* get placed call party number
|
||||
* @param [in] handle - call info handle
|
||||
* @return placed party number
|
||||
* NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed
|
||||
*/
|
||||
cc_string_t CCAPI_CallInfo_getPlacedCallPartyNumber(cc_callinfo_ref_t handle);
|
||||
|
||||
|
||||
/**
|
||||
* get call instance number
|
||||
* @param [in] handle - call info handle
|
||||
* @return
|
||||
* NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed
|
||||
*/
|
||||
cc_int32_t CCAPI_CallInfo_getCallInstance(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* get call status prompt
|
||||
* @param [in] handle - call info handle
|
||||
* @return call status
|
||||
* NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed
|
||||
*/
|
||||
cc_string_t CCAPI_CallInfo_getStatus(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* get call security // TODO XLS has callagent security and endtoend security on call?
|
||||
* @param [in] handle - call info handle
|
||||
* @return call security status
|
||||
*/
|
||||
cc_call_security_t CCAPI_CallInfo_getSecurity(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* get Call Selection Status
|
||||
* @param [in] handle - call info handle
|
||||
* @return cc_boolean - TRUE => selected
|
||||
*/
|
||||
cc_int32_t CCAPI_CallInfo_getSelectionStatus(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* get GCID
|
||||
* @param [in] handle - call info handle
|
||||
* @return GCID
|
||||
* NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed
|
||||
*/
|
||||
cc_string_t CCAPI_CallInfo_getGCID(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* get ringer loop count
|
||||
* @param handle - call handle
|
||||
* @return once Vs continuous
|
||||
*/
|
||||
cc_boolean CCAPI_CallInfo_getIsRingOnce(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* get ringer state.
|
||||
* @param handle - call handle
|
||||
* @return ringer state.
|
||||
*/
|
||||
cc_boolean CCAPI_CallInfo_getRingerState(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* get ringer mode
|
||||
* @param handle - call handle
|
||||
* @return ringer mode
|
||||
*/
|
||||
int CCAPI_CallInfo_getRingerMode(cc_callinfo_ref_t handle);
|
||||
|
||||
|
||||
/**
|
||||
* get onhook reason
|
||||
* @param [in] handle - call info handle
|
||||
* @return onhook reason
|
||||
*/
|
||||
cc_int32_t CCAPI_CallInfo_getOnhookReason(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* is Conference Call?
|
||||
* @param [in] handle - call info handle
|
||||
* @return boolean - is Conference
|
||||
*/
|
||||
cc_boolean CCAPI_CallInfo_getIsConference(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* getStream Statistics
|
||||
* @param [in] handle - call info handle
|
||||
* @param [in,out] stats - Array to get the stats
|
||||
* @param [in,out] count - in len of stats arraysize of stats / out stats copied
|
||||
* @return cc_return_t - CC_SUCCESS or CC_FAILURE
|
||||
*/
|
||||
cc_return_t CCAPI_CallInfo_getStreamStatistics(cc_callinfo_ref_t handle, cc_int32_t stats[], cc_int32_t *count);
|
||||
|
||||
|
||||
/**
|
||||
* has capability - is the feature allowed
|
||||
* @param [in] handle - call info handle
|
||||
* @param [in] feat_id - feature id
|
||||
* @return boolean - is Allowed
|
||||
*/
|
||||
cc_boolean CCAPI_CallInfo_hasCapability(cc_callinfo_ref_t handle, cc_int32_t feat_id);
|
||||
|
||||
/**
|
||||
* get Allowed Feature set
|
||||
* @param [in] handle - call info handle
|
||||
* @param [in,out] feat_set - array of len CC_CALL_CAP_MAX
|
||||
* @return cc_return_t - CC_SUCCESS or CC_FAILURE
|
||||
*/
|
||||
cc_return_t CCAPI_CallInfo_getCapabilitySet(cc_callinfo_ref_t handle, cc_int32_t feat_set[]);
|
||||
|
||||
/**
|
||||
* Call selection status
|
||||
* @param [in] handle - call info handle
|
||||
* @return cc_boolean - selection status
|
||||
*/
|
||||
cc_boolean CCAPI_CallInfo_isCallSelected(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* INFO Package for RECEIVED_INFO event
|
||||
* @param [in] handle - call info handle
|
||||
* @return cc_string_t - Info package header
|
||||
*/
|
||||
cc_string_t CCAPI_CallInfo_getINFOPack(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* INFO type for RECEIVED_INFO event
|
||||
* @param [in] handle - call info handle
|
||||
* @return cc_string_t - content-type header
|
||||
*/
|
||||
cc_string_t CCAPI_CallInfo_getINFOType(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* INFO body for RECEIVED_INFO event
|
||||
* @param [in] handle - call info handle
|
||||
* @return cc_string_t - INFO body
|
||||
*/
|
||||
cc_string_t CCAPI_CallInfo_getINFOBody(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* Get the call log reference
|
||||
* @param [in] handle - call info handle
|
||||
* @return cc_string_t - INFO body
|
||||
* NOTE: Memory associated with the call log is tied to the cc_callinfo_ref_t handle
|
||||
* this would be freed when the callinfo ref is freed.
|
||||
*/
|
||||
cc_calllog_ref_t CCAPI_CallInfo_getCallLogRef(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* returns the negotiated video direction for this call
|
||||
* @param [in] handle - call handle
|
||||
* @return cc_sdp_direction_t - video direction
|
||||
*/
|
||||
cc_sdp_direction_t CCAPI_CallInfo_getVideoDirection(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* Returns the Audio mute state for this call
|
||||
* @return boolean true=muted false=not muted
|
||||
*/
|
||||
cc_boolean CCAPI_CallInfo_isAudioMuted(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* Returns the Video mute state for this call
|
||||
* @return boolean true=muted false=not muted
|
||||
*/
|
||||
cc_boolean CCAPI_CallInfo_isVideoMuted(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* get SDP string CreateOffer and CreateAnswer callback
|
||||
* @param [in] handle - call info handle
|
||||
* @return sdp
|
||||
*/
|
||||
cc_string_t CCAPI_CallInfo_getSDP(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* get status code from internal JSEP functions
|
||||
* @param [in] handle - call info handle
|
||||
* @return status code
|
||||
*/
|
||||
cc_int32_t CCAPI_CallInfo_getStatusCode(cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* get media stream table
|
||||
* @param [in] handle - call info handle
|
||||
* @return media track table
|
||||
*/
|
||||
MediaStreamTable* CCAPI_CallInfo_getMediaStreams(cc_callinfo_ref_t handle);
|
||||
|
||||
#endif /* _CCAPIAPI_CALL_INFO_H_ */
|
||||
@@ -0,0 +1,22 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _CCAPI_CALL_LISTENER_H_
|
||||
#define _CCAPI_CALL_LISTENER_H_
|
||||
|
||||
#include "ccapi_types.h"
|
||||
|
||||
/**
|
||||
* Call Listener callback
|
||||
* @param [in] event - call event
|
||||
* @param [in] handle - call handle for the event
|
||||
* @param [in] info - reference to call info
|
||||
* @return void
|
||||
* NOTE: The memory associated with callInfo will be freed immediately upon return from this method.
|
||||
* If the application wishesd to retain a copy it should invoke CCAPI_Call_retainCallInfo() API. Once retained
|
||||
* it can be released by invoking the CCAPI_Call_releaseCallInfo API.
|
||||
*/
|
||||
void CCAPI_CallListener_onCallEvent(ccapi_call_event_e event, cc_call_handle_t handle, cc_callinfo_ref_t info);
|
||||
|
||||
#endif /* _CCAPIAPI_CALL_LISTENER_H_ */
|
||||
@@ -0,0 +1,87 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "cpr_stdio.h"
|
||||
#include "ccapi_call.h"
|
||||
#include "sessionHash.h"
|
||||
#include "CCProvider.h"
|
||||
#include "phone_debug.h"
|
||||
|
||||
|
||||
/**
|
||||
* get the placed missed rcvd disposition for the call
|
||||
* @param [in] handle - reference to call log
|
||||
* @return cc_log_disposition_t - log disposition
|
||||
*/
|
||||
cc_log_disposition_t CCAPI_CallLog_getCallDisposition(cc_calllog_ref_t handle);
|
||||
|
||||
/**
|
||||
* get call start Time as seconds since epoch
|
||||
* @param [in] handle - reference to call log
|
||||
* @return cc_uint32_t - start time as number of seconds since epoch
|
||||
*/
|
||||
cc_uint32_t CCAPI_CallLog_getStartTime(cc_calllog_ref_t handle);
|
||||
|
||||
/**
|
||||
* get call duration in seconds
|
||||
* @param [in] handle - reference to call log
|
||||
* @return cc_uint32_t - call duration in seconds
|
||||
*/
|
||||
cc_uint32_t CCAPI_CallLog_getCallDuration(cc_calllog_ref_t handle);
|
||||
|
||||
/**
|
||||
* get first leg remote party name
|
||||
* @param [in] handle - reference to call log
|
||||
* @return cc_string_t - remote party name for first leg
|
||||
*/
|
||||
cc_string_t CCAPI_CallLog_getFirstLegRemotePartyName(cc_calllog_ref_t handle);
|
||||
|
||||
/**
|
||||
* get last leg remote party name
|
||||
* @param [in] handle - reference to call log
|
||||
* @return cc_string_t - remote party name for last leg
|
||||
*/
|
||||
cc_string_t CCAPI_CallLog_getLastLegRemotePartyName(cc_calllog_ref_t handle);
|
||||
|
||||
/**
|
||||
* get first leg remote party number
|
||||
* @param [in] handle - reference to call log
|
||||
* @return cc_string_t - remote party number for first leg
|
||||
*/
|
||||
cc_string_t CCAPI_CallLog_getFirstLegRemotePartyNumber(cc_calllog_ref_t handle);
|
||||
|
||||
/**
|
||||
* get last leg remote party number
|
||||
* @param [in] handle - reference to call log
|
||||
* @return cc_string_t - remote party number for last leg
|
||||
*/
|
||||
cc_string_t CCAPI_CallLog_getLastLegRemotePartyNumber(cc_calllog_ref_t handle);
|
||||
|
||||
/**
|
||||
* get first leg local party name
|
||||
* @param [in] handle - reference to call log
|
||||
* @return cc_string_t - local party name for first leg
|
||||
*/
|
||||
cc_string_t CCAPI_CallLog_getLocalPartyName(cc_calllog_ref_t handle);
|
||||
|
||||
/**
|
||||
* get first leg local party number
|
||||
* @param [in] handle - reference to call log
|
||||
* @return cc_string_t - local party number for first leg
|
||||
*/
|
||||
cc_string_t CCAPI_CallLog_getLocalPartyNumber(cc_calllog_ref_t handle);
|
||||
|
||||
/**
|
||||
* get first leg alt party number
|
||||
* @param [in] handle - reference to call log
|
||||
* @return cc_string_t - alt party number for first leg
|
||||
*/
|
||||
cc_string_t CCAPI_CallLog_getFirstLegAltPartyNumber(cc_calllog_ref_t handle);
|
||||
|
||||
/**
|
||||
* get last leg alt party number
|
||||
* @param [in] handle - reference to call log
|
||||
* @return cc_string_t - alt party number for last leg
|
||||
*/
|
||||
cc_string_t CCAPI_CallLog_getLastLegAltPartyNumber(cc_calllog_ref_t handle);
|
||||
@@ -0,0 +1,97 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _CCAPI_CONF_ROSTER_H_
|
||||
#define _CCAPI_CONF_ROSTER_H_
|
||||
|
||||
#include "cpr_stdio.h"
|
||||
#include "ccapi_call.h"
|
||||
#include "CCProvider.h"
|
||||
#include "phone_debug.h"
|
||||
|
||||
// Basic type definitions for conferencing
|
||||
typedef string_t cc_participant_ref_t;
|
||||
|
||||
/**
|
||||
* Get Conference Participants
|
||||
*
|
||||
* Returns list of conference participant information last received from the UCM.
|
||||
* Note that the list may include conference participants in various states in addition to Connected.
|
||||
* [ For exampke, a listed participant may be in the ringing state (not yet on conference),
|
||||
* or disconnected state (leaving/left the conference).] Application should invoke
|
||||
* getConferenceParticipantStatus for each participant in the list to query exact status.
|
||||
*
|
||||
* @param [in] handle - call handle
|
||||
* @param [in/out] participantHandles - array of participant handles to be returned
|
||||
* @param [in/out] count - in: size of array provided in participantHandles; out: number of entries populated (up to original value provided)
|
||||
* @return void
|
||||
*/
|
||||
void CCAPI_CallInfo_getConfParticipants (cc_callinfo_ref_t handle, cc_participant_ref_t participantHandles[], int* count);
|
||||
|
||||
|
||||
/**
|
||||
* Get Maximum Number of Conference Participants ( in case gui wants to show %full conference info )
|
||||
* @param [in] handle - call handle
|
||||
* @return maximum number of conference participants
|
||||
*/
|
||||
cc_uint16_t CCAPI_CallInfo_getConfParticipantMax (cc_callinfo_ref_t handle);
|
||||
|
||||
|
||||
/**
|
||||
* Get Participant Name
|
||||
* @param [in] handle - call info handle
|
||||
* @param [in] participantHandle - specific handle for conference participant
|
||||
* @return display name of the conference participant
|
||||
*/
|
||||
cc_string_t CCAPI_CallInfo_getConfParticipantName (cc_callinfo_ref_t handle, cc_participant_ref_t participantHandle);
|
||||
|
||||
/**
|
||||
* Get Participant Number
|
||||
* @param [in] handle - handle of call
|
||||
* @param [in] participantHandle - handle of conference participant
|
||||
* @return display number of the conference participant
|
||||
*/
|
||||
cc_string_t CCAPI_CallInfo_getConfParticipantNumber (cc_callinfo_ref_t handle, cc_participant_ref_t participantHandle);
|
||||
|
||||
/**
|
||||
* Get Conference Participant Status
|
||||
* @param [in] handle - call handle
|
||||
* @param [in] participantHandle - handle of conference participant
|
||||
* @return conference status of specific participant
|
||||
*/
|
||||
cc_conf_participant_status_t CCAPI_CallInfo_getConfParticipantStatus (cc_callinfo_ref_t handle, cc_participant_ref_t participantHandleHandle);
|
||||
|
||||
/**
|
||||
* Get Participant Security
|
||||
* @param [in] handle - call handle
|
||||
* @param [in] participantHandle - handle of conference participant
|
||||
* @return security setting of the specific conference participant
|
||||
*/
|
||||
cc_call_security_t CCAPI_CallInfo_getConfParticipantSecurity (cc_callinfo_ref_t handle, cc_participant_ref_t participantHandleHandle);
|
||||
|
||||
/**
|
||||
* Able To Remove Others?
|
||||
* Find out whether this participant is capable of removing another participant
|
||||
* @param [in] handle - call handle
|
||||
* @return return code (0=indicates not capable, 1=indicates capable)
|
||||
*/
|
||||
cc_boolean CCAPI_CallInfo_selfHasRemoveConfParticipantCapability (cc_callinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* Check to see if a given conference participant reference is the one using this endpoint
|
||||
* @param [in] handle - call handle
|
||||
* @param [in] participantHandle - handle of a conference participant
|
||||
* @returns cc_boolean (TRUE if yes, FALSE if no)
|
||||
*/
|
||||
cc_boolean CCAPI_CallInfo_isConfSelfParticipant (cc_callinfo_ref_t handle, cc_participant_ref_t participantHandle);
|
||||
|
||||
/**
|
||||
* Return our conference participant-id
|
||||
* @param [in] handle - call handle
|
||||
* @return participant id of self
|
||||
*/
|
||||
cc_participant_ref_t CCAPI_CallInfo_getConfSelfParticipant (cc_callinfo_ref_t handle);
|
||||
|
||||
|
||||
#endif /* _CCAPI_CONF_ROSTER_H_ */
|
||||
@@ -0,0 +1,136 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _CCAPI_DEVICE_H_
|
||||
#define _CCAPI_DEVICE_H_
|
||||
|
||||
#include "ccapi_types.h"
|
||||
|
||||
|
||||
/**
|
||||
* Get device ID
|
||||
* @return cc_deviceinfo_ref_t - reference handle of the device
|
||||
*/
|
||||
cc_device_handle_t CCAPI_Device_getDeviceID();
|
||||
|
||||
/**
|
||||
* Get device reference handle
|
||||
* @param [in] id - device ID
|
||||
* @return cc_deviceinfo_ref_t - reference handle of the device
|
||||
* NOTE: The info returned by this method must be released using CCAPI_Device_releaseDeviceInfo()
|
||||
*/
|
||||
cc_deviceinfo_ref_t CCAPI_Device_getDeviceInfo(cc_device_handle_t id);
|
||||
|
||||
/**
|
||||
* Set full path of device configuration file. API will download and parse the config file using
|
||||
* provided location.
|
||||
* @param handle - device handle
|
||||
* @param [in] file_path - device config file full path
|
||||
* @return void
|
||||
*/
|
||||
void CCAPI_Device_configUpdate(cc_device_handle_t handle, file_path_t file_path);
|
||||
|
||||
/**
|
||||
* Retain the deviceInfo snapshot - this info shall not be freed until a
|
||||
* CCAPI_Device_releaseDeviceInfo() API releases this resource.
|
||||
* @param [in] ref - refrence to the block to be freed
|
||||
* @return void
|
||||
* NOTE: Application may use this API to retain the device info using this API inside
|
||||
* CCAPI_DeviceListener_onDeviceEvent() App must release the Info using
|
||||
* CCAPI_Device_releaseDeviceInfo() once it is done with it.
|
||||
*/
|
||||
void CCAPI_Device_retainDeviceInfo(cc_deviceinfo_ref_t ref);
|
||||
|
||||
/**
|
||||
* Release the deviceInfo snapshot
|
||||
* @param [in] ref - reference to the block to be freed
|
||||
* @return void
|
||||
*/
|
||||
void CCAPI_Device_releaseDeviceInfo(cc_deviceinfo_ref_t ref);
|
||||
|
||||
/**
|
||||
* Create a call on the device
|
||||
* Line selection is on the first available line. Lines that have there MNC reached will be skipped.
|
||||
* @param handle - device handle
|
||||
* @return cc_call_handle_t - handle of the call created
|
||||
*/
|
||||
cc_call_handle_t CCAPI_Device_CreateCall(cc_device_handle_t handle);
|
||||
|
||||
/**
|
||||
* Enable or disable video capability of the device.
|
||||
* @param handle - device handle
|
||||
* @param [in] enable - a flag to indicate that application wants to enable of
|
||||
* disable video capability of the device.
|
||||
* @return void
|
||||
*/
|
||||
void CCAPI_Device_enableVideo(cc_device_handle_t handle, cc_boolean enable);
|
||||
|
||||
/**
|
||||
* Enable or disable camera capability of the device.
|
||||
* @param handle - device handle
|
||||
* @param [in] enable - a flag to indicate that application wants to enable of
|
||||
* disable camera capability of the device.
|
||||
* @return void
|
||||
*/
|
||||
void CCAPI_Device_enableCamera(cc_device_handle_t handle, cc_boolean enable);
|
||||
|
||||
|
||||
/**
|
||||
* CCAPI_Device_setDigestNamePasswd
|
||||
*
|
||||
* @param handle - device handle
|
||||
* @param name - The Digest auth name
|
||||
* @param passwd - The password for that name for the line
|
||||
* @return void
|
||||
*/
|
||||
void CCAPI_Device_setDigestNamePasswd (cc_device_handle_t handle,
|
||||
char *name, char *pw);
|
||||
|
||||
|
||||
/**
|
||||
* CCAPI_Device_IP_Update
|
||||
*
|
||||
* There is a update in the IP address and the values of new set
|
||||
* of signaling and media IP addresses are provided.
|
||||
* These value are compared with the current IP address values
|
||||
* and depending on what changed, restart and/or re-invite
|
||||
* action is taken.
|
||||
*
|
||||
* The case being addressed.
|
||||
* 1) If the signaling IP change happens during a call,
|
||||
* the change is deferred till phone is idle.
|
||||
* 2)If media IP change happens during a call, it is applied immediately.
|
||||
* 3) If both change, and call is active, that is treated same
|
||||
* combination of case 1) and 2).
|
||||
* 4) If no call is present, and signaling IP change,
|
||||
* sipcc will re-register with new IP.
|
||||
*
|
||||
* @param handle - device handle
|
||||
* @param signaling_ip - IP address that Must be used for signalling
|
||||
* @param signaling_interface - Interface name associated with signaling IP
|
||||
* @param signaling_int_type - Interface Type associated with signaling IP
|
||||
* @param media_ip - IP address that Must be used for media
|
||||
* @param media_interface - Interface name associated with Media IP
|
||||
* @param media_int_type - Interface Type associated with Media IP
|
||||
* @return void
|
||||
*/
|
||||
void CCAPI_Device_IP_Update (cc_device_handle_t handle,
|
||||
const char *signaling_ip,
|
||||
const char *sig_interface,
|
||||
int sig_int_type,
|
||||
const char *media_ip,
|
||||
const char *media_interface,
|
||||
int media_int_type);
|
||||
|
||||
|
||||
/**
|
||||
* CCAPI_Device_setVideoAutoTxPreference
|
||||
*
|
||||
* @param handle - device handle
|
||||
* @param txPref - TRUE=> auto Tx Video prefered
|
||||
* @return void
|
||||
*/
|
||||
void CCAPI_Device_setVideoAutoTxPreference (cc_device_handle_t handle, cc_boolean txPref);
|
||||
|
||||
#endif /* _CCAPIAPI_DEVICE_H_ */
|
||||
@@ -0,0 +1,203 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _CCAPI_DEVICE_INFO_H_
|
||||
#define _CCAPI_DEVICE_INFO_H_
|
||||
|
||||
#include "ccapi_types.h"
|
||||
|
||||
/**
|
||||
* gets the device name
|
||||
* @returns - a pointer to the device name
|
||||
*/
|
||||
cc_deviceinfo_ref_t CCAPI_DeviceInfo_getDeviceHandle() ;
|
||||
|
||||
/**
|
||||
* gets the device name
|
||||
* @param [in] handle - reference to device info
|
||||
* @returns - a pointer to the device name
|
||||
* NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed
|
||||
*/
|
||||
cc_string_t CCAPI_DeviceInfo_getDeviceName(cc_deviceinfo_ref_t handle) ;
|
||||
|
||||
/**
|
||||
* gets the device idle status
|
||||
* @param [in] handle - reference to device info
|
||||
* @returns boolean - idle status
|
||||
*/
|
||||
cc_boolean CCAPI_DeviceInfo_isPhoneIdle(cc_deviceinfo_ref_t handle) ;
|
||||
|
||||
/**
|
||||
* gets the service state
|
||||
* @param [in] handle - reference to device info
|
||||
* @returns cc_service_state_t - INS/OOS
|
||||
*/
|
||||
cc_service_state_t CCAPI_DeviceInfo_getServiceState(cc_deviceinfo_ref_t handle) ;
|
||||
|
||||
/**
|
||||
* gets the service cause
|
||||
* @param [in] handle - reference to device info
|
||||
* @returns cc_service_cause_t - reason for service state
|
||||
*/
|
||||
cc_service_cause_t CCAPI_DeviceInfo_getServiceCause(cc_deviceinfo_ref_t handle) ;
|
||||
|
||||
/**
|
||||
* gets the cucm mode
|
||||
* @param [in] handle - reference to device info
|
||||
* @returns cc_cucm_mode_t - CUCM mode
|
||||
*/
|
||||
cc_cucm_mode_t CCAPI_DeviceInfo_getCUCMMode(cc_deviceinfo_ref_t handle) ;
|
||||
|
||||
/**
|
||||
* gets list of handles to calls on the device
|
||||
* @param [in] handle - reference to device info
|
||||
* @param [out] handles - array of call handle to be returned
|
||||
* @param [in,out] count number allocated in array/elements returned
|
||||
* @returns
|
||||
*/
|
||||
void CCAPI_DeviceInfo_getCalls(cc_deviceinfo_ref_t handle, cc_call_handle_t handles[], cc_uint16_t *count) ;
|
||||
|
||||
/**
|
||||
* gets list of handles to calls on the device by state
|
||||
* @param [in] handle - reference to device info
|
||||
* @param [in] state - call state for which the calls are requested
|
||||
* @param [out] handles - array of call handle to be returned
|
||||
* @param [in,out] count number allocated in array/elements returned
|
||||
* @returns
|
||||
*/
|
||||
void CCAPI_DeviceInfo_getCallsByState(cc_deviceinfo_ref_t handle, cc_call_state_t state,
|
||||
cc_call_handle_t handles[], cc_uint16_t *count) ;
|
||||
|
||||
/**
|
||||
* gets list of handles to lines on the device
|
||||
* @param [in] handle - reference to device info
|
||||
* @param [in] handles - array of line handle to be returned
|
||||
* @param [in,out] count - pointer to count in array in-> memory allocated out-> num populated
|
||||
* @returns
|
||||
*/
|
||||
void CCAPI_DeviceInfo_getLines(cc_deviceinfo_ref_t handle, cc_lineid_t handles[], cc_uint16_t *count) ;
|
||||
|
||||
/**
|
||||
* gets list of handles to features on the device
|
||||
* @param [in] handle - reference to device info
|
||||
* @param [in] handles - array of feature handle to be returned
|
||||
* @param [in,out] count - pointer to count in array in-> memory allocated out-> num populated
|
||||
* @returns
|
||||
*/
|
||||
void CCAPI_DeviceInfo_getFeatures(cc_deviceinfo_ref_t handle, cc_featureinfo_ref_t handles[], cc_uint16_t *count) ;
|
||||
|
||||
/**
|
||||
* gets handles of call agent servers
|
||||
* @param [in] handle - reference to device info
|
||||
* @param [in] handles - array of handles to call agent servers
|
||||
* @param [in,out] count - pointer to count in array in-> memory allocated out-> num populated
|
||||
* @returns
|
||||
*/
|
||||
void CCAPI_DeviceInfo_getCallServers(cc_deviceinfo_ref_t handle, cc_callserver_ref_t handles[], cc_uint16_t *count) ;
|
||||
|
||||
/**
|
||||
* gets call server name
|
||||
* @param [in] handle - handle of call server
|
||||
* @returns name of the call server
|
||||
* NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed
|
||||
*/
|
||||
cc_string_t CCAPI_DeviceInfo_getCallServerName(cc_callserver_ref_t handle);
|
||||
|
||||
/**
|
||||
* gets call server mode
|
||||
* @param [in] handle - handle of call server
|
||||
* @returns - mode of the call server
|
||||
*/
|
||||
cc_cucm_mode_t CCAPI_DeviceInfo_getCallServerMode(cc_callserver_ref_t handle);
|
||||
|
||||
/**
|
||||
* gets calls erver name
|
||||
* @param [in] handle - handle of call server
|
||||
* @returns status of the call server
|
||||
*/
|
||||
cc_ccm_status_t CCAPI_DeviceInfo_getCallServerStatus(cc_callserver_ref_t handle);
|
||||
|
||||
/**
|
||||
* get the NOTIFICATION PROMPT
|
||||
* @param [in] handle - reference to device info
|
||||
* @returns
|
||||
*/
|
||||
cc_string_t CCAPI_DeviceInfo_getNotifyPrompt(cc_deviceinfo_ref_t handle) ;
|
||||
|
||||
/**
|
||||
* get the NOTIFICATION PROMPT PRIORITY
|
||||
* @param [in] handle - reference to device info
|
||||
* @returns
|
||||
*/
|
||||
cc_uint32_t CCAPI_DeviceInfo_getNotifyPromptPriority(cc_deviceinfo_ref_t handle) ;
|
||||
|
||||
/**
|
||||
* get the NOTIFICATION PROMPT Progress
|
||||
* @param [in] handle - reference to device info
|
||||
* @returns
|
||||
*/
|
||||
cc_uint32_t CCAPI_DeviceInfo_getNotifyPromptProgress(cc_deviceinfo_ref_t handle) ;
|
||||
|
||||
/**
|
||||
* gets provisioing for missed call logging
|
||||
* This value should be reread on CONFIG_UPDATE event
|
||||
* @param [in] handle - reference to device info
|
||||
* @returns boolean - false => disabled true => enabled
|
||||
*/
|
||||
cc_boolean CCAPI_DeviceInfo_isMissedCallLoggingEnabled (cc_deviceinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* gets provisioing for placed call logging
|
||||
* This value should be reread on CONFIG_UPDATE event
|
||||
* @param [in] handle - reference to device info
|
||||
* @returns boolean - false => disabled true => enabled
|
||||
*/
|
||||
cc_boolean CCAPI_DeviceInfo_isPlacedCallLoggingEnabled (cc_deviceinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* gets provisioing for received call logging
|
||||
* This value should be reread on CONFIG_UPDATE event
|
||||
* @param [in] handle - reference to device info
|
||||
* @returns boolean - false => disabled true => enabled
|
||||
*/
|
||||
cc_boolean CCAPI_DeviceInfo_isReceivedCallLoggingEnabled (cc_deviceinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* gets register/in service time
|
||||
* This value should be read once the register completes successfully
|
||||
* @param [in] handle - reference to device info
|
||||
* @returns long - time registration completed successfully.
|
||||
*/
|
||||
long long CCAPI_DeviceInfo_getRegTime (cc_deviceinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* Returns dot notation IP address used for registering phone. If phone is not
|
||||
* registered, then "0.0.0.0" is returned.
|
||||
* @param [in] handle - reference to device info
|
||||
* @return cc_string_t IP address used to register phone.
|
||||
*/
|
||||
cc_string_t CCAPI_DeviceInfo_getSignalingIPAddress(cc_deviceinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* Returns camera admin enable/disable status
|
||||
* @param [in] handle - reference to device info
|
||||
* @return cc_boolean - TRUE => enabled
|
||||
*/
|
||||
cc_boolean CCAPI_DeviceInfo_isCameraEnabled(cc_deviceinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* Returns admin enable/disable video capablity for device
|
||||
* @param [in] handle - reference to device info
|
||||
* @return cc_boolean - TRUE => enabled
|
||||
*/
|
||||
cc_boolean CCAPI_DeviceInfo_isVideoCapEnabled(cc_deviceinfo_ref_t handle);
|
||||
|
||||
/**
|
||||
* gets the device mwi_lamp state
|
||||
* @param [in] handle - reference to device info
|
||||
* @returns boolean - mwi_lamp state
|
||||
*/
|
||||
cc_boolean CCAPI_DeviceInfo_getMWILampState(cc_deviceinfo_ref_t handle);
|
||||
|
||||
#endif /* _CCAPIAPI_DEVICE_INFO_H_ */
|
||||
@@ -0,0 +1,36 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _CCAPI_DEVICE_LISTENER_H_
|
||||
#define _CCAPI_DEVICE_LISTENER_H_
|
||||
|
||||
#include "cc_constants.h"
|
||||
|
||||
/**
|
||||
* Generates Device event
|
||||
* @param [in] type - event type for device
|
||||
* @param [in] device_id - device id
|
||||
* @param [in] dev_info - reference to device info
|
||||
* @returns
|
||||
* NOTE: The memory associated with deviceInfo will be freed immediately upon
|
||||
* return from this method. If the application wishes to retain a copy it should
|
||||
* invoke CCAPI_Device_retainDeviceInfo() API. once the info is retained it can be
|
||||
* released by invoking CCAPI_Device_releaseDeviceInfo() API
|
||||
*/
|
||||
void CCAPI_DeviceListener_onDeviceEvent(ccapi_device_event_e type, cc_device_handle_t device_id, cc_deviceinfo_ref_t dev_info);
|
||||
|
||||
/**
|
||||
* Generates Feature event
|
||||
* @param [in] type - event type for device
|
||||
* @param [in] device_id - device id
|
||||
* @param [in] feature_info - reference to feature info
|
||||
* @returns
|
||||
* NOTE: The memory associated with featureInfo will be freed immediately upon
|
||||
* return from this method. If the application wishes to retain a copy it should
|
||||
* invoke CCAPI_Device_retainFeatureInfo() API. once the info is retained it can be
|
||||
* released by invoking CCAPI_Device_releaseFeatureInfo() API
|
||||
*/
|
||||
void CCAPI_DeviceListener_onFeatureEvent(ccapi_device_event_e type, cc_deviceinfo_ref_t device_info, cc_featureinfo_ref_t feature_info);
|
||||
|
||||
#endif /* _CCAPIAPI_DEVICE_LISTENER_H_ */
|
||||
@@ -0,0 +1,67 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _CCAPIAPI_FEATURE_INFO_H_
|
||||
#define _CCAPIAPI_FEATURE_INFO_H_
|
||||
|
||||
#include "ccapi_types.h"
|
||||
|
||||
|
||||
/**
|
||||
* Get the physical button number on which this feature is configured
|
||||
* @param feature - feature reference handle
|
||||
* @return cc_int32_t - button assgn to the feature
|
||||
*/
|
||||
cc_int32_t CCAPI_featureInfo_getButton(cc_featureinfo_ref_t feature);
|
||||
|
||||
/**
|
||||
* Get the featureID
|
||||
* @param feature - feature reference handle
|
||||
* @return cc_int32_t - button assgn to the feature
|
||||
*/
|
||||
cc_int32_t CCAPI_featureInfo_getFeatureID(cc_featureinfo_ref_t feature);
|
||||
/**
|
||||
* Get the feature Name
|
||||
* @param feature - feature reference handle
|
||||
* @return cc_string_t - handle of the feature created
|
||||
*/
|
||||
cc_string_t CCAPI_featureInfo_getDisplayName(cc_featureinfo_ref_t feature);
|
||||
|
||||
/**
|
||||
* Get the speeddial Number
|
||||
* @param feature - feature reference handle
|
||||
* @return cc_string_t - handle of the feature created
|
||||
*/
|
||||
cc_string_t CCAPI_featureInfo_getSpeedDialNumber(cc_featureinfo_ref_t feature);
|
||||
|
||||
/**
|
||||
* Get the contact
|
||||
* @param feature - feature reference handle
|
||||
* @return cc_string_t - handle of the feature created
|
||||
*/
|
||||
cc_string_t CCAPI_featureInfo_getContact(cc_featureinfo_ref_t feature);
|
||||
|
||||
/**
|
||||
* Get the retrieval prefix
|
||||
* @param feature - feature reference handle
|
||||
* @return cc_string_t - handle of the feature created
|
||||
*/
|
||||
cc_string_t CCAPI_featureInfo_getRetrievalPrefix(cc_featureinfo_ref_t feature);
|
||||
|
||||
/**
|
||||
* Get BLF state
|
||||
* @param feature - feature reference handle
|
||||
* @return cc_string_t - handle of the feature created
|
||||
*/
|
||||
cc_blf_state_t CCAPI_featureInfo_getBLFState(cc_featureinfo_ref_t feature);
|
||||
|
||||
/**
|
||||
* Get the feature option mask
|
||||
* @param feature - feature reference handle
|
||||
* @return cc_int32_t - button assgn to the feature
|
||||
*/
|
||||
cc_int32_t CCAPI_featureInfo_getFeatureOptionMask(cc_featureinfo_ref_t feature);
|
||||
|
||||
|
||||
#endif /* _CCAPIAPI_FEATURE_INFO_H_ */
|
||||
@@ -0,0 +1,43 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _CCAPI_LINE_H_
|
||||
#define _CCAPI_LINE_H_
|
||||
|
||||
#include "ccapi_types.h"
|
||||
|
||||
/**
|
||||
* Get reference handle for the line
|
||||
* @param [in] line - lineID on which to create call
|
||||
* @return cc_call_handle_t - handle of the call created
|
||||
* NOTE: The info returned by this method must be released using CCAPI_Line_releaseLineInfo()
|
||||
*/
|
||||
cc_lineinfo_ref_t CCAPI_Line_getLineInfo(cc_uint32_t line);
|
||||
|
||||
/**
|
||||
* Create a call on the line
|
||||
* @param [in] line - lineID on which to create call
|
||||
* @return cc_call_handle_t - handle of the call created
|
||||
*/
|
||||
cc_call_handle_t CCAPI_Line_CreateCall(cc_lineid_t line);
|
||||
|
||||
/**
|
||||
* Retain the lineInfo snapshot - this info shall not be freed until a
|
||||
* CCAPI_Line_releaseLineInfo() API releases this resource.
|
||||
* @param [in] ref - reference to the block to be retained
|
||||
* @return void
|
||||
* NOTE: Application may use this API to retain the device info using this API inside
|
||||
* CCAPI_LineListener_onLineEvent() App must release the Info using
|
||||
* CCAPI_Line_releaseLineInfo() once it is done with it.
|
||||
*/
|
||||
void CCAPI_Line_retainLineInfo(cc_lineinfo_ref_t ref);
|
||||
|
||||
/**
|
||||
* Release the lineInfo snapshot that was retained using the CCAPI_Line_retainLineInfo API
|
||||
* @param [in] ref - line info reference to be freed
|
||||
* @return void
|
||||
*/
|
||||
void CCAPI_Line_releaseLineInfo(cc_lineinfo_ref_t ref);
|
||||
|
||||
#endif /* _CCAPIAPI_LINE_H_ */
|
||||
@@ -0,0 +1,165 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _CCAPI_LINE_INFO_H_
|
||||
#define _CCAPI_LINE_INFO_H_
|
||||
|
||||
#include "ccapi_types.h"
|
||||
|
||||
/**
|
||||
* Get the line ID
|
||||
* @param [in] line - line reference handle
|
||||
* @return cc_call_handle_t - handle of the call created
|
||||
*/
|
||||
cc_uint32_t CCAPI_lineInfo_getID(cc_lineinfo_ref_t line);
|
||||
|
||||
/**
|
||||
* Get the line Name
|
||||
* @param [in] line - line reference handle
|
||||
* @return cc_string_t - line Name
|
||||
* NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed
|
||||
*/
|
||||
cc_string_t CCAPI_lineInfo_getName(cc_lineinfo_ref_t line);
|
||||
|
||||
/**
|
||||
* Get the line Label
|
||||
* @param [in] line - line reference handle
|
||||
* @return cc_string_t - line Label
|
||||
* NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed
|
||||
*/
|
||||
cc_string_t CCAPI_lineInfo_getLabel(cc_lineinfo_ref_t line);
|
||||
|
||||
/**
|
||||
* Get the line DN Number
|
||||
* @param [in] line - line reference handle
|
||||
* @return cc_string_t - line DN
|
||||
* NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed
|
||||
*/
|
||||
cc_string_t CCAPI_lineInfo_getNumber(cc_lineinfo_ref_t line);
|
||||
|
||||
/**
|
||||
* Get the line External Number
|
||||
* @param [in] line - line reference handle
|
||||
* @return cc_string_t - line DN
|
||||
* NOTE: The memory for return string doesn't need to be freed it will be freedwhen the info reference is freed
|
||||
*/
|
||||
cc_string_t CCAPI_lineInfo_getExternalNumber(cc_lineinfo_ref_t line);
|
||||
|
||||
/**
|
||||
* Get the physical button number on which this line is configured
|
||||
* @param [in] line - line reference handle
|
||||
* @return cc_uint32_t - button number
|
||||
* NOTE: This API is deprecated please don't use this. the CCAPI_lineInfo_getID() returns the button number
|
||||
* as we use the button as line id
|
||||
*/
|
||||
cc_uint32_t CCAPI_lineInfo_getButton(cc_lineinfo_ref_t line);
|
||||
|
||||
/**
|
||||
* Get the Line Type
|
||||
* @param [in] line - line reference handle
|
||||
* @return cc_uint32_t - line featureID ( Line )
|
||||
*/
|
||||
cc_line_feature_t CCAPI_lineInfo_getLineType(cc_lineinfo_ref_t line);
|
||||
|
||||
/**
|
||||
* Get the physical button number on which this line is configured
|
||||
* @param [in] line - line reference handle
|
||||
* @return cc_uint32_t - button number
|
||||
*/
|
||||
cc_boolean CCAPI_lineInfo_getRegState(cc_lineinfo_ref_t line);
|
||||
|
||||
/**
|
||||
* Get the CFWDAll status for the line
|
||||
* @param [in] line - line reference handle
|
||||
* @return cc_boolean - isForwarded
|
||||
*/
|
||||
cc_boolean CCAPI_lineInfo_isCFWDActive(cc_lineinfo_ref_t line);
|
||||
|
||||
/**
|
||||
* Get the CFWDAll destination
|
||||
* @param [in] line - line reference handle
|
||||
* @return cc_string_t - cfwd target
|
||||
* NOTE: The memory for return string doesn't need to be freed it will be freed when the info reference is freed
|
||||
*/
|
||||
cc_string_t CCAPI_lineInfo_getCFWDName(cc_lineinfo_ref_t line);
|
||||
|
||||
/**
|
||||
* Get calls on line
|
||||
* @param [in] line - lineID
|
||||
* @param [in, out] handles[] - Array of callinfo references
|
||||
* @param [in,out] count - count of call references populated
|
||||
* @return void
|
||||
*/
|
||||
void CCAPI_LineInfo_getCalls(cc_lineid_t line, cc_call_handle_t handles[], int *count);
|
||||
|
||||
/**
|
||||
* Get calls on line by state
|
||||
* @param [in] line - lineID
|
||||
* @param [in] state - state
|
||||
* @param [in, out] handles[] - Array of callinfo references
|
||||
* @param [in,out] count - count of call references populated
|
||||
* @return void
|
||||
*/
|
||||
void CCAPI_LineInfo_getCallsByState(cc_lineid_t line, cc_call_state_t state,
|
||||
cc_call_handle_t handles[], int *count);
|
||||
|
||||
/**
|
||||
* Get the MWI Status
|
||||
* @param line - line reference handle
|
||||
* @return cc_uint32_t - MWI status (boolean 0 => no MWI)
|
||||
*/
|
||||
cc_uint32_t CCAPI_lineInfo_getMWIStatus(cc_lineinfo_ref_t line);
|
||||
|
||||
/**
|
||||
* Get the MWI Type
|
||||
* @param line - line reference handle
|
||||
* @return cc_uint32_t - MWI Type
|
||||
*/
|
||||
cc_uint32_t CCAPI_lineInfo_getMWIType(cc_lineinfo_ref_t line);
|
||||
|
||||
/**
|
||||
* Get the MWI new msg count
|
||||
* @param line - line reference handle
|
||||
* @return cc_uint32_t - MWI new msg count
|
||||
*/
|
||||
cc_uint32_t CCAPI_lineInfo_getMWINewMsgCount(cc_lineinfo_ref_t line);
|
||||
|
||||
/**
|
||||
* Get the MWI old msg count
|
||||
* @param line - line reference handle
|
||||
* @return cc_uint32_t - MWI old msg count
|
||||
*/
|
||||
cc_uint32_t CCAPI_lineInfo_getMWIOldMsgCount(cc_lineinfo_ref_t line);
|
||||
|
||||
/**
|
||||
* Get the MWI high priority new msg count
|
||||
* @param line - line reference handle
|
||||
* @return cc_uint32_t - MWI new msg count
|
||||
*/
|
||||
cc_uint32_t CCAPI_lineInfo_getMWIPrioNewMsgCount(cc_lineinfo_ref_t line);
|
||||
|
||||
/**
|
||||
* Get the MWI high priority old msg count
|
||||
* @param line - line reference handle
|
||||
* @return cc_uint32_t - MWI old msg count
|
||||
*/
|
||||
cc_uint32_t CCAPI_lineInfo_getMWIPrioOldMsgCount(cc_lineinfo_ref_t line);
|
||||
|
||||
/**
|
||||
* has capability - is the feature allowed
|
||||
* @param [in] handle - call info handle
|
||||
* @param [in] feat_id - feature id
|
||||
* @return boolean - is Allowed
|
||||
*/
|
||||
cc_boolean CCAPI_LineInfo_hasCapability(cc_lineinfo_ref_t line, cc_int32_t feat_id);
|
||||
|
||||
/**
|
||||
* get Allowed Feature set
|
||||
* @param [in] handle - call info handle
|
||||
* @param [in,out] feat_set - array of len CC_CALL_CAP_MAX
|
||||
* @return cc_return_t - CC_SUCCESS or CC_FAILURE
|
||||
*/
|
||||
cc_return_t CCAPI_LineInfo_getCapabilitySet(cc_lineinfo_ref_t line, cc_int32_t feat_set[]);
|
||||
|
||||
#endif /* _CCAPIAPI_LINE_INFO_H_ */
|
||||
@@ -0,0 +1,23 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _CCAPI_LINE_LISTENER_H_
|
||||
#define _CCAPI_LINE_LISTENER_H_
|
||||
|
||||
#include "cc_constants.h"
|
||||
|
||||
/**
|
||||
* Line event notification
|
||||
* @param [in] line_event - event
|
||||
* @param [in] line - line id
|
||||
* @param [in] lineInfo - line info reference
|
||||
* @return cc_call_handle_t - handle of the call created
|
||||
* NOTE: The memory associated with deviceInfo will be freed immediately upon
|
||||
* return from this method. If the application wishes to retain a copy it should
|
||||
* invoke CCAPI_Line_retainlineInfo() API. once the info is retained it can be
|
||||
* released by invoking CCAPI_Line_releaseLineInfo() API
|
||||
*/
|
||||
void CCAPI_LineListener_onLineEvent(ccapi_line_event_e line_event, cc_lineid_t line, cc_lineinfo_ref_t lineInfo);
|
||||
|
||||
#endif /* _CCAPIAPI_LINE_LISTENER_H_ */
|
||||
@@ -0,0 +1,85 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _CCAPI_SERVICE_H_
|
||||
#define _CCAPI_SERVICE_H_
|
||||
#include "cc_constants.h"
|
||||
|
||||
/**
|
||||
* Globals defined in ccapi_service.c
|
||||
*/
|
||||
extern int g_dev_hdl;
|
||||
#define G_DEV_NAME_SIZE 64
|
||||
extern char g_dev_name[G_DEV_NAME_SIZE];
|
||||
#define G_CFG_P_SIZE 256
|
||||
extern char g_cfg_p[G_CFG_P_SIZE];
|
||||
extern int g_compl_cfg;
|
||||
|
||||
/**
|
||||
* Defines the management methods.
|
||||
*/
|
||||
|
||||
/**
|
||||
* The following methods are defined to bring up the pSipcc stack
|
||||
*/
|
||||
|
||||
/**
|
||||
* This function creates various data module needed for initialization of
|
||||
* Sipcc stack. On reboot or after CCAPI_Service_destroy(), application must call
|
||||
* first this function followed by CC_Service_start()
|
||||
* to bring Sipcc stack in in-service. This function
|
||||
* need to be called only once.
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CCAPI_Service_create();
|
||||
|
||||
/**
|
||||
* Gracefully unload the Sipcc stack. To bring up the pSipcc stack again,
|
||||
* follow the function calling sequence starting from CCAPI_Service_create().
|
||||
* @return SUCCESS
|
||||
*/
|
||||
cc_return_t CCAPI_Service_destroy();
|
||||
|
||||
/**
|
||||
* Bring up the Sipcc stack in service.
|
||||
*
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CCAPI_Service_start();
|
||||
|
||||
/**
|
||||
* Stop Sipcc stack
|
||||
*
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
cc_return_t CCAPI_Service_stop();
|
||||
|
||||
/**
|
||||
* CCAPI_Service_reregister
|
||||
*
|
||||
* This API will result in stopping the stip stack (i.e unregister) followed
|
||||
* by parsing of the current config followed by a
|
||||
* start (i.e register) of the SIP stack, without the download of a new config
|
||||
* file. This API is used in the APPLY config case
|
||||
*
|
||||
* @param device_handle handle of the device, the response is for
|
||||
* @param device_name
|
||||
* @param cfg the config file name and path or the complete configuration
|
||||
* in memory.
|
||||
* @param from_memory boolean flag to indicate if the complete config
|
||||
* is sent. This parameter is meant to indicate if the "cfg" parameter
|
||||
* points to the file name or is a pointer to the complete config in memory.
|
||||
* @return
|
||||
*/
|
||||
cc_return_t CCAPI_Service_reregister (int device_handle, const char *device_name,
|
||||
const char *cfg, int from_memory);
|
||||
|
||||
/**
|
||||
* Reset request from the Reset Manager
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
void CCAPI_Service_reset_request();
|
||||
|
||||
#endif /* _CCAPI_SERVICE_H_ */
|
||||
@@ -0,0 +1,160 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/**
|
||||
* @mainpage Portable SIP Stack API
|
||||
*
|
||||
* @section intro_sec Introduction
|
||||
* The portable SIP stack is used in multiple SIP endpoints. This document
|
||||
* describes the API's provided by the portable SIP stack that third party
|
||||
* vendors must implement to use the stack.
|
||||
*
|
||||
* @section hlapi NG APIs
|
||||
* This API provides 3 main sets of APIs (device, line. call) and provides ways to
|
||||
* invoke actions on these and get status and even callbacks
|
||||
*
|
||||
* @subsection Management
|
||||
* @li cc_service.h @par
|
||||
*
|
||||
* @subsection Call
|
||||
* @li ccapi_call.h @par
|
||||
* @li ccapi_call_info.h @par
|
||||
* @li ccapi_call_listener.h @par to be implemented by the vendor for events related to call
|
||||
*
|
||||
* @subsection Line
|
||||
* @li ccapi_line.h @par
|
||||
* @li ccapi_line_info.h @par
|
||||
* @li ccapi_line_listener.h @par to be implemented by the vendor for events related to line
|
||||
*
|
||||
* @subsection Device
|
||||
* @li ccapi_device.h @par
|
||||
* @li ccapi_device_info.h @par
|
||||
* @li ccapi_device_listener.h @par to be implemented by the vendor for events related to device
|
||||
*
|
||||
* @subsection Misc
|
||||
* @li ccapi_types.h @par
|
||||
* @li cc_types.h @par
|
||||
* @li cc_constants.h @par
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _CCAPI_TYPES_H_
|
||||
#define _CCAPI_TYPES_H_
|
||||
|
||||
#include "cc_constants.h"
|
||||
|
||||
/**
|
||||
* Device ID typedef
|
||||
*/
|
||||
typedef unsigned int cc_device_handle_t;
|
||||
/**
|
||||
* File location
|
||||
*/
|
||||
typedef const char *file_path_t;
|
||||
/**
|
||||
* Device info reference typedef
|
||||
*/
|
||||
typedef struct cc_device_info_t_* cc_deviceinfo_ref_t;
|
||||
/**
|
||||
* Line info reference typedef
|
||||
*/
|
||||
typedef struct cc_line_info_t_ * cc_lineinfo_ref_t;
|
||||
/**
|
||||
* Feature info reference typedef
|
||||
*/
|
||||
typedef struct cc_feature_info_t_ * cc_featureinfo_ref_t;
|
||||
/**
|
||||
* Call info reference typedef
|
||||
*/
|
||||
typedef struct cc_call_info_t_* cc_callinfo_ref_t;
|
||||
/**
|
||||
* CAll server info reference typedef
|
||||
*/
|
||||
typedef struct cc_call_server_t_* cc_callserver_ref_t;
|
||||
|
||||
/**
|
||||
* CallLog reference typedef
|
||||
*/
|
||||
typedef struct cc_call_log_t_* cc_calllog_ref_t;
|
||||
|
||||
#define CCAPI_MAX_SERVERS 4
|
||||
/**
|
||||
* Call event types
|
||||
*/
|
||||
typedef enum {
|
||||
CCAPI_CALL_EV_CREATED,
|
||||
CCAPI_CALL_EV_STATE,
|
||||
CCAPI_CALL_EV_CALLINFO,
|
||||
CCAPI_CALL_EV_ATTR,
|
||||
CCAPI_CALL_EV_SECURITY,
|
||||
CCAPI_CALL_EV_LOG_DISP,
|
||||
CCAPI_CALL_EV_PLACED_CALLINFO,
|
||||
CCAPI_CALL_EV_STATUS,
|
||||
CCAPI_CALL_EV_SELECT,
|
||||
CCAPI_CALL_EV_LAST_DIGIT_DELETED,
|
||||
CCAPI_CALL_EV_GCID,
|
||||
CCAPI_CALL_EV_XFR_OR_CNF_CANCELLED,
|
||||
CCAPI_CALL_EV_PRESERVATION,
|
||||
CCAPI_CALL_EV_CAPABILITY,
|
||||
CCAPI_CALL_EV_VIDEO_AVAIL,
|
||||
CCAPI_CALL_EV_VIDEO_OFFERED,
|
||||
CCAPI_CALL_EV_RECEIVED_INFO,
|
||||
CCAPI_CALL_EV_RINGER_STATE,
|
||||
CCAPI_CALL_EV_CONF_PARTICIPANT_INFO,
|
||||
CCAPI_CALL_EV_MEDIA_INTERFACE_UPDATE_BEGIN,
|
||||
CCAPI_CALL_EV_MEDIA_INTERFACE_UPDATE_SUCCESSFUL,
|
||||
CCAPI_CALL_EV_MEDIA_INTERFACE_UPDATE_FAIL
|
||||
} ccapi_call_event_e;
|
||||
|
||||
/**
|
||||
* Line event types
|
||||
*/
|
||||
typedef enum {
|
||||
CCAPI_LINE_EV_CONFIG_CHANGED,
|
||||
CCAPI_LINE_EV_REG_STATE,
|
||||
CCAPI_LINE_EV_CAPSET_CHANGED,
|
||||
CCAPI_LINE_EV_CFWDALL,
|
||||
CCAPI_LINE_EV_MWI
|
||||
} ccapi_line_event_e;
|
||||
|
||||
/**
|
||||
* Device event types
|
||||
*/
|
||||
typedef enum {
|
||||
CCAPI_DEVICE_EV_CONFIG_CHANGED,
|
||||
CCAPI_DEVICE_EV_STATE, // INS/OOS
|
||||
CCAPI_DEVICE_EV_IDLE_SET,
|
||||
CCAPI_DEVICE_EV_MWI_LAMP,
|
||||
CCAPI_DEVICE_EV_NOTIFYPROMPT,
|
||||
CCAPI_DEVICE_EV_SERVER_STATUS,
|
||||
CCAPI_DEVICE_EV_BLF,
|
||||
CCAPI_DEVICE_EV_CAMERA_ADMIN_CONFIG_CHANGED,
|
||||
CCAPI_DEVICE_EV_VIDEO_CAP_ADMIN_CONFIG_CHANGED
|
||||
} ccapi_device_event_e;
|
||||
|
||||
/**
|
||||
* Call capability feature IDs
|
||||
*/
|
||||
typedef enum {
|
||||
CCAPI_CALL_CAP_NEWCALL,
|
||||
CCAPI_CALL_CAP_ANSWER,
|
||||
CCAPI_CALL_CAP_ENDCALL,
|
||||
CCAPI_CALL_CAP_HOLD,
|
||||
CCAPI_CALL_CAP_RESUME,
|
||||
CCAPI_CALL_CAP_CALLFWD,
|
||||
CCAPI_CALL_CAP_DIAL,
|
||||
CCAPI_CALL_CAP_BACKSPACE,
|
||||
CCAPI_CALL_CAP_SENDDIGIT,
|
||||
CCAPI_CALL_CAP_TRANSFER,
|
||||
CCAPI_CALL_CAP_CONFERENCE,
|
||||
CCAPI_CALL_CAP_SWAP,
|
||||
CCAPI_CALL_CAP_BARGE,
|
||||
CCAPI_CALL_CAP_REDIAL,
|
||||
CCAPI_CALL_CAP_JOIN,
|
||||
CCAPI_CALL_CAP_SELECT,
|
||||
CCAPI_CALL_CAP_RMVLASTPARTICIPANT,
|
||||
CCAPI_CALL_CAP_MAX
|
||||
} ccapi_call_capability_e;
|
||||
|
||||
#endif /* _CCAPIAPI_TYPES_H_ */
|
||||
@@ -0,0 +1,659 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/**
|
||||
* Skip this file if not doing video on the device.
|
||||
*
|
||||
* The ccsdp_xxx api's provide a means to query and populate the SDP attributes
|
||||
* for video m lines. These Api are not needed if we are not supporting video on
|
||||
* the platform. For audio the stack will populate the appropriate attributes
|
||||
*
|
||||
*
|
||||
* These API's can be invoked from the vcmCheckAttrs() and vcmPopulateAttrs()
|
||||
* methods to populate or extract the value of specific attributes in the video SDP.
|
||||
* These api require an handle to the SDP that is passed in the above methods.
|
||||
* <pre>
|
||||
* sdp_handle The SDP handle
|
||||
* level The level the attribute is defined. Can be either
|
||||
* SDP_SESSION_LEVEL or 0-n specifying a media line level.
|
||||
* inst_num The instance number of the attribute. Multiple instances
|
||||
* of a particular attribute may exist at each level and so
|
||||
* the inst_num determines the particular attribute at that
|
||||
* level that should be accessed. Note that this is the
|
||||
* instance number of the specified type of attribute, not the
|
||||
* overall attribute number at the level. Also note that the
|
||||
* instance number is 1-based. For example:
|
||||
* v=0
|
||||
* o=mhandley 2890844526 2890842807 IN IP4 126.16.64.4
|
||||
* s=SDP Seminar
|
||||
* c=IN IP4 10.1.0.2
|
||||
* t=0 0
|
||||
* m=audio 1234 RTP/AVP 0 101 102
|
||||
* a=foo 1
|
||||
* a=foo 2
|
||||
* a=bar 1 # This is instance 1 of attribute bar.
|
||||
* a=foo 3 # This is instance 3 of attribute foo.
|
||||
* cap_num Almost all of the attributes may be defined as X-cpar
|
||||
* parameters (with the exception of X-sqn, X-cap, and X-cpar).
|
||||
* If the cap_num is set to zero, then the attribute is not
|
||||
* an X-cpar parameter attribute. If the cap_num is any other
|
||||
* value, it specifies the capability number that the X-cpar
|
||||
* attribute is specified for.
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
#ifndef __CCSDP_H__
|
||||
#define __CCSDP_H__
|
||||
|
||||
#include "cpr_types.h"
|
||||
|
||||
#define SIPSDP_ILBC_MODE20 20
|
||||
|
||||
/**
|
||||
* Return codes for sdp helper APIs
|
||||
*/
|
||||
typedef enum rtp_ptype_
|
||||
{
|
||||
RTP_NONE = -1,
|
||||
RTP_PCMU = 0,
|
||||
RTP_CELP = 1,
|
||||
RTP_G726 = 2,
|
||||
RTP_GSM = 3,
|
||||
RTP_G723 = 4,
|
||||
RTP_DVI4 = 5,
|
||||
RTP_DVI4_II = 6,
|
||||
RTP_LPC = 7,
|
||||
RTP_PCMA = 8,
|
||||
RTP_G722 = 9,
|
||||
RTP_G728 = 15,
|
||||
RTP_G729 = 18,
|
||||
RTP_JPEG = 26,
|
||||
RTP_NV = 28,
|
||||
RTP_H261 = 31,
|
||||
RTP_H264_P0 = 97,
|
||||
RTP_H264_P1 = 126,
|
||||
RTP_AVT = 101,
|
||||
RTP_L16 = 102,
|
||||
RTP_H263 = 103,
|
||||
RTP_ILBC = 116, /* used only to make an offer */
|
||||
RTP_OPUS = 109,
|
||||
RTP_VP8 = 120,
|
||||
RTP_I420 = 124,
|
||||
RTP_ISAC = 124
|
||||
} rtp_ptype;
|
||||
|
||||
/**
|
||||
* IANA-registered static payload types for the RTP/AVP profile.
|
||||
* See http://www.iana.org/assignments/rtp-parameters/rtp-parameters.xml
|
||||
*/
|
||||
typedef enum static_rtp_ptype_
|
||||
{
|
||||
STATIC_RTP_AVP_PCMU_8000_1 = 0,
|
||||
STATIC_RTP_AVP_GSM_8000_1 = 3,
|
||||
STATIC_RTP_AVP_G723_8000_1 = 4,
|
||||
STATIC_RTP_AVP_DVI4_8000_1 = 5,
|
||||
STATIC_RTP_AVP_DVI4_16000_1 = 6,
|
||||
STATIC_RTP_AVP_LPC_8000_1 = 7,
|
||||
STATIC_RTP_AVP_PCMA_8000_1 = 8,
|
||||
STATIC_RTP_AVP_G722_8000_1 = 9,
|
||||
STATIC_RTP_AVP_L16_44100_2 = 10,
|
||||
STATIC_RTP_AVP_L16_44100_1 = 11,
|
||||
STATIC_RTP_AVP_QCELP_8000_1 = 12,
|
||||
STATIC_RTP_AVP_CN_8000_1 = 13,
|
||||
STATIC_RTP_AVP_MPA_90000_1 = 14,
|
||||
STATIC_RTP_AVP_G728_8000_1 = 15,
|
||||
STATIC_RTP_AVP_DVI4_11025_1 = 16,
|
||||
STATIC_RTP_AVP_DVI4_22050_1 = 17,
|
||||
STATIC_RTP_AVP_G729_8000_1 = 18,
|
||||
STATIC_RTP_AVP_CELB_90000_1 = 25,
|
||||
STATIC_RTP_AVP_JPEG_90000_1 = 26,
|
||||
STATIC_RTP_AVP_NV_90000_1 = 28,
|
||||
STATIC_RTP_AVP_H261_90000_1 = 31,
|
||||
STATIC_RTP_AVP_MPV_90000_1 = 32,
|
||||
STATIC_RTP_AVP_MP2T_90000_1 = 33,
|
||||
STATIC_RTP_AVP_H263_90000_1 = 34
|
||||
} static_rtp_ptype;
|
||||
|
||||
typedef struct {
|
||||
const char *name;
|
||||
int value;
|
||||
} ccsdp_key_table_entry_t;
|
||||
|
||||
typedef enum max_coded_audio_bandwidth_ {
|
||||
opus_nb = 0, /* Narrowband */
|
||||
opus_mb = 1, /* Mediumband */
|
||||
opus_wb = 2, /* Wideband */
|
||||
opus_swb = 3, /* Super-wideband */
|
||||
opus_fb = 4 /* Fullband */
|
||||
} max_coded_audio_bandwidth;
|
||||
|
||||
static const ccsdp_key_table_entry_t max_coded_audio_bandwidth_table[] = {
|
||||
{"nb", opus_nb},
|
||||
{"mb", opus_mb},
|
||||
{"wb", opus_wb},
|
||||
{"swb", opus_swb},
|
||||
{"fb", opus_fb}
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
SDP_SUCCESS, /**< Success */
|
||||
SDP_FAILURE,
|
||||
SDP_INVALID_SDP_PTR,
|
||||
SDP_NOT_SDP_DESCRIPTION,
|
||||
SDP_INVALID_TOKEN_ORDERING,
|
||||
SDP_INVALID_PARAMETER,
|
||||
SDP_INVALID_MEDIA_LEVEL,
|
||||
SDP_INVALID_CAPABILITY,
|
||||
SDP_NO_RESOURCE,
|
||||
SDP_UNRECOGNIZED_TOKEN,
|
||||
SDP_NULL_BUF_PTR,
|
||||
SDP_POTENTIAL_SDP_OVERFLOW,
|
||||
SDP_MAX_RC
|
||||
} sdp_result_e;
|
||||
|
||||
/**
|
||||
* Indicates invalid bandwidth value
|
||||
*/
|
||||
#define SDP_INVALID_VALUE (-2)
|
||||
|
||||
/**
|
||||
* Bandwidth modifier type for b= SDP line
|
||||
*/
|
||||
typedef enum {
|
||||
SDP_BW_MODIFIER_INVALID = -1,
|
||||
SDP_BW_MODIFIER_AS, /** < b=AS: */
|
||||
SDP_BW_MODIFIER_CT, /** < b=CT: */
|
||||
SDP_BW_MODIFIER_TIAS, /** < b=TIAS: */
|
||||
SDP_MAX_BW_MODIFIER_VAL,
|
||||
SDP_BW_MODIFIER_UNSUPPORTED
|
||||
} sdp_bw_modifier_e;
|
||||
|
||||
/**
|
||||
* SDP attribute types
|
||||
*/
|
||||
/* Attribute Types */
|
||||
typedef enum {
|
||||
SDP_ATTR_BEARER = 0,
|
||||
SDP_ATTR_CALLED,
|
||||
SDP_ATTR_CONN_TYPE,
|
||||
SDP_ATTR_DIALED,
|
||||
SDP_ATTR_DIALING,
|
||||
SDP_ATTR_DIRECTION,
|
||||
SDP_ATTR_EECID,
|
||||
SDP_ATTR_FMTP,
|
||||
SDP_ATTR_FRAMING,
|
||||
SDP_ATTR_INACTIVE,
|
||||
SDP_ATTR_PTIME,
|
||||
SDP_ATTR_QOS,
|
||||
SDP_ATTR_CURR,
|
||||
SDP_ATTR_DES,
|
||||
SDP_ATTR_CONF,
|
||||
SDP_ATTR_RECVONLY,
|
||||
SDP_ATTR_RTPMAP,
|
||||
SDP_ATTR_SECURE,
|
||||
SDP_ATTR_SENDONLY,
|
||||
SDP_ATTR_SENDRECV,
|
||||
SDP_ATTR_SUBNET,
|
||||
SDP_ATTR_T38_VERSION,
|
||||
SDP_ATTR_T38_MAXBITRATE,
|
||||
SDP_ATTR_T38_FILLBITREMOVAL,
|
||||
SDP_ATTR_T38_TRANSCODINGMMR,
|
||||
SDP_ATTR_T38_TRANSCODINGJBIG,
|
||||
SDP_ATTR_T38_RATEMGMT,
|
||||
SDP_ATTR_T38_MAXBUFFER,
|
||||
SDP_ATTR_T38_MAXDGRAM,
|
||||
SDP_ATTR_T38_UDPEC,
|
||||
SDP_ATTR_X_CAP,
|
||||
SDP_ATTR_X_CPAR,
|
||||
SDP_ATTR_X_PC_CODEC,
|
||||
SDP_ATTR_X_PC_QOS,
|
||||
SDP_ATTR_X_QOS,
|
||||
SDP_ATTR_X_SQN,
|
||||
SDP_ATTR_TMRGWXID,
|
||||
SDP_ATTR_TC1_PAYLOAD_BYTES,
|
||||
SDP_ATTR_TC1_WINDOW_SIZE,
|
||||
SDP_ATTR_TC2_PAYLOAD_BYTES,
|
||||
SDP_ATTR_TC2_WINDOW_SIZE,
|
||||
SDP_ATTR_RTCP,
|
||||
SDP_ATTR_RTR,
|
||||
SDP_ATTR_SILENCESUPP,
|
||||
SDP_ATTR_SRTP_CONTEXT, /* version 2 sdescriptions */
|
||||
SDP_ATTR_MPTIME,
|
||||
SDP_ATTR_X_SIDIN,
|
||||
SDP_ATTR_X_SIDOUT,
|
||||
SDP_ATTR_X_CONFID,
|
||||
SDP_ATTR_GROUP,
|
||||
SDP_ATTR_MID,
|
||||
SDP_ATTR_SOURCE_FILTER,
|
||||
SDP_ATTR_RTCP_UNICAST,
|
||||
SDP_ATTR_MAXPRATE,
|
||||
SDP_ATTR_SQN,
|
||||
SDP_ATTR_CDSC,
|
||||
SDP_ATTR_CPAR,
|
||||
SDP_ATTR_SPRTMAP,
|
||||
SDP_ATTR_SDESCRIPTIONS, /* version 9 sdescriptions */
|
||||
SDP_ATTR_LABEL,
|
||||
SDP_ATTR_FRAMERATE,
|
||||
SDP_ATTR_ICE_CANDIDATE,
|
||||
SDP_ATTR_ICE_UFRAG,
|
||||
SDP_ATTR_ICE_PWD,
|
||||
SDP_ATTR_RTCP_MUX,
|
||||
SDP_ATTR_DTLS_FINGERPRINT,
|
||||
SDP_ATTR_MAXPTIME,
|
||||
SDP_MAX_ATTR_TYPES,
|
||||
SDP_ATTR_INVALID
|
||||
} sdp_attr_e;
|
||||
|
||||
/**
|
||||
* Gets the value of the fmtp attribute- parameter-sets parameter for H.264 codec
|
||||
*
|
||||
* @param[in] sdp_handle The SDP handle
|
||||
* @param[in] level The level to check for the attribute.
|
||||
* @param[in] cap_num The capability number associated with the attribute if any. If none, should be zero.
|
||||
* @param[in] inst_num The attribute instance number to check.
|
||||
*
|
||||
* @return parameter-sets value.
|
||||
*/
|
||||
|
||||
const char* ccsdpAttrGetFmtpParamSets(void *sdp_handle, uint16_t level,
|
||||
uint8_t cap_num, uint16_t inst_num);
|
||||
|
||||
/**
|
||||
* Gets the value of the fmtp attribute- packetization-mode parameter for H.264 codec
|
||||
*
|
||||
* @param[in] sdp_handle The SDP handle
|
||||
* @param[in] level The level to check for the attribute.
|
||||
* @param[in] cap_num The capability number associated with the attribute if any. If none, should be zero.
|
||||
* @param[in] inst_num The attribute instance number to check.
|
||||
* @param[out] *val packetization-mode value in the range 0 - 2.
|
||||
*
|
||||
* @return sdp_result_e SDP_SUCCESS = SUCCESS
|
||||
*/
|
||||
sdp_result_e ccsdpAttrGetFmtpPackMode(void *sdp_handle, uint16_t level,
|
||||
uint8_t cap_num, uint16_t inst_num, uint16_t *val);
|
||||
/**
|
||||
* Gets the value of the fmtp attribute- level asymmetry allowed parameter for H.264 codec
|
||||
*
|
||||
* @param[in] sdp_handle The SDP handle
|
||||
* @param[in] level The level to check for the attribute.
|
||||
* @param[in] cap_num The capability number associated with the attribute if any. If none, should be zero.
|
||||
* @param[in] inst_num The attribute instance number to check.
|
||||
* @param[out] *val level-asymmetry-allowed param value in the range 0 - 1.
|
||||
*
|
||||
* @return sdp_result_e SDP_SUCCESS = SUCCESS
|
||||
*/
|
||||
sdp_result_e ccsdpAttrGetFmtpLevelAsymmetryAllowed(void *sdp_handle, uint16_t level,
|
||||
uint8_t cap_num, uint16_t inst_num, uint16_t *val);
|
||||
|
||||
|
||||
/**
|
||||
* Gets the value of the fmtp attribute- profile-level-id parameter for H.264 codec
|
||||
*
|
||||
* @param[in] sdp_handle The SDP handle returned by sdp_init_description.
|
||||
* @param[in] level The level to check for the attribute.
|
||||
* @param[in] cap_num The capability number associated with the attribute if any. If none, should be zero.
|
||||
* @param[in] inst_num The attribute instance number to check.
|
||||
*
|
||||
* @return char * profile-level-id value.
|
||||
*/
|
||||
const char* ccsdpAttrGetFmtpProfileLevelId (void *sdp_handle, uint16_t level,
|
||||
uint8_t cap_num, uint16_t inst_num);
|
||||
|
||||
/**
|
||||
* Gets the value of the fmtp attribute- max-mbps parameter for H.264 codec
|
||||
*
|
||||
* @param[in] sdp_handle The SDP handle
|
||||
* @param[in] level The level to check for the attribute.
|
||||
* @param[in] cap_num The capability number associated with the
|
||||
* attribute if any. If none, should be zero.
|
||||
* @param[in] inst_num The attribute instance number to check.
|
||||
* @param[out] *val max-mbps value.
|
||||
*
|
||||
* @return sdp_result_e SDP_SUCCESS
|
||||
*/
|
||||
|
||||
sdp_result_e ccsdpAttrGetFmtpMaxMbps (void *sdp_handle, uint16_t level,
|
||||
uint8_t cap_num, uint16_t inst_num, uint32_t *val);
|
||||
|
||||
/**
|
||||
* Gets the value of the fmtp attribute- max-fs parameter for H.264 codec
|
||||
*
|
||||
* @param[in] sdp_handle The SDP handle
|
||||
* @param[in] level The level to check for the attribute.
|
||||
* @param[in] cap_num The capability number associated with the
|
||||
* attribute if any. If none, should be zero.
|
||||
* @param[in] inst_num The attribute instance number to check.
|
||||
* @param[out] *val max-fs value.
|
||||
*
|
||||
* @return sdp_result_e SDP_SUCCESS
|
||||
*/
|
||||
sdp_result_e ccsdpAttrGetFmtpMaxFs (void *sdp_handle, uint16_t level,
|
||||
uint8_t cap_num, uint16_t inst_num, uint32_t *val);
|
||||
|
||||
/**
|
||||
* Gets the value of the fmtp attribute- max-cpb parameter for H.264 codec
|
||||
* @param[in] sdp_handle The SDP handle
|
||||
* @param[in] level The level to check for the attribute.
|
||||
* @param[in] cap_num The capability number associated with the attribute if any. If none, should be zero.
|
||||
* @param[in] inst_num The attribute instance number to check.
|
||||
* @param [out] *val max-cpb value.
|
||||
*
|
||||
* @return sdp_result_e SDP_SUCCESS
|
||||
*/
|
||||
sdp_result_e ccsdpAttrGetFmtpMaxCpb (void *sdp_handle, uint16_t level,
|
||||
uint8_t cap_num, uint16_t inst_num, uint32_t *val);
|
||||
|
||||
/**
|
||||
* Gets the value of the fmtp attribute- max-br parameter for H.264 codec
|
||||
*
|
||||
* @param[in] sdp_handle The SDP handle
|
||||
* @param[in] level The level to check for the attribute.
|
||||
* @param[in] cap_num The capability number associated with the attribute if any. If none, should be zero.
|
||||
* @param[in] inst_num The attribute instance number to check.
|
||||
* @param [out] *val max-br value.
|
||||
*
|
||||
* @return sdp_result_e SDP_SUCCESS
|
||||
*/
|
||||
sdp_result_e ccsdpAttrGetFmtpMaxBr (void *sdp_handle, uint16_t level,
|
||||
uint8_t cap_num, uint16_t inst_num, uint32_t* val);
|
||||
|
||||
/**
|
||||
* Returns the bandwidth value parameter from the b= line.
|
||||
*
|
||||
* @param[in] sdp_handle The SDP handle
|
||||
* @param[in] level The level from which to get the bw value.
|
||||
* @param[in] inst_num instance number of bw line at the level. The first
|
||||
* instance has a inst_num of 1 and so on.
|
||||
*
|
||||
* @return A valid numerical bw value or SDP_INVALID_VALUE(-2).
|
||||
*/
|
||||
int ccsdpGetBandwidthValue (void *sdp_handle, uint16_t level, uint16_t inst_num);
|
||||
|
||||
/**
|
||||
* Add a new attribute of the specified type at the given level and capability
|
||||
* level or base attribute if cap_num is zero.
|
||||
*
|
||||
* @param[in] sdp_handle The SDP handle
|
||||
* @param[in] level The level to check for the attribute.
|
||||
* @param[in] cap_num The capability number associated with the attribute if any. If none, should be zero.
|
||||
* @param[in] attr_type The type of attribute to add.
|
||||
* @param[in] inst_num Pointer to a uint16_t in which to return the instance number of the newly added attribute.
|
||||
*
|
||||
* @return sdp_result_e
|
||||
* SDP_SUCCESS Attribute was added successfully.
|
||||
* SDP_NO_RESOURCE No memory avail for new attribute.
|
||||
* SDP_INVALID_PARAMETER Specified media line is not defined.
|
||||
*/
|
||||
sdp_result_e ccsdpAddNewAttr (void *sdp_handle, uint16_t level, uint8_t cap_num,
|
||||
sdp_attr_e attr_type, uint16_t *inst_num);
|
||||
|
||||
/**
|
||||
* Gets the value of the fmtp attribute- max-dpb parameter for H.264 codec
|
||||
*
|
||||
* @param[in] sdp_handle The SDP handle
|
||||
* @param[in] level The level to check for the attribute.
|
||||
* @param[in] cap_num The capability number associated with the attribute if any. If none, should be zero.
|
||||
* @param[in] inst_num The attribute instance number to check.
|
||||
* @param[out] *val max-dpb value.
|
||||
*
|
||||
* @return sdp_result_e
|
||||
* SDP_SUCCESS Attribute was added successfully.
|
||||
*/
|
||||
|
||||
sdp_result_e ccsdpAttrGetFmtpMaxDpb (void *sdp_handle, uint16_t level,
|
||||
uint8_t cap_num, uint16_t inst_num, uint32_t *val);
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value of the fmtp attribute payload type parameter for the given attribute.
|
||||
*
|
||||
* @param[in] sdp_handle The SDP handle
|
||||
* @param[in] level The level to check for the attribute.
|
||||
* @param[in] cap_num The capability number associated with the attribute if any. If none, should be zero.
|
||||
* @param[in] inst_num The attribute instance number to check.
|
||||
* @param[in] payload_num New payload type value.
|
||||
*
|
||||
* @return SDP_SUCCESS Attribute was added successfully.
|
||||
* SDP_INVALID_PARAMETER Specified attribute is not defined.
|
||||
*/
|
||||
sdp_result_e ccsdpAttrSetFmtpPayloadType (void *sdp_handle, uint16_t level,
|
||||
uint8_t cap_num, uint16_t inst_num, uint16_t payload_num);
|
||||
|
||||
/**
|
||||
* Sets the value of the packetization mode attribute parameter for the given attribute.
|
||||
*
|
||||
* @param[in] sdp_handle The SDP handle returned by sdp_init_description.
|
||||
* @param[in] level The level to check for the attribute.
|
||||
* @param[in] cap_num The capability number associated with the attribute if any. If none, should be zero.
|
||||
* @param[in] inst_num The attribute instance number to check.
|
||||
* @param[in] pack_mode Packetization mode value
|
||||
*
|
||||
* @return SDP_SUCCESS Attribute was added successfully.
|
||||
* SDP_INVALID_PARAMETER Specified attribute is not defined.
|
||||
*/
|
||||
|
||||
sdp_result_e ccsdpAttrSetFmtpPackMode (void *sdp_handle, uint16_t level,
|
||||
uint8_t cap_num, uint16_t inst_num, uint16_t pack_mode);
|
||||
/**
|
||||
* Sets the value of the level-asymmetry-allowed attribute parameter for the given attribute.
|
||||
*
|
||||
* @param[in] sdp_handle The SDP handle returned by sdp_init_description.
|
||||
* @param[in] level The level to check for the attribute.
|
||||
* @param[in] cap_num The capability number associated with the attribute if any. If none, should be zero.
|
||||
* @param[in] inst_num The attribute instance number to check.
|
||||
* @param[in] level_asymmetry_allowed level asymmetry allowed value (0 or 1).
|
||||
*
|
||||
* @return SDP_SUCCESS Attribute was added successfully.
|
||||
* SDP_INVALID_PARAMETER Specified attribute is not defined.
|
||||
*/
|
||||
|
||||
sdp_result_e ccsdpAttrSetFmtpLevelAsymmetryAllowed (void *sdp_handle, uint16_t level,
|
||||
uint8_t cap_num, uint16_t inst_num, uint16_t level_asymmetry_allowed);
|
||||
|
||||
/**
|
||||
* Sets the value of the profile-level-id parameter for the given attribute.
|
||||
*
|
||||
* @param[in] sdp_handle The SDP handle returned by sdp_init_description.
|
||||
* @param[in] level The level to check for the attribute.
|
||||
* @param[in] cap_num The capability number associated with the attribute if any. If none, should be zero.
|
||||
* @param[in] inst_num The attribute instance number to check.
|
||||
* @param[in] profile_level_id profile_level_id to be set
|
||||
*
|
||||
* @return SDP_SUCCESS Attribute was added successfully.
|
||||
* SDP_INVALID_PARAMETER Specified attribute is not defined.
|
||||
*/
|
||||
|
||||
sdp_result_e ccsdpAttrSetFmtpProfileLevelId (void *sdp_handle, uint16_t level,
|
||||
uint8_t cap_num, uint16_t inst_num, const char *profile_level_id);
|
||||
|
||||
/**
|
||||
* Sets the value of the profile-level-id parameter for the given attribute.
|
||||
*
|
||||
* @param[in] sdp_handle The SDP handle returned by sdp_init_description.
|
||||
* @param[in] level The level to check for the attribute.
|
||||
* @param[in] cap_num The capability number associated with the attribute if any. If none, should be zero.
|
||||
* @param[in] inst_num The attribute instance number to check.
|
||||
* @param[in] parameter_sets parameter_sets to be set
|
||||
*
|
||||
* @return SDP_SUCCESS Attribute was added successfully.
|
||||
* SDP_INVALID_PARAMETER Specified attribute is not defined.
|
||||
*/
|
||||
|
||||
sdp_result_e ccsdpAttrSetFmtpParameterSets (void *sdp_handle, uint16_t level,
|
||||
uint8_t cap_num, uint16_t inst_num, const char *parameter_sets);
|
||||
|
||||
/**
|
||||
* Sets the value of the max-br parameter for the given attribute.
|
||||
*
|
||||
* @param[in] sdp_handle The SDP handle returned by sdp_init_description.
|
||||
* @param[in] level The level to check for the attribute.
|
||||
* @param[in] cap_num The capability number associated with the attribute if any. If none, should be zero.
|
||||
* @param[in] inst_num The attribute instance number to check.
|
||||
* @param[in] max_br max_br value to be set
|
||||
*
|
||||
* @return SDP_SUCCESS Attribute was added successfully.
|
||||
* SDP_INVALID_PARAMETER Specified attribute is not defined.
|
||||
*/
|
||||
|
||||
|
||||
sdp_result_e ccsdpAttrSetFmtpMaxBr (void *sdp_handle, uint16_t level,
|
||||
uint8_t cap_num, uint16_t inst_num, uint32_t max_br);
|
||||
|
||||
/**
|
||||
* Sets the value of the fmtp attribute- max-mbps parameter for H.264 codec
|
||||
*
|
||||
* @param[in] sdp_handle The SDP handle returned by sdp_init_description.
|
||||
* @param[in] level The level to check for the attribute.
|
||||
* @param[in] cap_num The capability number associated with the attribute if any. If none, should be zero.
|
||||
* @param[in] inst_num The attribute instance number to check.
|
||||
* @param[in] max_mbps value of max_mbps to be set
|
||||
*
|
||||
* @return SDP_SUCCESS Attribute was added successfully.
|
||||
* SDP_INVALID_PARAMETER Specified attribute is not defined.
|
||||
*/
|
||||
|
||||
sdp_result_e ccsdpAttrSetFmtpMaxMbps (void *sdp_handle, uint16_t level,
|
||||
uint8_t cap_num, uint16_t inst_num, uint32_t max_mbps);
|
||||
|
||||
/**
|
||||
* Sets the value of the fmtp attribute- max-fs parameter for H.264 codec
|
||||
* @param[in] sdp_handle The SDP handle returned by sdp_init_description.
|
||||
* @param[in] level The level to check for the attribute.
|
||||
* @param[in] cap_num The capability number associated with the attribute if any. If none, should be zero.
|
||||
* @param[in] inst_num The attribute instance number to check.
|
||||
* @param[in] max_fs max_fs value to be set
|
||||
*
|
||||
* @return SDP_SUCCESS Attribute was added successfully.
|
||||
* SDP_INVALID_PARAMETER Specified attribute is not defined.
|
||||
*/
|
||||
sdp_result_e ccsdpAttrSetFmtpMaxFs (void *sdp_handle, uint16_t level,
|
||||
uint8_t cap_num, uint16_t inst_num, uint32_t max_fs);
|
||||
/**
|
||||
* Sets the value of the fmtp attribute- max-cbp parameter for H.264 codec
|
||||
* @param[in] sdp_handle The SDP handle returned by sdp_init_description.
|
||||
* @param[in] level The level to check for the attribute.
|
||||
* @param[in] cap_num The capability number associated with the attribute if any. If none, should be zero.
|
||||
* @param[in] inst_num The attribute instance number to check.
|
||||
* @param[in] max_cpb max_cbp value to be set
|
||||
*
|
||||
* @return SDP_SUCCESS Attribute was added successfully.
|
||||
* SDP_INVALID_PARAMETER Specified attribute is not defined.
|
||||
*/
|
||||
|
||||
sdp_result_e ccsdpAttrSetFmtpMaxCpb (void *sdp_handle, uint16_t level,
|
||||
uint8_t cap_num, uint16_t inst_num, uint32_t max_cpb);
|
||||
/**
|
||||
* Sets the value of the fmtp attribute- max-dbp parameter for H.264 codec
|
||||
* @param[in] sdp_handle The SDP handle returned by sdp_init_description.
|
||||
* @param[in] level The level to check for the attribute.
|
||||
* @param[in] cap_num The capability number associated with the attribute if any. If none, should be zero.
|
||||
* @param[in] inst_num The attribute instance number to check.
|
||||
* @param[in] max_dpb max_dbp value to be set
|
||||
*
|
||||
* @return SDP_SUCCESS Attribute was added successfully.
|
||||
* SDP_INVALID_PARAMETER Specified attribute is not defined.
|
||||
*/
|
||||
|
||||
sdp_result_e ccsdpAttrSetFmtpMaxDbp (void *sdp_handle, uint16_t level,
|
||||
uint8_t cap_num, uint16_t inst_num, uint32_t max_dpb);
|
||||
|
||||
|
||||
/**
|
||||
* Sets the value of the fmtp attribute qcif parameter for the given attribute.
|
||||
* @param[in] sdp_handle The SDP handle returned by sdp_init_description.
|
||||
* @param[in] level The level to check for the attribute.
|
||||
* @param[in] cap_num The capability number associated with the attribute if any. If none, should be zero.
|
||||
* @param[in] inst_num The attribute instance number to check.
|
||||
* @param[in] qcif Sets the QCIF value for a video codec
|
||||
*
|
||||
* @return SDP_SUCCESS Attribute param was set successfully.
|
||||
* SDP_INVALID_PARAMETER Specified attribute is not defined.
|
||||
*/
|
||||
sdp_result_e ccsdpAttrSetFmtpQcif (void *sdp_handle, uint16_t level,
|
||||
uint8_t cap_num, uint16_t inst_num, uint16_t qcif);
|
||||
|
||||
/**
|
||||
* Sets the value of the fmtp attribute sqcif parameter for the given attribute.
|
||||
*
|
||||
* @param[in] sdp_handle The SDP handle returned by sdp_init_description.
|
||||
* @param[in] level The level to check for the attribute.
|
||||
* @param[in] cap_num The capability number associated with the attribute if any. If none, should be zero.
|
||||
* @param[in] inst_num The attribute instance number to check.
|
||||
* @param[in] sqcif Sets the SQCIF value for a video codec
|
||||
*
|
||||
* @return SDP_SUCCESS Attribute param was set successfully.
|
||||
* SDP_INVALID_PARAMETER Specified attribute is not defined.
|
||||
*/
|
||||
sdp_result_e ccsdpAttrSetFmtpSqcif (void *sdp_handle, uint16_t level,
|
||||
uint8_t cap_num, uint16_t inst_num, uint16_t sqcif);
|
||||
|
||||
/**
|
||||
*
|
||||
* To specify bandwidth parameters at any level, a bw line must first be
|
||||
* added at that level using this function. This function returns the instance
|
||||
* number of an existing bw_line that matches bw_modifier type, or of a newly
|
||||
* created bw_line of type bw_modifier. After this addition, you can set the
|
||||
* properties of the added bw line by using sdp_set_bw().
|
||||
*
|
||||
* Note carefully though, that since there can be multiple instances of bw
|
||||
* lines at any level, you must specify the instance number when setting
|
||||
* or getting the properties of a bw line at any level.
|
||||
*
|
||||
* This function returns the inst_num variable, the instance number
|
||||
* of the created bw_line at that level. The instance number is 1 based.
|
||||
* <pre>
|
||||
* For example:
|
||||
* v=0 :Session Level
|
||||
* o=mhandley 2890844526 2890842807 IN IP4 126.16.64.4
|
||||
* s=SDP Seminar
|
||||
* c=IN IP4 10.1.0.2
|
||||
* t=0 0
|
||||
* b=AS:60 : instance number 1
|
||||
* b=TIAS:50780 : instance number 2
|
||||
* m=audio 1234 RTP/AVP 0 101 102 : 1st Media level
|
||||
* b=AS:12 : instance number 1
|
||||
* b=TIAS:8480 : instance number 2
|
||||
* m=audio 1234 RTP/AVP 0 101 102 : 2nd Media level
|
||||
* b=AS:20 : instance number 1
|
||||
* </pre>
|
||||
* @param[in] sdp_handle The SDP handle returned by sdp_init_description.
|
||||
* @param[in] level The level to create the bw line.
|
||||
* @param[in] bw_modifier The Type of bandwidth, CT, AS or TIAS.
|
||||
* @param[out] inst_num This memory is set with the instance number of the newly created bw line instance.
|
||||
*
|
||||
* @return SDP_SUCCESS Attribute param was set successfully.
|
||||
* SDP_INVALID_PARAMETER Specified attribute is not defined.
|
||||
*/
|
||||
sdp_result_e ccsdpAddNewBandwidthLine (void *sdp_handle, uint16_t level, sdp_bw_modifier_e bw_modifier, uint16_t *inst_num);
|
||||
|
||||
|
||||
/**
|
||||
* Once a bandwidth line is added under a level, this function can be used to
|
||||
* set the properties of that bandwidth line.
|
||||
*
|
||||
* @param[in] sdp_handle The SDP handle returned by sdp_init_description.
|
||||
* @param[in] level The level to at which the bw line resides.
|
||||
* @param[in] inst_num The instance number of the bw line that is to be set.
|
||||
* @param[in] bw_modifier The Type of bandwidth, CT, AS or TIAS.
|
||||
* @param[in] bw_val Numerical bandwidth value.
|
||||
*
|
||||
* @note Before calling this function to set the bw line, the bw line must
|
||||
* be added using sdp_add_new_bw_line at the required level.
|
||||
*
|
||||
* @return SDP_SUCCESS Attribute param was set successfully.
|
||||
* SDP_INVALID_PARAMETER Specified attribute is not defined.
|
||||
*/
|
||||
sdp_result_e ccsdpSetBandwidth (void *sdp_handle, uint16_t level, uint16_t inst_num,
|
||||
sdp_bw_modifier_e bw_modifier, uint32_t bw_val);
|
||||
|
||||
/**
|
||||
* Returns a string representation of a codec's name.
|
||||
*
|
||||
* @param[in] rtp_ptype The value taken from the rtp_ptype enumeration
|
||||
*
|
||||
* @return A string representing the name of the codec
|
||||
*/
|
||||
const char * ccsdpCodecName(rtp_ptype ptype);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,120 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _CONFIG_API_H_
|
||||
#define _CONFIG_API_H_
|
||||
|
||||
#include "cc_types.h"
|
||||
|
||||
|
||||
/**
|
||||
* configFetchReq
|
||||
*
|
||||
* This function tells the config manager to fetch the CTL file
|
||||
* and then fetch the config from the CUCM. It is expected that
|
||||
* this will result in processing of
|
||||
* the config file after the config managers response is received.
|
||||
*
|
||||
* The response received for this request is asynchronous and
|
||||
* should be handled via event provided by config manager.
|
||||
* The CCAPI_Config_reponse api needs to be called for the
|
||||
* handling of the response to the fetch request
|
||||
*
|
||||
*/
|
||||
void configFetchReq(int device_handle);
|
||||
|
||||
/**
|
||||
* configParserError
|
||||
*
|
||||
* Notify the config manager that the config file has an error
|
||||
* and a new config file needs to be downloaded.
|
||||
*
|
||||
* The error could be XML format error or minimum config not being
|
||||
* present in the config file. It is expected that
|
||||
* this will result in processing of
|
||||
* the config file after the config managers response is received.
|
||||
*
|
||||
*/
|
||||
void configParserError(void);
|
||||
|
||||
/**
|
||||
* When called this function should register with CUCM without prior device file download.
|
||||
*/
|
||||
void CCAPI_Start_response(int device_handle, const char *device_name, const char *sipUser, const char *sipPassword, const char *sipDomain);
|
||||
|
||||
/**
|
||||
* Inform application that pSipcc stack has receive a NOTIFY message of event
|
||||
* type "service-control" and action=apply-config. The arguments passed to this
|
||||
* function contains the parameter values received in the message.
|
||||
*
|
||||
* @param config_version [in] latest version stamp of phone configuration.
|
||||
* @param dial_plan_version [in] latest version stamp of the dial plan.
|
||||
* @param fcp_version [in] latest version stamp of feature policy control.
|
||||
* @param cucm_result [in] action taken by the cucm for the changes applied by the
|
||||
* user to the phone configuration. cucm result could be
|
||||
* @li "no_change" - the new phone configuration changes do not impact Unified CM,
|
||||
* @li "config_applied" - The Unified CM Administration applied the
|
||||
* configuration changes dynamically without requiring phone to re-register,
|
||||
* @li "reregister_needed" - The Unified CM Administration applied the
|
||||
* configuration changes and required the phone to re-register to make them
|
||||
* effective.
|
||||
* @param load_id [in] - firmware image name that phone should be running with
|
||||
* @param inactive_load_id [in] - firmware image name that phone should be in inactive partition.
|
||||
* @param load_server [in] - address of load server to download the firmware
|
||||
* image load_id.
|
||||
* @param log_server [in] - log server address where error report need to be
|
||||
* sent. Error report, for example, could be related to image download failure
|
||||
* or phone configuration file download failure.
|
||||
* @param ppid [in] whether peer to peer upgrade is available
|
||||
* @return void
|
||||
*/
|
||||
void configApplyConfigNotify(cc_string_t config_version,
|
||||
cc_string_t dial_plan_version,
|
||||
cc_string_t fcp_version,
|
||||
cc_string_t cucm_result,
|
||||
cc_string_t load_id,
|
||||
cc_string_t inactive_load_id,
|
||||
cc_string_t load_server,
|
||||
cc_string_t log_server,
|
||||
cc_boolean ppid);
|
||||
|
||||
/**
|
||||
* dialPlanFetchReq
|
||||
*
|
||||
* This function tells the get file request service to fetch the latest dial
|
||||
* plan from the CUCM.
|
||||
*
|
||||
* @param device_handle [in] handle of the device, the response is for
|
||||
* @param dialPlanFileName [in] the name of dialplan file to retrieve
|
||||
* @return cc_boolean indicating success/failure
|
||||
*
|
||||
*/
|
||||
cc_boolean dialPlanFetchReq(int device_handle, char* dialPlanFileName);
|
||||
|
||||
/**
|
||||
* fcpFetchReq
|
||||
*
|
||||
* This function tells the get file request service to fetch the latest fcp
|
||||
* file from the CUCM.
|
||||
*
|
||||
* @param device_handle [in] handle of the device, the response is for
|
||||
* @param dialPlanFileName [in] the name of fcp file to retrieve
|
||||
* @return cc_boolean indicating success/failure
|
||||
*
|
||||
*/
|
||||
cc_boolean fcpFetchReq(int device_handle, char* fcpFileName);
|
||||
|
||||
|
||||
cc_boolean CCAPI_Config_set_server_address(const char *ip_address);
|
||||
cc_boolean CCAPI_Config_set_transport_udp(const cc_boolean is_udp);
|
||||
cc_boolean CCAPI_Config_set_local_voip_port(const int port);
|
||||
cc_boolean CCAPI_Config_set_remote_voip_port(const int port);
|
||||
int CCAPI_Config_get_local_voip_port();
|
||||
int CCAPI_Config_get_remote_voip_port();
|
||||
const char* CCAPI_Config_get_version();
|
||||
cc_boolean CCAPI_Config_set_p2p_mode(const cc_boolean is_p2p);
|
||||
cc_boolean CCAPI_Config_set_sdp_mode(const cc_boolean is_sdp);
|
||||
cc_boolean CCAPI_Config_set_avp_mode(const cc_boolean is_rtpsavpf);
|
||||
|
||||
#endif /* _CONFIG_API_H_ */
|
||||
@@ -0,0 +1,82 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/**
|
||||
* @section DNS APIS
|
||||
* This module contains method definitions to be implemented by the platform.
|
||||
* SIP Stack uses these methods to perform DNS queries
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _DNS_UTIL_H_
|
||||
#define _DNS_UTIL_H_
|
||||
|
||||
#include "cc_constants.h"
|
||||
#include "cpr_types.h"
|
||||
|
||||
/**
|
||||
* Defines the return values for DNS query.
|
||||
*/
|
||||
#define CC_DNS_OK 0
|
||||
#define CC_DNS_ERR_NOBUF 1
|
||||
#define CC_DNS_ERR_INUSE 2
|
||||
#define CC_DNS_ERR_TIMEOUT 3
|
||||
#define CC_DNS_ERR_NOHOST 4
|
||||
#define CC_DNS_ERR_HOST_UNAVAIL 5
|
||||
|
||||
typedef void *srv_handle_t;
|
||||
|
||||
/**
|
||||
* Perform an DNS lookup of the name specified
|
||||
*
|
||||
* @param[in] hname host name
|
||||
* @param[out] ipaddr_ptr the ip address returned by DNS for host with name hname.
|
||||
* @param[in] timeout the timeout for the query
|
||||
* @param[in] retries the retry times for the query
|
||||
*
|
||||
* @return CC_DNS_OK or CC_DNS_ERR_NOHOST
|
||||
*/
|
||||
cc_int32_t dnsGetHostByName(const char *hname,
|
||||
cpr_ip_addr_t *ipaddr_ptr,
|
||||
cc_int32_t timeout,
|
||||
cc_int32_t retries);
|
||||
|
||||
/**
|
||||
* This function calls the dns api to perform a dns srv query.
|
||||
*
|
||||
* @param[in] service the service name, e.g. "sip"
|
||||
* @param[in] protocol the protocol name, e.g. "udp"
|
||||
* @param[in] domain the domain name
|
||||
* @param[out] ipaddr_ptr the returned ip address
|
||||
* @param[out] port the port
|
||||
* @param[in] timeout the timeout for the query
|
||||
* @param[in] retries the number of retries for the query
|
||||
* @param[in,out] psrv_handle the handle for this query
|
||||
*
|
||||
* @note if handle is NULL an new query needs to be made and the
|
||||
* first response needs to be returned along with a valid handle.
|
||||
* Subsequent calls should return the next result if a valid handle has been provided.
|
||||
*
|
||||
* @returns CC_DNS_OK for success or
|
||||
* CC_DNS_ERR_NOHOST, CC_DNS_ERR_HOST_UNAVAIL
|
||||
*/
|
||||
cc_int32_t dnsGetHostBySRV(cc_int8_t *service,
|
||||
cc_int8_t *protocol,
|
||||
cc_int8_t *domain,
|
||||
cpr_ip_addr_t *ipaddr_ptr,
|
||||
cc_uint16_t *port,
|
||||
cc_int32_t timeout,
|
||||
cc_int32_t retries,
|
||||
srv_handle_t *psrv_handle);
|
||||
|
||||
/**
|
||||
* Free the srvhandle allocated in dnsGetHostBySRV.
|
||||
*
|
||||
* @param[in] srv_handle handle to be freed.
|
||||
*
|
||||
*/
|
||||
|
||||
void dnsFreeSrvHandle(srv_handle_t srv_handle);
|
||||
|
||||
#endif /* _DNS_UTIL_H_ */
|
||||
@@ -0,0 +1,35 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _PEER_CONNECTION_TYPES_H_
|
||||
#define _PEER_CONNECTION_TYPES_H_
|
||||
|
||||
#define MAX_TRACKS 8
|
||||
|
||||
enum StatusCode {
|
||||
PC_OK = 0,
|
||||
PC_INVALID_HINTS,
|
||||
PC_INVALID_OFFER,
|
||||
PC_INVALID_REMOTE_SDP,
|
||||
PC_INVALID_LOCAL_SDP,
|
||||
PC_NO_OBSERVER,
|
||||
PC_SDPCHANGED,
|
||||
PC_SETLOCALDESCERROR,
|
||||
PC_SETREMOTEDESCERROR,
|
||||
PC_INTERNAL_ERROR
|
||||
};
|
||||
|
||||
typedef struct MediaTrack {
|
||||
unsigned int media_stream_track_id;
|
||||
int video;
|
||||
} MediaTrack;
|
||||
|
||||
typedef struct MediaStreamTable {
|
||||
unsigned int media_stream_id;
|
||||
unsigned int num_tracks;
|
||||
MediaTrack track[MAX_TRACKS];
|
||||
} MediaStreamTable;
|
||||
|
||||
|
||||
#endif /*_PEER_CONNECTION_TYPES_H_*/
|
||||
@@ -0,0 +1,720 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _PLAT_API_H_
|
||||
#define _PLAT_API_H_
|
||||
|
||||
#include "cc_constants.h"
|
||||
#include "cpr_socket.h"
|
||||
#include "cc_types.h"
|
||||
|
||||
/**
|
||||
* Define unregister reason
|
||||
*/
|
||||
#define CC_UNREG_REASON_UNSPECIFIED 0
|
||||
//Common with what SCCP uses...need to match with J-Side
|
||||
#define CC_UNREG_REASON_TCP_TIMEOUT 10
|
||||
#define CC_UNREG_REASON_CM_RESET_TCP 12
|
||||
#define CC_UNREG_REASON_CM_ABORTED_TCP 13
|
||||
#define CC_UNREG_REASON_CM_CLOSED_TCP 14
|
||||
#define CC_UNREG_REASON_REG_TIMEOUT 17
|
||||
#define CC_UNREG_REASON_FALLBACK 18
|
||||
#define CC_UNREG_REASON_PHONE_KEYPAD 20
|
||||
#define CC_UNREG_REASON_RESET_RESET 22
|
||||
#define CC_UNREG_REASON_RESET_RESTART 23
|
||||
#define CC_UNREG_REASON_PHONE_REG_REJ 24
|
||||
#define CC_UNREG_REASON_PHONE_INITIALIZED 25
|
||||
#define CC_UNREG_REASON_VOICE_VLAN_CHANGED 26
|
||||
#define CC_UNREG_REASON_POWER_SAVE_PLUS 32
|
||||
//sip specific ones...need to match with J-Side
|
||||
#define CC_UNREG_REASON_VERSION_STAMP_MISMATCH 100
|
||||
#define CC_UNREG_REASON_VERSION_STAMP_MISMATCH_CONFIG 101
|
||||
#define CC_UNREG_REASON_VERSION_STAMP_MISMATCH_SOFTKEY 102
|
||||
#define CC_UNREG_REASON_VERSION_STAMP_MISMATCH_DIALPLAN 103
|
||||
#define CC_UNREG_REASON_APPLY_CONFIG_RESTART 104
|
||||
#define CC_UNREG_REASON_CONFIG_RETRY_RESTART 105
|
||||
#define CC_UNREG_REASON_TLS_ERROR 106
|
||||
#define CC_UNREG_REASON_RESET_TO_INACTIVE_PARTITION 107
|
||||
#define CC_UNREG_REASON_VPN_CONNECTIVITY_LOST 108
|
||||
|
||||
#define CC_IPPROTO_UDP 17
|
||||
#define CC_IPPROTO_TCP 6
|
||||
|
||||
|
||||
/**
|
||||
* socket security status
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
PLAT_SOCK_SECURE,
|
||||
PLAT_SOCK_NONSECURE
|
||||
} plat_soc_status_e;
|
||||
|
||||
/**
|
||||
* socket connection status
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
PLAT_SOCK_CONN_OK,
|
||||
PLAT_SOCK_CONN_WAITING,
|
||||
PLAT_SOCK_CONN_FAILED
|
||||
} plat_soc_connect_status_e;
|
||||
|
||||
/**
|
||||
* socket connection type
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
PLAT_SOCK_CUCM
|
||||
} plat_soc_connect_type_e;
|
||||
|
||||
/**
|
||||
* socket connection mode
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
PLAT_SOCK_AUTHENTICATED,
|
||||
PLAT_SOCK_ENCRYPTED,
|
||||
PLAT_SOCK_NON_SECURE
|
||||
} plat_soc_connect_mode_e;
|
||||
|
||||
/**
|
||||
* psipcc core debug categories
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
CC_DEBUG_CCAPP,
|
||||
CC_DEBUG_CONFIG_CACHE,
|
||||
CC_DEBUG_SIP_ADAPTER,
|
||||
CC_DEBUG_CCAPI,
|
||||
CC_DEBUG_CC_MSG,
|
||||
CC_DEBUG_FIM,
|
||||
CC_DEBUG_FSM,
|
||||
CC_DEBUG_AUTH,
|
||||
CC_DEBUG_GSM,
|
||||
CC_DEBUG_LSM,
|
||||
CC_DEBUG_FSM_CAC,
|
||||
CC_DEBUG_DCSM,
|
||||
CC_DEBUG_SIP_TASK,
|
||||
CC_DEBUG_SIP_STATE,
|
||||
CC_DEBUG_SIP_MSG,
|
||||
CC_DEBUG_SIP_REG_STATE,
|
||||
CC_DEBUG_SIP_TRX,
|
||||
CC_DEBUG_TIMERS,
|
||||
CC_DEBUG_SIP_DM,
|
||||
CC_DEBUG_CCDEFAULT, /* Always ON by default */
|
||||
CC_DEBUG_DIALPLAN,
|
||||
CC_DEBUG_KPML,
|
||||
CC_DEBUG_REMOTE_CC,
|
||||
CC_DEBUG_SIP_PRESENCE,
|
||||
CC_DEBUG_CONFIG_APP,
|
||||
CC_DEBUG_CALL_EVENT,
|
||||
CC_DEBUG_PLAT,
|
||||
CC_DEBUG_NOTIFY,
|
||||
CC_DEBUG_CPR_MEMORY, /* Has additional parameters - Tracking/poison */
|
||||
CC_DEBUG_MAX /* NOT USED */
|
||||
} cc_debug_category_e;
|
||||
|
||||
|
||||
/**
|
||||
* debug show categories
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
CC_DEBUG_SHOW_FSMCNF,
|
||||
CC_DEBUG_SHOW_FSMDEF,
|
||||
CC_DEBUG_SHOW_FSMXFR,
|
||||
CC_DEBUG_SHOW_FSMB2BCNF,
|
||||
CC_DEBUG_SHOW_DCSM,
|
||||
CC_DEBUG_SHOW_FIM,
|
||||
CC_DEBUG_SHOW_FSM,
|
||||
CC_DEBUG_SHOW_LSM,
|
||||
CC_DEBUG_SHOW_BULK_REGISTER,
|
||||
CC_DEBUG_SHOW_KPML,
|
||||
CC_DEBUG_SHOW_REMOTE_CC,
|
||||
CC_DEBUG_SHOW_CONFIG_CACHE,
|
||||
CC_DEBUG_SHOW_SUBS_STATS,
|
||||
CC_DEBUG_SHOW_PUBLISH_STATS,
|
||||
CC_DEBUG_SHOW_REGISTER,
|
||||
CC_DEBUG_SHOW_DIALPLAN,
|
||||
CC_DEBUG_SHOW_CPR_MEMORY, /* Has additional parameters -
|
||||
config/heap-gaurd/stat/tracking. */
|
||||
CC_DEBUG_SHOW_MAX
|
||||
} cc_debug_show_options_e;
|
||||
|
||||
/**
|
||||
* debug clear categories
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
CC_DEBUG_CLEAR_CPR_MEMORY,
|
||||
CC_DEBUG_CLEAR_MAX
|
||||
} cc_debug_clear_options_e;
|
||||
|
||||
/**
|
||||
* cpr memory debug sub-categories
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
CC_DEBUG_CPR_MEM_TRACKING,
|
||||
CC_DEBUG_CPR_MEM_POISON
|
||||
} cc_debug_cpr_mem_options_e;
|
||||
|
||||
/**
|
||||
* cpr memory clear sub-commands
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
CC_DEBUG_CLEAR_CPR_TRACKING,
|
||||
CC_DEBUG_CLEAR_CPR_STATISTICS
|
||||
} cc_debug_clear_cpr_options_e;
|
||||
|
||||
/**
|
||||
* cpr memory show sub-commands
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
CC_DEBUG_SHOW_CPR_CONFIG,
|
||||
CC_DEBUG_SHOW_CPR_HEAP_GUARD,
|
||||
CC_DEBUG_SHOW_CPR_STATISTICS,
|
||||
CC_DEBUG_SHOW_CPR_TRACKING
|
||||
} cc_debug_show_cpr_options_e;
|
||||
|
||||
/**
|
||||
* Enabling/disabling debugs
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
CC_DEBUG_DISABLE,
|
||||
CC_DEBUG_ENABLE
|
||||
} cc_debug_flag_e;
|
||||
|
||||
// Corresponds to the values for XML tags DHCPv4Status and DHCPv6Status
|
||||
typedef enum {
|
||||
DHCP_STATUS_GOOD = 1,
|
||||
DHCP_STATUS_TIMEOUT,
|
||||
DHCP_STATUS_DISABLED
|
||||
} dhcp_status_e;
|
||||
|
||||
|
||||
// Corresponds to the value for XML tag for DNSStatusUnifiedCMX
|
||||
typedef enum {
|
||||
DNS_STATUS_GOOD = 1,
|
||||
DNS_STATUS_TIMEOUT,
|
||||
DNS_STATUS_DID_NOT_RESOLVE,
|
||||
DNS_STATUS_NA_IP_CONFIGURED
|
||||
} ucm_dns_resolution_status_e;
|
||||
|
||||
#define LEN32 32
|
||||
#define IP_ADDR_MAX_LEN 32
|
||||
#define PORT_MAX_LEN 20
|
||||
#define STATUS_MAX_LEN 4
|
||||
#define LEN80 80
|
||||
#define WIRED_PROP_PREFIX "dhcp.eth0"
|
||||
#define WIRELESS_PROP_PREFIX "dhcp.mlan0"
|
||||
#define WIRED_INT 1
|
||||
#define WIFI_INT 2
|
||||
|
||||
|
||||
/**
|
||||
* Called by the thread to initialize any thread specific data
|
||||
* once the thread is created.
|
||||
*
|
||||
* @param[in] tname thread name
|
||||
*
|
||||
* @return 0 - SUCCESS
|
||||
* -1 - FAILURE
|
||||
*/
|
||||
int platThreadInit(char * tname);
|
||||
|
||||
/**
|
||||
* The initial initialization function for any platform related
|
||||
* modules
|
||||
*
|
||||
*
|
||||
* @return 0 - SUCCESS
|
||||
* -1 - FAILURE
|
||||
*/
|
||||
int platInit();
|
||||
|
||||
/**
|
||||
* The initial initialization function for the debugging/logging
|
||||
* modules
|
||||
*
|
||||
*/
|
||||
void debugInit();
|
||||
|
||||
/**
|
||||
* Get device model that will be sent to cucm in the UserAgent header
|
||||
*
|
||||
* @return char * Pointer to the string containing the model number of the phone.
|
||||
*/
|
||||
char *platGetModel();
|
||||
|
||||
/**
|
||||
* plat_audio_device_t
|
||||
* Enums for indicating audio device
|
||||
*/
|
||||
typedef enum vcm_audio_device_type {
|
||||
VCM_AUDIO_DEVICE_NONE,
|
||||
VCM_AUDIO_DEVICE_HEADSET,
|
||||
VCM_AUDIO_DEVICE_SPEAKER
|
||||
} plat_audio_device_t;
|
||||
|
||||
|
||||
/**
|
||||
* Add cc control classifier
|
||||
*
|
||||
* Called by SIP stack to specify addresses and ports that will be used for call control
|
||||
*
|
||||
* @param[in] myIPAddr - phone local interface IP Address
|
||||
* @param[in] myPort - phone local interface Port
|
||||
* @param[in] cucm1IPAddr - CUCM 1 IP Address
|
||||
* @param[in] cucm1Port - CUCM 1 Port
|
||||
* @param[in] cucm2IPAddr - CUCM 2 IP Address
|
||||
* @param[in] cucm2Port - CUCM 2 Port
|
||||
* @param[in] cucm3IPAddr - CUCM 3 IP Address
|
||||
* @param[in] cucm3Port - CUCM 3 Port
|
||||
* @param[in] protocol - CC_IPPROTO_UDP or CC_IP_PROTO_TCP
|
||||
*
|
||||
* @note : Needed only if using WiFi. If not using Wifi please provide a stub
|
||||
*/
|
||||
void platAddCallControlClassifiers(unsigned long myIPAddr, unsigned short myPort,
|
||||
unsigned long cucm1IPAddr, unsigned short cucm1Port,
|
||||
unsigned long cucm2IPAddr, unsigned short cucm2Port,
|
||||
unsigned long cucm3IPAddr, unsigned short cucm3Port,
|
||||
unsigned char protocol);
|
||||
|
||||
/**
|
||||
* Remove cc control classifier.
|
||||
*
|
||||
* Undo platAddCallControlClassifiers
|
||||
*/
|
||||
void platRemoveCallControlClassifiers();
|
||||
|
||||
/**
|
||||
* Tell whether wifi is supported and active
|
||||
*
|
||||
* @return boolean wether WLAN is active or not
|
||||
*/
|
||||
cc_boolean platWlanISActive();
|
||||
|
||||
/**
|
||||
* Check if the netowrk interface changed.
|
||||
*
|
||||
* @return boolean returns TRUE if the network interface has changed
|
||||
*
|
||||
* @note Most common case is for softphone clients where if a PC is
|
||||
* undocked the network interface changes from wired to wireless.
|
||||
*/
|
||||
boolean platIsNetworkInterfaceChanged();
|
||||
|
||||
/**
|
||||
* Get active phone load name
|
||||
*
|
||||
* Returns the phone images in the active and inactive partitions
|
||||
* The phone reports these phone loads to CUCM for display on the Admin page
|
||||
*
|
||||
* @param[in] image_a : Populate the image name from partition a
|
||||
* @param[in] image_b : Populate the image name from partition b
|
||||
* @param[in] len : Length of the pointers for image_a and image_b
|
||||
* @return 1 - image_a is active
|
||||
* 2 - image_b is active
|
||||
* -1 - Failure
|
||||
*/
|
||||
int platGetActiveInactivePhoneLoadName(char * image_a, char * image_b, int len);
|
||||
|
||||
/**
|
||||
* Get localized phrase for the specified index
|
||||
*
|
||||
* @param[in] index the phrase index, see
|
||||
* @param[in] phrase the return phrase holder
|
||||
* @param[in] len the input length to cap the maximum value
|
||||
*
|
||||
* @return SUCCESS or FAILURE
|
||||
*/
|
||||
int platGetPhraseText(int index, char* phrase, unsigned int len);
|
||||
|
||||
/**
|
||||
* Set the unregistration reason
|
||||
*
|
||||
* @param[in] reason see the unregister reason definitions.
|
||||
*
|
||||
* @note we expect the platform to save this value in Non Volatile memory
|
||||
* This will be retrieved later by using platGetUnregReason. This reason is reported to CUCM
|
||||
*/
|
||||
void platSetUnregReason(int reason);
|
||||
|
||||
|
||||
/**
|
||||
* Get the unregistration reason code.
|
||||
*
|
||||
* @return reason code for unregistration
|
||||
*/
|
||||
int platGetUnregReason();
|
||||
|
||||
/**
|
||||
* Sets the time based on Date header in 200 OK from REGISTER request
|
||||
* @param void
|
||||
* @return void
|
||||
*/
|
||||
void platSetCucmRegTime (void);
|
||||
|
||||
/**
|
||||
* Set the kpml value for application.
|
||||
*
|
||||
* @param kpml_config the kpml value
|
||||
*/
|
||||
void platSetKPMLConfig(cc_kpml_config_t kpml_config);
|
||||
|
||||
/**
|
||||
* Check if a line has active MWI status
|
||||
*
|
||||
* @param line
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @note The stack doesn't store the MWI status and expects
|
||||
* the application to store that information. The stack
|
||||
* queries the mwi status from the application using this method.
|
||||
*/
|
||||
boolean platGetMWIStatus(cc_lineid_t line);
|
||||
|
||||
/**
|
||||
* Check if the speaker or headset is enabled.
|
||||
*
|
||||
* @return boolean if the speaker or headset is enabled, returns true.
|
||||
*/
|
||||
boolean platGetSpeakerHeadsetMode();
|
||||
|
||||
/**
|
||||
* Secure Socket API's.
|
||||
* The pSIPCC expects the following Secure Socket APIs to be implemented in the
|
||||
* vendor porting layer.
|
||||
*/
|
||||
|
||||
/**
|
||||
* platSecIsServerSecure
|
||||
*
|
||||
* @brief Lookup the secure status of the server
|
||||
*
|
||||
* This function looks at the the CCM server type by using the security library
|
||||
* and returns appropriate indication to the pSIPCC.
|
||||
*
|
||||
*
|
||||
* @return Server is security enabled or not
|
||||
* PLAT_SOCK_SECURE or PLAT_SOCK_NONSECURE
|
||||
*
|
||||
* @note This API maps to the following HandyIron API:
|
||||
* int secIsServerSecure(SecServerType type) where type should be SRVR_TYPE_CCM
|
||||
*/
|
||||
plat_soc_status_e platSecIsServerSecure(void);
|
||||
|
||||
|
||||
/**
|
||||
* platSecSocConnect
|
||||
* @brief Securely connect to a remote server
|
||||
*
|
||||
* This function uses the security library APIs to connect to a remote server.
|
||||
* @param[in] host server addr
|
||||
* @param[in] port port number
|
||||
* @param[in] ipMode IP mode to indicate v6, v4 or both
|
||||
* @param[in] mode blocking connect or not
|
||||
* FALSE: non-blocking; TRUE: blocking
|
||||
* @param[in] tos TOS value
|
||||
* @param[in] connectionMode The mode of the connection
|
||||
* (Authenticated/Encrypted)
|
||||
* @param[out] localPort local port used for the connection
|
||||
*
|
||||
* @return client socket descriptor
|
||||
* >=0: connected or in progress
|
||||
* INVALID SOCKET: failed
|
||||
*
|
||||
* @pre (hostAndPort not_eq NULL)
|
||||
* @pre (localPort not_eq NULL)
|
||||
*
|
||||
* @note localPort is undefined when the return value is INVALID_SOCKET
|
||||
*
|
||||
* @note This API maps to the HandyIron APIs as follows:
|
||||
* If mode == TRUE (blocking):
|
||||
* int secEstablishSecureConnection(const char* serverAddr, *uint32_t port, secConnectionType type)
|
||||
* @li ipMode is UNUSED
|
||||
* @li "host" maps to "serverAddr", "type" should be determined by an application and use the value from SecServerType.
|
||||
* @li localPort is passed in as 0
|
||||
* If mode == FALSE (non-blocking):
|
||||
* int secConnect(const char* serverAddr, uint32_t port, *secConnectionType type, uint32_t localPort)
|
||||
* @li ipMode is UNUSED
|
||||
* @li "host" maps to "serverAddr", "type" should be determined by an application and use the value from SecServerType.
|
||||
*
|
||||
* @note The implementation should use the "setsockopt" to set the "tos" value passed
|
||||
* in this API on the created socket.
|
||||
*
|
||||
*/
|
||||
cpr_socket_t
|
||||
platSecSocConnect (char *host,
|
||||
int port,
|
||||
int ipMode,
|
||||
boolean mode,
|
||||
unsigned int tos,
|
||||
plat_soc_connect_mode_e connectionMode,
|
||||
cc_uint16_t *localPort);
|
||||
|
||||
/**
|
||||
* platSecSockIsConnected
|
||||
* Determine the status of a secure connection that was initiated
|
||||
* in non-blocking mode
|
||||
*
|
||||
* @param[in] sock socket descriptor
|
||||
*
|
||||
* @return connection status
|
||||
* @li connection complete: PLAT_SOCK_CONN_OK
|
||||
* @li connection waiting: PLAT_SOCK_CONN_WAITING
|
||||
* @li connection failed: PLAT_SOCK_CONN_FAILED
|
||||
*
|
||||
* @note This API maps to the following HandyIron API:
|
||||
* int secIsConnectionReady (int connDesc)
|
||||
* The "sock" is the connection descriptor.
|
||||
*/
|
||||
plat_soc_connect_status_e platSecSockIsConnected (cpr_socket_t sock);
|
||||
|
||||
/**
|
||||
* platGenerateCryptoRand
|
||||
* @brief Generates a Random Number
|
||||
*
|
||||
* Generate crypto graphically random number for a desired length.
|
||||
* The function is expected to be much slower than the cpr_rand().
|
||||
* This function should be used when good random number is needed
|
||||
* such as random number that to be used for SRTP key for an example.
|
||||
*
|
||||
* @param[in] buf - pointer to the buffer to store the result of random
|
||||
* bytes requested.
|
||||
* @param[in] len - pointer to the length of the desired random bytes.
|
||||
* When calling the function, the integer's value
|
||||
* should be set to the desired number of random
|
||||
* bytes ('buf' should be of at least this size).
|
||||
* upon success, its value will be set to the
|
||||
* actual number of random bytes being returned.
|
||||
* (realistically, there is a maximum number of
|
||||
* random bytes that can be returned at a time.
|
||||
* if the caller request more than that, the
|
||||
* 'len' will indicate how many bytes are actually being
|
||||
* returned) on failure, its value will be set to 0.
|
||||
*
|
||||
* @return
|
||||
* 1 - success.
|
||||
* 0 - fail.
|
||||
*
|
||||
* @note The intent of this function is to generate a cryptographically strong
|
||||
* random number. Vendors can map this to HandyIron or OpenSSL random number
|
||||
* generation functions.
|
||||
*
|
||||
* @note This API maps to the following HandyIron API:
|
||||
* int secGetRandomData(uint8_t *buf, uint32_t size). Also note that a
|
||||
* "secAddEntropy(...)" may be required the first time to feed entropy data to
|
||||
* the random number generator.
|
||||
*/
|
||||
int platGenerateCryptoRand(cc_uint8_t *buf, int *len);
|
||||
|
||||
/**
|
||||
* platSecSocSend
|
||||
*
|
||||
* @brief The platSecSocSend() function is used to send data over a secure
|
||||
* socket.
|
||||
*
|
||||
* The platSecSocSend() function shall transmit a message from the specified socket to
|
||||
* its peer. The platSecSocSend() function shall send a message only when the socket is
|
||||
* connected. The length of the message to be sent is specified by the length
|
||||
* argument. If the message is too long to pass through the underlying protocol,
|
||||
* platSecSocSend() shall fail and no data is transmitted. Delivery of the message is
|
||||
* not guaranteed.
|
||||
*
|
||||
* @param[in] soc Specifies the socket created with cprSocket() to send
|
||||
* @param[in] buf A pointer to the buffer of the message to send.
|
||||
* @param[in] len Specifies the length in bytes of the message pointed to by the buffer argument.
|
||||
*
|
||||
* @return Upon successful completion, platSecSocSend() shall return the number of
|
||||
* bytes sent. Otherwise, SOCKET_ERROR shall be returned and cpr_errno set to
|
||||
* indicate the error.
|
||||
*
|
||||
* @note The possible error values this function should return are
|
||||
* @li [CPR_EBADF] The socket argument is not a valid file descriptor
|
||||
* @li [CPR_ENOTSOCK] socket does not refer to a socket descriptor
|
||||
* @li [CPR_EAGAIN] The socket is marked non-blocking and no data can
|
||||
* be sent
|
||||
* @li [CPR_EWOULDBLOCK] Same as CPR_EAGAIN
|
||||
* @li [CPR_ENOTCONN] A connection-mode socket that is not connected
|
||||
* @li [CPR_ENOTSUPP] The specified flags are not supported for this
|
||||
* type of socket or protocol.
|
||||
* @li [CPR_EMSGSIZE] The message is too large to be sent all at once
|
||||
* @li [CPR_EDESTADDRREQ] The socket has no peer address set
|
||||
*
|
||||
*/
|
||||
ssize_t
|
||||
platSecSocSend (cpr_socket_t soc,
|
||||
CONST void *buf,
|
||||
size_t len);
|
||||
|
||||
/**
|
||||
* platSecSocRecv
|
||||
*
|
||||
* @brief The platSecSocRecv() function shall receive a message from a secure socket.
|
||||
*
|
||||
* This function is normally used with connected sockets because it does not permit
|
||||
* the application to retrieve the source address of received data. The
|
||||
* platSecSocRecv() function shall return the length of the message written to
|
||||
* the buffer pointed to by the "buf" argument.
|
||||
*
|
||||
* @param[in] soc - Specifies the socket to receive data
|
||||
* @param[out] buf - Contains the data received
|
||||
* @param[out] len - The length of the data received
|
||||
*
|
||||
* @return On success the length of the message in bytes (including zero).
|
||||
* On failure SOCKET_ERROR shall be returned and cpr_errno set to
|
||||
* indicate the error.
|
||||
*
|
||||
* @note The possible error values this function should return are
|
||||
* @li [CPR_EBADF] The socket argument is not a valid file descriptor
|
||||
* @li [CPR_ENOTSOCK] The descriptor references a file, not a socket.
|
||||
* @li [CPR_EAGAIN] The socket is marked non-blocking and no data is
|
||||
* waiting to be received.
|
||||
* @li [CPR_EWOULDBLOCK] Same as CPR_EAGAIN
|
||||
* @li [CPR_ENOTCONN] A receive attempt is made on a connection-mode socket that is not connected
|
||||
* @li [CPR_ENOTSUPP] The specified flags are not supported for this type of socket or protocol
|
||||
*
|
||||
*/
|
||||
ssize_t
|
||||
platSecSocRecv (cpr_socket_t soc,
|
||||
void * RESTRICT buf,
|
||||
size_t len);
|
||||
|
||||
/**
|
||||
* platSecSocClose
|
||||
*
|
||||
* @brief The platSecSocClose function shall close a secure socket
|
||||
*
|
||||
* The platSecSocClose() function shall destroy the socket descriptor indicated
|
||||
* by socket.
|
||||
*
|
||||
* @param[in] soc - The socket that needs to be destroyed
|
||||
*
|
||||
* @return CPR_SUCCESS on success otherwise, CPR_FAILURE. cpr_errno needs to be set in this case.
|
||||
*
|
||||
* @note The possible error values this function should return are
|
||||
* @li [CPR_EBADF] socket is not a valid socket descriptor.
|
||||
*/
|
||||
cpr_status_e
|
||||
platSecSocClose (cpr_socket_t soc);
|
||||
|
||||
/**
|
||||
* Sets the SIS protocol version
|
||||
*
|
||||
* @param a - major version
|
||||
* @param b - minor version
|
||||
* @param c - additional version information
|
||||
* @param name - version name
|
||||
*
|
||||
* @return void
|
||||
* @note the platform should store this information and provide it when asked via the platGetSISProtocolVer()
|
||||
*/
|
||||
|
||||
void platSetSISProtocolVer(cc_uint32_t a, cc_uint32_t b, cc_uint32_t c, char* name);
|
||||
|
||||
/**
|
||||
* Provides the SIS protocol version
|
||||
*
|
||||
* @param *a pointer to fill in the major version
|
||||
* @param *b pointer to fill in the minor version
|
||||
* @param *c pointer to fill in the additonal version
|
||||
* @param *name pointer to fill in the version name
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
void
|
||||
platGetSISProtocolVer (cc_uint32_t *a, cc_uint32_t *b, cc_uint32_t *c, char* name);
|
||||
|
||||
/**
|
||||
* Provides the local IP address
|
||||
*
|
||||
* @return char * returns the local IP address
|
||||
*/
|
||||
char *platGetIPAddr();
|
||||
|
||||
/**
|
||||
* Provides the local MAC address
|
||||
*
|
||||
* @param *maddr the pointer to the string holding MAC address
|
||||
* in the MAC address format after converting from string format.
|
||||
* @return void
|
||||
*/
|
||||
void platGetMacAddr(char *addr);
|
||||
|
||||
|
||||
/**
|
||||
* platGetFeatureAllowed
|
||||
*
|
||||
* Get whether the feature is allowed
|
||||
*
|
||||
* @param featureId - sis feature id
|
||||
*
|
||||
* @return 1 - allowed, 0 - not allowed
|
||||
*
|
||||
*/
|
||||
int platGetFeatureAllowed(cc_sis_feature_id_e featureId);
|
||||
|
||||
|
||||
/**
|
||||
* Set the Status message for failure reasons
|
||||
* @param char *msg
|
||||
* @return void
|
||||
*/
|
||||
void platSetStatusMessage(char *msg);
|
||||
|
||||
/**
|
||||
* The equivalent of the printf function.
|
||||
*
|
||||
* This function MUST be implemented by the vendors. This is called by the core
|
||||
* library whenever some debugging information needs to be printed out.
|
||||
* call this function in order to clear the CPR Memory/Tracking statistics
|
||||
*
|
||||
* Please also be aware that cpr_stdio.h has other logging functions as well.
|
||||
* Vendors need to implement this function and the functions (err_msg,
|
||||
* buginf....etc) found in cpr_stdio.h
|
||||
*
|
||||
* @param[in] _format format string
|
||||
* @param[in] ... variable arg list
|
||||
*
|
||||
* @return Return code from printf
|
||||
*/
|
||||
int debugif_printf(const char *_format, ...);
|
||||
|
||||
/**
|
||||
* Enable / disable speaker
|
||||
*
|
||||
* @param[in] state - true -> enable speaker, false -> disable speaker
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
void platSetSpeakerMode(cc_boolean state);
|
||||
|
||||
/**
|
||||
* Get the status (on/off) of the audio device
|
||||
*
|
||||
* @param[in] device_type - headset or speaker (see vcm_audio_device_t)
|
||||
*
|
||||
* @return 1 -> On, 0 -> off, ERROR -> unknown (error)
|
||||
*/
|
||||
|
||||
int platGetAudioDeviceStatus(plat_audio_device_t device_type);
|
||||
|
||||
/*
|
||||
* Returns the default gateway
|
||||
*
|
||||
* @param void
|
||||
* @return u_long
|
||||
*/
|
||||
cc_ulong_t platGetDefaultgw();
|
||||
|
||||
|
||||
#endif /* _PLATFORM_API_H_ */
|
||||
@@ -0,0 +1,51 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _RESET_API_H_
|
||||
#define _RESET_API_H_
|
||||
|
||||
|
||||
/**
|
||||
* resetRequest
|
||||
*
|
||||
* This function tells the reset Manager that the SIPCC module
|
||||
* wants to do a HARD RESET. This is most likely because of a request
|
||||
* from the CUCM.
|
||||
*
|
||||
* The response received for this request is asynchronous and
|
||||
* should be handled via event provided by reset manager.
|
||||
* The CCAPI_Service_shutdown api needs to be called for the
|
||||
* handling of the response to the reset request
|
||||
*
|
||||
*/
|
||||
void resetRequest();
|
||||
|
||||
|
||||
/**
|
||||
* resetReady
|
||||
*
|
||||
* This function tells the reset manager that call control is
|
||||
* ready for reset. This is called whenever the call control
|
||||
* determines that it is idle
|
||||
*
|
||||
* The resetManager will keep track of events can initate
|
||||
* reset when it has received ready.
|
||||
*
|
||||
*/
|
||||
void resetReady();
|
||||
|
||||
/**
|
||||
* resetNotReady
|
||||
*
|
||||
* This function tells the reset manager that call control is
|
||||
* NOT ready for reset. This is called whenever the call control
|
||||
* is not idle
|
||||
*
|
||||
* The resetManager will keep track of events and it CANNOT initate
|
||||
* reset until a resetReady event is received
|
||||
*
|
||||
*/
|
||||
void resetNotReady();
|
||||
|
||||
#endif /* _RESET_API_H_ */
|
||||
@@ -0,0 +1,137 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef _SLL_LITE_H
|
||||
#define _SLL_LITE_H
|
||||
|
||||
#include "cpr_types.h"
|
||||
/*
|
||||
* List node structure
|
||||
*/
|
||||
typedef struct sll_lite_node_t_ {
|
||||
struct sll_lite_node_t_ *next_p; /* pointer to the next node */
|
||||
} sll_lite_node_t;
|
||||
|
||||
/*
|
||||
* List control structure
|
||||
*/
|
||||
typedef struct sll_lite_list_t_ {
|
||||
uint16_t count; /* number of elements on the list */
|
||||
sll_lite_node_t *head_p; /* pointer to the head or first node */
|
||||
sll_lite_node_t *tail_p; /* pointer to the tail or last node */
|
||||
} sll_lite_list_t;
|
||||
|
||||
typedef enum {
|
||||
SLL_LITE_RET_SUCCESS,
|
||||
SLL_LITE_RET_INVALID_ARGS,
|
||||
SLL_LITE_RET_NODE_NOT_FOUND,
|
||||
SLL_LITE_RET_OTHER_FAILURE
|
||||
} sll_lite_return_e;
|
||||
|
||||
/*
|
||||
* Convenient macros
|
||||
*/
|
||||
#define SLL_LITE_LINK_HEAD(link) \
|
||||
(((sll_lite_list_t *)link)->head_p)
|
||||
|
||||
#define SLL_LITE_LINK_TAIL(link) \
|
||||
(((sll_lite_list_t *)link)->tail_p)
|
||||
|
||||
#define SLL_LITE_LINK_NEXT_NODE(node) \
|
||||
(((sll_lite_node_t *)node)->next_p)
|
||||
|
||||
#define SLL_LITE_NODE_COUNT(link) \
|
||||
(((sll_lite_list_t *)link)->count)
|
||||
|
||||
/**
|
||||
* sll_lite_init initializes list control structure given by the
|
||||
* caller.
|
||||
*
|
||||
* @param[in] list - pointer to the list control structure
|
||||
* sll_lite_list_t
|
||||
*
|
||||
* @return - SLL_LITE_RET_SUCCESS for success
|
||||
* - SLL_LITE_RET_INVALID_ARGS when arguments are
|
||||
* invalid.
|
||||
*/
|
||||
extern sll_lite_return_e
|
||||
sll_lite_init(sll_lite_list_t *list);
|
||||
|
||||
/**
|
||||
* sll_lite_link_head puts node to the head of the list.
|
||||
*
|
||||
* @param[in] list - pointer to the list control structure
|
||||
* sll_lite_list_t. The list must be
|
||||
* initialized prior.
|
||||
* @param[in] node - pointer to the list node structure.
|
||||
*
|
||||
* @return - SLL_LITE_RET_SUCCESS for success
|
||||
* - SLL_LITE_RET_INVALID_ARGS when arguments are
|
||||
* invalid.
|
||||
*/
|
||||
extern sll_lite_return_e
|
||||
sll_lite_link_head(sll_lite_list_t *list, sll_lite_node_t *node);
|
||||
|
||||
/**
|
||||
* sll_lite_link_tail puts node to the tail of the list.
|
||||
*
|
||||
* @param[in] list - pointer to the list control structure
|
||||
* sll_lite_list_t. The list must be
|
||||
* initialized prior.
|
||||
* @param[in] node - pointer to the list node structure.
|
||||
*
|
||||
* @return - SLL_LITE_RET_SUCCESS for success
|
||||
* - SLL_LITE_RET_INVALID_ARGS when arguments are
|
||||
* invalid.
|
||||
*/
|
||||
sll_lite_return_e
|
||||
sll_lite_link_tail(sll_lite_list_t *list, sll_lite_node_t *node);
|
||||
|
||||
/**
|
||||
* sll_lite_unlink_head removes head node from the head of the list and
|
||||
* returns it to the caller.
|
||||
*
|
||||
* @param[in] list - pointer to the list control structure
|
||||
* sll_lite_list_t. The list must be
|
||||
* initialized prior.
|
||||
*
|
||||
* @return Pointer to the head node if one exists otherwise
|
||||
* return NULL.
|
||||
*/
|
||||
extern sll_lite_node_t *
|
||||
sll_lite_unlink_head(sll_lite_list_t *list);
|
||||
|
||||
/**
|
||||
* sll_lite_unlink_tail removes tail node from the list and
|
||||
* returns it to the caller.
|
||||
*
|
||||
* @param[in] list - pointer to the list control structure
|
||||
* sll_lite_list_t. The list must be
|
||||
* initialized prior.
|
||||
*
|
||||
* @return Pointer to the tail node if one exists otherwise
|
||||
* return NULL.
|
||||
*/
|
||||
sll_lite_node_t *
|
||||
sll_lite_unlink_tail(sll_lite_list_t *list);
|
||||
|
||||
/**
|
||||
* sll_lite_remove removes the given node from the list.
|
||||
*
|
||||
* @param[in] list - pointer to the list control structure
|
||||
* sll_lite_list_t. The list must be
|
||||
* initialized prior.
|
||||
* @param[in] node - pointer to the list node structure to be
|
||||
* removed.
|
||||
*
|
||||
* @return - SLL_LITE_RET_SUCCESS for success
|
||||
* - SLL_LITE_RET_INVALID_ARGS when arguments are
|
||||
* invalid.
|
||||
* - SLL_LITE_RET_NODE_NOT_FOUND when the node
|
||||
* to remove is not found.
|
||||
*/
|
||||
extern sll_lite_return_e
|
||||
sll_lite_remove(sll_lite_list_t *list, sll_lite_node_t *node);
|
||||
|
||||
#endif
|
||||
Executable
+1014
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,636 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef XML_PARSER_DEFINES_H
|
||||
#define XML_PARSER_DEFINES_H
|
||||
|
||||
#include "sll_lite.h"
|
||||
#include "cc_constants.h"
|
||||
|
||||
|
||||
/**
|
||||
* In general, when a parser constructs a xml string,
|
||||
* it should translate the enum to cooresponding string
|
||||
* value that is defined in the accompanied xsd files.
|
||||
*/
|
||||
/**
|
||||
* Define the state values
|
||||
*/
|
||||
typedef enum {
|
||||
XML_STATE_PARTIAL = 0, //Encode as "partial"
|
||||
XML_STATE_FULL //"full"
|
||||
} xml_state_t;
|
||||
|
||||
/**
|
||||
* Define the call orientation
|
||||
*/
|
||||
typedef enum {
|
||||
XML_CALL_ORIENTATION_UNSPECIFIED = 0,
|
||||
XML_CALL_ORIENTATION_TO,
|
||||
XML_CALL_ORIENTATION_FROM
|
||||
} xml_call_orientation_t;
|
||||
|
||||
/**
|
||||
* Define the call lock status
|
||||
*/
|
||||
typedef enum {
|
||||
XML_CALLLOCK_UNLOCKED = 0,
|
||||
XML_CALLLOCK_LOCKED,
|
||||
XML_CALLLOCK_REMOTE_LOCKED
|
||||
} xml_calllock_t;
|
||||
|
||||
/**
|
||||
* Define the direction values
|
||||
*/
|
||||
typedef enum {
|
||||
XML_DIRECTION_INITIATOR = 0,
|
||||
XML_DIRECTION_RECIPIENT
|
||||
} xml_direction_t;
|
||||
|
||||
/**
|
||||
* Define the event values
|
||||
*/
|
||||
typedef enum {
|
||||
XML_EVENT_CANCELLED = 0,
|
||||
XML_EVENT_REJECTED,
|
||||
XML_EVENT_REPLACED,
|
||||
XML_EVENT_LOCAL_BYE,
|
||||
XML_EVENT_REMOTE_BYE,
|
||||
XML_EVENT_ERROR,
|
||||
XML_EVENT_TIMEOUT
|
||||
} xml_event_t;
|
||||
|
||||
/**
|
||||
* Define the yes or no values
|
||||
*/
|
||||
typedef enum {
|
||||
XML_NO = 0,
|
||||
XML_YES,
|
||||
XML_NONEAPPLICABLE //"na"
|
||||
} xml_yes_no_t;
|
||||
|
||||
/**
|
||||
* Define the on or off value
|
||||
*/
|
||||
typedef enum {
|
||||
XML_OFF = 0,
|
||||
XML_ON
|
||||
} xml_on_off_t;
|
||||
|
||||
/**
|
||||
* Define the true or false values
|
||||
*/
|
||||
typedef enum {
|
||||
XML_FALSE = 0,
|
||||
XML_TRUE
|
||||
} xml_true_false_t;
|
||||
|
||||
/**
|
||||
* Define the line key events
|
||||
*/
|
||||
typedef enum {
|
||||
XML_LINE_KEY_EVENT_LINE = 0,
|
||||
XML_LINE_KEY_EVENT_SPEEDDIAL
|
||||
} xml_line_key_event_t;
|
||||
|
||||
/**
|
||||
* Define the persist types
|
||||
*/
|
||||
typedef enum {
|
||||
XML_PERSIST_TYPE_ONE_SHOT = 0,
|
||||
XML_PERSIST_TYPE_PERSIST,
|
||||
XML_PERSIST_TYPE_SINGLE_NOTIFY
|
||||
} xml_persist_type_t;
|
||||
|
||||
/**
|
||||
* Define the soft key invoke type
|
||||
*/
|
||||
typedef enum {
|
||||
XML_SKEY_INVOKE_EXPLICIT = 0,
|
||||
XML_SKEY_NVOKE_IMPLICIT
|
||||
} xml_skey_invoke_t;
|
||||
|
||||
/**
|
||||
* Define the soft key event data
|
||||
*/
|
||||
typedef enum {
|
||||
XML_SKEY_EVENT_UNDEFINED = 0,
|
||||
XML_SKEY_EVENT_REDIAL,
|
||||
XML_SKEY_EVENT_NEWCALL,
|
||||
XML_SKEY_EVENT_HOLD,
|
||||
XML_SKEY_EVENT_TRANSFER,
|
||||
XML_SKEY_EVENT_CFWDALL, //5
|
||||
XML_SKEY_EVENT_CFWDBUSY,
|
||||
XML_SKEY_EVENT_CFWDNOANSWER,
|
||||
XML_SKEY_EVENT_BACKSPACE,
|
||||
XML_SKEY_EVENT_ENDCALL,
|
||||
XML_SKEY_EVENT_RESUME, //10
|
||||
XML_SKEY_EVENT_ANSWER,
|
||||
XML_SKEY_EVENT_INFO,
|
||||
XML_SKEY_EVENT_CONFERENCE,
|
||||
XML_SKEY_EVENT_JION, //15
|
||||
XML_SKEY_EVENT_REMVOVE_LAST_CONF_PARTICIPANT,
|
||||
XML_SKEY_EVENT_DIRECT_XFER,
|
||||
XML_SKEY_EVENT_SELECT, //25
|
||||
XML_SKEY_EVENT_TRANSFER_TO_VOICE_MAIL,
|
||||
XML_SKEY_EVENT_SAC,
|
||||
XML_SKEY_EVENT_UNSELECT, //35
|
||||
XML_SKEY_EVENT_CANCEL,
|
||||
XML_SKEY_EVENT_COPNFERENCE_DETAILS,//40
|
||||
XML_SKEY_EVENT_TRASFMG = 65,
|
||||
XML_SKEY_EVENT_INTRCPT,
|
||||
XML_SKEY_EVENT_SETWTCH,
|
||||
XML_SKEY_EVENT_TRNSFVM,
|
||||
XML_SKEY_EVENT_TRNSFAS
|
||||
} xml_skey_event_code_t;
|
||||
|
||||
/**
|
||||
* Define the map for station sequence mapping
|
||||
*/
|
||||
typedef enum {
|
||||
XML_STATION_SEQ_FIRST = 0,
|
||||
XML_STATION_SEQ_MORE,
|
||||
XML_STATION_SEQ_LAST
|
||||
} xml_stataionseq_t;
|
||||
|
||||
/**
|
||||
* Define the hold reasons
|
||||
*/
|
||||
typedef enum {
|
||||
XML_HOLD_REASON_NONE = 0,
|
||||
XML_HOLD_REASON_TRANSFER,
|
||||
XML_HOLD_REASON_CONFERENCE,
|
||||
XML_HOLD_REASON_INTERNAL
|
||||
} xml_hold_reason_t;
|
||||
|
||||
/**
|
||||
* Define the lamp status
|
||||
*/
|
||||
typedef enum {
|
||||
XML_LAMP_STATE_OFF = 0,
|
||||
XML_LAMP_STATE_ON,
|
||||
XML_LAMP_STATE_BLINK,
|
||||
XML_LAMP_STATE_FLASH
|
||||
} xml_lamp_state_t;
|
||||
|
||||
/**
|
||||
* Define the lamp type
|
||||
*/
|
||||
typedef enum {
|
||||
XML_LAMP_TYPE_LINE = 1,
|
||||
XML_LAMP_TYPE_VOICE_MAIL
|
||||
} xml_lamp_type_t;
|
||||
|
||||
/**
|
||||
* Define the image down load method
|
||||
*/
|
||||
typedef enum {
|
||||
XML_IMAGE_DOWNLOAD_METHOD_TFTP = 1,
|
||||
XML_IMAGE_DOWNLAOD_METHOD_HTTP,
|
||||
XML_IMAGE_DOWNLOAD_METHOD_PPID
|
||||
} xml_image_dl_method_t;
|
||||
|
||||
/**
|
||||
* Define the image download failure reason
|
||||
*/
|
||||
typedef enum {
|
||||
XML_IMAGE_DOWNLOAD_FAILURE_REASON_DISKFULL = 1,
|
||||
XML_IMAGE_DOWNLOAD_FAILURE_REASON_IMAGE_NOT_AVAILABLE,
|
||||
XML_IMAGE_DOWNLOAD_FAILURE_REASON_ACCESS_VIOLATION
|
||||
} xml_image_dl_failure_reason_t;
|
||||
|
||||
typedef signed long xml_signed32;
|
||||
typedef unsigned long xml_unsigned32;
|
||||
typedef unsigned short xml_unsigned16;
|
||||
typedef unsigned char xml_unsigned8;
|
||||
|
||||
// start of copy from ccsip_eventbodies.h
|
||||
typedef struct State {
|
||||
xml_signed32 event;
|
||||
xml_signed32 code;
|
||||
xml_signed32 state;
|
||||
} State;
|
||||
|
||||
typedef struct Replaces {
|
||||
char call_id[128];
|
||||
char local_tag[64];
|
||||
char remote_tag[64];
|
||||
} Replaces;
|
||||
|
||||
typedef struct RefferedBy {
|
||||
char display_name[64];
|
||||
char uri[64];
|
||||
} RefferedBy;
|
||||
|
||||
typedef struct RouteSet {
|
||||
char hop[5][16];
|
||||
} RouteSet;
|
||||
|
||||
typedef struct Identity {
|
||||
char display_name[64];
|
||||
char uri[64];
|
||||
} Identity;
|
||||
|
||||
typedef struct Param {
|
||||
char pname[32];
|
||||
char pval[32];
|
||||
} Param;
|
||||
|
||||
typedef struct Target {
|
||||
Param param[4];
|
||||
char uri[64];
|
||||
} Target;
|
||||
|
||||
typedef struct SessionDescription {
|
||||
char type[32];
|
||||
} SessionDescription;
|
||||
|
||||
typedef struct Participant {
|
||||
Identity identity;
|
||||
Target target;
|
||||
SessionDescription session_description;
|
||||
xml_unsigned16 cseq;
|
||||
} Participant;
|
||||
|
||||
typedef struct primCall {
|
||||
char call_id[128];
|
||||
char local_tag[64];
|
||||
char remote_tag[64];
|
||||
xml_signed32 h_reason;
|
||||
} primCall;
|
||||
|
||||
typedef struct callFeature {
|
||||
char cfwdall_set[128];
|
||||
char cfwdall_clear[128];
|
||||
} callFeature;
|
||||
|
||||
typedef struct Stream {
|
||||
char reverse[16];
|
||||
} Stream;
|
||||
|
||||
typedef struct Regex {
|
||||
char regexData[32];
|
||||
char tag[32];
|
||||
char pre[32];
|
||||
} Regex;
|
||||
|
||||
typedef struct Pattern {
|
||||
xml_signed32 flush;
|
||||
Regex regex;
|
||||
xml_signed32 persist;
|
||||
xml_unsigned32 interdigittimer;
|
||||
xml_unsigned32 criticaldigittimer;
|
||||
xml_unsigned32 extradigittimer;
|
||||
xml_unsigned16 longhold;
|
||||
xml_unsigned8 longrepeat;
|
||||
xml_unsigned8 nopartial;
|
||||
char enterkey[8];
|
||||
} Pattern;
|
||||
|
||||
typedef struct KPMLRequest {
|
||||
Stream stream;
|
||||
Pattern pattern;
|
||||
char version[16];
|
||||
} KPMLRequest;
|
||||
|
||||
typedef struct KPMLResponse {
|
||||
char version[16];
|
||||
char code[16];
|
||||
char text[16];
|
||||
xml_unsigned8 suppressed;
|
||||
char forced_flush[16];
|
||||
char digits[16];
|
||||
char tag[16];
|
||||
} KPMLResponse;
|
||||
|
||||
typedef struct dialogID {
|
||||
char callid[128];
|
||||
char localtag[64];
|
||||
char remotetag[64];
|
||||
} dialogID;
|
||||
|
||||
typedef struct consultDialogID {
|
||||
char callid[128];
|
||||
char localtag[64];
|
||||
char remotetag[64];
|
||||
} consultDialogID;
|
||||
|
||||
typedef struct joindialogID {
|
||||
char callid[128];
|
||||
char localtag[64];
|
||||
char remotetag[64];
|
||||
} joindialogID;
|
||||
|
||||
typedef struct reg_contact_t {
|
||||
char Register[16];
|
||||
char Unregister[16];
|
||||
xml_unsigned32 line;
|
||||
xml_unsigned32 low;
|
||||
xml_unsigned32 high;
|
||||
xml_signed32 all;
|
||||
} reg_contact_t;
|
||||
|
||||
|
||||
typedef struct remotecc {
|
||||
char status[16];
|
||||
} remotecc;
|
||||
|
||||
typedef struct combine {
|
||||
xml_unsigned16 max_bodies;
|
||||
remotecc remotecc;
|
||||
char service_control[16];
|
||||
} combine;
|
||||
|
||||
typedef struct dialog {
|
||||
char usage[64];
|
||||
char unot[16];
|
||||
char sub[16];
|
||||
} dialog;
|
||||
|
||||
typedef struct presence {
|
||||
char usage[64];
|
||||
char unot[16];
|
||||
char sub[16];
|
||||
} presence;
|
||||
|
||||
typedef struct voice_msg_t {
|
||||
xml_signed32 newCount;
|
||||
xml_signed32 oldCount;
|
||||
} voice_msg_t;
|
||||
|
||||
typedef struct voice_msg_hp_t {
|
||||
xml_signed32 newCount;
|
||||
xml_signed32 oldCount;
|
||||
} voice_msg_hp_t;
|
||||
|
||||
typedef struct fax_msg_t {
|
||||
xml_signed32 newCount;
|
||||
xml_signed32 oldCount;
|
||||
} fax_msg_t;
|
||||
|
||||
typedef struct fax_msg_hp_t {
|
||||
xml_signed32 newCount;
|
||||
xml_signed32 oldCount;
|
||||
} fax_msg_hp_t;
|
||||
|
||||
typedef struct emwi_t {
|
||||
voice_msg_t voice_msg;
|
||||
voice_msg_hp_t voice_msg_hp;
|
||||
fax_msg_t fax_msg;
|
||||
fax_msg_hp_t fax_msg_hp;
|
||||
} emwi_t;
|
||||
|
||||
typedef struct cfwdallupdate {
|
||||
char fwdAddress[256];
|
||||
} cfwdallupdate;
|
||||
|
||||
typedef struct Contact_t {
|
||||
xml_unsigned32 line;
|
||||
xml_unsigned32 high;
|
||||
xml_unsigned32 low;
|
||||
xml_signed32 all;
|
||||
xml_signed32 mwi;
|
||||
emwi_t emwi;
|
||||
cfwdallupdate cfwdallupdate;
|
||||
} Contact_t;
|
||||
|
||||
typedef struct dialog_t {
|
||||
char usage[64];
|
||||
char unot[12];
|
||||
char sub[12];
|
||||
} dialog_t;
|
||||
|
||||
typedef struct presence_t {
|
||||
char usage[64];
|
||||
char unot[12];
|
||||
char sub[12];
|
||||
} presence_t;
|
||||
|
||||
typedef struct options_ans_t {
|
||||
combine combine;
|
||||
dialog_t dialog;
|
||||
presence_t presence;
|
||||
} options_ans_t;
|
||||
|
||||
typedef struct PersonStatusStruct {
|
||||
char basic[32];
|
||||
} PersonStatusStruct;
|
||||
|
||||
typedef struct ActivitiesStruct {
|
||||
char alerting[12];
|
||||
char onThePhone[12];
|
||||
char busy[12];
|
||||
char away[12];
|
||||
char meeting[12];
|
||||
} ActivitiesStruct;
|
||||
|
||||
typedef struct PersonStruct {
|
||||
char id[256];
|
||||
PersonStatusStruct personStatus;
|
||||
ActivitiesStruct activities;
|
||||
} PersonStruct;
|
||||
|
||||
typedef struct StatusStruct {
|
||||
char basic[32];
|
||||
ActivitiesStruct activities;
|
||||
} StatusStruct;
|
||||
|
||||
typedef struct TupleStruct {
|
||||
char id[256];
|
||||
StatusStruct status;
|
||||
char contact[1][256];
|
||||
char note[1][1024];
|
||||
} TupleStruct;
|
||||
|
||||
typedef struct PresenceRPIDStruct {
|
||||
char entity[256];
|
||||
PersonStruct person;
|
||||
TupleStruct tuple[1];
|
||||
char note[5][1024];
|
||||
} PresenceRPIDStruct;
|
||||
|
||||
typedef struct sipProfile {
|
||||
xml_unsigned16 kpml_val;
|
||||
} sipProfile;
|
||||
|
||||
typedef struct ConfigApp_req_data_t {
|
||||
sipProfile sip_profile;
|
||||
} ConfigApp_req_data_t;
|
||||
|
||||
typedef struct to_encoder_t {
|
||||
xml_unsigned32 picture_fast_update;
|
||||
} to_encoder_t;
|
||||
|
||||
typedef struct vc_primivite_t {
|
||||
to_encoder_t to_encoder;
|
||||
char stream_id[128];
|
||||
} vc_primivite_t;
|
||||
|
||||
typedef struct Media_Control_t {
|
||||
vc_primivite_t vc_primitive;
|
||||
char general_error[128];
|
||||
} Media_Control_t;
|
||||
|
||||
// end of copy from ccsip_eventbodies.h
|
||||
|
||||
typedef struct Presence_ext_t_ {
|
||||
PresenceRPIDStruct presence_body;
|
||||
/*
|
||||
* Some of the tags' mere presence in the rpid document has a meaning. These tags
|
||||
* may not contain any value between starting and ending tag. So we need a way to
|
||||
* indicate the presence of a tag. We will use the following boolean memeber fields.
|
||||
*/
|
||||
boolean onThePhone;
|
||||
boolean busy;
|
||||
boolean away;
|
||||
boolean meeting;
|
||||
boolean alerting;
|
||||
} Presence_ext_t;
|
||||
|
||||
|
||||
typedef enum {
|
||||
EVENT_DATA_INVALID = 0,
|
||||
EVENT_DATA_KPML_REQUEST,
|
||||
EVENT_DATA_KPML_RESPONSE,
|
||||
EVENT_DATA_REMOTECC_REQUEST,
|
||||
EVENT_DATA_PRESENCE,
|
||||
EVENT_DATA_DIALOG,
|
||||
EVENT_DATA_RAW,
|
||||
EVENT_DATA_CONFIGAPP_REQUEST,
|
||||
EVENT_DATA_MEDIA_INFO
|
||||
} ccsip_event_data_type_e;
|
||||
|
||||
typedef struct {
|
||||
char *data;
|
||||
uint32_t length;
|
||||
} raw_data_t;
|
||||
|
||||
typedef struct {
|
||||
Media_Control_t media_control;
|
||||
uint32_t picture_fast_update;
|
||||
} media_control_ext_t;
|
||||
|
||||
#define TAG_LENGTH 16
|
||||
typedef struct {
|
||||
char current_method[TAG_LENGTH];
|
||||
char hookstate[TAG_LENGTH];
|
||||
char presence[TAG_LENGTH];
|
||||
} Options_ind_t;
|
||||
|
||||
|
||||
|
||||
typedef struct rcc_response_t {
|
||||
xml_unsigned16 code;
|
||||
char reason[128];
|
||||
xml_unsigned32 applicationid;
|
||||
xml_unsigned32 transactionid;
|
||||
xml_signed32 stationsequence;
|
||||
xml_unsigned16 displaypriority;
|
||||
xml_unsigned16 appinstance;
|
||||
xml_unsigned16 linenumber;
|
||||
xml_unsigned32 routingid;
|
||||
xml_unsigned32 confid;
|
||||
char callID[128];
|
||||
options_ans_t options_ind;
|
||||
} rcc_response_t;
|
||||
|
||||
typedef enum {
|
||||
RCC_NULL_REQ = 0,
|
||||
RCC_INITCALL_REQ = 1,
|
||||
RCC_MONITORCALL_REQ,
|
||||
RCC_DIALCALL_REQ,
|
||||
RCC_DIALDTMF_REQ,
|
||||
RCC_ANSCALL_REQ,
|
||||
RCC_DISCCALL_REQ,
|
||||
RCC_XFERSETUP_REQ,
|
||||
RCC_XFERCOMPLETE_REQ,
|
||||
RCC_CONFSETUP_REQ,
|
||||
RCC_CONFCOMPLETE_REQ,
|
||||
RCC_HOLD_REQ,
|
||||
RCC_HOLDRETRIEVE_REQ,
|
||||
RCC_DATAPASSTHROUGH_REQ,
|
||||
RCC_CFWDALL_REQ,
|
||||
RCC_LINEKEY_EVT,
|
||||
RCC_STATUS_UPDATE_REQ,
|
||||
RCC_SET_IDLE_STATUS_PROMPT_REQ,
|
||||
RCC_PLAY_TONE_REQ,
|
||||
RCC_STOP_TONE_REQ,
|
||||
RCC_CALL_SELECT_REQ,
|
||||
RCC_SOFTKEY_EVT,
|
||||
RCC_LINE_RINGER_SET_REQ,
|
||||
RCC_HOLD_REVERSION_REQ,
|
||||
RCC_LAMP_CONTROL_REQ,
|
||||
RCC_LINEKEY_UPDATE,
|
||||
RCC_BULKREGISTER_REQ,
|
||||
RCC_OPTIONS_IND,
|
||||
RCC_BULK_UPDATE,
|
||||
RCC_CALL_JOIN_REQ,
|
||||
RCC_NOTIFY_REQ,
|
||||
RCC_MONITOR_UPDATE_REQ,
|
||||
RCC_MAX_REQ
|
||||
} rcc_request_type_t;
|
||||
|
||||
typedef struct rcc_softkey_event_msg_t {
|
||||
xml_signed32 softkeyevent;
|
||||
dialogID dialogid;
|
||||
xml_unsigned16 linenumber;
|
||||
xml_unsigned16 participantnum;
|
||||
dialogID consultdialogid;
|
||||
xml_unsigned8 state;
|
||||
dialogID joindialogid;
|
||||
//eventData eventdata;
|
||||
char userdata[32];
|
||||
xml_unsigned16 soktkeyid;
|
||||
xml_unsigned16 applicationid;
|
||||
} rcc_softkey_event_msg_t;
|
||||
|
||||
|
||||
typedef struct RCC_req_data {
|
||||
rcc_softkey_event_msg_t rcc_softkey_event_msg;
|
||||
} RCC_req_data;
|
||||
|
||||
typedef struct rcc_int_t_ {
|
||||
RCC_req_data rcc_int;
|
||||
// User added fields
|
||||
xml_unsigned8 iterations;
|
||||
cc_lineid_t line;
|
||||
cc_callid_t gsm_id;
|
||||
cc_callid_t consult_gsm_id;
|
||||
cc_callid_t join_gsm_id;
|
||||
rcc_request_type_t rcc_request_type;
|
||||
} RCC_data;
|
||||
|
||||
|
||||
// Data for event generation
|
||||
typedef struct ccsip_event_data_t_ {
|
||||
struct ccsip_event_data_t_ *next;
|
||||
ccsip_event_data_type_e type;
|
||||
union {
|
||||
KPMLResponse kpml_response;
|
||||
KPMLRequest kpml_request;
|
||||
RCC_data remotecc_data;
|
||||
rcc_response_t remotecc_data_response;
|
||||
Options_ind_t options_ind;
|
||||
Presence_ext_t presence_rpid;
|
||||
raw_data_t raw_data; // used for cmxml and other body types
|
||||
ConfigApp_req_data_t configapp_data;
|
||||
media_control_ext_t media_control_data;
|
||||
} u;
|
||||
} ccsip_event_data_t;
|
||||
|
||||
|
||||
/**
|
||||
* Request to allocate memory for external xml parser
|
||||
* @param [in] size ofrequested memory
|
||||
* @return pointer to memory allocated.
|
||||
*/
|
||||
void *ccAllocXML(cc_size_t size);
|
||||
|
||||
/**
|
||||
* Free xml memory
|
||||
* @param [in] mem - memory to free
|
||||
* @return void
|
||||
*/
|
||||
void ccFreeXML(void *mem);
|
||||
#endif
|
||||
Reference in new issue
Block a user