RDK-B
voice_hal.h File Reference

For CCSP Component: CcspTelcoVoIPAgent. More...

#include <stdint.h>
#include <stdbool.h>
#include <sys/socket.h>
#include <netinet/in.h>
Include dependency graph for voice_hal.h:

Go to the source code of this file.

Data Structures

struct  TelcoVoipAgent_VoiceService_Stats_t
 
struct  TelcoVoipAgent_Voice_Calling_Features_t
 
struct  TelcoVoipAgent_Voice_Credentials_t
 

Macros

#define RETURN_ERROR   (-1)
 
#define RETURN_OK   0
 
#define RDK_SUCCESS   (0) /*No Error*/
 
#define RDK_FAILURE   (-1) /*any other failure*/
 
#define RDK_ERROR_PARAM   (-2) /* NULL pointers mainly */
 
#define RDK_ERROR_RANGE   (-3) /* Value provided, but out of permitted range */
 
#define RDK_ERROR_OOM   (-4) /* Out of memory, usually malloc failed */
 
#define VOICE_HAL_USERNAME_LENGTH   (40)
 
#define VOICE_HAL_PASSWORD_LENGTH   (40)
 

Typedefs

typedef struct TelcoVoipAgent_Voice_Calling_Features_tpTelcoVoipAgent_Voice_Calling_Features_t
 
typedef struct TelcoVoipAgent_Voice_Credentials_tpTelcoVoipAgent_Voice_Credentials_t
 

Enumerations

enum  VoiceHalLineStatus_e {
  VOICE_HAL_LINE_STATE_UP = 0, VOICE_HAL_LINE_STATE_INITIALIZING, VOICE_HAL_LINE_STATE_REGISTERING, VOICE_HAL_LINE_STATE_UNREGISTERING,
  VOICE_HAL_LINE_STATE_ERROR, VOICE_HAL_LINE_STATE_TESTING, VOICE_HAL_LINE_STATE_QUIESCENT, VOICE_HAL_LINE_STATE_DISABLED
}
 
enum  VoiceHalLineEnable_e { VOICE_HAL_LINE_DISABLED = 0, VOICE_HAL_LINE_QUIESCENT, VOICE_HAL_LINE_ENABLED }
 
enum  VoiceHalCallState_e {
  VOICE_HAL_CALL_STATE_IDLE = 0, VOICE_HAL_CALL_STATE_CALLING, VOICE_HAL_CALL_STATE_RINGING, VOICE_HAL_CALL_STATE_CONNECTING,
  VOICE_HAL_CALL_STATE_INCALL, VOICE_HAL_CALL_STATE_HOLD, VOICE_HAL_CALL_STATE_DISCONNECTING
}
 
enum  VoiceHalDiagnosticState_e {
  VOICE_HAL_DIAG_STATE_TYPE_NONE = 0, VOICE_HAL_DIAG_STATE_TYPE_REQUESTED, VOICE_HAL_DIAG_STATE_TYPE_COMPLETE, VOICE_HAL_DIAG_STATE_TYPE_ERROR_INTERNAL,
  VOICE_HAL_DIAG_STATE_TYPE_ERROR_OTHER
}
 
enum  VoiceHalDigitMap_e { VOICE_HAL_NORMAL_DIGIT_MAP = 0, VOICE_HAL_EMERGENCY_DIGIT_MAP }
 
enum  VoiceHalIpAddressFamily_e { VOICE_HAL_AF_INET_V4 = 0, VOICE_HAL_AF_INET_V6 }
 
enum  VoiceHalIpLinkState_e { VOICE_HAL_IP_LINK_STATE_DOWN = 0, VOICE_HAL_IP_LINK_STATE_UP }
 
enum  VoiceHalDigitTimer_e { VOICE_HAL_S_TIMER = 0, VOICE_HAL_Z_TIMER }
 
enum  VoiceHalAuthCredentialType_e { VOICE_HAL_AUTH_UNAME = 0, VOICE_HAL_AUTH_PWD }
 
enum  VoiceProcessStateRequest_e { VOICE_PROCESS_STATE_STOP = 0, VOICE_PROCESS_STATE_START, VOICE_PROCESS_STATE_RESTART, VOICE_PROCESS_STATE_FACTORY_DEFAULT }
 
enum  VoiceProcessStatus_e {
  VOICE_PROCESS_STATUS_STOPPED = 0, VOICE_PROCESS_STATUS_STARTING, VOICE_PROCESS_STATUS_STARTED, VOICE_PROCESS_STATUS_STOPPING,
  VOICE_PROCESS_STATUS_ERROR
}
 
enum  VoiceCallFeatureType_e {
  VOICE_CALLING_FEATURE_CALL_WAITING = 0, VOICE_CALLING_FEATURE_MSG_WAIT_INDICATOR, VOICE_CALLING_FEATURE_CONF_CALL, VOICE_CALLING_FEATURE_HOLD,
  VOICE_CALLING_FEATURE_CALLER_ID
}
 

Functions

int32_t voice_hal_Init (void)
 
int32_t voice_hal_InitDB (void)
 
int32_t voice_hal_Deinit (void)
 
int32_t voice_hal_DeinitDB (void)
 
int32_t voice_hal_setVoiceProcessState (uint32_t service, VoiceProcessStateRequest_e voice_state)
 
int32_t voice_hal_getVoiceProcessState (uint32_t service, VoiceProcessStateRequest_e *pvoice_state)
 
int32_t voice_hal_getVoiceProcessStatus (uint32_t service, VoiceProcessStatus_e *pvoice_status)
 
int32_t voice_hal_getServiceVersion (char *service_version, uint32_t *pLength)
 
int32_t voice_hal_getConfigSoftwareVersion (uint32_t service, char *config_version, uint32_t *pLength)
 
int32_t voice_hal_getCountServices (uint32_t *serviceCount)
 
int32_t voice_hal_getCountProfiles (uint32_t service, uint32_t *profileCount)
 
int32_t voice_hal_getCountLines (uint32_t service, uint32_t profile, uint32_t *lineCount)
 
int32_t voice_hal_getCountPhyInterfaces (uint32_t service, uint32_t *phyCount)
 
int32_t voice_hal_getBoundIfName (uint32_t service, char *bound_if_name, uint32_t *pLength)
 
int32_t voice_hal_setBoundIfName (uint32_t service, const char *bound_if_name)
 
int32_t voice_hal_setIpAddressFamily (uint32_t service, const char *address_family)
 
int32_t voice_hal_getIpAddressFamily (uint32_t service, char *address_family, uint32_t *pLength)
 
int32_t voice_hal_setLinkState (VoiceHalIpLinkState_e state)
 
int32_t voice_hal_setIpWanAddress (uint32_t service, const char *boundIpAddress)
 
int32_t voice_hal_getIpWanAddress (uint32_t service, char *boundIpAddress, uint32_t *pLength)
 
int32_t voice_hal_getTestState (uint32_t service, uint32_t phy_interface, char *testState, uint32_t *pLength)
 
int32_t voice_hal_setTestState (uint32_t service, uint32_t phy_interface, char *testState)
 
int32_t voice_hal_getTestResult (uint32_t service, uint32_t phy_interface, char *test_result, uint32_t *pLength)
 
int32_t voice_hal_setTestSelector (uint32_t service, uint32_t phy_interface, char *test_selector)
 
int32_t voice_hal_getTestSelector (uint32_t service, uint32_t phy_interface, char *testSelector, uint32_t *pLength)
 
int32_t voice_hal_getPOSTTipGroundVoltageACParameter (uint32_t service, uint32_t phy_interface, char *pValue, uint32_t *pLength)
 
int32_t voice_hal_getPOSTTipGroundVoltageDCParameter (uint32_t service, uint32_t phy_interface, char *pValue, uint32_t *pLength)
 
int32_t voice_hal_getPOSTRingGroundVoltageACParameter (uint32_t service, uint32_t phy_interface, char *pValue, uint32_t *pLength)
 
int32_t voice_hal_getPOSTRingGroundVoltageDCParameter (uint32_t service, uint32_t phy_interface, char *pValue, uint32_t *pLength)
 
int32_t voice_hal_getPOSTTipGroundImpedanceParameter (uint32_t service, uint32_t phy_interface, char *pValue, uint32_t *pLength)
 
int32_t voice_hal_getPOSTRingGroundImpedanceParameter (uint32_t service, uint32_t phy_interface, char *pValue, uint32_t *pLength)
 
int32_t voice_hal_getPOSTTipRingImpedanceParameter (uint32_t service, uint32_t phy_interface, char *pValue, uint32_t *pLength)
 
int32_t voice_hal_setCallingFeatures (uint32_t service, uint32_t profile, uint32_t line, VoiceCallFeatureType_e eFeature, bool bStatus)
 
int32_t voice_hal_getCallingFeatures (uint32_t service, uint32_t profile, uint32_t line, VoiceCallFeatureType_e eFeature, bool *pStatus)
 
int32_t voice_hal_getOutboundProxyAddresses (uint32_t service, uint32_t profile, uint32_t line, char *pProxyAddresses, uint32_t *pLength)
 
int32_t voice_hal_getOutboundProxy (uint32_t service, uint32_t profile, char *ipNameAddress, uint32_t *pLength)
 
int32_t voice_hal_setOutboundProxy (uint32_t service, uint32_t profile, const char *ipNameAddress)
 
int32_t voice_hal_getOutboundProxyPort (uint32_t service, uint32_t profile, uint32_t *port)
 
int32_t voice_hal_setOutboundProxyPort (uint32_t service, uint32_t profile, uint32_t port)
 
int32_t voice_hal_getProxyServer (uint32_t service, uint32_t profile, char *proxyServer, uint32_t *pLength)
 
int32_t voice_hal_setProxyServer (uint32_t service, uint32_t profile, const char *proxyServer)
 
int32_t voice_hal_getProxyServerPort (uint32_t service, uint32_t profile, uint32_t *port)
 
int32_t voice_hal_setProxyServerPort (uint32_t service, uint32_t profile, uint32_t port)
 
int32_t voice_hal_getRegistrarServerPort (uint32_t service, uint32_t profile, uint32_t *port)
 
int32_t voice_hal_setRegistrarServerPort (uint32_t service, uint32_t profile, uint32_t port)
 
int32_t voice_hal_setRegistrarServer (uint32_t service, uint32_t profile, const char *ipNameAddress)
 
int32_t voice_hal_getRegistrarServer (uint32_t service, uint32_t profile, char *ipNameAddress, uint32_t *pLength)
 
int32_t voice_hal_setLogServer (uint32_t service, uint32_t profile, const char *ipNameAddress)
 
int32_t voice_hal_setLogServerPort (uint32_t service, uint32_t profile, uint32_t ipPort)
 
int32_t voice_hal_getLogServer (uint32_t service, uint32_t profile, char *logServerName, uint32_t *puiLength)
 
int32_t voice_hal_getLogServerPort (uint32_t service, uint32_t profile, uint32_t *ipPort)
 
int32_t voice_hal_setUserAgentDomain (uint32_t service, uint32_t profile, const char *ipDomain)
 
int32_t voice_hal_getUserAgentDomain (uint32_t service, uint32_t profile, char *ipDomain, uint32_t *pLength)
 
int32_t voice_hal_setConferencingUri (uint32_t service, uint32_t profile, const char *pUri)
 
int32_t voice_hal_getConferencingUri (uint32_t service, uint32_t profile, char *uri, uint32_t *pLength)
 
int32_t voice_hal_setEnableNetworkDisconnect (uint32_t service, uint32_t profile, bool enableDisconnect)
 
int32_t voice_hal_getEnableNetworkDisconnect (uint32_t service, uint32_t profile, bool *enableDisconnect)
 
int32_t voice_hal_setEnablePrackRequired (uint32_t service, uint32_t profile, bool enablePrackRequired)
 
int32_t voice_hal_getEnablePrackRequired (uint32_t service, uint32_t profile, bool *enablePrackRequired)
 
int32_t voice_hal_getDigitMap (uint32_t service, uint32_t profile, VoiceHalDigitMap_e map_type, char *digit_map_string, uint32_t *uiBufLen)
 
int32_t voice_hal_setDigitMap (uint32_t service, uint32_t profile, VoiceHalDigitMap_e map_type, const char *digit_map_string)
 
int32_t voice_hal_setSipDscpMark (uint32_t service, uint32_t profile, uint32_t dscp)
 
int32_t voice_hal_getSipDscpMark (uint32_t service, uint32_t profile, uint32_t *dscp)
 
int32_t voice_hal_setSipEthernetPriorityMark (uint32_t service, uint32_t profile, int32_t priority)
 
int32_t voice_hal_getSipEthernetPriorityMark (uint32_t service, uint32_t profile, int32_t *priority)
 
int32_t voice_hal_getSipSKBMark (uint32_t service, uint32_t profile, uint32_t *mark)
 
int32_t voice_hal_setRtpDscpMark (uint32_t service, uint32_t profile, uint32_t dscp)
 
int32_t voice_hal_getRtpDscpMark (uint32_t service, uint32_t profile, uint32_t *dscp)
 
int32_t voice_hal_setRtpEthernetPriorityMark (uint32_t service, uint32_t profile, int32_t priority)
 
int32_t voice_hal_getRtpEthernetPriorityMark (uint32_t service, uint32_t profile, int32_t *priority)
 
int32_t voice_hal_getRtpSKBMark (uint32_t service, uint32_t profile, uint32_t *mark)
 
int32_t voice_hal_setReceiveGain (uint32_t service, uint32_t profile, uint32_t line, int32_t gain)
 
int32_t voice_hal_getReceiveGain (uint32_t service, uint32_t profile, uint32_t line, int32_t *gain)
 
int32_t voice_hal_setTransmitGain (uint32_t service, uint32_t profile, uint32_t line, int32_t gain)
 
int32_t voice_hal_getTransmitGain (uint32_t service, uint32_t profile, uint32_t line, int32_t *gain)
 
int32_t voice_hal_setDisableLoopCurrentUntilRegistered (uint32_t service, bool disable)
 
int32_t voice_hal_getDisableLoopCurrentUntilRegistered (uint32_t service, bool *disabled)
 
int32_t voice_hal_setLoggingEnable (bool enable)
 
int32_t voice_hal_getLoggingEnable (bool *enable)
 
int32_t voice_hal_setCCTKTraceGroup (uint32_t service, const char *bitmask)
 
int32_t voice_hal_getCCTKTraceGroup (uint32_t service, char *bitmask, uint32_t *pLength)
 
int32_t voice_hal_setCCTKTraceLevel (uint32_t service, const char *logLevel)
 
int32_t voice_hal_getCCTKTraceLevel (uint32_t service, char *traceLevel, uint32_t *pLength)
 
int32_t voice_hal_setLoggingLevel (uint32_t service, uint32_t uLevel)
 
int32_t voice_hal_getLoggingLevel (uint32_t service, uint32_t *pLevel)
 
int32_t voice_hal_setModuleLogLevels (uint32_t service, const char *logLevels)
 
int32_t voice_hal_getModuleLogLevels (uint32_t service, char *logLevels, uint32_t *pLength)
 
int32_t voice_hal_getCallState (uint32_t service, uint32_t profile, uint32_t line, VoiceHalCallState_e *callState)
 
int32_t voice_hal_getDirectoryNumber (uint32_t service, uint32_t profile, uint32_t line, char *directoryNumber, uint32_t *pLength)
 
int32_t voice_hal_setDirectoryNumber (uint32_t service, uint32_t profile, uint32_t line, char *buffer)
 
int32_t voice_hal_setLineEnable (uint32_t service, uint32_t profile, uint32_t line, VoiceHalLineEnable_e eLineEnable)
 
int32_t voice_hal_getLineEnable (uint32_t service, uint32_t profile, uint32_t line, VoiceHalLineEnable_e *peLineEnable)
 
int32_t voice_hal_getAuthCredentials (uint32_t service, uint32_t profile, uint32_t line, VoiceHalAuthCredentialType_e eAuthCredential, char *pBuffer, uint32_t *pLength)
 
int32_t voice_hal_setAuthCredentials (uint32_t service, uint32_t profile, uint32_t line, VoiceHalAuthCredentialType_e eAuthCredential, char *pBuffer)
 
int32_t voice_hal_getSipURI (uint32_t service, uint32_t profile, uint32_t line, char *pSipUri, uint32_t *pLength)
 
int32_t voice_hal_setSipUri (uint32_t service, uint32_t profile, uint32_t line, const char *buffer)
 
int32_t voice_hal_getLineStatus (uint32_t service, uint32_t profile, uint32_t line, VoiceHalLineStatus_e *lineState)
 
int32_t voice_hal_setDigitTimer (uint32_t service, uint32_t profile, VoiceHalDigitTimer_e digit_timer, uint32_t timer_value)
 
int32_t voice_hal_getDigitTimer (uint32_t service, uint32_t profile, VoiceHalDigitTimer_e digit_timer, uint32_t *timer_value)
 
int32_t voice_hal_getLineStats (uint32_t service, uint32_t profile, uint32_t lineIndex, TelcoVoipAgent_VoiceService_Stats_t *output_stats_struct)
 
int32_t voice_hal_resetLineStats (uint32_t service, uint32_t profile, uint32_t lineIndex)
 
void voice_hal_print_debug_counters ()
 

yes

For CCSP Component: CcspTelcoVoIPAgent.

Author
sky @description This header file gives the function call prototypes and structure definitions used for the RDK-Broadband hardware abstraction layer for VoIP

Definition in file voice_hal.h.