[EVENT]
A Call's State Changes
A call_new_state
event occurs any time the state of a call is changed - for example, when it is answered, or when it ends. This event contains information about the call, the operator responsible for the call at the time, the new state, and assorted other relevant details. If the call has ended, this event will also list a code and description for the reason it ended.
Code | State | Description |
---|---|---|
20 | ccRinging | The call has been assigned to an operator, and is currently ringing. |
30 | ccMissedCall | The call was missed (not answered in allotted time). |
50 | ccInCall | The call has been answered, and the caller and operator are currently connected. |
60 | ccCallerOnHold | The call has been placed on hold by the operator. This also occurs automatically if the operator activates the enquiry call menu. |
70 | ccEnquiryStarting | The operator has raised an enquiry call, but it has not yet been answered. |
80 | ccInEnquiry | The operator has raised an enquiry call, which has been answered. |
85 | ccCallerHungUpButStillInEnquiry | The operator has raised an enquiry call, but the caller has hung up which the enquiry is ongoing. |
90 | ccEnquiryAndCallerOnHold | The enquiry call has been answered, and the enquiree is now on-hold. This typically occurs before the call is either patched (connecting the enquiree and the caller) or turned into a three-way conversation between the operator, enquiree, and caller. |
100 | cc3Way | The operator raised an enquiry call that was answered. They then initiated a three-way call between themselves, the caller, and the recipient of the enquiry. |
120 | ccPatched | The call has been redirected to another operator. Usually, another event will accompany this one to say that the call to the original operator has ended (code 200). |
200 | ccCallEnded | The call has ended. |
Code | State | Description |
---|---|---|
300 | ccOutdialSessionStarted | An outdialler session has begun, in readiness for the call to begin. |
301 | ccOutdialSessionRinging | The call has been assigned to an operator, and is currently ringing that operator. |
305 | ccOutdialCallRinging | The call has been assigned to an operator, who has picked it up, and is currently ringing the intended number. |
50 | ccInCall | The outbound call has been answered, and the call target and operator are currently connected. |
310 | ccOutdialTargetOnHold | The call has been placed on hold by the operator. This also occurs automatically if the operator activates the enquiry call menu. |
311 | ccOutdialMakingEnquiry | The operator has raised an enquiry call, but it has not yet been answered. |
313 | ccOutdialPatched | The call has been redirected to another operator. |
314 | ccOutdial3Way | The operator raised an enquiry call that was answered. They then initiated a three-way call between themselves, the caller, and the recipient of the enquiry. |
316 | ccOutdialInEnquiry | The operator has raised an enquiry call, which has been answered. |
200 | ccCallEnded | The call has ended. |
502 | ccOpqOutdialTargetProgress | The call has been answered by the operator, and the system is currently establishing a call to the target number. |
Code | Reason | Further Details |
---|---|---|
1 | No answer. | The operator did not answer the call and their max ring time was reached. |
2 | Failed. | The call to the operator failed, with the cause code given in another variable. Most commonly, this is when the operator is engaged. This isn’t actually sent to the operator, as no call has been established to them at this point. |
3 | Plucked away. | The call to the operator has stopped because someone else has remotely picked up (plucked) the call. |
4 | Rejected by operator. | When prompted to accept the call (e.g. by a whisper prompt), the operator rejected it. |
5 | Not accepted. | When prompted to accept the call, the operator either did not respond or hung up. |
6 | Maximum queue time reached. | The call to the operator was aborted because the caller had been in the queue too long (you have to configure the queue for this; by default, it gives each operator their full ring time). |
7 | Caller exited queue by DTMF. | The call to the operator ended as the caller pressed a DTMF digit that was valid for exiting the queue. This includes the use of 5 to choose a queued call-back. |
8 | Call was answered by someone else (when broadcasting). | |
9 | Rejected by signal. | The operator being called rejected the call by clicking the hang-up button. |
11 | Caller hung up. | The caller ended the call before the operator answered. |
12 | Call to target failed. | |
13 | Operator hung up before the target call was answered. |
Code | Reason | Description |
---|---|---|
20 | Call parked. | The call to the operator has ended, but the caller is on hold. |
21 | Passed back into the IVR. | The operator had invoked a yoyo-IVR option. |
22 | Patched. | The call to the current operator has ended due to the call being patched through to someone else. |
23 | Max time in conversation. | The call has reached its maximum permitted duration, either causing the call to end or (for some service types) requiring further payment from the caller. |
24 | Operator pressed 5. | There is a feature that allows the call to end if the operator presses DTMF 5. This is used in situations where an outbound call to a landline has been hung up, but the system might not have detected that fact. |
25 | Operator pressed the hang-up button. | This code will also occur if the operator selects End call #1 from their call log, ending the call. |
26 | Caller (or called party) hung up. | The clearing code, if any, can be provided. |
27 | Operator hung up. | The clearing code, if any, can also be provided. |
Code | Reason | Description |
---|---|---|
30 | No reason specified. | This might happen if the call ends unexpectedly, or if the telephony server ends the call for some other reason, such as the customer running out of credit. |
Parameters
operator_id | number |
The unique number associated with the operator currently responsible for the call. Calls may simultaneously have multiple states if there is more than one operator involved. For example, if a call is allocated to one operator, but they have initiated an enquiry call to another operator, a separate |
operator_call_end_reason_code | number | If the call has ended, this code indicates the reason why. |
operator_call_end_reason_text | string | A short description of why the call ended, as dictated by operator_call_end_reason_code . |
call_id | number |
The unique number allocated to the call by TelXL. |
new_state | number | A number representing the call state. |
status_text | string | A short message associated with the new_state , describing that state in human-readable terms. |
recording_audio | object |
Details relating to any audio recording of the call. Refer to The recording_audio Object for details. |
The recording_audio
Object
recording_audio_status | number |
1 if recording 0 if not recording |
recording_audio_status_desc | string |
"In progress" if recording "Not recording" otherwise |
recording_audio_control | number |
1 When control is allowed 0 When control is not allowed |
recording_audio_control_desc | string |
Corresponds with Can be "Allowed" or "Not allowed". |
recording_audio_suspended | number |
1 if suspended (only applicable to calls with recording in progress, where control is allowed) 0 otherwise |
recording_audio_suspended_desc | string |
Corresponds with Either "Suspended", or an empty string if not suspended. |
recording_audio_highlighted | number |
1 if the call is highlighted (which can only be done if it is being recorded) 0 otherwise |
recording_audio_highlighted_desc | string |
Corresponds with Either "Highlighted", or an empty string if not highlighted. |
recording_audio_last_message | string | A description of what caused this event, such as "Started recording", "Resumed", and similar. |
Example Response
{"event":{"event_type":"call_new_state","operator_id":5577,"operator_call_end_reason_code":27,"operator_call_end_reason_text":"Operator hung up","call_id":105395,"new_state":200,"status_text":"Operator hung up at 11:24:31","recording_audio":{"recording_audio_status":0,"recording_audio_status_desc":"Not recording","recording_audio_control":1,"recording_audio_control_desc":"Allowed","recording_audio_suspended":0,"recording_audio_suspended_desc":"","recording_audio_highlighted":0,"recording_audio_highlighted_desc":"","recording_audio_last_message":"Not being recorded (cannot resume)"}}}