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

Interface Invoked After Dialog Transfer (inaction=11)

inparams

Parameter

Type

Position

Mandatory

Description

call_id

String

Body

Yes

Unique call ID, which is the same as the value of userid and is used by the flow.

The value can contain a maximum of 64 characters.

call_dst_id

String

Body

Yes

Access ID.

1. In the voice navigation scenario, this parameter is set to the flow access code.

2. In the voice outbound call survey scenario, this parameter is set to the flow access code. 3. In other interaction scenarios, this parameter is set to the access ID.

The value can contain a maximum of 20 characters.

begin_trans

String

Body

Yes

Transfer start time.

end_trans

String

Body

Yes

Transfer end time.

trans_result

String

Body

Yes

Transfer result.

  • 0: success
  • Other values: failure

auth_token

String

Body

Yes

Authorization information, which is the token value returned by the access control system.

For details, see C3 OIAP Interface Authentication.

record_result

String

Body

No

Recording result (valid only when the call is successfully transferred to a third-party number.)

  • 0: success
  • Other values: failure

input

String

Body

No

Interaction result. (For details about this parameter, see the following scenarios.)

After the transfer is successful, the trans_result parameter that is set to 0 is added to the request, and the input parameter is not required. Then, the access party receives the hangup response (in which outaction is set to 10) of the ODFS, and the access party needs to send the request again. The request needs to obtain the input parameter that is set to hangup.

  • hangup: hangup

The value can contain a maximum of 1024 characters.

inter_idx

String

Body

No (special field in the voice navigation scenario)

Number of interaction times. The value is the same as that of inter_idx returned by the ODFS in the previous time.

mediaType

String

Body

No

Media type (text, audio, video, and so on).

Example: audio or video

channelType

String

Body

No

Channel type.

  • WEB
  • INSTAGRAM
  • TELEGRAM
  • WECHAT
  • FACEBOOK
  • TWITTER
  • EMAIL
  • LINE
  • WHATSAPP
  • 5G
  • SMS

ExtParams

Parameter

Type

Position

Mandatory

Description

transin_data

String

Body

No

Call-associated data parameters agreed by the access party and the OIAP, for example, data packet parameters transferred by the IVR.

Request Example

  • If the call is transferred successfully, the access party sends the following request:
{
    "userid": "1528780879-9581",
    "inaction": 11,
    "inparams": {
        "call_id": "1528780879-9581",
        "call_dst_id": "10086", 
        "begin_trans": "2018090407:16:24",
        "end_trans": "2018090407:20:24",
        "trans_result":"0",
        "input": "",
        "inter_idx": "1"
    },
   "extparams": {
        "transin_data":"95,22714,0,,1,1,,test_gdj_01005"
    }
}

After receiving a response from the ODFS, the access party sends the following request again:

{
    "userid": "1528780879-9581",
    "inaction": 11,
    "inparams": {
        "call_id": "1528780879-9581",
        "call_dst_id": "10086", 
        "begin_trans": "2018090407:16:24",
        "end_trans": "2018090407:20:24",
        "trans_result":"0",
        "input": "hangup",
        "inter_idx": "1"
    },
   "extparams": {
        "transin_data":"95,22714,0,,1,1,,test_gdj_01005"
    }
}

After receiving the request, the ODFS sends a hangup response again. The access party does not need to invoke the ODFS interface. The call transfer is complete.

  • If the call fails to be transferred:

    After the preceding parameters are transferred, the access party may receive the response containing the value of outaction from the ODFS. The options are 9, 10, and 11, and the actual value is determined by the business logic.

After receiving a request whose inaction is 8, 9, or 11, the ODFS may send different responses based on the TUC configuration, that is, the value of outaction may be 9, 10, 11, or 12.

Table 1 outparams (outaction=9: Dialog Interaction)

Parameter

Type

Position

Mandatory

Description

prompt_type

String

Body

Yes

Interaction type.

  • 0: Plays a specified voice for voice interaction (full path).
  • 1: Plays a specified voice for voice interaction.
  • 2: Plays TTS content for voice interaction.
  • 3: text interaction.
  • 4: Records the voice of the calling party.
  • 5: Plays a video.
  • 6: multimedia interaction.
  • 7: card interaction.

prompt_wav

String

Body

No (special field in the voice navigation scenario)

When prompt_type is set to 0, 4, or 5, enter the full path name for storing the file to be played or recorded. (The path must be readable by the UAP.)

When prompt_type is set to 1, enter the name of the voice file (excluding the path header, which is assembled by the IVR during voice playing).

prompt_text

String

Body

Yes

TTS dynamic text content or text dialog content.

This parameter is mandatory when prompt_type is set to 2, 3, 6, or 7.

language

String

Body

Yes

Language ID. (This parameter is mandatory for TTS voice playing and ASR.)

0: Chinese

1: English

inter_idx

String

Body

No (special field in the voice navigation scenario)

Number of consecutive interactions with a user in the ODFS.

model_type

String

Body

No (special field in the voice navigation scenario)

Template type. The value is a number of seven digits. The first three digits indicate whether voice playback, recognition, and key pressing are supported, respectively.

  • 100: Only playback is supported.
  • 101: Playback is interrupted during key pressing, and recognition is not supported.
  • 110: Playback is interrupted during recognition, and key pressing is not supported.
  • 120: Playback is not interrupted during recognition, and key pressing is not supported.
  • 122: Playback is not interrupted during key pressing and recognition.
  • 111: Playback is interrupted during key pressing and recognition.
  • 102: Playback is not interrupted during key pressing, and recognition is not supported. The following two digits indicate the maximum number of pressed keys. The last two digits indicate whether the asterisk key (*) and pound key (#) are used as function keys, respectively. The value 1 indicates that the key is used as a function key. The pound key (#) is used as the confirm key, and the asterisk (*) is used as the cancel key. The value 0 indicates that the key is used as a common key rather than a function key. For example, 1011201 indicates that voice playback and key pressing are supported but recognition is not supported, the maximum number of pressed keys is 12, and the pound key (#) is used as the confirm key. 1101200 indicates that voice playback and recognition are supported but key pressing is not supported. In this case, the last four digits 1200 are invalid.

timeout

String

Body

No (special field in the voice navigation scenario)

Voice playing timeout interval, in seconds. The parameter specifies the timeout interval for the system to wait for customer input after the voice playing ends.

tone

String

Body

No (special field in the voice navigation scenario)

This parameter is mandatory for recording when prompt_type is set to 4.

true: A beep tone is played before recording starts.

false: A beep tone is not played before recording starts.

vendor

String

Body

No (special field in the voice navigation scenario)

ASR extended parameter.

grammar

String

Body

No (special field in the voice navigation scenario)

Syntax file name (including the path and suffix).

question_id

String

Body

No (special field in the voice outbound call survey scenario)

Question sequence number in the outbound call scenario, for example, Q1 and Q2. (This parameter is discarded.)

question_name

String

Body

No (special field in the voice outbound call survey scenario)

Question name in the outbound call scenario.

(This parameter is discarded.)

answer_id

String

Body

No (special field in the voice outbound call survey scenario)

Answer to the question in the outbound call scenario.

  • Y: yes
  • N: no
  • TIMEOUT: timeout
  • NOMATCH: unidentified
  • ERROR: other exceptions

If the answer is not Y or N, the actual configuration result is used.

(This parameter is discarded.)

flowRecordFlag

String

Body

No

Whether to record voices.

  • 0: yes
  • 1: no

    If this parameter is not set, the default value is 1.

flowRecordPath

String

Body

No

Path of the recording file returned when recording is required.

ttsGroupId

String

Body

No

Group ID of the TTS server configured on the UAP.

ttsSoundEffect

String

Body

No

Sound effect of TTS voice playing.

0: male voice

1: female voice

ttsSoundSpeed

String

Body

No

Speed of TTS voice playing.

0: low speed

1: medium speed

8: high speed

ttsMRCPVendor

String

Body

No

TTS extended parameter, that is, the mrcp vendor parameter. The value contains a maximum of 40 characters.

asrMRCPId

String

Body

No

MRCP ID of the ASR server configured on the UAP.

asrSlotName

String

Body

No

Keyword used for parsing the ASR slots.

asrRecognizeType

String

Body

No

ASR recognition type.

0: common recognition

1: intelligent recognition

asrNoInputTimeout

String

Body

No

Timeout period when a user remains silent, in seconds. The default value is 100.

asrRecognitionTimeout

String

Body

No

Interval when the recognition times out, in seconds. The default value is 200.

asrSpeechCompleteTimeout

String

Body

No

Timeout period when a user pauses, in seconds. The default value is 500.

responseSource

Integer

Body

No

Whether the reply comes from a chatbot or a silent agent. The options are 0 (chatbot) and 1 (silent agent).

specialRecognize

Integer

Body

No

Whether to use recognition by packet capture and recording.

The options are 0 (original recognition) and 1 (recognition by packet capture and recording).

Table 2 Prompt_text format description (for intelligent information matching businesses)

Parameter

Type

Position

Mandatory

Description

Source

sensitive_word

JSON object

Body

No

Sensitive word notification.

{"Prohibited word":["Password"]}

TUC sensitive word configuration

Intend

String

Body

Yes

Customer intention.

It is a description text.

TUC intention

recomand_KP

List

Body

No

Recommended knowledge points.

Business knowledge base

call_script

JSON string

Body

Yes

Recommended script.

Note:

The intentcode parameter indicates the TUC intention code and can be empty. The intentDsp parameter indicates the intention description and cannot be empty.

{

{intentcode: "", intentDsp: "", "status":"", childintent[{intentcode: "", intentDsp: "", "status":""},{intentcode: "", intentDsp: "", "status":""}...]}

{ intentcode:"", intentDsp:"", "status":""}

}

ODFS resource template configuration

call_script_matchedstep

String

Body

No

Intention code.

It corresponds to the intention code in call_script.

It indicates the script progress (matched step).

TUC intention

Prompt_text format description (for intelligent case filling businesses)

Parameter

Type

Position

Mandatory

Description

Usage Method

beginIndex

String

Body

Yes

Start index of an entity in a text file.

Start index of an entity in a text file.

endIndex

String

Body

Yes

End index of an entity in a text file.

End index of an entity in a text file.

type

String

Body

Yes

Extracted entity type.

Recognition type of the entity. You do not need to enter the value in the form.

entity

String

Body

Yes

Entity content, which has been standardized.

Used to fill in the corresponding fields in the form.

tag

String

Body

Yes

Name of the field to be filled in the form.

Example: object level 2

Response Example 1

{
    "userid": "1528780879-9581",
    "outaction": 9,
    "outparams": {
        "call_id": "1528780879-9581",
        "prompt_type": "1",
        "prompt_wav": "welcome",
        "prompt_text": "Query the call fee.",
        "language": "0",
        "inter_idx": "1",
        "model_type":"1011201"
        "timeout": "10",
        "tone": "",
        "grammar": "",
        "question_id": "Q1",
        "question_name": "Question 1",
        "answer_id": "Y"       
    }
}
Table 3 outparams (outaction=12: Query Operation, Used in the Common IVR Flow)

Parameter

Type

Position

Mandatory

Description

call_id

String

Body

Yes

Unique call ID, which is the same as the value of userid and is used by the flow.

prompt_type

String

Body

Yes

Query type.

  • 1: Query the queuing information about the current skill queue when a call is queuing in a skill queue.
  • 2: Query the queuing information by skill queue ID before a call enters a skill queue.
  • 3: Query the information about the skill queue where an agent belongs by agent ID.
  • 5: Switch between audio and video calls.

skill_id

String

String

No

Skill queue ID.

This parameter is mandatory only when prompt_type is set to 2.

moduleName

String

Body

No

Module name, that is, name of a diagram element.

inter_idx

String

Body

No (special field in the voice navigation scenario)

Number of consecutive interactions with a user in the ODFS.

Response Example

{
    "outaction": 12,
    "outparams": {
        "call_id": "1528780879-9581",
        "prompt_type": "1",
        "inter_idx": "1",
        "moduleName":"Query",
        "xxx":"xxx" //Extend
    }
}
Table 4 outparams (outaction=11: Dialog Transfer)

Parameter

Type

Position

Mandatory

Description

call_id

String

Body

Yes

Unique call ID, which is the same as the value of userid and is used by the flow.

call_sor_id

String

Body

Yes

User ID. (In the voice navigation and voice outbound call scenarios, the value is a user number. In other interaction scenarios, the value is a user ID.)

trans_type

String

Body

Yes

Dialog transfer type.

  • 1: transfer to the manual service (to a skill queue based on the routing number)
  • 2: transfer to the IVR
  • 3: transfer to the manual service (to a skill queue based on the skill name)
  • 4: transfer to the manual service (to an agent ID)
  • 5: transfer to a third-party number
  • 6: online digital assistance
  • 7: transfer to the manual service (to the last agent. Currently, only multimedia is supported.)
  • 8: transfer to the manual service (to the skill queue to which an agent belongs. Currently, only multimedia is supported.)
  • 31: transfer to a multimedia message (to the last agent)
  • 32: transfer to a multimedia message (to a skill queue)
  • 33: transfer to a multimedia message (to an agent)

route_value

String

Body

Yes

Route value information, which depends on the value of trans_type.

When the value of trans_type is 1, route_value is set to the subsequent access code of the skill queue.

When the value of trans_type is 2, route_value is set to the access code of the IVR flow.

When the value of trans_type is 3, route_value is set to the name of the skill queue.

When the value of trans_type is 4, route_value is set to an agent ID.

When the value of trans_type is 5, route_value is set to a third-party number.

When the value of trans_type is 6, route_value is set to a flow route number.

When the value of trans_type is 7, route_value is left empty.

When the value of trans_type is 8, route_value is set to an agent ID.

When the value of trans_type is 31, route_value is left empty.

When the value of trans_type is 32, route_value is set to a skill queue name or access code.

When the value of trans_type is 33, route_value is set to an agent ID.

trans_data

String

Body

No

Call-associated data (transferred when the call is transferred to the manual service).

calling_num

String

Body

No

Number preferentially used as the calling number when a call is forwarded to a third-party.

record_path

String

Body

No

Full recording path name. (This parameter is valid and conference recording starts only when route_value is set to a third-party number. If this parameter is left empty or does not exist, recording is not performed.)

inter_idx

String

Body

No (special field in the voice navigation scenario)

Number of consecutive interactions with a user in the ODFS.

trans_idx

String

Body

No (special field in the voice navigation scenario)

Jump sequence number.

question_id

String

Body

No (special field in the voice outbound call survey scenario)

Question ID in the outbound call scenario. (This parameter is discarded.)

question_name

String

Body

No (special field in the voice outbound call survey scenario)

Question name in the outbound call scenario. (This parameter is discarded.)

answer_id

String

Body

No (special field in the voice outbound call survey scenario)

Answer to the question in the outbound call scenario. (This parameter is discarded.)

Response Example 2

{
    "userid": "1528780879-9581",
    "outaction": 11,
    "outparams": {
        "call_id": "1528780879-9581",
        "call_sor_id": "13500000001",
        "calling_num":"1234567890",
        "trans_type": "1",
        "route_value": "123456789",
        "inter_idx": "1",
        "trans_idx": "1",
        "question_id": "Q1",
        "question_name": "Question 1",
        "answer_id": "Y"       
    }
}
Table 5 outparams (outaction=10: Dialog Hangup)

Parameter

Type

Position

Mandatory

Description

call_id

String

Body

Yes

Unique call ID, which is the same as the value of userid and is used by the flow.

call_sor_id

String

Body

Yes

User ID. (In the voice navigation and voice outbound call scenarios, the value is a user number. In other interaction scenarios, the value is a user ID.)

call_dst_id

String

Body

Yes

Access ID.

1. In the voice navigation scenario, this parameter is set to the called number.

2. In the voice outbound call survey scenario, this parameter is set to the survey type ID.

3. In other interaction scenarios, this parameter is set to the access ID.

start_time

String

Body

Yes

Dialog interaction start time.

end_time

String

Body

Yes

Dialog interaction end time.

release_reason

String

Body

No

Whether the ODFS flow enters the End diagram element properly.

0: The flow enters the End diagram element properly.

1: The flow enters the End diagram element when an exception or timeout occurs and no error tolerance business logic is processed.

region_id

String

Body

No (special field in the voice navigation scenario)

Region of a user.

entrance_id

String

Body

No (special field in the voice navigation scenario)

Entrance ID.

exit_id

String

Body

No (special field in the voice navigation scenario)

Exit ID. The value is the same as that of entrance_id.

user_type_id

String

Body

No (special field in the voice navigation scenario)

User type.

suilu_region_id

String

Body

No (special field in the voice navigation scenario)

Call access region ID.

After a session ends, if the IVR initiates a request whose inaction is 9 or 11 and input is hangup, the ODFS triggers the hangup response and sends the response to the IVR as the end flag. The IVR does not invoke the ODFS interface.

Response Example 3

{
    "userid": "1528780879-9581",
    "outaction": 10,
    "outparams": {
        "call_id": "1528780879-9581",
        "call_sor_id": "13500000001",
        "call_dst_id": "10086",
        "start_time": "2018090407:16:24",
        "end_time": "2018090407:30:24",
        "release_reason": "0",
        "region_id": "025",
        "entrance_id": "03",
        "exit_id": "05",
        "user_type_id": "01",
        "suilu_region_id":"025"
     }
}