| /* |
| * |
| * Data : 2022/11/07 16:57:28 |
| * Author : HanZhiyu |
| */ |
| #include "mbtk_audio.h" |
| |
| typedef enum { |
| LYNQ_CALL_FAIL_UNOBTAINABLE_NUMBER = 1, |
| LYNQ_CALL_FAIL_NORMAL = 16, |
| LYNQ_CALL_FAIL_BUSY = 17, |
| LYNQ_CALL_FAIL_CONGESTION = 34, |
| LYNQ_CALL_FAIL_ACM_LIMIT_EXCEEDED = 68, |
| LYNQ_CALL_FAIL_LYNQ_CALL_BARRED = 240, |
| LYNQ_CALL_FAIL_FDN_BLOCKED = 241, |
| LYNQ_CALL_FAIL_IMSI_UNKNOWN_IN_VLR = 242, |
| LYNQ_CALL_FAIL_IMEI_NOT_ACCEPTED = 243, |
| LYNQ_CALL_FAIL_DIAL_MODIFIED_TO_USSD = 244, /* STK LYNQ_CALL Control */ |
| LYNQ_CALL_FAIL_DIAL_MODIFIED_TO_SS = 245, |
| LYNQ_CALL_FAIL_DIAL_MODIFIED_TO_DIAL = 246, |
| LYNQ_CALL_FAIL_CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000, |
| LYNQ_CALL_FAIL_CDMA_DROP = 1001, |
| LYNQ_CALL_FAIL_CDMA_INTERCEPT = 1002, |
| LYNQ_CALL_FAIL_CDMA_REORDER = 1003, |
| LYNQ_CALL_FAIL_CDMA_SO_REJECT = 1004, |
| LYNQ_CALL_FAIL_CDMA_RETRY_ORDER = 1005, |
| LYNQ_CALL_FAIL_CDMA_ACCESS_FAILURE = 1006, |
| LYNQ_CALL_FAIL_CDMA_PREEMPTED = 1007, |
| LYNQ_CALL_FAIL_CDMA_NOT_EMERGENCY = 1008, /* For non-emergency number dialed |
| during emergency callback mode */ |
| LYNQ_CALL_FAIL_CDMA_ACCESS_BLOCKED = 1009, /* CDMA network access probes blocked */ |
| LYNQ_CALL_FAIL_ERROR_UNSPECIFIED = 0xffff |
| } lynq_last_call_fail_cause_t; |
| |
| typedef enum{ |
| AUDIO_MODE_CODEC = 0, /* Codec */ |
| AUDIO_MODE_RTP = 1, /* RTP */ |
| }LYNQ_Audio_Mode; |
| |
| typedef enum{ |
| RTP_CLIENT = 0, /*客户端,从远端拉文件到本地播放*/ |
| RTP_SERVER =1, /*服务器端,推文件到远端播放*/ |
| RTP_MODE_MAX |
| }LYNQ_Rtp_Mode; |
| |
| typedef enum{ |
| LYNQ_CALL_ACTIVE, |
| LYNQ_CALL_HOLDING, |
| LYNQ_CALL_DIALING, |
| LYNQ_CALL_ALERTING, |
| LYNQ_CALL_INCOMING, |
| LYNQ_CALL_WAITING, |
| LYNQ_CALL_OFFERING, |
| }LYNQ_Call_State; |
| |
| int lynq_init_call(int uToken); |
| int lynq_deinit_call(void); |
| int lynq_call(int *handle, char addr[]); |
| int lynq_call_answer(); |
| int lynq_call_hungup_all(); |
| int lynq_call_hungup(int *handle); |
| int lynq_hangup_waiting_or_background(void); |
| int lynq_switch_waiting_or_holding_and_active(void); |
| int lynq_hangup_foreground_resume_background(void); |
| int lynq_wait_incoming_call(void *incoming_call_cb); |
| int lynq_get_mute_mic (int *status); |
| int lynq_set_mute_mic(const int enable); |
| int lynq_set_DTMF(const char callnum); |
| int lynq_get_current_call_state(int *handle,int *call_state,int*toa,int *direction,char addr[]); |
| //void lynq_audio_volume_cb(int volume); |
| int lynq_set_speech_volume(const int volume); |
| int lynq_get_speech_volume(int * volume); |