/// <summary> /// Answer a call using OpalCmdAnswerCall via OpalSendMessage() /// <param name="callToken">Call token for call being answered.</param> public bool AnswerCall(string callToken) { OpalMessageRef message = new OpalMessageRef(Opal_API.OpalMessageType.OpalCmdAnswerCall); OpalMessageRef response = new OpalMessageRef(); message.SetCallToken(callToken); return SendMessage(message, response); }
static int DoHold() { // Example cmd line: hold [email protected] OpalMessageRef command = new OpalMessageRef(); OpalMessageRef response; Console.WriteLine("Hold"); command.SetMessageType(Opal_API.OpalMessageType.OpalCmdHoldCall); command.SetCallToken(currentCallToken); if ((response = MySendCommand(command, "Could not hold call")) == null) return 0; heldCallToken = currentCallToken; currentCallToken = null; return 1; }