Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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);
        }