Skip to content
Jean-Philippe Gariépy edited this page Apr 25, 2015 · 3 revisions

GVP Call UUID is exposed under session.connection.uuid. We use a Script turn to retrieve it:

Dialogue.java:

@Override
public VoiceXmlLastTurn run(VoiceXmlFirstTurn firstTurn, VoiceXmlDialogueContext context)
        throws Exception {

    VariableList variables = new VariableList();
    variables.addWithExpression("uuid", "session.connection.uuid");

    Script script = new Script("get-uuid");
    script.setVariables(variables);

    VoiceXmlInputTurn inputTurn = DialogueUtils.doTurn(script, context);

    JsonObject result = (JsonObject) inputTurn.getJsonValue();
    context.getLogger().info("UUID: " + result.getString("uuid"));

    //end of dialogue
    return new Exit("exit");
}

Running this example

You can download or browse the complete code for this example at GitHub.This is a complete working application that you can build and run for yourself.

You can also clone the Rivr Cookbook repository and checkout this example:

git clone -b genesys-gvp-uuid [email protected]:nuecho/rivr-cookbook.git

Then, to build and run it:

cd rivr-cookbook

./gradlew jettyRun

The VoiceXML dialogue should be available at http://localhost:8080/rivr-cookbook/dialogue

To stop the application, press Control-C in the console.