/// <summary> /// Transfer. /// </summary> /// <param name="contacts">The contact list.</param> /// <param name="contactsView">The contacts list view.</param> /// <param name="imageListSmall">The image list.</param> public TransferList(Data.contacts contacts, ListView contactsView, ImageList imageListSmall) { InitializeComponent(); _contacts = contacts; _contactsView = contactsView; _imageListSmall = imageListSmall; }
/// <summary> /// In coming call. /// </summary> /// <param name="voipCall">VoIP call.</param> /// <param name="inComingCall">In coming call param.</param> /// <param name="contactsView">The contacts list view.</param> /// <param name="callsView">The calls list view.</param> /// <param name="conferenceView">The conference list view.</param> /// <param name="contacts">The contact list.</param> /// <param name="imageListSmall">The image list.</param> /// <param name="imageListLarge">The image list.</param> /// <param name="contactName">The contact name.</param> /// <param name="ringFilePath">The filename and path of the ringing audio.</param> /// <param name="audioDeviceIndex">The audio device index.</param> /// <param name="autoAnswer">Auto answer enabled.</param> /// <param name="autoAnswerFilePath">Auto answer file path..</param> /// <param name="autoAnswerWait">Auto answer wait time.</param> /// <param name="autoAnswerRecordingPath">Auto answer recording file and path.</param> /// <param name="messageBankWaitTime">The time to record the message.</param> /// <param name="redirectEnabled">The time to record the message.</param> /// <param name="redirectCallNumber">The time to record the message.</param> /// <param name="redirectCallAfter">The time to record the message.</param> public InComingCall(Nequeo.VoIP.PjSip.VoIPCall voipCall, Nequeo.VoIP.PjSip.Param.OnIncomingCallParam inComingCall, ListView contactsView, ListView callsView, ListView conferenceView, Data.contacts contacts, ImageList imageListSmall, ImageList imageListLarge, string contactName, string ringFilePath, int audioDeviceIndex = -1, bool autoAnswer = false, string autoAnswerFilePath = null, int autoAnswerWait = 30, string autoAnswerRecordingPath = null, int messageBankWaitTime = 20, bool redirectEnabled = false, string redirectCallNumber = "", int redirectCallAfter = -1) { InitializeComponent(); _contactName = contactName; _ringFilePath = ringFilePath; _voipCall = voipCall; _inComingCall = inComingCall; _callsView = callsView; _conferenceView = conferenceView; _contactsView = contactsView; _contacts = contacts; _imageListSmall = imageListSmall; _imageListLarge = imageListLarge; // Auto answer. _autoAnswer = autoAnswer; _autoAnswerFilePath = autoAnswerFilePath; _autoAnswerWait = autoAnswerWait; _autoAnswerRecordingPath = autoAnswerRecordingPath; _messageBankWaitTime = messageBankWaitTime; // Assign redirect call. _redirectEnabled = redirectEnabled; _redirectCallNumber = redirectCallNumber; _redirectCallAfter = redirectCallAfter; // If auto answer recording path. if (!String.IsNullOrEmpty(autoAnswerRecordingPath)) { // Create the recording file name and path. DateTime time = DateTime.Now; string audioRecodingExt = System.IO.Path.GetExtension(autoAnswerRecordingPath); string audioRecordingDir = System.IO.Path.GetDirectoryName(autoAnswerRecordingPath).TrimEnd(new char[] { '\\' }) + "\\"; string audioRecordingFile = System.IO.Path.GetFileNameWithoutExtension(autoAnswerRecordingPath) + "_" + contactName.Replace(" ", "").Replace("'", "") + "_" + time.Day.ToString() + "-" + time.Month.ToString() + "-" + time.Year.ToString() + "_" + time.Hour.ToString() + "-" + time.Minute.ToString() + "-" + time.Second.ToString(); // Create the file name. _autoAnswerRecordingPath = audioRecordingDir + audioRecordingFile + audioRecodingExt; } // If a valid audio device has been set. if (audioDeviceIndex >= 0) { // Get the audio device. Nequeo.IO.Audio.Device device = Nequeo.IO.Audio.Devices.GetDevice(audioDeviceIndex); _player = new WavePlayer(device); _player.PlaybackStopped += _player_PlaybackStopped; } }
/// <summary> /// Contact info. /// </summary> /// <param name="voipCall">VoIP call.</param> /// <param name="contactKey">The contact key.</param> /// <param name="adding">True if adding false if updating.</param> /// <param name="contacts">The contact list.</param> /// <param name="contactsView">The contact list.</param> public ContactInfo(Nequeo.VoIP.Sip.VoIPCall voipCall, string contactKey, bool adding, Data.contacts contacts, ListView contactsView) { InitializeComponent(); _voipCall = voipCall; _contactKey = contactKey; _adding = adding; _contacts = contacts; _contactsView = contactsView; }