private static void OnHangup(SIPDialogue dialogue) { if (dialogue != null) { string callID = dialogue.CallId; userAgent.Close(); } }