static void Main(string[] args) { MinisipModule.setupDefaultSignalHandling(); Console.WriteLine("MiniSIP C# GUI ... welcome!"); MyGui gui = new MyGui(); GuiRef guiref = new GuiRef(gui); GC.SuppressFinalize(gui); ThreadStart job = new ThreadStart(gui.run); Thread thread = new Thread(job); thread.Start(); int length; SWIGTYPE_p_p_char argv = getArgv(args, out length); MinisipMain sip = new MinisipMain(guiref, length, argv); if (sip.startSip() <= 0) { return; } Console.WriteLine("SIP started"); // CommandString register; // register = new CommandString("", SipCommandString.proxy_register); // register.setKey("proxy_domain", "fowley.hem.za.org"); // cb.handleCommand("sip", register); // gui.sendInvite("sip:xxx@yyy"); //gui.run(); Console.WriteLine("<<< Press ENTER to quit >>>"); Console.ReadLine(); gui.stopStreams(); gui.stop(); thread.Join(); sip.exit(); Console.WriteLine("Bye"); return; }
static void Main(string[] args) { MinisipModule.setupDefaultSignalHandling(); Console.WriteLine("MiniSIP C# GUI ... welcome!"); MyGui gui = new MyGui(); GuiRef guiref = new GuiRef(gui); GC.SuppressFinalize(gui); ThreadStart job = new ThreadStart( gui.run ); Thread thread = new Thread( job ); thread.Start(); int length; SWIGTYPE_p_p_char argv = getArgv(args, out length); MinisipMain sip = new MinisipMain(guiref, length, argv); if( sip.startSip() <= 0 ){ return; } Console.WriteLine("SIP started"); // CommandString register; // register = new CommandString("", SipCommandString.proxy_register); // register.setKey("proxy_domain", "fowley.hem.za.org"); // cb.handleCommand("sip", register); // gui.sendInvite("sip:xxx@yyy"); //gui.run(); Console.WriteLine("<<< Press ENTER to quit >>>"); Console.ReadLine(); gui.stopStreams(); gui.stop(); thread.Join(); sip.exit(); Console.WriteLine("Bye"); return; }