private void Pbx_OnChannelDestroyedEvent(IAriClient sender, ChannelDestroyedEvent e) { ProtocolMessages.Message msg = null; try { lock (_locker) { //si aun existe el callhandler manejo el evento if (callHandlerCache.GetByChannelId(e.Channel.Id) != null) { msg = callHandlerCache.GetByChannelId(e.Channel.Id).ChannelDestroyEvent(e.Channel.Id, e.Cause, e.Cause_txt); } } } catch (Exception ex) { Log.Logger.Debug("Error en Pbx_OnChannelDestroyedEvent - " + ex.Message); } if (msg != null) { actorPbxProxy.Send(msg); } else { Log.Logger.Debug("Channel Destroy: " + e.Channel.Id + " el callhandler devolvió msg = null"); } lock (_locker) { callHandlerCache.RemoveChannel(e.Channel.Id); } Log.Logger.Debug("Channel Destroy: " + e.Channel.Id + " remuevo channel del callhandler"); }
private async void AriClientOnChannelDestroyed(object sender, ChannelDestroyedEvent e) { await _commandFactory.GetCommand(StasisStartEventType.RejectedCallFromUser).Execute(e.Channel, null); }
private void AriClient_OnChannelDestroyedEvent(IAriClient sender, ChannelDestroyedEvent e) { ChannelDestroyed?.Invoke(this, e); }