Skip to content

Instantly share code, notes, and snippets.

@siniypin
Created January 16, 2016 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save siniypin/9c30a6d33c1734e77954 to your computer and use it in GitHub Desktop.
Save siniypin/9c30a6d33c1734e77954 to your computer and use it in GitHub Desktop.
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);
var action = e.RingOn ? "turn on" : "switch off";
var toneType = e.IsRingback ? "a ringback tone" : "a ring sound";
System.Console.WriteLine("========>>> {0} {1}", action, toneType);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment