SipContext ParserContext_ParseCompleted(ParseCompletedEventArgs e, Datagram datagram) { var c = new SipContext(); _logger.Trace("Parse on parser context completed."); c.Request = e.Message as SipRequest; c.Response = e.Message as SipResponse; c.RemoteEndPoint = datagram.RemoteEndPoint; c.LocalEndPoint = datagram.LocalEndPoint; if (c.Request != null) _logger.Debug("Request Received '" + c.Request.RequestLine.Method + " " + c.Request.RequestLine.Uri.FormatToString() + "' from " + datagram.RemoteEndPoint); if (c.Response != null) _logger.Debug("Response Received '" + c.Response.StatusLine.StatusCode + " " + c.Response.StatusLine.ReasonPhrase + "' from " + datagram.RemoteEndPoint); return c; }
SipContext ParserContext_ParseCompleted(ParseCompletedEventArgs e, Datagram datagram) { var c = new SipContext(); _logger.Trace("Parse on parser context completed."); c.Request = e.Message as SipRequest; c.Response = e.Message as SipResponse; c.RemoteEndPoint = datagram.RemoteEndPoint; c.LocalEndPoint = datagram.LocalEndPoint; if (c.Request != null) { _logger.Debug("Request Received '" + c.Request.RequestLine.Method + " " + c.Request.RequestLine.Uri.FormatToString() + "' from " + datagram.RemoteEndPoint); } if (c.Response != null) { _logger.Debug("Response Received '" + c.Response.StatusLine.StatusCode + " " + c.Response.StatusLine.ReasonPhrase + "' from " + datagram.RemoteEndPoint); } return(c); }