Subscribing to Call End Notifications
Function
A notification is sent when a call ends. The call record information is returned.
Function Prototype
setOnCallEndedNotifyCB(onCallEndedNotify: (callRecordInfo: CallRecordInfo) => void): voidsetOnCallEndedNotifyCB(onCallEndedNotify: (callRecordInfo: CallRecordInfo) => void): void
Request Parameters
Parameter | Mandatory | Type | Description |
---|---|---|---|
onCallEndedNotify | Y | (callRecordInfo: CallRecordInfo) => void | Notification sent when a call ends. The call record information is returned. |
Return Values
void
Notification Method Parameters
(callRecordInfo: CallRecordInfo) => void
Parameter | Type | Description |
---|---|---|
callRecordInfo | CallRecordInfo | Call record information. |
Parameter | Type | Description |
---|---|---|
callInfo | CallInfo | Call information. |
reason | CallEndReason | Call end reason. |
Parameter | Type | Description |
---|---|---|
mediaType | MediaType | Media type. |
number | string | Number of the other participant. |
nickName | string | Name of the other participant. |
startTime | string | Start time of the call. |
endTime | string | End time of the call. This field is left blank before the call ends. |
isCallOut | boolean | Whether the call is an outgoing call. |
Enumeration Name | Enumerated Value | Description |
---|---|---|
HWM_MEDIA_TYPE_AUDIO | 0 | Audio. |
HWM_MEDIA_TYPE_VIDEO | 1 | Video. |
Enumeration Name | Enumerated Value | Description |
---|---|---|
HWM_CALL_END_REASON_CONNECTED_HANGUP_BY_CALLER | 1 | The caller hangs up the call (the call is connected). |
HWM_CALL_END_REASON_CONNECTED_HANGUP_BY_CALLEE | 2 | The called participant hangs up the call (the call is connected). |
HWM_CALL_END_REASON_HANGUP_BY_CALLER | 3 | The caller hangs up the call (the call is not connected). |
HWM_CALL_END_REASON_HANGUP_BY_CALLEE | 4 | The called participant hangs up the call (the call is not connected). |
HWM_CALL_END_REASON_CALLEE_BUSY | 5 | The called participant is in a call (the call is not connected). |
HWM_CALL_END_REASON_CALLEE_ANSWER_TIMEOUT | 6 | The called participant does not answer the call (the call is not connected). |
HWM_CALL_END_REASON_CALLEE_NUMBER_ERROR | 7 | The called number is incorrect (the call is not connected). |
HWM_CALL_END_REASON_FAILED | 8 | The call fails. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot