Esempio n. 1
0
        internal static void TestMessageParser()
        {
            TSIP_Message message = TSIP_ParserMessage.Parse(Encoding.UTF8.GetBytes(SIP_MESSAGE), true);

            if (message != null)
            {
                TSK_Debug.Info("Request = {0}", message);
            }
        }
        private void TSIP_Transport_NetworkEvent(object sender, TNET_Transport.TransportEventArgs e)
        {
            if (e.Type != Doubango.tinyNET.TNET_Transport.TransportEventArgs.TransportEventTypes.Data)
            {
                return;
            }

            /* === SigComp === */

            TSIP_Message message = TSIP_ParserMessage.Parse(e.Data, true);

            if (message != null && message.FirstVia != null && message.CSeq != null && message.From != null && message.To != null)
            {
                this.HandleIncomingMessage(message);
            }
            else
            {
                TSK_Debug.Error("Failed to parse message from network");
            }
        }