This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void Main(string[] args) | |
{ | |
//Initialization skipped | |
ua.CallManager.IncomingCall += CallManager_IncomingCall; | |
ua.CallManager.Ring += CallManager_Ring; | |
//Loop is skipped | |
static void CallManager_Ring(object sender, RingEventArgs e) | |
{ | |
System.Console.WriteLine("Call {0} ring event.", e.CallId); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void ua_Log(object sender, LogEventArgs e) | |
{ | |
if (e.Data.Contains("TCP transport destroyed with reason 70016: End of file (PJ_EEOF)")) | |
{ | |
System.Console.WriteLine("SNAP, SERVER WENT DOWN"); | |
ua.AccountManager.Accounts.All(x => x.Unregister()); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ChatControl | |
{ | |
private void client_LoginStateChanged(object sender, EventArgs e) | |
{ | |
if (client.LoginState == LoginStateEnum.Logon) | |
client.Messanger.IncomingMessage += Messanger_IncomingMessage; | |
if ((client.LoginState == LoginStateEnum.Logoff || client.LoginState == LoginStateEnum.LoginError) | |
&& client.Messanger != null) | |
client.Messanger.IncomingMessage -= Messanger_IncomingMessage; | |
} |
OlderNewer