Genesys CTI User Forum

Genesys CTI User Forum => Genesys CTI Technical Discussion => Topic started by: cavagnaro on January 24, 2013, 07:52:13 PM

Title: SSML on composer prompt
Post by: cavagnaro on January 24, 2013, 07:52:13 PM
Hi guys,
I'm trying to make this work:

[code]
<prompt bargein="true"  gvp:langexpr="AppState.APP_LANGUAGE">
<say-as interpret-as="spell" format="alphanumeric"><value expr="AppState.In_CPF" /></say-as>
    </prompt>
[/code]

If I put this on the vxml file directly it does work, but I need to make this on Composer, if not each time the dev guys compile will be lost...

I tried to add this to the Prompt tab as

[code]
<say-as interpret-as="spell" format="alphanumeric"> AppState.In_CPF</say-as>
[/code]


but this makes this output:

[code]
<prompt bargein="true"  gvp:langexpr="AppState.APP_LANGUAGE">
<value expr="&lt;say-as interpret-as=&quot;spell&quot; format=&quot;alphanumeric&quot;&gt; AppState.In_CPF&lt;/say-as&gt;" />
    </prompt>
[/code]

which gives me a semantic error...

The GVP Composer Deployment guide states:

SSML tags can be used in prompts


But how...a support ticket (old one 8.0) advises to call VXML externally from subdialog but this would be too tedious as would have to maintain also those files...

Any idea how to achieve this??

Thanks!
Title: Re: SSML on composer prompt
Post by: gawix on January 25, 2013, 03:55:51 AM
You can have a single (i.e. re-usable) VoiceXML subdialog taking 2 parameters (valueToPlay and language):

spell.vxml:

<?xml version="1.0" encoding="utf-8"?>
<vxml version="2.1" xml:lang="en-US" xmlns="http://www.w3.org/2001/vxml"
xmlns:gvp="http://www.genesyslab.com/2006/vxml21-extension">
<form>
<var name="valueToPlay" />
<var name="language" />

<block>
<prompt bargein="true" gvp:langexpr="language">
<say-as interpret-as="spell" format="alphanumeric">
<value expr="valueToPlay" />
</say-as>
</prompt>
<return />
</block>
</form>
</vxml>

Use a subdialog node (type=URL, uri=spell.vxml) to invoke it and pass language=AppState.APP_LANGUAGE and valueToPlay=<your variable>.  Obviously, it's not a regular composer prompt, so you won't be able to use it from a menu node. However prompt queuing should allow use to play it just before the menu prompt.

Note: I haven't tested it.
Title: Re: SSML on composer prompt
Post by: cavagnaro on January 25, 2013, 10:49:28 AM
Thanks :) Will test this and let you know
Title: Re: SSML on composer prompt
Post by: cavagnaro on January 29, 2013, 04:20:10 PM
Worked like a charm :)
Thanks!