예제 #1
0
 public void ResumeCall(LinphoneCall linphoneCall)
 {
     if (linphoneCall.IsExist() && LinphoneCore.IsNonZero())
     {
         CallModule.linphone_core_resume_call(LinphoneCore, linphoneCall.LinphoneCallPtr);
     }
 }
예제 #2
0
 public void RedirectCall(LinphoneCall linphoneCall, string redirect_uri)
 {
     if (linphoneCall.IsExist() && LinphoneCore.IsNonZero())
     {
         CallModule.linphone_call_redirect(LinphoneCore, linphoneCall.LinphoneCallPtr, redirect_uri);
     }
 }
예제 #3
0
 public void PauseRecording(LinphoneCall linphoneCall)
 {
     if (linphoneCall.IsExist() && LinphoneCore.IsNonZero() && !string.IsNullOrWhiteSpace(linphoneCall.RecordFile))
     {
         GenericModules.linphone_call_stop_recording(linphoneCall.LinphoneCallPtr);
     }
 }
예제 #4
0
 public void HoldCall(LinphoneCall linphoneCall)
 {
     if (linphoneCall.IsExist() && LinphoneCore.IsNonZero())
     {
         CallModule.linphone_core_pause_call(LinphoneCore, linphoneCall.LinphoneCallPtr);
     }
 }
예제 #5
0
 public void SendDTMFs(LinphoneCall linphoneCall, string dtmfs)
 {
     if (linphoneCall.IsExist() && LinphoneCore.IsNonZero() && !string.IsNullOrWhiteSpace(dtmfs))
     {
         CallModule.linphone_call_send_dtmfs(linphoneCall.LinphoneCallPtr, dtmfs);
     }
 }
예제 #6
0
 public void EchoCancellation(LinphoneCall linphoneCall, bool value)
 {
     if (linphoneCall.IsExist())
     {
         MediaModule.linphone_call_enable_echo_cancellation(linphoneCall.LinphoneCallPtr, value);
     }
 }
예제 #7
0
 /// <summary>
 /// Set speaker gain between 0..1f
 /// </summary>
 /// <param name="linphoneCall"></param>
 /// <param name="value"></param>
 public void SetSpeakerValue(LinphoneCall linphoneCall, double value)
 {
     if (linphoneCall.IsExist())
     {
         MediaModule.linphone_call_set_speaker_volume_gain(linphoneCall.LinphoneCallPtr, (float)value);
     }
 }
예제 #8
0
 public void TerminateCall(LinphoneCall linphoneCall)
 {
     if (linphoneCall.IsExist() && LinphoneCore.IsNonZero())
     {
         CallModule.linphone_core_terminate_call(LinphoneCore, linphoneCall.LinphoneCallPtr);
     }
 }
예제 #9
0
        public double GetSpeakerSound(LinphoneCall linphoneCall)
        {
            var result = 0f;

            if (linphoneCall.IsExist())
            {
                result = MediaModule.linphone_call_get_speaker_volume_gain(linphoneCall.LinphoneCallPtr);
            }
            return(result);
        }
예제 #10
0
        public void ReceiveCall(LinphoneCall linphoneCall)
        {
            if (linphoneCall.IsExist() && LinphoneCore.IsNonZero())
            {
                CallModule.linphone_call_ref(linphoneCall.LinphoneCallPtr);

                IntPtr callParams = CreateCallParameters();

                CallModule.linphone_core_accept_call_with_params(LinphoneCore, linphoneCall.LinphoneCallPtr, callParams);
            }
        }
예제 #11
0
        public void ReceiveCallAndRecord(LinphoneCall linphoneCall, string filename, bool startRecordInstantly = true)
        {
            if (linphoneCall.IsExist() && LinphoneCore.IsNonZero())
            {
                CallModule.linphone_call_ref(linphoneCall.LinphoneCallPtr);
                IntPtr callParams = CreateCallParameters();

                CallModule.linphone_call_params_set_record_file(callParams, filename);

                CallModule.linphone_core_accept_call_with_params(LinphoneCore, linphoneCall.LinphoneCallPtr, callParams);

                if (startRecordInstantly)
                {
                    GenericModules.linphone_call_start_recording(linphoneCall.LinphoneCallPtr);
                }
            }
        }