如何在 iOS 中通话期间接收 DTMF 接收



我是Linphone的新手。任何人都可以指导我如何在呼入期间接收 dtmf苹果。我把这个方法放在LinphoneCoreVTable中。

.dtmf_received = linphone_iphone_notify_dtmf_received.

但是当这种方法调用我不知道。

你必须实现在收到dtmf时调用的函数。

功能接口如下:

/**
 * Callback for being notified of DTMFs received.
 * @param lc the linphone core
 * @param call the call that received the dtmf
 * @param dtmf the ascii code of the dtmf
 */
typedef void (*LinphoneCoreCbsDtmfReceivedCb)(LinphoneCore* lc, LinphoneCall *call, int dtmf);

与调用状态更改相同:

可VTable

.call_state_changed = (LinphoneCoreCallStateChangedCb)linphone_iphone_call_state,

接口

/**
 * Call state notification callback.
 * @param lc the LinphoneCore
 * @param call the call object whose state is changed.
 * @param cstate the new state of the call
 * @param message a non NULL informational message about the state.
 */
typedef void (*LinphoneCoreCbsCallStateChangedCb)(LinphoneCore *lc, LinphoneCall *call, LinphoneCallState cstate, const char *message);

和方法

static void linphone_iphone_call_state(LinphoneCore *lc, LinphoneCall *call, LinphoneCallState state, const char *message) {
    [(__bridge LinphoneManager *)linphone_core_get_user_data(lc) onCall:call StateChanged:state withMessage:message];
}

最新更新