dialogflow cx - Avaya-CXI/virtual-agent-public GitHub Wiki
HOME / REFERENCE DOCUMENTATION / DIALOGFLOW CX
These session parameters are automatically injected as soon as the call hits Avaya Cloud. The purpose of these session parameters is so that Dialogflow has access to key information about the call. That key information contains the Call SID (call_sid) from Avaya Cloud, the Called Party (called_party) which is the Avaya Cloud number that was called, and the Calling Party (calling_party) which represents the client. The fourth field that is also injected is the interaction_type which is either VOICE or SMS (coming soon). An example of these session parameters could be seen below.
{
calling_party: '+16106571234'
called_party : '+14157271234'
call_sid : 'CA777c3e32301d155d1953463a8ce29405'
interaction_type : 'VOICE'
}
Avaya Cloud will attempt to change all phone numbers to E.164 format (e.g. (123)-456-7890 to 1234567890). If it cannot, it uses the raw number input.
If an intent has a session parameter named 'avaya_cloud_transfer' and this value is set to true, then Virtual Agent will try and forward the call. In order to tell Avaya who to transfer the call to, you must set a session parameter named ‘avaya_cloud_transfer_to’. This value could either be a full number or a SIP URI. Virtual Agent also allows you to set the caller ID when the call transfers. To do this you must include a session parameter named ‘avaya_cloud_transfer_caller_id’. This parameter can either have the value that you want the caller ID to be, however if you give it the value of ‘FROM’
then the caller ID will be set to the calling_party. If you give it the value of ‘TO’ then the caller ID will be set to the called_party. Finally you could also tell the Virtual Agent how to transfer the call, SIP or PSTN. PSTN is the default, however in order to tell Virtual Agent to transfer via SIP you must set the ‘avaya_cloud_sip_transfer’ parameter to true. To take this a step further, in order to perform a SIP forward with direct media you can set the parameter ‘avaya_cloud_sip_direct_media’ to true and then Virtual Agent will attempt to transfer the call via SIP Direct Media.
{
avaya_cloud_transfer : true ,
avaya_cloud_transfer_to : +16106571234 ,
avaya_cloud_transfer_caller_id : FROM
}
{
avaya_cloud_transfer : true ,
avaya_cloud_transfer_to : +16106571234 ,
avaya_cloud_transfer_caller_id : FROM ,
avaya_cloud_sip_transfer : true ,
avaya_cloud_sip_direct_media : false
}
If a Dialogflow CX session has a session parameter named 'avaya_cloud_end_conversation' and it is set to true, then Virtual Agent will attempt to end the call. The call will be terminated after the configured text response is spoken by Dialogflow for the specific turn.
Avaya Could Virtual Agent provides a number of methods for giving our speech recognition engine hints on what the user might be trying to say, in order to enforce recognition accuracy. All methods involve attaching an output context to a given intent. If an intent has a certain output context, then the next time the Virtual Agent goes to collect speech from the user, it will use the provided speech hints. There are currently multiple options to inject speech hints via the Virtual Agent. Several of these methods involve Google Class Tokens. The use of class tokens provides far better results when the use case requires them. All of these output contexts could work in conjunction with each other to provide speech hinting to understand more complex statements.
Session Parameter | Avaya STT Hint |
---|---|
avaya_cloud_speech_hints-alphanumeric | $OOV_CLASS_ALPHANUMERIC_SEQUENCE |
avaya_cloud_speech_hints-digits | $00V_CLASS_DIGIT_SEQUENCE |
avaya_cloud_speech_hints-letters | $00V_CLASS_ALPHA_SEQUENCE |
avaya_cloud_speech_hints-ordinal | $00V_CLASS_ORDINAL_SEQUENCE |
avaya_cloud_speech_hints-temperature | $00V_CLASS_TEMPERATURE_SEQUENCE |
avaya_cloud_speech_hints-address | $ADDRESSNUM |
avaya_cloud_speech_hints-day | $DAY |
avaya_cloud_speech_hints-phone-number | $FULLPHONENUM |
avaya_cloud_speech_hints-money | $MONEY |
avaya_cloud_speech_hints-month | $MONTH |
avaya_cloud_speech_hints-operand | $OPERAND |
avaya_cloud_speech_hints-postal-code | `$POSTALCODE |
avaya_cloud_speech_hints-year | $YEAR |
avaya_cloud_speech_hints-time | $TIME |
avaya_cloud_speech_hints-common-yes-and-no |
YES * NO * |
avaya_cloud_custom_speech_hints | Supply a comma separated list of words * |
YES : yes,yeah,yup,why not,okay i will,yes that's alright,yes i do, exactly,of course,yep,that's okay,ok,okay,sure,for sure,sg,yes that's ok,i agree,yes you can do it, i don't mind,that one works,that works,sure why not,perfect,i think so, yep that's right,yes i agree,sounds correct,sounds good,that's correct,go ahead,do it,it's fine,alright,yes please,alright why not,right,looks perfect,yes i can,confirm,absolutely
NO : thanks but no,no way,no,no don't,na,nah,no it isn't,don't,nah i'm good,no i cannot, I can't,nothing,no that's ok, nope, no not really,nope not really,thanks but not this time,I don't think so,thanks but not this time,no maybe next time,not this time,i disagree,no we are good,don't do it,no that be all,not right now, no thanks, no that's ok,I don't want that,definitely not,nothing else,not,not at all,no never,no way no,not really,not today, not interested,no that's fine thank you,i'm not
comma separated list of words : “word1 , word2 , word3 , word4”
Avaya Could Virtual Agent provides a way of allowing the Virtual Agent to detect DTMF tones. Virtual Agent looks for a special session parameter from the Dialogflow bot in order to look for DTMF. Once the Virtual Agent detects DTMF, it will pass the DTMF tones as a numeric string to Dialogflow. For example, if the user enters ‘1’ then the Virtual Agent will pass ‘1’, if the user enters ‘123’ then the Virtual Agent will pass ‘123’ with no spaces in between the digits.
Setting a session parameter to ‘avaya_cloud_dtmf’ and setting it to true will tell the Virtual Agent to detect DTMF for that specific turn. Virtual Agent will try and collect DTMF as long as this parameter ( ‘avaya_cloud_dtmf’
) is set to true. If the goal is to collect DTMF throughout the entirety of the call, then set the session parameter of your Welcome intent to ‘avaya_cloud_dtmf’ and a value of true. By default, when using this output context, the Virtual Agent will collect multiple digits and will stop on the pound sign ( #
).
If you’d like to collect more than 1 digit, then you must also include the ‘avaya_cloud_dtmf_num_digits’ parameter for a given intent. For example, setting the session parameter of ‘avaya_cloud_dtmf_num_digits’ equal to 3 will tell the Virtual Agent to collect 3 digits. You must update this parameter value each time you’d like to collect DTMF if the number of digits that you’d like to collect changes.
If you’d like to tell the Virtual Agent to stop collecting digits once it detects a certain DTMF tone, then you must include ‘avaya_cloud_dtmf_stop_digit’ on that intent. For example, setting the parameter of ‘avaya_cloud_dtmf_stop_digit’ equal to 7 tells the Virtual Agent to stop detecting DTMF once a 7 is detected. You must update this parameter value each time you’d like to use a different stop digit.
If you’d like to specify the timeout when collecting digits, you can use ‘avaya_cloud_dtmf_timeout’ session parameter for a given turn. For example, setting the parameter of ‘avaya_cloud_dtmf_timeout’ equal to 10, it will then tell the Virtual Agent to timeout on gathering digits after 10 seconds. The default is 5 seconds.
NOTE: The ‘avaya_cloud_dtmf_stop’ , ‘avaya_cloud_dtmf_num_digits’ , and ‘avaya_cloud_dtmf_timeout’ parameters are not recognized by the Virtual Agent unless ‘avaya_cloud_dtmf’ is also included/set to true.