void callHandler_ProfileExtendedStatusChanged(object sender, ProfileExtendedStatusChangedEventArgs e) { var profileExtendedStatusChanged = new ProfileExtendedStatusChanged(); try { var _sender = sender as MyPhonePlugins.IMyPhoneCallHandler; fillCallHandler_1(_sender, profileExtendedStatusChanged.CallHandler); profileExtendedStatusChanged.ProfileId = e.ProfileId; profileExtendedStatusChanged.Status = e.Status; foreach (var call in _sender.ActiveCalls) { var newCall = new CallStatus(); fillCallStatus(call, newCall); profileExtendedStatusChanged.CallHandler.ActiveCalls.Add(newCall); } foreach (var profile in _sender.Profiles) { var newProfile = new UserProfileStatus(); fillProfiles(profile, newProfile); profileExtendedStatusChanged.CallHandler.Profiles.Add(newProfile); } } catch { profileExtendedStatusChanged = null; } Callback(channel => channel.ProfileExtendedStatusChanged(profileExtendedStatusChanged)); }
public void ProfileExtendedStatusChanged(ProfileExtendedStatusChanged profileExtendedStatusChanged) { V8Context.CreateV8Context().AsyncEvent.ExternalEvent("3CXPhonePlugin", "ProfileExtendedStatusChanged", convertToJSON(profileExtendedStatusChanged, typeof(ProfileExtendedStatusChanged))); }