Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rivr support on call flow routing other IVR application (non-Rivr VoiceXML application) #22

Open
nmvprasad opened this issue Sep 28, 2021 · 1 comment
Labels

Comments

@nmvprasad
Copy link

Hi Rivr Team,,

Is there anyway rivr supports routing the callflow from one rivr application to other IVR application (non rivr vxml application)

@gawi
Copy link
Member

gawi commented Sep 28, 2021

Yes. SImply end your dialogue with a Goto instead of a Exit.

package com.nuecho.rivr.cookbook.dialogue;

import com.nuecho.rivr.core.channel.*;
import com.nuecho.rivr.voicexml.dialogue.*;
import com.nuecho.rivr.voicexml.turn.first.*;
import com.nuecho.rivr.voicexml.turn.last.*;

public class Dialogue implements VoiceXmlDialogue {

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

        
        // ... dialogue here

        return new Goto("goto", "https://example.com/dialogues/otherDialogue");
    }

}

If you want to pass data captured in your dialogue, then use a Submit and pass values in the VariableList:

package com.nuecho.rivr.cookbook.dialogue;

import com.nuecho.rivr.core.channel.*;
import com.nuecho.rivr.voicexml.dialogue.*;
import com.nuecho.rivr.voicexml.rendering.voicexml.*;
import com.nuecho.rivr.voicexml.turn.*;
import com.nuecho.rivr.voicexml.turn.first.*;
import com.nuecho.rivr.voicexml.turn.last.*;

public class Dialogue implements VoiceXmlDialogue {

    @Override
    public VoiceXmlLastTurn run(VoiceXmlFirstTurn firstTurn, VoiceXmlDialogueContext context) throws Timeout,
            InterruptedException {
       
        // ... dialogue here

        VariableList variables = new VariableList();
        variables.addWithString("param1", "value1");
        variables.addWithString("param2", "value2");
        
        Submit submit = new Submit("submit", "https://example.com/dialogues/otherDialogue", variables);
        submit.setMethod(SubmitMethod.post); // can also be "get"
        
        return submit;
    }

}

@gawi gawi added the question label Sep 28, 2021
@gawi gawi changed the title Rivr support on call flow routing other IVR application (non rivr vxml application) Rivr support on call flow routing other IVR application (non-Rivr VoiceXML application) Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants