public void SendRequest(SIPRequest sipRequest)
        {
            SIPEndPoint dstEndPoint =
                m_sipTransport.GetRequestEndPoint(sipRequest, OutboundProxy, true).GetSIPEndPoint();

            if (dstEndPoint != null)
            {
                FireTransactionTraceMessage("Send Request " + LocalSIPEndPoint.ToString() + "->" +
                                            dstEndPoint.ToString() + m_crLF + sipRequest.ToString());

                if (sipRequest.Method == SIPMethodsEnum.ACK)
                {
                    m_ackRequest           = sipRequest;
                    m_ackRequestIPEndPoint = dstEndPoint;
                }
                else
                {
                    RemoteEndPoint = dstEndPoint;
                }

                m_sipTransport.SendRequest(dstEndPoint, sipRequest);
            }
            else
            {
                throw new ApplicationException(
                          "Could not send Transaction Request as request end point could not be determined.\r\n" +
                          sipRequest.ToString());
            }
        }
        public void GotRequest(SIPEndPoint localSIPEndPoint, SIPEndPoint remoteEndPoint, SIPRequest sipRequest)
        {
            FireTransactionTraceMessage("Received Request " + localSIPEndPoint.ToString() + "<-" +
                                        remoteEndPoint.ToString() + m_crLF + sipRequest.ToString());

            TransactionRequestReceived?.Invoke(localSIPEndPoint, remoteEndPoint, this, sipRequest);
        }
        public void SendRequest(SIPEndPoint dstEndPoint, SIPRequest sipRequest)
        {
            FireTransactionTraceMessage("Send Request " + LocalSIPEndPoint.ToString() + "->" + dstEndPoint + m_crLF +
                                        sipRequest.ToString());

            if (sipRequest.Method == SIPMethodsEnum.ACK)
            {
                m_ackRequest           = sipRequest;
                m_ackRequestIPEndPoint = dstEndPoint;
            }

            m_sipTransport.SendRequest(dstEndPoint, sipRequest);
        }
Esempio n. 4
0
 void transport_SIPRequestInTraceEvent(SIPEndPoint localEndPoint, SIPEndPoint fromEndPoint, SIPRequest sipRequest)
 {
     Console.WriteLine("Request In: " + localEndPoint + "<-" + fromEndPoint.ToString() + "\n" + sipRequest.ToString());
 }
Esempio n. 5
0
 void transport_SIPRequestOutTraceEvent(SIPEndPoint localEndPoint, SIPEndPoint toEndPoint, SIPRequest sipRequest)
 {
     Console.WriteLine("Request Out: " + localEndPoint + "->" + toEndPoint.ToString() + "\n" + sipRequest.ToString());
 }