2 posts / 0 new
Last post
Parth Kakadiya
Plantronics handle Active call (Javascript)
Hi, In my Angular project, I want to handle active call with the Plantronics.  Senario :
  1. I have active call with system speaker and microphone as a Audio i/o.
  2. I want to handle call with Plantronics Headset.
  3. I chose poly/plantronics as audio i/o during active call 
  4. I init plantronics during active call to handle call with plantronics. 
REST services not giving any callevent results. I have implemented code based on https://developer.plantronics.com/article/softphone-integration-code-samples for JavaScript. How can I handle Active call with plantronics headset.? Note: I init Plantronics script during active call. but not able to handle call with headset. Please provide information about handle active call. Plantronics Hub version :  3.24.1 (windows) Headset: Blackwire 3220  Thanks 

lcollins
Hi, You should find it possible to receive the callevent results. The results queue will be empty until there are some callevents, you need to continuously poll it at a suggested rate of 2000ms. Could I suggest you try this "live demo" of the API: https://pltdev.github.io/Plantronics%20JavaScript%20Sample.html Note, don't use Chrome version 98 or Edge 98, as it has a known issue. However, Chrome 99 is working. Once you run this app, it should connect to Hub REST API. Try clicking ring/incoming call - headset should ring. Press talk button on headset and you should see Call Events of AcceptCall and Call In Progress. If you turn on the Chrome Inspector (right click, Inspect) during this test and look at the Network tab, you can see the repeated calls to the Events and CallEvents queues. Here is an example response on the CallEvents queue request, that includes an Action of 1 which means AcceptCall (call was accepted on the headset): jQuery1720598496117916248_1646737900186({"Description":"Call Events","Result":[{"Action":32,"CallId":{"ConferenceId":0,"Id":2,"InConference":false},"CallSource":"Hello World JavaScript Plugin","DeviceEvent":3,"DialedKey":0},{"Action":1,"CallId":{"ConferenceId":0,"Id":2,"InConference":false},"CallSource":"Hello World JavaScript Plugin","DeviceEvent":3,"DialedKey":0},{"Action":6,"CallId":{"ConferenceId":0,"Id":2,"InConference":false},"CallSource":"Hello World JavaScript Plugin","DeviceEvent":3,"DialedKey":0}],"Type":10,"Type_Name":"CallStateArray","isError":false} ) For a full list of Action numbers and their meanings, see below: [Guid("EA5CF474-7B60-3C13-B8DE-4D171CD24DE7")] public enum CallState { CallState_Unknown = 0, CallState_AcceptCall = 1, CallState_TerminateCall = 2, CallState_HoldCall = 3, CallState_Resumecall = 4, CallState_Flash = 5, CallState_CallInProgress = 6, CallState_CallRinging = 7, CallState_CallEnded = 8, CallState_TransferToHeadSet = 9, CallState_TransferToSpeaker = 10, CallState_MuteON = 11, CallState_MuteOFF = 12, CallState_MobileCallRinging = 13, CallState_MobileCallInProgress = 14, CallState_MobileCallEnded = 15, CallState_Don = 16, CallState_Doff = 17, CallState_CallIdle = 18, CallState_Play = 19, CallState_Pause = 20, CallState_Stop = 21, CallState_DTMFKey = 22, CallState_RejectCall = 23, CallState_Hook = 24, CallState_HookIdle = 25, CallState_HookDocked = 26, CallState_HookUndocked = 27, CallState_BaseEvent = 28, CallState_AnsweredAndEnded = 29, CallState_UnansweredAndEnded = 30, CallState_DeviceChange = 31, CallState_DeviceArrived = 32, CallState_MakeCall = 33 }

Add new comment