Ejemplo n.º 1
0
 /// <summary>
 /// Informs Spokes that user has resumed a softphone call that was previously on hold,
 /// for example with a softphone GUI.
 /// </summary>
 /// <param name="callid">The unique numeric id that defines which softphone call you want to end.</param>
 /// <returns>Boolean indicating if the command was called succesfully or not.</returns>
 public bool ResumeCall(int callid)
 {
     bool success = false;
     try
     {
         if (m_comSession != null)
         {
             CallCOM call = new CallCOM(); // { Id = callid };
             call.SetId(callid);
             m_comSession.GetCallCommand().ResumeCall(call);
             success = true;
         }
     }
     catch (Exception) { success = false; }
     return success;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Allows your softphone application to inform Plantronics device about an outgoing call. Note: will automatically open audio/rf link to wireless device.
        /// </summary>
        /// <param name="callid">A unique numeric identifier for the call that your application and Spokes will use to identify it as.</param>
        /// <param name="contactname">Optional caller's contact name that will display on Plantronics display devices, e.g. Calisto P800 and P240 devices.</param>
        /// <returns>Boolean indicating if command was issued successfully or not.</returns>
        public bool OutgoingCall(int callid, string contactname = "")
        {
            bool success = false;
            try
            {
                if (m_comSession != null)
                {
                    ContactCOM contact = new ContactCOM();
                    contact.SetName(contactname);
                    CallCOM call = new CallCOM();
                    call.SetId(callid);

                    m_comSession.GetCallCommand().OutgoingCall(call, contact, CallAudioRoute.AudioRoute_ToHeadset);
                    ConnectAudioLinkToDevice(true);
                    success = true;
                }
            }
            catch (Exception) { success = false; }
            return success;
        }