Author Message
Bhavesh
Joined: Apr 22, 2015
Messages: 3
Offline
Hi,

We have done the speech integration with google dialog flow from Avaya, but we are unable to parse the complete response received from google dialog flow. we can see the response coming in Voice Browser Logs.

Would need your help in parsing the response for below given variables
1) <value expr="lastresult$.interpretation.fulfillment_text"/>
2) <value expr="lastresult$.interpretation.query_text"/>
How can i read the fulfillment_text from the response?

Below is the logs for reference, which shows response coming from dialog flow. I just need to read the "fulfillment_text" node from the response.


@2018-12-05 12:27:53,516||FINE|VB|839|Session=labep-2018339042737-3|received a VXML_REC_RECOGNITION_RESULT|labep####
@2018-12-05 12:27:53,516||FINEST|VB|839|Session=labep-2018339042737-3|******** Entering Utility.cpp:489:LogIPCMessage|labep####
@2018-12-05 12:27:53,516||FINEST|VB|839|Session=labep-2018339042737-3|VXML_REC_RECOGNITION_RESULT
{
dialogHandle: 63
bargein: 0
DTMF: 0
result: "<?xml version="1.0"?><result><interpretation grammar="session:1" confidence="1"><instance><query_text>book a room</query_text><action>room.reservation</action><parameters><date></date><location></location><duration></duration><guests></guests><time></time></parameters><fulfillment_text>I can help with that. Where would you like to reserve a room?</fulfillment_text><fulfillment_messages><text><text>I can help with that. Where would you like to reserve a room?</text></text><platform>FACEBOOK</platform></fulfillment_messages><fulfillment_messages><text><text>I can help with that. Where would you like to reserve a room?</text></text></fulfillment_messages><output_contexts><name>projects/speechproject-219709/agent/sessions/4ffebcf7b2314d4e/contexts/e8f6a63e-73da-4a1a-8bfc-857183f71228_id_dialog_context</name><lifespan_count>2</lifespan_count><parameters><date></date><date_original></date_original><duration></duration><guests></guests><time></time><duration_original></duration_original><location_original></location_original><location></location><guests_original></guests_original><time_original></time_original></parameters></output_contexts><output_contexts><name>projects/speechproject-219709/agent/sessions/4ffebcf7b2314d4e/contexts/room_reservation_dialog_params_location</name><lifespan_count>1</lifespan_count><parameters><location_original></location_original><location></location><guests_original></guests_original><time_original></time_original><date></date><date_original></date_original><duration></duration><time></time><guests></guests><duration_original></duration_original></parameters></output_contexts><output_contexts><name>projects/speechproject-219709/agent/sessions/4ffebcf7b2314d4e/contexts/room_reservation_dialog_context</name><lifespan_count>2</lifespan_count><parameters><location_original></location_original><location></location><guests_original></guests_original><time_original></time_original><date></date><date_original></date_original><duration></duration><guests></guests><time></time><duration_original></duration_original></parameters></output_contexts><intent><name>projects/speechproject-219709/agent/intents/e8f6a63e-73da-4a1a-8bfc-857183f71228</name><display_name>room.reservation</display_name></intent><intent_detection_confidence>1</intent_detection_confidence><language_code>en-us</language_code></instance><input mode="speech">book a room</input></interpretation></result>"
haveUtterance: 0
utteranceDuration: 0
utterancePath: ""
rslt: [
inputMode: 1
result 0
{
grammarName: session:1
confidence: 1
rawInput: book a room
interpretation 0
{
simpleResult:
}
}
]
}
|labep####
@2018-12-05 12:27:53,516||FINEST|VB|839|Session=labep-2018339042737-3|******** Leaving Utility.cpp:489:LogIPCMessage|labep####
@2018-12-05 12:27:53,516||FINEST|VB|839|Session=labep-2018339042737-3|******** Leaving vpchannel.cpp:7661:WaitForMessageSub|labep####
@2018-12-05 12:27:53,516||FINEST|VB|839|Session=labep-2018339042737-3|VPChannel::WaitForMessageSub access count is 1|labep####
@2018-12-05 12:27:53,516||FINEST|VB|839|Session=labep-2018339042737-3|******** Leaving vpchannel.cpp:7634:WaitForMessage|labep####
@2018-12-05 12:27:53,516||FINEST|VB|839|Session=labep-2018339042737-3|VPChannel::DoRecog got a VXML_REC_RECOGNITION_RESULT|labep####
@2018-12-05 12:27:53,516||FINEST|VB|839|Session=labep-2018339042737-3|recognition result: <?xml version="1.0"?><result><interpretation grammar="session:1" confidence="1"><instance><query_text>book a room</query_text><action>room.reservation</action><parameters><date></date><location></location><duration></duration><guests></guests><time></time></parameters><fulfillment_text>I can help with that. Where would you like to reserve a room?</fulfillment_text><fulfillment_messages><text><text>I can help with that. Where would you like to reserve a room?</text></text><platform>FACEBOOK</platform></fulfillment_messages><fulfillment_messages><text><text>I can help with that. Where would you like to reserve a room?</text></text></fulfillment_messages><output_contexts><name>projects/speechproject-219709/agent/sessions/4ffebcf7b2314d4e/contexts/e8f6a63e-73da-4a1a-8bfc-857183f71228_id_dialog_context</name><lifespan_count>2</lifespan_count><parameters><date></date><date_original></date_original><duration></duration><guests></guests><time></time><duration_original></duration_original><location_original></location_original><location></location><guests_original></guests_original><time_original></time_original></parameters></output_contexts><output_contexts><name>projects/speechproject-219709/agent/sessions/4ffebcf7b2314d4e/contexts/room_reservation_dialog_params_location</name><lifespan_count>1</lifespan_count><parameters><location_original></location_original><location></location><guests_original></guests_original><time_original></time_original><date></date><date_original></date_original><duration></duration><time></time><guests></guests><duration_original></duration_original></parameters></output_contexts><output_contexts><name>projects/speechproject-219709/agent/sessions/4ffebcf7b2314d4e/contexts/room_reservation_dialog_context</name><lifespan_count>2</lifespan_count><parameters><location_original></location_original><location></location><guests_original></guests_original><time_original></time_original><date></date><date_original></date_original><duration></duration><guests></guests><time></time><duration_original></duration_original></parameters></output_contexts><intent><name>projects/speechproject-219709/agent/intents/e8f6a63e-73da-4a1a-8bfc-857183f71228</name><display_name>room.reservation</display_name></intent><intent_detection_confidence>1</intent_detection_confidence><language_code>en-us</language_code></instance><input mode="speech">book a room</input></interpretation></result>|labep####
@2018-12-05 12:27:53,516||FINEST|VB|839|Session=labep-2018339042737-3|1st result, grammar: session:1 confidence: 1 raw: book a room|labep####
@2018-12-05 12:27:53,516||FINER|VB|839|Session=labep-2018339042737-3|result 0, no slots so key is best_answer|labep####
@2018-12-05 12:27:53,516||FINEST|VB|839|Session=labep-2018339042737-3|******** Leaving vpchannel.cpp:1981:DoRecog|labep####
@2018-12-05 12:27:53,516||FINEST|VB|839|Session=labep-2018339042737-3|******** Entering vpchannel.cpp:3385:TransformRecogResult|labep####
@2018-12-05 12:27:53,516||FINEST|VB|839|Session=labep-2018339042737-3|******** Leaving vpchannel.cpp:3385:TransformRecogResult|labep####
@2018-12-05 12:27:53,517||FINE|CommonVXI.Rec|5127|Session=labep-2018339042737-3|osbrec.cpp:1453:AVBrecRecognize() platform call IChannel::DoRecog() returned: CHANNEL_RESULT_SUCCESS|labep####
@2018-12-05 12:27:53,517||FINE|CommonVXI.Rec|5127|Session=labep-2018339042737-3|osbrec.cpp:1490:AVBrecRecognize() maxnbest: 1|labep####
@2018-12-05 12:27:53,517||FINE|CommonVXI.Rec|5127|Session=labep-2018339042737-3|osbrec.cpp:1497:AVBrecRecognize() platform call IChannel::TransformRecogResult() returned: CHANNEL_RESULT_SUCCESS|labep####
@2018-12-05 12:27:53,517||FINE|CommonVXI.Rec|5127|Session=labep-2018339042737-3|osbrec.cpp:1508:AVBrecRecognize() Recog Mode: 4, Recog Status: 0|labep####
@2018-12-05 12:27:53,517||FINE|CommonVXI.Interpreter|5127|Session=labep-2018339042737-3|GrammarManager.cpp:2468:GrammarManager::Recognize() platform returns: 0|labep####
@2018-12-05 12:27:53,517||FINE|CommonVXI.Interpreter|5127|Session=labep-2018339042737-3|GrammarManager.cpp:2543:GrammarManager::Recognize() recognition status code: 0|labep####
@2018-12-05 12:27:53,517||FINE|CommonVXI.Interpreter|5127|Session=labep-2018339042737-3|GrammarManager.cpp:2580:GrammarManager::Recognize() recognition input mode: 4|labep####
@2018-12-05 12:27:53,517||FINE|CommonVXI.Interpreter|5127|Session=labep-2018339042737-3|GrammarManager.cpp:2613:DocumentParser::Recognize() Number of rec answers: 1|labep####
@2018-12-05 12:27:53,517||FINE|CommonVXI.Interpreter|5127|Session=labep-2018339042737-3|GrammarManager.cpp:2622:DocumentParser::Recognize() Verifying answer 0|labep####
@2018-12-05 12:27:53,517||FINER|CommonVXI.Interpreter|5127|Session=labep-2018339042737-3|GrammarManager.cpp:2778:DocumentParser::Recognize() keys Vector length: 1|labep####
@2018-12-05 12:27:53,517||FINE|CommonVXI.Interpreter|5127|Session=labep-2018339042737-3|GrammarManager.cpp:2798:DocumentParser::Recognize() Verified answer: 0|labep####
@2018-12-05 12:27:53,517||FINER|CommonVXI.Interpreter|5127|Session=labep-2018339042737-3|GrammarManager.cpp:2845:DocumentParser::Recognize() Found a matching Grammar: Element(grammar) Field($_internalName_31941) Dialog(main) DocID($_internalName_31939) Enabled(true)|labep####
@2018-12-05 12:27:53,517||FINER|CommonVXI.Interpreter|5127|Session=labep-2018339042737-3|VXI.cpp:7967:VXI::do_recognition() - return code: 0|labep####
@2018-12-05 12:27:53,518||FINER|CommonVXI.Interpreter|5127|Session=labep-2018339042737-3|VXI.cpp:8172:VXI::do_recognition - have an answer|labep####
@2018-12-05 12:27:53,518||FINER|CommonVXI.Interpreter|5127|Session=labep-2018339042737-3|VXI.cpp:2863:VXI::RunInnerLoop - saving unprocessed recog results|labep####
@2018-12-05 12:27:53,518||FINER|CommonVXI.Interpreter|5127|Session=labep-2018339042737-3|VXI.cpp:2875:VXI::RunInnerLoop - processing non-form level results|labep####
@2018-12-05 12:27:53,518||FINER|CommonVXI.Interpreter|5127|Session=labep-2018339042737-3|VXI.cpp:8305:VXI::ProcessRecognitionResultEx()|labep####
@2018-12-05 12:27:53,518||FINER|CommonVXI.Interpreter|5127|Session=labep-2018339042737-3|VXI.cpp:8346:VXI::ProcessRecognitionResultEx() - fieldName = $_internalName_31941, slotName = , num answers = 1|labep####
@2018-12-05 12:27:53,519||FINER|CommonVXI.Interpreter|5127|Session=labep-2018339042737-3|VXI.cpp:8393:VXI::ProcessRecognitionResultEx() - saving rec result -->application.lastresult$[0].utterance = book a room|labep####
@2018-12-05 12:27:53,519||FINER|CommonVXI.Interpreter|5127|Session=labep-2018339042737-3|VXI.cpp:8421:VXI::ProcessRecognitionResultEx() - saving rec result -->application.lastresult$[0].inputmode = voice|labep####
@2018-12-05 12:27:53,519||FINER|CommonVXI.Interpreter|5127|Session=labep-2018339042737-3|VXI.cpp:8572:application.lastresult$[0].confidence = 1|labep####
@2018-12-05 12:27:53,519||FINEST|CommonVXI.Interpreter|5127|Session=labep-2018339042737-3|VXI.cpp:8721:VXI::ProcessRecognitionResultEx() - Dumping value of application.lastresult$[0].interpretation$[0]|labep####
@2018-12-05 12:27:53,519||FINEST|CommonVXI.Interpreter|5127|Session=labep-2018339042737-3|VXI.cpp:8722: value is STRING: |labep####
@2018-12-05 12:27:53,522||FINER|CommonVXI.Interpreter|5127|Session=labep-2018339042737-3|VXI.cpp:8964:VXI::ProcessRecognitionResults - processing <filled> elements|labep####
@2018-12-05 12:27:53,522||FINER|CommonVXI.Interpreter|5127|Session=labep-2018339042737-3|VXI.cpp:3652:VXI::execute_content()|labep####


Do revert in case of any other information is required.

Thanks & Regards,
Bhavesh Mistry
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
I don't know where your integration point is since Dialogflow is no officially supported. Is OD involved? How do you get the result from Dialogflow?
RaymondWhite
Joined: Jan 31, 2011
Messages: 15
Offline
Hello-

Was there ever a solution to this issue? I have the same issue, where I need to access the data from the recognizer in VXML. How do we do this?

Kind Regards,

Ray
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
This is an old post. EP and OD have support for Google Dialogflow. Are you using the feature? It comes in the EP 7.2.3 version.
Go to:   
Mobile view