public bool PlayFileMusic(List <PASection> targets, BKMusicFolder foler) { if (targets == null) { return(false); } DialRule rule = new DialRule(); rule.Sections = targets; rule.BuildDialString(); int sectionIds; if (!int.TryParse(rule.SectionsId, out sectionIds)) { return(false); } int folderId = 0, filesId = 0; rule.GetFileMusicIds(foler, ref folderId, ref filesId); PARemoteProc proxy = _system.GetPARpc(); proxy.StartFileMusic("111", sectionIds, rule.Zones, 1, folderId, filesId); return(true); }
public bool Speech(List <PASection> targets) { if (targets == null) { return(false); } DialRule rule = new DialRule(); rule.ActionType = PA_ACTION_TYPE.PA_ACT_MANUAL; rule.Sections = targets; rule.BuildDialString(); if (string.IsNullOrEmpty(rule.DialString)) { return(false); } int accId = _system.GetAccountId(); if (accId == -1) { return(false); } App.SIPUA.MakeCall(accId, rule.DialString, (int)_system.Id); return(true); }