Updated on 2023-03-23 GMT+08:00

Call End Notification

Notification Description

A notification is sent when the call ends and its information is returned.

Method Definition

1
- (void)onCallEnded:(HWMCallRecordInfo *)callInfo;

Precautions

  1. Set the HWMCallNotifyHandler proxy during SDK initialization or set the proxy on the target page.

Parameter Description

Table 1 Parameter description

Parameter

Type

Description

callInfo

HWMCallRecordInfo

Call information.

Table 2 HWMCallRecordInfo parameters

Parameter

Type

Description

callType

HWMCallMediaType

Call type.

srtp

BOOL

Whether to encrypt the data.

displayName

NSString

Name of the calling party.

telNum

NSString

Calling number of the incoming call or called number of the outgoing call.

startTime

NSTimeInterval

Start time of a call.

callSuccess

BOOL

Whether the call is connected.

reasonCode

NSUInteger

Failure cause code.

reasonText

NSString

Call end reason.

callRingBack

BOOL

Whether the call is a callback.

callOut

BOOL

Whether the call is an outgoing call.

duration

NSTimeInterval

Call duration.

state

HWMCallEndReason

State corresponding to a call end or error.

Table 3 Enumerated values of HWMCallMediaType

Enumerated Value

Description

HWMCallMediaTypeAudio

Voice call.

HWMCallMediaTypeVideo

Video call.

Table 4 Enumerated values of HWMCallEndReason

Enumerated Value

Description

HWM_CALL_END_REASON_INVALID

The call is invalid.

HWM_CALL_END_REASON_CONNECTED_HANGUP_BY_CALLER

The calling party hangs up the call (the call is connected).

HWM_CALL_END_REASON_CONNECTED_HANGUP_BY_CALLEE

The called party hangs up the call (the call is connected).

HWM_CALL_END_REASON_HANGUP_BY_CALLER

The calling party hangs up the call (the call is not connected).

HWM_CALL_END_REASON_HANGUP_BY_CALLEE

The called party hangs up the call (the call is not connected).

HWM_CALL_END_REASON_CALLEE_BUSY

The called party is busy (the call is not connected).

HWM_CALL_END_REASON_CALLEE_ANSWER_TIMEOUT

The called party does not answer the call within the specified period (the call is not connected).

HWM_CALL_END_REASON_FAILED

The call fails.