简体   繁体   English

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

[英]How to receive DTMF receive during call in iOS?

I am new in linphone. 我是陌生人。 Anyone can guide me how to receive dtmf during call in iOS. 任何人都可以指导我如何在iOS通话期间接收dtmf。 I puted method this in LinphoneCoreVTable . 我把方法放在LinphoneCoreVTable中

.dtmf_received = linphone_iphone_notify_dtmf_received.

But when this method call I don't know. 但是当这个方法调用时我不知道。

you have to implement function which get called when dtmf is received. 您必须实现在收到dtmf时调用的函数。

Interface of function is following: 功能界面如下:

/**
 * 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);

Is a same as for call state change: 与呼叫状态更改相同:

VTable 虚函数表

.call_state_changed = (LinphoneCoreCallStateChangedCb)linphone_iphone_call_state,

Interface 接口

/**
 * 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);

And method 和方法

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];
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM