Author Message
VasilyL
Joined: Jul 11, 2016
Messages: 230
Offline
Hello Gurus,
Can you please help with a termchar problem?

We have a Record element. It works fine. It records the users speech.
We have a simple gramma file, to determine when user press the "#" button for speech termination purposes.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<grammar>
<properties>
<mode value="dtmf"/>
<type value="static"/>
</properties>
<data>
<column id="Column0" repeat="-1" width="150">
<item repeat="-1" repeat-prob="-1" tag="" value="#" weight="-1"/>

</column>
</data>
</grammar>

We see in the VoiceBrowser logs that when user presses the "#" button the VB sends the result back to the application.

@2022-08-29 15:18:04,231||FINEST|VB|1869487|Session=epsingle-2022241121716-12|VXML_REC_RECOGNITION_RESULT
{
dialogHandle: 32
bargein: 0
DTMF: 1
result: "#"
haveUtterance: 0
utteranceDuration: 0
utterancePath: ""
rslt: [
inputMode: 1
]
}
|epsingle.avaya.lab.croc.ru####

We expects that the result (i.e. the "#" sign) should be in the Record complex variable: Record:termchar.
According OD User Guide: termchar: The value of the DTMF key the caller pressed to terminate the recording. If the
caller did not press a DTMF key to terminate the recording, this field is undefined.

In the logs we see empty value instead of "#":
29/08/2022 15:47:12:761 DEBUG - E0483B4D402DE3DFD593C8992D30D41E:/App_MyApp : session id:epsingle-2022241124157-13 | App_MyApp:REPORT_FINISH_Q6 | termchar = | Record6:termchar :

Does anybody know why we do not see the value in the Record6:termchar variable?

How we can detect in the Record node that user presses the "#" button?

And one more question: in the OD UG there is a point that "If the
caller did not press a DTMF key to terminate the recording, this field is undefined."
How we can detect that the variable Record6:termchar is undefined?

Thanks in advance!
Vasily.
VasilyL
Joined: Jul 11, 2016
Messages: 230
Offline
Any chance for help?
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
Not sure why you need to grammar for this. By default, the dtmfTerm property is set to true. The log you show doesn't seem to be from the record result which is expected to have the termchar field returned. When user, presses any key, it would terminate the recording and send back the termchar and this would be stored in the variable's termchar field. You can even test it out in OD simulation.
You would see something like this in the log:
31/08/2022 08:58:15:793 INFO - 4FC850F7AA708A2ECB781CCFA264F5AE:/SpeechApp : Storing :untitledRecord___termchar to complex: untitledRecord:termchar as [1]
VasilyL
Joined: Jul 11, 2016
Messages: 230
Offline
Hi,
Thank you for an answer!
I will try to exclude grammar and use the default way!
Vasily.
VasilyL
Joined: Jul 11, 2016
Messages: 230
Offline
Hi again,

The grammar file was removed. Now the termchar "#" works in the same manner but with out grammar file.

But...
Now we have a side effect because of other signs 1,2,3...etc can interrupt the record.

How to restrict to have only "#" termchar for termination?

Thanks in advance,
Vasily.
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
So you only want "#" to work. You would need to set the dtmfTerm property to false then. It would then use the grammar embedded in the Record element. The recognition result would probably come back to the column0 field instead. I have never tried this myself. Hope this works.
VasilyL
Joined: Jul 11, 2016
Messages: 230
Offline
Ok, I see. Thanks.
But I am curious how to get the column0 value? Where it will come? How to fetch it in the code?
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
Once you embed the grammar in the record element, the variable field would have been created for the grammar slot. The recognition would be sent back and stored in the variable field the same way as other input elements
VasilyL
Joined: Jul 11, 2016
Messages: 230
Offline
Hi,
We have nothing in Record6:Column0.

session id:epsingle-2022250092559-20 | App1:REPORT_FINISH_Q6 | column0 (termchar) = | Record6:Column0 :

So, what can be wrong? May be some settings? Or what?
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
Like I said before I didn't really have experience of this functionality. I just thought it would have worked the way I described. Now I've looked deeper into what is happening, I don't see how the VXML code generated by OD is getting any value returned matching the input grammar. Below is the sample vxml in the log I am looking at. That's how the variable is filled by OD. I don't think we ever fully implemented the functionality for some reason. However, if we know that EP does return a value matching the grammar, you maybe able to develop a customer VXML Servlet instead of using the Record node to handle this.

29:<filled>
30:<assign name="untitledRecord___value" expr="try {untitledRecord} catch (errMsg) {'undefined'}"/>
31:<assign name="untitledRecord___confidence" expr="try {untitledRecord$.confidence} catch (errMsg) {'undefined'}"/>
32:<assign name="untitledRecord___utterance" expr="try {untitledRecord$.utterance} catch (errMsg) {'undefined'}"/>
33:<assign name="untitledRecord___duration" expr="try {untitledRecord$.duration} catch (errMsg) {'undefined'}"/>
34:<assign name="untitledRecord___size" expr="try {untitledRecord$.size} catch (errMsg) {'undefined'}"/>
35:<assign name="untitledRecord___termchar" expr="try {untitledRecord$.termchar} catch (errMsg) {'undefined'}"/>
36:<assign name="untitledRecord___maxtime" expr="try {untitledRecord$.maxtime} catch (errMsg) {'undefined'}"/>
37:</filled>
Go to:   
Mobile view