Print

Integration with Dialogflow for voice applications

In Avaya Experience Portal, applications like Orchestration Designer or VXML connect to a Dialogflow bot by using a defined grammar. The VXML grammar must have the application/avaya-ep-csr type attribute.

Google Dialogflow does not support standard grammar specifications such as SRGS or SISR. The content of a VXML grammar for Google Dialogflow is formatted as a CDATA section that encapsulates JSON objects. The JSON contains the properties that are related to this recognition request and are sent to Google using the Dialogflow V2Beta APIs. The JSON is used to send events and context from Avaya Experience Portal to Dialogflow.

The following grammar is an example of the initial grammar sending the Welcome event with sip-hdrs and avaya-session-telephone context. Here the default language, en-us, is overridden with the language en-gb (key/value pair defined in the JSON object).

<grammar mode="voice" type ="application/avaya-ep-csr" xml:lang=”en-us”>
<![CDATA[
     {"provider": "dialogflow_v2beta1", 
      "event_input":{"name":"Welcome"},
      "language":"en-gb",
      "contexts":[
          {
              "name":"sip-hdrs", "lifespanCount":1,
              "parameters":
              {
                  "callid":"3ffdc4d6555541e98159050568f34fb",
                  "requestmethod":"INVITE",
                  "requesturi":"sip:2141280@sipccgal.com",
                  "requestversion":"SIP/2.0"
              }
          },
          {
              "name":"avaya-session-telephone", "lifespanCount":1,
              "parameters":
              {
                  "aai":"00FA08000E04E35CA37458;encoding=hex",
                  "ani":"8140971",
                  "callid":"mpp248-EPMPP224SM-1-2019092144217",
                  "dnis":"2141280",
                  "early_media":"false"
              }
          }]
     }
]]>
</grammar>