Exemple #1
0
        private static SIPStack CreateStack(SIPApp app, string proxyIp = null, int proxyPort = -1)
        {
            SIPStack myStack = new SIPStack(app);

            if (proxyIp != null)
            {
                myStack.ProxyHost = proxyIp;
                myStack.ProxyPort = (proxyPort == -1) ? 5060 : proxyPort;
            }
            return(myStack);
        }
Exemple #2
0
        static void Main()
        {
            if (String.IsNullOrEmpty(_localIP))
            {
                _localIP = Helpers.GetLocalIP();
            }
            TransportInfo localTransport = CreateTransport(_localIP, LocalPort);

            _app = new SIPApp(localTransport);
            _app.RequestRecvEvent  += AppRequestRecvEvent;
            _app.ResponseRecvEvent += AppResponseRecvEvent;
            const string scscfIP   = "scscf.open-ims.test";
            const int    scscfPort = 6060;
            SIPStack     stack     = CreateStack(_app, scscfIP, scscfPort);

            stack.Uri = new SIPURI(ServerURI);
            PublishService(true, LocalPort);
            StartTimer();
            Console.ReadKey();
        }
Exemple #3
0
 private static SIPStack CreateStack(SIPApp app, string proxyIp = null, int proxyPort = -1)
 {
     SIPStack myStack = new SIPStack(app);
     if (proxyIp != null)
     {
         myStack.ProxyHost = proxyIp;
         myStack.ProxyPort = (proxyPort == -1) ? 5060 : proxyPort;
     }
     return myStack;
 }
Exemple #4
0
 static void Main()
 {
     if (String.IsNullOrEmpty(_localIP))
     {
         _localIP = Helpers.GetLocalIP();
     }
     TransportInfo localTransport = CreateTransport(_localIP, LocalPort);
     _app = new SIPApp(localTransport);
     _app.RequestRecvEvent += AppRequestRecvEvent;
     _app.ResponseRecvEvent += AppResponseRecvEvent;
     const string scscfIP = "scscf.open-ims.test";
     const int scscfPort = 6060;
     SIPStack stack = CreateStack(_app, scscfIP, scscfPort);
     stack.Uri = new SIPURI(ServerURI);
     PublishService(true, LocalPort);
     StartTimer();
     Console.ReadKey();
 }