Author Message
voice.developer
Joined: Aug 23, 2016
Messages: 33
Offline
Hello,

I am trying to understand the SSML item MARK. According to the AAOD documentation it is used to add markers in a prompt that plays TTS, TTS segment, or prompt. The markers can be used for detecting barge-in during prompt play back as well as tracking how much of a prompt the caller heard based on mark names and times.

Question is how do I access the MARKS in the AAOD. What I am trying to do is determine how much voice prompt is heard by the caller.

Thanks

Kurt
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
Wow, I have not looked at this for at least 6 years :shock: .

In your prompt you inter-leave the prompts segments with "mark" segments. The mark can have a constant name, or be a variable with a name in the variable. This only works on Input items with a prompt. ALSO (and important) you need to have vxml.2,1 enabled in your project properties and generate ssml enabled. Lastly on the Input item, in the properties you MUST set "Collect Mark Dta" to true.

Given the above 2 additional fields are added to the input variable "markname" and "marktime". This are submitted with the other values (confidence, utterance, value...).
voice.developer
Joined: Aug 23, 2016
Messages: 33
Offline
Thank you for the quick reply. I changed everything per your email and I am now able to see the MARK data. However, in one of my prompt and collect nodes I catch the connection.disconnect.hangup event and throw a custom event that is caught in the App node. The only thing I see is that the MARK data is not captured when an event is thrown. Even if I throw a connection.disconnect.hangup after the MARK line is executed in the prompt. I am thinking there is some sort of race condition that is not allowing the MARK data to be stored prior to exiting out of the servlet? When I let the IVR flow to the next node (without throwing an event), the MARK data is recorded. Any thoughts or just a limitation?

Thanks

Kurt
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
The spec does not say what happens on disconnect. I did notice that we do submit recording utterance info on disconnect so this may or may not be limitation or omission. I will have to alter the code and test that out.
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
I did some testing and altered the runtime framework to try to submit the mark time and name on disconnect


52:<catch event="connection.disconnect">
53:<var name="untitledPromptAndCollect_input___recording" expr="try {application.lastresult$.recording} catch (errMsg) {'undefined'}"/>
54:<var name="untitledPromptAndCollect_input___recordingsize" expr="try {objectToString(application.lastresult$.recordingsize)} catch (errMsg) {'undefined'}"/>
55:<var name="untitledPromptAndCollect_input___recordingduration" expr="try {objectToString(application.lastresult$.recordingduration)} catch (errMsg) {'undefined'}"/>
56:<var name="untitledPromptAndCollect_input___markname" expr="try {application.lastresult$.markname} catch (errMsg) {'undefined'}"/>
57:<var name="untitledPromptAndCollect_input___marktime" expr="try {objectToString(application.lastresult$.marktime)} catch (errMsg) {'undefined'}"/>
58:<assign name="untitledPromptAndCollect_input___noinputcount" expr="try {_avayaNoinputCounter} catch (errMsg) {'0'}"/>
59:<assign name="untitledPromptAndCollect_input___nomatchcount" expr="try {_avayaNomatchCounter} catch (errMsg) {'0'}"/>
60:<submit next="AvayaDefaultDisconnectHandler?___DDSESSIONID=BFA787BFC8F8AC92D42F19E7A9BB6683%3A%2FTestMark" namelist="untitledPromptAndCollect_input___recording untitledPromptAndCollect_input___recordingsize untitledPromptAndCollect_input___recordingduration untitledPromptAndCollect_input___markname untitledPromptAndCollect_input___marktime untitledPromptAndCollect_input___noinputcount untitledPromptAndCollect_input___nomatchcount" method="post" enctype="multipart/form-data"/>
61:</catch>
62:<block>
63:<submit next="untitledReturn1?___DDSESSIONID=BFA787BFC8F8AC92D42F19E7A9BB6683%3A%2FTestMark" namelist="untitledPromptAndCollect_input___value untitledPromptAndCollect_input___confidence untitledPromptAndCollect_input___utterance untitledPromptAndCollect_input___inputmode untitledPromptAndCollect_input___interpretation untitledPromptAndCollect_input___noinputcount untitledPromptAndCollect_input___nomatchcount untitledPromptAndCollect_input___Column0 untitledPromptAndCollect_input___markname untitledPromptAndCollect_input___marktime untitledPromptAndCollect_input___recording untitledPromptAndCollect_input___recordingsize untitledPromptAndCollect_input___recordingduration" method="post" enctype="multipart/form-data"/>

...
...
...
06/04/2017 07:14:04:665 INFO - BFA787BFC8F8AC92D42F19E7A9BB6683:/TestMark : Using SCESession BFA787BFC8F8AC92D42F19E7A9BB6683:/TestMark servlet : AvayaDefaultDisconnectHandler
06/04/2017 07:14:04:761 INFO - BFA787BFC8F8AC92D42F19E7A9BB6683:/TestMark : Storing :untitledPromptAndCollect_input___recordingsize to complex: untitledPromptAndCollect_input:recordingsize as [undefined]
06/04/2017 07:14:04:761 INFO - BFA787BFC8F8AC92D42F19E7A9BB6683:/TestMark : Storing :untitledPromptAndCollect_input___marktime to complex: untitledPromptAndCollect_input:marktime as [undefined]
06/04/2017 07:14:04:761 INFO - BFA787BFC8F8AC92D42F19E7A9BB6683:/TestMark : Storing :untitledPromptAndCollect_input___recordingduration to complex: untitledPromptAndCollect_input:recordingduration as [undefined]
06/04/2017 07:14:04:761 INFO - BFA787BFC8F8AC92D42F19E7A9BB6683:/TestMark : Storing :untitledPromptAndCollect_input___nomatchcount to complex: untitledPromptAndCollect_input:nomatchcount as [0]
06/04/2017 07:14:04:761 INFO - BFA787BFC8F8AC92D42F19E7A9BB6683:/TestMark : Storing :untitledPromptAndCollect_input___recording to complex: untitledPromptAndCollect_input:recording as [undefined]
06/04/2017 07:14:04:761 INFO - BFA787BFC8F8AC92D42F19E7A9BB6683:/TestMark : Storing :untitledPromptAndCollect_input___markname to complex: untitledPromptAndCollect_input:markname as [undefined]
06/04/2017 07:14:04:761 INFO - BFA787BFC8F8AC92D42F19E7A9BB6683:/TestMark : Storing :untitledPromptAndCollect_input___noinputcount to complex: untitledPromptAndCollect_input:noinputcount as [0]
06/04/2017 07:14:04:761 INFO - In Progress | session id:VB72-2017096133848-3 | TestMark:AvayaDefaultDisconnectHandler | Default Disconnect Handler | Default connection.disconnect handler caught disconnect, application exiting | | | undefined



I see that it is undefined. So it seems that the voice browser down not capture the marktime and markname on hangup.

You would have to raise an issue with platform support if you believe that should be different. The spec (VXML 2.1) does not say one way or the other.
voice.developer
Joined: Aug 23, 2016
Messages: 33
Offline
Thanks Ross,

I feel this is an important feature. Here is what I have used this feature for in the past (with other platforms). We are creating a reminder service for Dr. appointments. So we need to know if the patient listened long enough to hear the appointment time and date. Many times the patients will come to an appointment late or miss an appointment all together saying they did not hear the appointment time. This is costly since the office still has to pay the physician regardless if the patients shows or not. So what I am implementing are these marks to equip the vendor with the data that show how much of a prompt was heard. Many patients will just listen to the appointment time and then hang up. So this throws the connection.disconnect.hangup event but unfortunately does not retain the MARK data. Maybe there is another way to implement this granularity of prompt verification? I can throw the event in the node but I cannot see an easy way to determine if they heard the appointment time.

Thanks

Kurt
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
I understand. The changes in the OD runtime framework are relatively simple to "try" and capture the marktime and markname on hangup. HOWEVER, the Voice browser (VXI) is not capturing the mark as seen above. You will need to pursue this with the Platform support and when/if they make any changes OD will also have to make a corresponding change.
voice.developer
Joined: Aug 23, 2016
Messages: 33
Offline
Ok thanks,

Do I just open a ticket with my regular support channel or is there a way to initiate a support ticket through DevConnect.

RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
I believe the former. You should also reference this thread. For this to work changes would be needed in OD and the VXI. In rereading the spec I see

"Processors of conforming VoiceXML 2.1 documents must set the following two properties on the application.lastresult$ object whenever the application.lastresult$ object is assigned (e.g. a <link> is matched) and a <mark> has been executed."

So the question is.... Does application.lastresult$ get assigned on a hangup? If so, then this would be a bug/enhancement. If not then that is the way it works. Note that the recordutterance is also not captured by the VXI on hangup, even though OD does generate the vxml to submit it. So my sense is "that is the way it works". I have no guess of this can be altered as that would be up the the Voice Browser experts.

An alternative method to solve your delima would be to use capture the current time when the page that has the appointment reminder prompt is generated (in requestBegine(), System.currentTimeMillis()), and store that in an OD variable. Then when you catch the hangup or get to the next node you can do the same thing and generate a duration. This should give you a reasonable estimate of how much of the prompt was played.
Go to:   
Mobile view