示例#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;
 }
示例#2
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);
        }
示例#3
0
        private static void Main()
        {
            TransportInfo localTransport = CreateTransport(Helpers.GetLocalIP(), 7242);

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

            InitKeyValueStore();
            SIPStack stack = CreateStack(_app, scscfIP, scscfPort);

            stack.Uri = new SIPURI(ServerURI);
            StartTimer();
            WebServer wb = new WebServer(_tree);

            wb.Start();
            Console.WriteLine("Press \'q\' to quit");
            while (Console.Read() != 'q')
            {
            }
        }
示例#4
0
 private static void Main()
 {
     TransportInfo localTransport = CreateTransport(Helpers.GetLocalIP(), 7242);
     _app = new SIPApp(localTransport);
     _app.RequestRecvEvent += AppRequestRecvEvent;
     _app.ResponseRecvEvent += AppResponseRecvEvent;
     const string scscfIP = "scscf.open-ims.test";
     const int scscfPort = 6060;
     InitKeyValueStore();
     SIPStack stack = CreateStack(_app, scscfIP, scscfPort);
     stack.Uri = new SIPURI(ServerURI);
     StartTimer();
     WebServer wb = new WebServer(_tree);
     wb.Start();
     Console.WriteLine("Press \'q\' to quit");
     while (Console.Read() != 'q')
     {
     }
 }