Updated on 2023-09-27 GMT+08:00

Release Event Callback API

Scenario

This API is invoked to push a call release event.

Method

POST

URL

Defined by a third-party system.

The voice notification callback URL can be configured in either of the following methods:

  • Configuration on the GUI: A tenant administrator can choose Configuration Center > Expansion Management > Voice Notification and set Hang-up Callback URL under VOICE NOTIFICATION CALLBACK CONFIGURATION.
  • Configuration using the API for creating a voice notification: Pass the request parameter callBackUrl when invoking the API for creating a voice notification.

Request Description

  • Request header parameters

    None

  • Request body parameters

    No.

    Parameter

    Type

    Mandatory or Not

    Description

    1

    callSerialNo

    String

    Yes

    Call SN.

    Length limit: string (50)

    2

    called

    String

    Yes

    Called number.

    3

    signature

    String

    No

    Signature.

    This parameter is mandatory when the callback URL is passed using the API for creating a voice notification and Shared Key is configured on the Callback Url Configuration page.

    4

    timestamp

    String

    No

    Timestamp.

    This parameter is mandatory when the callback URL is passed using the API for creating a voice notification and Shared Key is configured on the Callback Url Configuration page.

    5

    nonce

    String

    No

    Random number.

    This parameter is mandatory when the callback URL is passed using the API for creating a voice notification and Shared Key is configured on the Callback Url Configuration page.

    6

    callerPresent

    String

    No

    CLIP number of the calling party.

    7

    createCallTime

    String

    No

    Time when a call is initiated, for example, 2022/02/17,13:10:06:836.

    8

    alertingTime

    String

    No

    Ringing time of the user's phone.

    9

    talkingTime

    String

    No

    Call connection time.

    10

    releaseTime

    String

    No

    Call release time.

    11

    talkDuration

    String

    No

    Call duration.

    12

    recordfile

    String

    No

    Path to the voice recording file.

    13

    locationId

    String

    No

    Voice recording node.

    14

    releaseReason

    String

    No

    Call release cause code. The options are as follows:

    0: The called party releases the call after the call is connected.

    1: After the call is connected, the system automatically releases the call when the voice notification is finished.

    4: The called party rejects the call or does not answer the call within the specified period after ringing.

    6: The call fails before ringing.

    8: No resource is available.

    9: The ACD times out.

    10: The call is restricted.

    999: The UAP fails to initiate a recording conference.

Response Description

Response code: 200

  • Response message

    No.

    Parameter

    Type

    Mandatory or Not

    Description

    1

    retCode

    String

    Yes

    Result code. The value 0 indicates success, and other values indicates failure.

    2

    retMsg

    String

    Yes

    Failure cause.

Example

Request parameters:

{
  alertingTime=2022/02/22,10:04:29:004, 
  callSerialNo=1197765398201387012, 
  called=88880067, 
  callerPresent=960003, 
  createCallTime=2022/02/22,10:04:28:823, 
  locationId=0, 
  nonce=-1482421808053124529, 
  recordfile=Y:/2/mobileAgent/20220222/1645524268-824.wav, 
  releaseReason=0, 
  releaseTime=2022/02/22,10:04:36:318, 
  signature=+lk************************50=, 
  talkDuration=0, 
  talkingTime=2022/02/22,10:04:30:418, 
  timestamp=1645524163326
 }

Response parameters:

{ 
    "retCode": "0",
    "retMsg": "success"
}