Developer Documentation Developer Documentation
Help Center (opens new window)
Help Center (opens new window)
  • Call Center V6

  • Telemarketing Center

    • API Function Specification
    • Basic Management API
    • Data Service API
    • Call Capability (https)
    • Call Capability (JS-SDK)
    • Call Capability (UI Phone Bar)
    • Call Event (TS)
      • Call Capability (Android-SDK)
      • Call Capability (iOS-SDK)
    • Voice Product API
    • Telemarketing Center
    Sobot
    2022-09-13
    Menus

    Call Event (TS)

    # Call Event (TS)

    # Message Format

    # ● Public Field of All Events
    Field Field name Field example description
    messageID Event type Any of all the event types described in this section
    creationTime Event time 1641361630895 (unix millisecond timestamp)
    companyId Tenant ID 30f80aa47cde4b10bd89484aeab63691 (tenant Id)
    referenceID Request S/N Which request generated the event
    attachedData Attached data carried by the event {"orderID":"ef3ed1a8d50558389a21300c70f21694"}
    # ● Public Field of Traffic Events
    Field Field name Field example description
    callID Traffic ID 4dce61ec399644029fab7e8251da9bf1332
    partyID Talk channel ID 123e45670e89bN12d33a456L426655440000
    callType Call type Inbound; Outbound; Internal; Consult
    partyRole Talk channel party role Customer; Agent; VirtualAgent; Supervisor; ThirdPSTN
    ANI PSTN initiator 13912345678 (PSTN initiator, blank when it is non-PSTN)
    DNIS PSTN receiver 40012345678 (PSTN receiver, blank when it is non-PSTN)
    # ● Public Field of Agent Events
    Field Field name Field example description
    agentID Agent work no. 1001 agent work no.
    agentUUID Agent's unique ID 2631394bbea55c23ae06dbe9c0a23db4 (the unique ID generated when the agent is created, unchangeable)
    thisDN Telepone no. used by agent 1001 (extension) or 13912345678 (cell phone)

    # Traffic Related

    In CTI, the call status is mainly a finite state machine that participates in the terminal Party. Party has 5 status: IDLE, Dialing, Ringing, Talk, and Held, which are shown in the figure below:
    Party state machine

    # ● Make Phone Calls
    # 1. Sequence diagram

    Sequence diagram of making phone calls

    # 2.EventDialing
    • Body
    
    {
    
    "messageID": "EventDialing",
    
    "referenceID": 123456,
    
    "callID": "4dce61ec399644029fab7e8251da9bf1332", // Current talk's unique UUID.
    
    "partyID": "4dce61ec399644029fab7e8251da9bf1332", // Current Party's unique UUID.
    
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    
    "partyRole": "Agent", // Unknown(0),Customer(1),Agent(2)
    
    "thisDN": "A", // In the agent outbound scenario, agent extension 1001
    
    "thisDNRole": "Origination", // Origination(1),Destination(2),TransferBy(3),TransferTo(4),
    
    "otherDN": "B", // In the agent outbound scenario, customer's phone no. 13988886666
    
    "otherDNRole": "Destination", // Origination(1),Destination(2),TransferBy(3),TransferTo(4),
    
    "callType": "Outbound",
    
    "makeCallType":"Regular",  // Regular(1): Regular operation; DirectAgent(2): Agent directly dials on the hardphone
    
    "ANI": "01088886666", // Optional, required when passing PSTN; ANI is the initiator of PSTN
    
    "DNIS": "13988886666", // Optional, required when passing PSTN; DNIS is the receiver of PSTN, such as customer's phone no.
    
    "attachedData": { "campaignID": "123","contactSN":"456"}, // The attached data brought by business, which can be obtained in the events of a call
    
    "creationTime":  1637128329720 ,
    
    }
    
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    # 3.EventRinging
    • Body
    
    {
    
    "messageID":"EventRinging",
    
    "referenceID":123456,
    
    "callID": "4dce61ec399644029fab7e8251da9bf1332", // Current talk's unique UUID.
    
    "partyID": "123e45670e89bN12d33a456L426655440000", // Current Party's unique UUID.
    
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    
    "partyRole": "Customer", // Customer(1),Agent(2)
    
    "thisDN": "B", // In the agent outbound scenario, customer's phone no. 13988886666
    
    "thisDNRole": "Destination", // Origination(1),Destination(2),TransferBy(3),TransferTo(4),
    
    "otherDN": "A", // In the agent outbound scenario, agent extension 1001
    
    "otherDNRole": "Origination", // Origination(1),Destination(2),TransferBy(3),TransferTo(4),
    
    "callType": "Outbound",
    
    "ANI": "01088886666", // Optional, required when passing PSTN; ANI is the initiator of PSTN
    
    "DNIS": "13988886666", // Optional, required when passing PSTN; DNIS is the receiver of PSTN, such as customer's phone no.
    
    "attachedData": {"campaignID": "123","contactSN":"456"}, // The attached data brought by business, which can be obtained in the events of a call
    
    "creationTime":  1637128329720 ,
    
    }
    
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    # 3.EventOtherRinging
    • Description: Notify the agent side, a customer's ringing event

    • Body

    
    {
    
    "messageID":"EventOtherRinging",
    
    "referenceID":123456,
    
    "callID": "4dce61ec399644029fab7e8251da9bf1332", // Current talk's unique UUID.
    
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    
    "partyRole": "Agent", // Customer(1),Agent(2)
    
    "thisDN": "A", // In the agent outbound scenario, agent extension 1001
    
    "otherDN": "B", // In the agent outbound scenario, customer's phone no. 13988886666
    
    "callType": "Outbound",
    
    "ANI": "01088886666", // Optional, required when passing PSTN; ANI is the initiator of PSTN
    
    "DNIS": "13988886666", // Optional, required when passing PSTN; DNIS is the receiver of PSTN, such as customer's phone no.
    
    "attachedData": {"campaignID": "123","contactSN":"456"}, // The attached data brought by business, which can be obtained in the events of a call
    
    "creationTime":  1637128329720 ,
    
    }
    
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    # ● Answer Calls
    # 1. EventEstablished caller
    • Body
    
    {
    
    "messageID":"EventEstablished",
    
    "referenceID": 123457,
    
    "callID": "4dce61ec399644029fab7e8251da9bf1332", // Current talk's unique UUID.
    
    "partyID": "4dce61ec399644029fab7e8251da9bf1332", // Current Party's unique UUID.
    
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    
    "partyRole": "Agent", // Customer(1),Agent(2)
    
    "thisDN": "A", // In the agent outbound scenario, agent extension 1001
    
    "otherDN": "B", // In the agent outbound scenario, customer's phone no. 13988886666
    
    "callType": "Outbound",
    
    "makeCallType":"Regular",  // Regular(1): Regular operation; DirectAgent(2): Agent directly dials on the hardphone
    
    "ANI": "01088886666", // ANI is the initiator of the PSTN, which is not fully guaranteed to be correct in the VOIP gateway, and may be a messy display
    
    "DNIS": "13988886666", // DNIS is the receiver of PSTN, such as customer's phone no.
    
    "attachedData": {"campaignID": "123","contactSN":"456"},
    
    "creationTime":  1637128329720 ,
    
    }
    
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    # 2. EventEstablished called
    • Body
    
    {
    
    "messageID":"EventEstablished",
    
    "callID": "4dce61ec399644029fab7e8251da9bf1332", // Current talk's unique UUID
    
    "partyID": "123e45670e89bN12d33a456L426655440000", // Current Party's unique UUID
    
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    
    "partyRole": "Customer", // Customer(1),Agent(2)
    
    "thisDN": "B", // In the agent outbound scenario, customer's phone no. 13988886666
    
    "otherDN": "A", // In the agent outbound scenario, agent extension 1001
    
    "callType": "Outbound",
    
    "ANI": "01088886666", // ANI is the initiator of the PSTN, which is not fully guaranteed to be correct in the VOIP gateway, and may be a messy display
    
    "DNIS": "13988886666", // DNIS is the receiver of PSTN, such as customer's phone no.
    
    "attachedData": { "campaignID": "123","contactSN":"456"},
    
    "creationTime":  1637128329720 ,
    
    }
    
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    # ● Hang up Calls
    # 1. EventReleased caller
    • Body
    
    {
    
    "messageID": "EventReleased",
    
    "referenceID": 123458,
    
    "callID": "4dce61ec399644029fab7e8251da9bf1332", // Current talk's unique UUID
    
    "partyID": "4dce61ec399644029fab7e8251da9bf1332", // Current Party's unique UUID
    
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    
    "partyRole": "Agent", // Customer(1),Agent(2)
    
    "thisDN": "A", // In the agent outbound scenario, agent extension 1001
    
    "otherDN": "B", // In the agent outbound scenario, customer's phone no. 13988886666
    
    "callType": "Outbound",
    
    "makeCallType":"Regular",  // Regular(1): Regular operation; DirectAgent(2): Agent directly dials on the hardphone
    
    "ANI": "01088886666", // ANI is the initiator of the PSTN, which is not fully guaranteed to be correct in the VOIP gateway, and may be a messy display
    
    "DNIS": "13988886666", // DNIS is the receiver of PSTN, such as customer's phone no.
    
    "attachedData": {"to_customer_ani":"","campaignID": "123","contactSN":"456","retries": 1}, // to_customer_ani Customer replay no.; campaignID Activity ID; contactSN retries Retry count
    
    "billsec": 100, // Billing duration, counted by seconds;
    
    "answersec": 100, // Answering duration, counted by seconds
    
    "startUepoch":  16371284166171234 , // Call start timestamp ms
    
    "progressUepoch":  16371284166171234 , // Call 180/182 ringing timestamp ms
    
    "answerUepoch":  16371284166171234 , // Call answering timestamp ms
    
    "bridgeUepoch":  16371284166171234 , // Call bridging timestamp ms
    
    "lastHoldUepoch":  16371284166171234 , // Call latest Hold timestamp ms
    
    "endUepoch": 16371284166171234 , // Call end timestamp ms
    
    "hangupCause": "BY_AGENT", // Hang up by agent: BY_AGENT  Hang up by system: BY_SYSTEM Others: Please refer to FS
    
    "earlyDetectCause": 105, // Early ring-back tone recognition result
    // 0: Unknown; 103: Out of service; 104: Not exist; 105: Downtime; 109: Subscriber busy;  115: No answer; 119: Line fault; 
    // If the call is answered, the early media before answering is generally 200: answered
    
    "hangupDisposition": "recv_bye", // Hangup direction Hang up by telephone: send_bye,send_cancel,send_refuse, Hang up by FreeSwitch: recv_bye,recv_cancel,recv_refuse   
    
    "creationTime":  1637128416617 ,
    
    "recordedEarlymedia": true // Whether early media recordings exist
    
    }
    
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    # 2. EventReleased called
    • Body
    
    {
    
    "messageID": "EventReleased",
    
    "callID": "4dce61ec399644029fab7e8251da9bf1332", // Current talk's unique UUID
    
    "partyID": "123e45670e89bN12d33a456L426655440000", // Current Party's unique UUID
    
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    
    "partyRole": "Customer", // Customer(1),Agent(2)
    
    "thisDN": "B", // In the agent outbound scenario, customer's phone no. 13988886666
    
    "otherDN": "A", // In the agent outbound scenario, agent extension 1001
    
    "callType": "Outbound",
    
    "ANI": "01088886666", // ANI is the initiator of the PSTN, which is not fully guaranteed to be correct in the VOIP gateway, and may be a messy display
    
    "DNIS": "13988886666", // DNIS is the receiver of PSTN, such as customer's phone no.
    
    "wrapUpDuration": 60, // Post-call summary duration, 0 by default. Only the agent call assigned from the queue has a value
    
    "attachedData": {"gender":0,"emotion_status":1,"campaignID": "123","contactSN":"456","answerBusinessCode":"123","hangupBusinessCode":"123"},
    
    "hangupCause": "BY_AGENT", // Hang up by agent: BY_AGENT  Hang up by system: BY_SYSTEM Others: Please refer to FS
    
    "earlyDetectCause": 105, // Early ring-back tone recognition result
    // 0: Unknown; 103: Out of service; 104: Not exist; 105: Downtime; 109: Subscriber busy;  115: No answer; 119: Line fault; 
    // If the call is answered, the early media before answering is generally 200: answered
    
    
    "hangupDisposition": "recv_bye", // Hangup direction Hang up by telephone: send_bye,send_cancel,send_refuse, Hang up by FreeSwitch: recv_bye,recv_cancel,recv_refuse   
    
    "billsec": 0, // Billing duration, counted by seconds
    
    "answersec": 100, // Answering duration, counted by seconds
    
    "startUepoch":  16371284166171234 , // Call start timestamp ms
    
    "progressUepoch":  16371284166171234 , // Call 180/182 ringing timestamp ms
    
    "answerUepoch":  16371284166171234 , // Call answering timestamp ms
    
    "bridgeUepoch":  16371284166171234 , // Call bridging timestamp ms
    
    "lastHoldUepoch":  16371284166171234 , // Call latest Hold timestamp ms
    
    "endUepoch": 16371284166171234 , // Call end timestamp ms
    
    "creationTime":  1637128416617 
    
    }
    
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    # ● Increase Attached Data
    # 1.EventAttachedDataChanged
    • Description: notify attachedData changed event

    • Body

    
    {
        "messageID":"EventAttachedDataChanged",
        "referenceID":200500, 
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "thisDN": "C",                               // Add UserData to the call
        "callType": "Inbound",
        "ANI": "01088886666",                // ANI is the initiator of the PSTN, which is not fully guaranteed to be correct in the VOIP gateway, and may be a messy display
        "DNIS": "18618256606",               // DNIS is the receiver of PSTN, such as customer's phone no.
        "attachedData":  { "orderID": "123", "customerID": "123","policyID": "567","_key1": "123", "_key2": "123","_key3": "567"},     // Include all bot output params
        "creationTime":  1637128416617
    }
    
    
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    # ● Single Step Transfer
    # 1. Sequence diagram

    Sequence diagram of single step transfer

    # 2.EventReleased
    • Description: After B single transfer, notify B EventReleased
    • Body
    
    {
        "messageID":"EventReleased",
        "referenceID":12346,                
        "callID": "4dce61ec399644029fab7e8251da9bf1332",                                 // Current talk's unique UUID
        "partyID": "4dce61ec399644029fab7e8251da9bf1332",      // Current Party's unique UUID
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole":  "Agent",                                       // Customer (1), Agent (2)
        "thisDN": "B",                                         // Agent B
        "otherDN": "A",                                        // Customer A
        "thirdDN": "C",                                        // Phone number of the transferring party
        "thirdDNRole": "TransferTo",                           // - TransferTo(13): Transferred
        "callState":"Transferred",
        "callType": "Outbound",
        "attachedData":  {"orderID":"123","customerID":"123","policyID":"567"},          // The attached data brought by business, which can be obtained in the events of a call
        "creationTime":  1637128416617 ,
    }
    
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    # 3.EventRinging
    • Description: After single transfer, notify C EventRinging
    • Body
    
    {
        "messageID":"EventRinging",
        "referenceID":0,                
        "callID": "4dce61ec399644029fab7e8251da9bf1332",                                 // Current talk's unique UUID
        "partyID": "4dce61ec399644029fab7e8251da9bf1332",      // Current Party's unique UUID
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole":  "Agent",                                       // Customer (1), Agent (2)
        "thisDN": "C",                                         // Agent C
        "otherDN": "A",                                        // Customer A
        "thirdDN": "B",                                        // Phone number B of the transferring party
        "thirdDNRole": "TransferBy",                           // - TransferBy(8): Transfer initiator
        "callType": "Outbound",
        "attachedData":  {"orderID":"123","customerID":"123","policyID":"567"},          // The attached data brought by business, which can be obtained in the events of a call
        "creationTime":  1637128416617 ,
    }
    
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    # 4.EventEstablished
    • Description: notify C EventEstablished
    • Body
    
    {
        "messageID":"EventEstablished",
        "referenceID":0,                
        "callID": "4dce61ec399644029fab7e8251da9bf1332",                                 // Current talk's unique UUID
        "partyID": "4dce61ec399644029fab7e8251da9bf1332",      // Current Party's unique UUID
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole":  "Agent",                                       // Unknown(0),Customer(1)
        "thisDN": "C",                                         // Transferred agent C
        "otherDN": "A",                                        // Customer's phone number after transfer
        "callType": "Outbound",
        "attachedData":  {"orderID":"123","customerID":"123","policyID":"567"},          // The attached data brought by business, which can be obtained in the events of a call
        "creationTime":  1637128416617 ,
    }
    
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    # ● Hold Calls
    # 1. Sequence diagram

    Sequence diagram of holding calls

    # 2.EventHeld
    • Body
    {
        "messageID": "EventHeld",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  // Current Party's unique UUID
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole":  "Agent",                // Customer(1),Agent(2)
        "thisDN": "B",                                         // Hold initiator
        "callType": "Outbound",
        "ANI": "01088886666",                                  // ANI is the initiator of the PSTN, which is not fully guaranteed to be correct in the VOIP gateway, and may be a messy display
        "DNIS": "18618256606",                                 // DNIS is the receiver of PSTN, such as customer's phone no.
        "attachedData": {"orderID":"123","customerID":"123","policyID":"567"},          // The attached data brought by business, which can be obtained in the events of a call
        "creationTime":  1637128416617 ,
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    # 3.EventRetrieved
    • Body
    {
        "messageID": "EventRetrieved",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  // Current Party's unique UUID
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole": "Agent",                // Customer(1),Agent(2)
        "thisDN": "B",                                         // Hold initiator
        "callType": "Outbound",
        "ANI": "01088886666",                                  // ANI is the initiator of the PSTN, which is not fully guaranteed to be correct in the VOIP gateway, and may be a messy display
        "DNIS": "18618256606",                                 // DNIS is the receiver of PSTN, such as customer's phone no.
        "attachedData": {"orderID":"123","customerID":"123","policyID":"567"},          // The attached data brought by business, which can be obtained in the events of a call
        "creationTime":  1637128416617 ,
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    # ● Mute and Unmute
    # 1. Sequence diagram

    Sequence diagram of muting and unmuting

    # 2.EventMuted
    • Body
    {
        "messageID": "EventMuted",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  // Current Party's unique UUID
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole":  "Agent",                // Customer(1),Agent(2)
        "thisDN": "B",                                         // Mute initiator
        "otherDN": "A",                                         // Customer
        "callType": "Outbound",
        "ANI": "01088886666",                                  // ANI is the initiator of the PSTN, which is not fully guaranteed to be correct in the VOIP gateway, and may be a messy display
        "DNIS": "18618256606",                                 // DNIS is the receiver of PSTN, such as customer's phone no.
        "attachedData": {"orderID":"123","customerID":"123","policyID":"567"},          // The attached data brought by business, which can be obtained in the events of a call
        "creationTime":  1637128416617 ,
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    # 3.EventUnmuted
    • Body
    {
        "messageID": "EventUnmuted",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  // Current Party's unique UUID
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole": "Agent",                // Customer(1),Agent(2)
        "thisDN": "B",                                         // Unmute initiator
        "otherDN": "A",                                         // Customer
        "callType": "Outbound",
        "ANI": "01088886666",                                  // ANI is the initiator of the PSTN, which is not fully guaranteed to be correct in the VOIP gateway, and may be a messy display
        "DNIS": "18618256606",                                 // DNIS is the receiver of PSTN, such as customer's phone no.
        "attachedData": {"orderID":"123","customerID":"123","policyID":"567"},          // The attached data brought by business, which can be obtained in the events of a call
        "creationTime":  1637128416617 ,
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    # ● Initiate Inquiries
    # 1. Sequence diagram

    Sequence diagram of initiating inquiries

    # 2.EventAttachedDataChanged
    • Body
    {
        "messageID": "EventAttachedDataChanged",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole": "Agent",                // Customer(1),Agent(2)
        "thisDN": "B",                                         // Inquirer
        "otherDN": "C",                                         // The inquired party
        "callType": "Outbound",
        "attachedData": {"consultStage":1},          // Inquiry stage 1: The inquiry has begun
        "creationTime":  1637128416617 ,
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    # 3.EventRinging
    • Body
    {
        "messageID": "EventRinging",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole": "Agent",             // Customer(1),Agent(2)
        "thisDN": "C",               // The inquired party
        "otherDN": "B",              // Inquirer
        "otherDNRole": "ConsultBy",              // ConsultBy(9): Inquirer
        "thirdDN": "18688886666",    // Customer's phone no.
        "callType": "Outbound",
        "callState": "Consult",
        "attachedData": {"consultStage":"2","consulting":"true"},       // Inquiry stage 2: Ring on the inquired party
        "creationTime":  1637128416617 ,
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    # 4.EventAttachedDataChanged
    • Body
    {
        "messageID": "EventAttachedDataChanged",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole":  "Agent",                // Customer(1),Agent(2)
        "thisDN": "B",                                         // Inquirer
        "otherDN": "C",                                         // The inquired party
        "callType": "Outbound",
        "callState": "Consult",
        "attachedData": {"consultStage":2},          // Inquiry stage 2: Ring on the inquired party
        "creationTime":  1637128416617 ,
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    # 5.EventEstablished
    • Body
    {
        "messageID": "EventEstablished",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole":  "Agent",                // Customer(1),Agent(2)
        "thisDN": "C",                                         // The inquired party
        "otherDN": "B",              // Inquirer
        "otherDNRole": "ConsultBy",              // ConsultBy(9): Inquirer
        "thirdDN": "18688886666",    // Customer's phone no.
        "callType": "Outbound",
        "callState": "Consult",
        "attachedData": {"consultStage":"4","consulting":"true"},   // Inquiry stage 4: Answered by the inquired party
        "creationTime":  1637128416617 ,
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    # 6.EventAttachedDataChanged
    • Body
    {
        "messageID": "EventAttachedDataChanged",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole":  "Agent",                // Customer(1),Agent(2)
        "thisDN": "B",                                         // Inquirer
        "otherDN": "C",                                         // The inquired party
        "callType": "Outbound",
        "callState": "Consult",
        "attachedData": {"consultStage":4},          // Inquiry stage 4: Answered by the inquired party
        "creationTime":  1637128416617 ,
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    # ● Inquiry Cancellation
    # 1. Sequence diagram

    Sequence diagram of inquiry cancellation

    # 2.EventReleased
    • Body
    {
        "messageID": "EventReleased",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole": "Agent",                // Customer(1),Agent(2)
        "thisDN": "C",                  // The inquired party
        "otherDN": "B",              // Inquirer
        "otherDNRole": "ConsultBy",              // ConsultBy(9): Inquirer
        "thirdDN": "18688886666",    // Customer's phone no.
        "callType": "Outbound",
        "callState": "Consult",
        "attachedData": {"consultStage":3,"consulting":"true"},          // Inquiry stage 3: The inquiry has been canceled
        "creationTime":  1637128416617 ,
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    # 3.EventAttachedDataChanged
    • Body
    {
        "messageID": "EventAttachedDataChanged",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole": "Agent",                // Customer(1),Agent(2)
        "thisDN": "B",                                         // Inquirer
        "otherDN": "C",                                         // The inquired party
        "callType": "Outbound",
        "callState": "Consult",
        "attachedData": {"consultStage":3},          // Inquiry stage 3: The inquiry has been canceled
        "creationTime":  1637128416617 ,
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    # ● Retrieve After Inquiry
    # 1. Sequence diagram

    Sequence diagram of retrieval after inquiry

    # 2.EventReleased
    • Body
    {
        "messageID": "EventReleased",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole":  "Agent",                // Customer(1),Agent(2)
        "thisDN": "C",                                         // The inquired party
        "otherDN": "B",              // Inquirer
        "otherDNRole": "ConsultBy",              // ConsultBy(9): Inquirer
        "thirdDN": "18688886666",    // Customer's phone no.
        "callType": "Outbound",
        "callState": "Consult",
        "attachedData": {"consultStage":5,"consulting":"true"},          // Inquiry stage 5: The inquiry has been retrieved
        "creationTime":  1637128416617 ,
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    # 3.EventAttachedDataChanged
    • Body
    {
        "messageID": "EventAttachedDataChanged",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole":  "Agent",                // Customer(1),Agent(2)
        "thisDN": "B",                                         // Inquirer
        "otherDN": "C",                                         // The inquired party
        "callType": "Outbound",
        "callState": "Consult",
        "attachedData": {"consultStage":5},          // Inquiry stage 5: The inquiry has been retrieved
        "creationTime":  1637128416617 ,
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    # ● Transfer After Inquiry
    # 1. Sequence diagram

    Sequence diagram of transfer after inquiry

    # 2.EventReleased
    • Body
    {
        "messageID": "EventReleased",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole":  "Agent",                // Customer(1),Agent(2)
        "thisDN": "B",                                         // The inquired party
        "thisDNRole":"ConsultBy", // ConsultBy the transferring party
        "otherDN": "C",                                         // Inquirer
        "callType": "Outbound",
        "callState":"Transferred",
        "attachedData": {"consultStage":6},          // Inquiry stage 6: Transfer after inquiry
        "creationTime":  1637128416617 ,
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    # 3.EventPartyChanged
    • Body
    {
        "messageID": "EventPartyChanged",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole":  "Agent",                // Customer(1),Agent(2)
        "thisDN": "C",                  // Inquirer
        "otherDN": "18688886666",    // Customer phone no.
        "thirdDN": "B",               // The inquired party
        "thirdDNRole": "TransferBy", // TransferBy(8) : Transfer initiator
        "callType": "Outbound",
        "callState": "OK", // Current talk is OK
        "attachedData": {"consultStage":6},          // Inquiry stage 6: Transfer after inquiry; No consulting after successful inquiry transfer
        "creationTime":  1637128416617 ,
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    # ● Meeting After Inquiry
    # 1. Sequence diagram

    Sequence diagram of meeting after inquiry

    # 2.EventPartyAdded
    • Body
    {
        "messageID": "EventPartyAdded",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole":  "Agent",                // Customer(1),Agent(2)
        "thisDN": "B",                  
        "otherDN": "C",    // Party added in the meeting
        "thirdDN": "B",    // Inquiry meeting initiator
        "thirdDNRole": "AddedBy", // AddedBy(3) : Attendee
        "callType": "Outbound",
        "callState": "Conference", // In the current meeting. If a three-party meeting becomes a two-party one, the callState should be changed to OK
        "attachedData": {"consultStage":7},          // Inquiry stage 7: Meeting after inquiry
        "creationTime":  1637128416617 ,
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    # 3.EventPartyChanged
    • Body
    {
        "messageID": "EventPartyChanged",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole":  "Agent",                // Customer(1),Agent(2)
        "thisDN": "C",                  
        "otherDN": "18688886666",    // Customer phone no.
        "thirdDN": "B",    // Inquiry meeting initiator
        "thirdDNRole": "AddedBy", // AddedBy(3) : Attendee
        "callType": "Outbound",
        "callState": "Conference", // In the current meeting. If a three-party meeting becomes a two-party one, the callState should be changed to OK
        "attachedData": {"consultStage":7},          // Inquiry stage 7: Meeting after inquiry; No consulting after successful inquiry meeting
        "creationTime":  1637128416617 ,
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    # 4.EventPartyDeleted
    • Description: Transfer after meeting, the three-party talk is changed to the two-party one
    • Body
    {
        "messageID": "EventPartyDeleted",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole":  "Agent",                // Customer(1),Agent(2)
        "thisDN": "C",                  
        "otherDN": "B",    // Party quitting from the meeting
        "thirdDN": "B",    // Party deleting others from the meeting
        "thirdDNRole": "DeletedBy", // DeletedBy(5) : Party deleting others from the meeting AddedBy(3) : Attendee
        "callType": "Outbound",
        "callState": "OK", // After quitting from the meeting. If a three-party meeting becomes a two-party one, the callState should be changed to OK
        "attachedData": {"consultStage":8},          // Inquiry stage 8: Transfer after meeting
        "creationTime":  1637128416617 ,
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    # 5.EventPartyDeleted
    • Description: Retrieve after meeting, the three-party talk is changed to the two-party one
    • Body
    {
        "messageID": "EventPartyDeleted",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole":  "Agent",                // Customer(1),Agent(2)
        "thisDN": "B",                  
        "otherDN": "C",    // Party quitting from the meeting
        "thirdDN": "B",    // Party deleting others from the meeting
        "thirdDNRole": "DeletedBy", // DeletedBy(5) : Party deleting others from the meeting AddedBy(3) : Attendee
        "callType": "Outbound",
        "callState": "OK", // After quitting from the meeting. If a three-party meeting becomes a two-party one, the callState should be changed to OK
        "attachedData": {"consultStage":9},          // Inquiry stage 9: Retrieve after meeting
        "creationTime":  1637128416617 ,
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    # ● Send dtmf
    # 1.EventDtmfSent
    • Description: notify agent DTMF sent to customer
    • Body:
    {
        "messageID":"EventDtmfSent",
        "referenceID":211101,  
        "callID": "4dce61ec399644029fab7e8251da9bf1332",     // Main talk ID
        "companyId": "30f80aa47cde4b10bd89484aeab63691",
        "thisDN": "B",                              // Agent B initiates DTMF
        "otherDN": "18688886666",                  // Customer call receives DTMF
        "dtmfDigits":"1234#",   // dtmf key
        "callType": "Outbound",
        "creationTime":  1637128416617
    }
    
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    # ● Take away Calls
    # 1. Sequence diagram

    Takeaway sequence diagram

    # 2.EventRinging
    • Body
    {
        "messageID": "EventRinging",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole":  "Agent",             // Customer(1),Agent(2),Supervisor(8) 
        "thisDN": "C",               // Taking-away party
        "otherDN": "18688886666",    // Customer's phone no.
        "thirdDN": "B",              // Taken-away party
        "thirdDNRole": "InterceptTo",  // BargeinTo(10): Interrupted party; InterceptTo(11): Breakdown party
        "callType": "Outbound",
        "creationTime":  1637128416617 ,
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    # 3.EventReleased
    • Description: C intercept failure
    • Body
    {
        "messageID": "EventReleased",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole":  "Agent",             // Customer(1),Agent(2),Supervisor(8) 
        "thisDN": "C",               // Taking-away party
        "otherDN": "18688886666",    // Customer's phone no.
        "thirdDN": "B",              // Taken-away party
        "thirdDNRole": "InterceptTo",  // BargeinTo(10): Interrupted party; InterceptTo(11): Breakdown party
        "callType": "Outbound",
        "attachedData": {"intercept_cause":1},          // Reasons for takeaway failure 1: Failure before the supervisor answers 2: Bridging failure after the supervisor answers
        "creationTime":  1637128416617 ,
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    # 4.EventEstablished
    • Body
    {
        "messageID": "EventEstablished",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole":  "Agent",             // Customer(1),Agent(2),Supervisor(8) 
        "thisDN": "C",               // Taking-away party
        "otherDN": "18688886666",    // Customer's phone no.
        "thirdDN": "B",              // Taken-away party
        "thirdDNRole": "InterceptTo",  // BargeinTo(10): Interrupted party; InterceptTo(11): Breakdown party
        "callType": "Outbound",
        "creationTime":  1637128416617 ,
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    # 5.EventReleased
    • Body
    {
        "messageID": "EventReleased",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole":  "Agent",             // Customer(1),Agent(2),Supervisor(8) 
        "thisDN": "B",               // Taken-away party
        "otherDN": "18688886666",    // Customer's phone no.
        "thirdDN": "C",  // Taking-away party
        "thirdDNRole": "InterceptBy",
        "callType": "Outbound",
        "attachedData": {},          // 
        "creationTime":  1637128416617 ,
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    # ● Interrupt Calls
    # 1. Sequence diagram

    Interruption sequence diagram

    # 2.EventRinging
    • Body
    {
        "messageID": "EventRinging",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole":  "Agent",             // Customer(1),Agent(2),Supervisor(8) 
        "thisDN": "C",               // Supervisor extension initiating an interruption
        "otherDN": "A",    // Customer's phone no.
        "thirdDN": "B",              // Agent extension interrupted
        "thirdDNRole": "BargeinTo",  // BargeinTo(10): Interrupted party; InterceptTo(11): Breakdown party
        "callType": "Inbound",
        "creationTime":  1637128416617 ,
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    # 3.EventReleased
    • Body
    {
        "messageID": "EventReleased",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole":  "Agent",             // Customer(1),Agent(2),Supervisor(8) 
        "thisDN": "C",               // Interrupting party
        "otherDN": "18688886666",    // Customer's phone no.
        "thirdDN": "B",
        "thirdDNRole": "BargeinTo",  // BargeinTo(10): Interrupted party; InterceptTo(11): Breakdown party
        "callType": "Outbound",
        "attachedData": {"bargein_cause":1},          // Reasons for interruption failure 1: Failure before the supervisor answers 2: Interruption failure after the supervisor answers
        "creationTime":  1637128416617 ,
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    # 4.EventEstablished
    • Body
    {
        "messageID": "EventEstablished",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole":  "Agent",             // Customer(1),Agent(2),Supervisor(8) 
        "thisDN": "C",               // Supervisor extension initiating an interruption
        "otherDN": "A",    // Customer's phone no.
        "thirdDN": "B",              // Agent extension interrupted
        "thirdDNRole": "BargeinTo",  // BargeinTo(10): Interrupted party; InterceptTo(11): Breakdown party
        "callType": "Inbound",
        "creationTime":  1637128416617 ,
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    # 5.EventPartyAdded
    • Body
    
    
    {
        "messageID": "EventPartyAdded",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole":  "Agent",             // Customer(1),Agent(2),Supervisor(8) 
        "thisDN": "B",               // Perspectives of interrupted agent     
        "otherDN": "C",                 // New meeting member            
        "thirdDN": "C",                    // Interruption initiator
        "thirdDNRole": "BargeinBy",  // BargeinTo(10): Interrupted party; InterceptTo(11): Breakdown party; BargeinBy(12): Interruption initiator;
        "callType": "Inbound",
        "callState": "Conference", // In the current processing meeting. If a three-party meeting becomes a two-party one, the callState should be changed to OK
        "attachedData": {"orderID":"123","customerID":"123","policyID":"567"},      
        "creationTime":  1637128416617 ,
    }
    
    
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    # 6.EventPartyDeleted
    • Description: Supervisor C hangs up the B's call, and the three-party talk is changed to the two-party one
    • Body
    {
        "messageID": "EventPartyDeleted",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole":  "Agent",                // Customer(1),Agent(2)
        "thisDN": "C",                  
        "otherDN": "B",    // Party quitting from the meeting
        "thirdDN": "C",    // Party deleting others from the meeting
        "thirdDNRole": "DeletedBy", // DeletedBy(5) : Party deleting others from the meeting AddedBy(3) : Attendee
        "callType": "Inbound",
        "callState": "OK", // After quitting from the meeting. If a three-party meeting becomes a two-party one, the callState should be changed to OK
        "creationTime":  1637128416617 ,
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    # ● Monitor Calls
    # 1. Sequence diagram

    Takeaway sequence diagram

    # 2.EventRinging
    • Body
    {
        "messageID": "EventRinging",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole":  "Supervisor",             // Customer(1),Agent(2),Supervisor(8)
        "thisDN": "C",               // Supervisor C
        "otherDN": "B",              // Monitored agent
        "otherDNRole": "ObserveTo", // ObserveTo(14) : Monitored
        "thirdDN": "18688886666",    // Customer's phone no.
        "callType": "Outbound",
        "creationTime":  1637128416617 ,
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    # 3.EventEstablished
    • Body
    {
        "messageID": "EventEstablished",
        "callID": "4dce61ec399644029fab7e8251da9bf1332",
        "partyID": "5dce61ec399644029fab7e8251da9bf1332",  
        "companyId":"30f80aa47cde4b10bd89484aeab63691",
        "partyRole":  "Supervisor",             // Customer(1),Agent(2),Supervisor(8)
        "thisDN": "C",               // Supervisor C
        "otherDN": "B",              // Monitored agent
        "otherDNRole": "ObserveTo", // ObserveTo(14) : Monitored
        "thirdDN": "18688886666",    // Customer's phone no.
        "callType": "Outbound",
        "creationTime":  1637128416617 ,
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    # ● Create and Destroy
    # 1.EventCallCreated
    • Description: Create events by a call
    • Body
    
    {
        "messageID": "EventCallCreated",
        "referenceID": 0, 
        "companyId": "30f80aa47cde4b10bd89484aeab63691",
        "callID": "callID 1",
        "thisDN": "A",                        
        "callType": "Outbound",
        "attachedData": {"orderID":"123","customerID":"123","policyID":"567"},     // Include all business-related parameters
        "creationTime":  1637128416617
    }
    
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    # 2.EventCallDeleted
    • Description: Destroy events by a call
    • Body
    
    {
        "messageID": "EventCallDeleted",
        "referenceID": 0, 
        "companyId": "30f80aa47cde4b10bd89484aeab63691",
        "callID": "callID 1",
        "thisDN": "A",      // Initiator of call creation
        "otherDN": "B",     // Receiver of call creation
        "callType": "Outbound",
        "startUepoch":  1631763908786 , // First call start timestamp ms
        "bridgeUepoch":  1631763948786 , // First call bridging timestamp ms
        "endUepoch": 1631763948786 , // Last call end timestamp ms
        "recordUUID":"3519d6deb17e49f794df05c9044cee18",
        "recordUrl":"https://aws-prod-20221024.s3.ap-southeast-1.amazonaws.com/recordings/20210207/1721/6ec0eb05420347d2aeeb9d5ea6a8e246.mp3",
        "attachedData": {"NoCallReasonCode":"1","customerID":"123","policyID":"567"},     // Include all business-related parameters
        // Reasons for system missing NoCallReasonCode: 1 Enterprise in arrears; 2 Customer in the blacklist; If there is EventCallCreated, there is no NoCallReasonCode
        "creationTime":  1637128416617
    }
    
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    # 3. Reasons for system missing NoCallReasonCode:
    • 1 Enterprise in arrears
    • 2 Customer in the blacklist
    • 400 Unknown error
    # 4. EventCallInfo
    • Body
    
    {
        "messageID": "EventCallInfo",
        "referenceID": 200100, 
        "callID": "callID 1",
        "thisDN": "C",                        // C can be the super admin 100000000
        "parties":  [ {"thisDN":"A","DNRole":"Origination","createTime":1637128416617},{"thisDN":"B","DNRole":"Destination","createTime":1637128416617}],
        "callType": "Outbound",
        "ANI": "01088886666",                // ANI is the initiator of the PSTN, which is not fully guaranteed to be correct in the VOIP gateway, and may be a messy display
        "DNIS": "18618256606",               // DNIS is the receiver of PSTN, such as customer's phone no.
        "attachedData": {"orderID":"123","customerID":"123","policyID":"567"},     // Include all business-related parameters
        "creationTime":  1637128416617
    }
    
    
    
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16

    # Agent Related

    Agent status is a typical finite state machine. There are three status, including Logout, Ready, NotReady. They are shown in the figure below

    Agent state machine

    # ● EventAgentLogin
    • Body
    
    {
    
    "messageID":"EventAgentLogin",
    
    "referenceID":1001,
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "agentID": "1001", // Agent work no. can be a null string
    "agentUUID": "8e0ec51fdf3b57a4bc1c09ff585655a1", // Agent UUID
    "thisDN": "1001", // Agent phone no. 13988886666
    "phoneType":1, // Device type 1: Web phone 2: WeChat Mini Program 3: PSTN 4: Sip Phone
    "agentState": 2,   // agentState Ready(1),NotReady(2)
    "attachedData": {  "orderID": "123", "customerID": "123"}, // Optional 
    "reasonCode":2, //   2:DoNotDisturb DND; 4:AfterCallWork Post-call Summary; 11: Rest Break  >11 and <99: Custom 
    "creationTime":  1637128416617
    
    }
    
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    # ● EventAgentReady
    • Body
    
    {
    
    "messageID":"EventAgentReady",
    "referenceID":10002,
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    "agentID": "1001", // Agent work no. can be a null string
    "agentUUID": "8e0ec51fdf3b57a4bc1c09ff585655a1", // Agent UUID
    "thisDN": "1001", // Telephone no., extension no. or phone no. 13988886666
    "reasonCode":4, //   0 : Other reasons; 4: AfterCallWork Post-call summary;  
    "attachedData": { "orderID": "123", "callID": "81a3e101-9475-4ba1-bd38-6a7ca6c31ab5"}, // Optional 
    "creationTime":  1637128416617
    }
    
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    # ● EventAgentNotReady
    • Body
    
    {
    
    "messageID": "EventAgentNotReady",
    
    "referenceID": 10003,
    
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    
    "agentID": "1001", // Agent work no. can be a null string
    
    "agentUUID": "8e0ec51fdf3b57a4bc1c09ff585655a1", // Agent UUID
    
    "thisDN": "1001", // Telephone no., extension no. or phone no. 13988886666
    
    "reasonCode":4, //   2:DoNotDisturb DND; 4:AfterCallWork Post-call Summary; 11: Rest Break  >11 and <99: Custom 
    
    "attachedData": { "loginState": "1", "customerID": "123", "callID": "81a3e101-9475-4ba1-bd38-6a7ca6c31ab5"}, // Optional Only ACW requires the previous status to be loginState: 1 Online 2: DND
    
    "creationTime":  1637128416617
    
    }
    
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    # ● EventAgentLogout
    • Body
    
    {
    
    "messageID":"EventAgentLogout",
    
    "referenceID":10005,
    
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    
    "agentID": "1001", // Agent work no. can be a null string
    
    "agentUUID": "8e0ec51fdf3b57a4bc1c09ff585655a1", // Agent UUID
    
    "thisDN": "1001", // Telephone no., extension no. or phone no. 13988886666
    
    "attachedData": { "orderID": "123", "customerID": "123"}, // Optional
    
    "creationTime":  1637128416617
    
    }
    
    
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    # ● EventDelayAfterCallWork
    • Body
    
    {
    
    "messageID":"EventDelayAfterCallWork",
    
    "referenceID":123456,
    
    "companyId":"30f80aa47cde4b10bd89484aeab63691",
    
    "agentID": "1001", // Agent work no. can be a null string
    
    "agentUUID": "8e0ec51fdf3b57a4bc1c09ff585655a1", // Agent UUID
    
    "thisDN": "1001",
    
    "callID": "4dce61ec399644029fab7e8251da9bf1332",
    
    "partyId": "03734ec400281M11ec583fc70a80ff2603de",
    
    "expirationTime": 1637128416617, // Post-handling the timestamp (ms) that will automatically end
    
    "creationTime":  1637128416617
    
    }
    
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25

    # Error Related

    # ● Error Code

    Talk related error code is 301XXX

    • Unknown(301000)
    • AgentMonitoredBy(301001)
    • SupervisorMonitoring(301002)
    • SupervisorInCall(301003)
    • NotFoundCallID(301004)
    • InvalidCallType(301005)
    • InvalidAgentState(301006)
    • CallHasObserver(301007)
    • ConferenceToTransfer(301008)
    • TargetPartyIsSelf(301009)
    • HeldInProcess(301010)
    • NotFoundOtherParty(301011)
    • TargetPartyInCall(301012)
    • PartyIsObserver(301013)
    • NotFoundAgent(301014)
    • CustomerAddByConference(301015)
    • NotFoundParty(301016)
    • NotEnoughMeetmeRoom(301017)
    • InvalidParams(301018)
    • PBXError(301019)
    • CTIException(301020)
    • NotFoundChannel(301021)
    • SocketToJSon(301022)
    • MessageIDNotMatch(301025)
    • RegisterDNNotMatch(301026)
    • RequestTooFast(301027)

    Agent related error code is 302XXX

    • Unknown(302000)
    • NotFoundAgentID(302001)

    Supervisor related error code is 303XXX

    • Unknown(303000)
    • AgentIsInBargedInScene(303001)
    • AgentIsInMonitorScene(303002)
    • AgentIsInInterceptScene(303003)
    • AgentIsInConsultScene(303004)
    • AgentIsInConferenceScene(303005)
    # ● EventPartyError
    • Body
    {
        "messageID":"EventPartyError",
        "referenceID":1001,                  // The corresponding event is initiated by the request
        "companyId": "30f80aa47cde4b10bd89484aeab63691",                   // Tenant ID
        "callID":"d24c627642c8498ebc071e79cede8321 "
        "thisDN","1001"
        "errorCode": 301004,                     // Error code
        "errorMessage": "NotFoundCallID",    // Error description
        "request":  "RequestMakeCall",  // Request source
        "creationTime":  1637128416617
    }
    
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    # ● EventAgentError
    • Body
    {
        "messageID":"EventAgentError",
        "referenceID":1001,                  // The corresponding event is initiated by the request
        "companyId": "30f80aa47cde4b10bd89484aeab63691",                   // Tenant ID
        "agentUUID": "fa9056d575295e8d89239ea8312d9b58",      // Agent UUID
        "agentID":"1001", // Agent No.
        "thisDN": "1001",
        "attachedData": { "orderID": "123", "customerID": "123"}, // Optional
        "errorCode": 302001,                     // Error code
        "errorMessage": "NotFoundAgent",    // Error description
        "request":  "RequestAgentLogin",  // Request source
        "creationTime":  1637128416617
    }
    
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    Last Updated: 11/18/2024, 7:41:11 PM

    ← Call Capability (UI Phone Bar) Call Capability (Android-SDK)→

    Update Date
    01
    Operations Support API
    04-03
    02
    CRM Docking Scheme
    12-05
    03
    AI Agent API
    09-09
    More Articles>
    Theme by Vdoing
    • Follow Sys
    • Line
    • Dark
    • Read