public void DeleteVoicemail(Guid extensionID, Guid voicemailID) { CallButlerDataset.VoicemailsRow vRow = dataProvider.GetVoicemail(extensionID, voicemailID); if (vRow != null) { string voicemailPath = String.Format("{0}\\{1}\\{2}.snd", WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.VoicemailRootDirectory), vRow.ExtensionID.ToString(), voicemailID.ToString()); dataProvider.DeleteVoicemail(extensionID, voicemailID); if (File.Exists(voicemailPath)) { File.Delete(voicemailPath); } // Send a message waiting notification to our PBX phone if (registrarService != null) { registrarService.SendMessageWaitingNotification(extensionID); } } }