public async Task OnConnected(InboundCall connectedInfo, IChannel channel) { InboundCall = connectedInfo; Channel = channel; await ResumeAsync(); await MyEventsAsync(); await DivertEventsAsync(true); await PreHandleAsync(); await AnswerAsync(); await HandleAsync(); }
public override async void ChannelActive(IChannelHandlerContext context) { var channel = context.Channel; _logger.Debug("received a new connection from freeswitch {0}. Sending a connect command...", channel.RemoteAddress); var connectCommand = new ConnectCommand(); var reply = await SendCommandAsync(connectCommand, channel); if (!reply.IsOk) { return; } var connectedCall = new InboundCall(new EslEvent(reply.Response, true)); await _inboundListener.OnConnected(connectedCall, channel); }