**/
void linphone_call_send_vfu_request(LinphoneCall *call)
{
- sal_call_send_vfu_request(call->op);
+ if (LinphoneCallStreamsRunning == linphone_call_get_state(call))
+ sal_call_send_vfu_request(call->op);
}
#endif
+
+void linphone_call_enable_echo_cancellation(LinphoneCall *call, bool_t enable) {
+ if (call!=NULL && call->audiostream!=NULL && call->audiostream->ec){
+ bool_t bypass_mode = !enable;
+ ms_filter_call_method(call->audiostream->ec,MS_ECHO_CANCELLER_SET_BYPASS_MODE,&bypass_mode);
+ }
+}
+bool_t linphone_call_echo_cancellation_enabled(LinphoneCall *call) {
+ if (call!=NULL && call->audiostream!=NULL && call->audiostream->ec){
+ bool_t val;
+ ms_filter_call_method(call->audiostream->ec,MS_ECHO_CANCELLER_GET_BYPASS_MODE,&val);
+ return !val;
+ } else {
+ return linphone_core_echo_cancellation_enabled(call->core);
+ }
+}
+
+void linphone_call_enable_echo_limiter(LinphoneCall *call, bool_t val){
+ if (call!=NULL && call->audiostream!=NULL ) {
+ if (val) {
+ const char *type=lp_config_get_string(call->core->config,"sound","el_type","mic");
+ if (strcasecmp(type,"mic")==0)
+ audio_stream_enable_echo_limiter(call->audiostream,ELControlMic);
+ else if (strcasecmp(type,"full")==0)
+ audio_stream_enable_echo_limiter(call->audiostream,ELControlFull);
+ } else {
+ audio_stream_enable_echo_limiter(call->audiostream,ELInactive);
+ }
+ }
+}
+
+bool_t linphone_call_echo_limiter_enabled(const LinphoneCall *call){
+ if (call!=NULL && call->audiostream!=NULL ){
+ return call->audiostream->el_type !=ELInactive ;
+ } else {
+ return linphone_core_echo_limiter_enabled(call->core);
+ }
+}
+