mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 19:18:06 +00:00
add dtmf on call
This commit is contained in:
parent
510e9d92d0
commit
35ad211d22
5 changed files with 23 additions and 3 deletions
|
|
@ -4843,7 +4843,7 @@ int linphone_call_send_dtmf(LinphoneCall *call,char dtmf){
|
|||
return 0;
|
||||
}
|
||||
|
||||
int linphone_call_send_dtmfs(LinphoneCall *call,char *dtmfs) {
|
||||
int linphone_call_send_dtmfs(LinphoneCall *call,const char *dtmfs) {
|
||||
if (call==NULL){
|
||||
ms_warning("linphone_call_send_dtmfs(): invalid call, canceling DTMF sequence.");
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -870,7 +870,7 @@ LINPHONE_PUBLIC int linphone_call_send_dtmf(LinphoneCall *call,char dtmf);
|
|||
* @return -2 if there is already a DTMF sequence, -1 if call is not ready, 0 otherwise.
|
||||
* @ingroup call_control
|
||||
**/
|
||||
LINPHONE_PUBLIC int linphone_call_send_dtmfs(LinphoneCall *call,char *dtmfs);
|
||||
LINPHONE_PUBLIC int linphone_call_send_dtmfs(LinphoneCall *call,const char *dtmfs);
|
||||
|
||||
/**
|
||||
* Stop current DTMF sequence sending.
|
||||
|
|
|
|||
|
|
@ -1946,6 +1946,16 @@ extern "C" jlong Java_org_linphone_core_LinphoneCoreImpl_interpretUrl( JNIEnv*
|
|||
ReleaseStringUTFChars(env, jurl, url);
|
||||
return result;
|
||||
}
|
||||
extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_sendDtmfs( JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong lc
|
||||
,jstring dtmf) {
|
||||
int result;
|
||||
const char* dtmfs = GetStringUTFChars(env, dtmf);
|
||||
result = linphone_call_send_dtmfs(linphone_core_get_current_call((LinphoneCore*)lc),dtmfs);
|
||||
ReleaseStringUTFChars(env, dtmf, dtmfs);
|
||||
return result;
|
||||
}
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_sendDtmf( JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong lc
|
||||
|
|
@ -8172,4 +8182,4 @@ extern "C" jobject Java_org_linphone_core_LinphoneAccountCreatorImpl_configure(J
|
|||
LinphoneCoreVTable *table = linphone_core_get_current_vtable(lc);
|
||||
LinphoneCoreData* lcData = (LinphoneCoreData*)linphone_core_v_table_get_user_data(table);
|
||||
return getProxy(env, lpc, lcData->core);
|
||||
}
|
||||
}
|
||||
|
|
@ -837,6 +837,11 @@ public interface LinphoneCore {
|
|||
*/
|
||||
boolean isMicMuted();
|
||||
|
||||
/**
|
||||
* Initiate dtmf if in call
|
||||
* @param dtmf send dtmf
|
||||
*/
|
||||
void sendDtmfs(String dtmf);
|
||||
/**
|
||||
* Initiate a dtmf signal if in call
|
||||
* @param number send dtmf ['0'..'9'] | '#', '*'
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
private native long interpretUrl(long nativePtr,String destination);
|
||||
private native Object inviteAddress(long nativePtr,long to);
|
||||
private native Object inviteAddressWithParams(long nativePtrLc,long to, long nativePtrParam);
|
||||
private native int sendDtmfs(long nativePtr,String dtmf);
|
||||
private native void sendDtmf(long nativePtr,char dtmf);
|
||||
private native void clearCallLogs(long nativePtr);
|
||||
private native boolean isMicMuted(long nativePtr);
|
||||
|
|
@ -367,6 +368,10 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
}
|
||||
}
|
||||
|
||||
public synchronized void sendDtmfs(String dtmf) {
|
||||
sendDtmfs(nativePtr, dtmf);
|
||||
}
|
||||
|
||||
public synchronized void sendDtmf(char number) {
|
||||
sendDtmf(nativePtr, number);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue