Hi all!
Does anyone know how to inject ssml tag through variable?
Fixed mode works
[code]
<form>
<block>
<prompt bargein="true" gvp:langexpr="language">
<voice name="rosana-highquality.voice"><prosody volume="+15dB" rate="40%"> Text to speak </prosody></voice>
</prompt>
<return />
</block>
</form>
[/code]
dynamically doesn't work
[code]
<!-- Global Vars declarations -->
<script>
var AppState = new Object();
AppState.System = new Object();
AppState.System.RetainInputTypeVariableDefaultValue = false;
AppState.CallUUID = session.connection.uuid;
AppState.ANI = getANI();
AppState.DNIS = getDNIS();
AppState.USE_LCASE_USERDATAKEY = initSystemTypeVariable('USE_LCASE_USERDATAKEY',0);
if (session.connection.protocol.sip.headers != undefined &&
session.connection.protocol.sip.headers['x-genesys-gvp-session-id']){
AppState.GVPSessionID = session.connection.protocol.sip.headers['x-genesys-gvp-session-id'];
} else {
AppState.GVPSessionID = 'undefined';
}
AppState.APP_LANGUAGE = initSystemTypeVariable('APP_LANGUAGE','en-US');
AppState.APP_ASR_LANGUAGE = initSystemTypeVariable('APP_ASR_LANGUAGE','en-US');
AppState.PREV_APP_LANGUAGE = initSystemTypeVariable('PREV_APP_LANGUAGE','en-US');
AppState.PREV_APP_ASR_LANGUAGE = initSystemTypeVariable('PREV_APP_ASR_LANGUAGE','en-US');
AppState.GRAMMARFILEDIR = initSystemTypeVariable('GRAMMARFILEDIR','../Resources/Grammars');
AppState.VOXFILEDIR = initSystemTypeVariable('VOXFILEDIR','../Resources/Prompts');
AppState.SCRIPTSDIR = initSystemTypeVariable('SCRIPTSDIR','../Scripts');
AppState.EnableReports = initSystemTypeVariable('EnableReports',true);
AppState.EnableSNMP = initSystemTypeVariable('EnableSNMP',false);
AppState.LAST_EVENT_NAME = initSystemTypeVariable('LAST_EVENT_NAME','undefined');
AppState.LAST_EVENT_MSG = initSystemTypeVariable('LAST_EVENT_MSG','undefined');
AppState.LAST_EVENT_URL = initSystemTypeVariable('LAST_EVENT_URL','undefined');
AppState.LAST_EVENT_ELEMENT = initSystemTypeVariable('LAST_EVENT_ELEMENT','undefined');
AppState.LAST_EVENT_LINE = initSystemTypeVariable('LAST_EVENT_LINE','undefined');
AppState.EnableFCR = initSystemTypeVariable('EnableFCR',true);
AppState.COMPOSER_WSSTUBBING = initSystemTypeVariable('COMPOSER_WSSTUBBING','0');
AppState.APP_OPM = initSystemTypeVariable('APP_OPM',eval('('+session.connection.protocol.sip.requesturi['parameters']+')'));
AppState.OCS_RecordURI = initSystemTypeVariable('OCS_RecordURI',getCallflowRecordURI());
AppState.OCS_URI = initSystemTypeVariable('OCS_URI',getCallflowOCSURI());
AppState.OCS_Record = initSystemTypeVariable('OCS_Record',getCallflowOCSRecord());
AppState.content = '<voice name="rosana-highquality.voice"><prosody volume="+15dB" rate="40%"> Text to speak </prosody></voice>';
</script>
...
...
...
<form>
<block name="Prompt1P0">
<prompt bargein="true" gvp:langexpr="AppState.APP_LANGUAGE">
<value expr="AppState.content" />
</prompt>
<return />
</block>
</form>
[/code]
<voice name="rosana-highquality.voice"><prosody volume="+15dB" rate="40%"> Text to speak </prosody></voice>
[]īs!