Today I was completing an Auto Function algorythm for my IVR (Interactive Voice Recognition) application I am working on.

The premise to to deduce selections for the customer based on account information such as delinquency, or outage information for the region. Then route the customer to the appropriate  section automatically.

I test locally with Voxeo Prophecy. I prefer this as Voxeo seems to be fairly strict in the VXML specification, thus not allowing poor formatted VXML.

From Voxeo, I was getting this error

14:34:28,090 11/19 00B402E6D4AFF4D04E2DD7D50C06D346 INFO  callerInputLogger                   - request parameters for: exception/handleVoiceBrowserError [_message=The redirection chain from http://localhost:8080/agent-ivr/identify/callGetServiceInfo.vxml takes more than 4 steps, possible loop., _event=error.semantic]
14:34:28,105 11/19 00B402E6D4AFF4D04E2DD7D50C06D346 ERROR ExceptionController                 - An unhandled Voice Browser error occurred. event=error.semantic message=Theredirectionchainfromhttp://localhost:8080/agent-ivr/identify/callGetServiceInfo.vxmltakesmorethan4steps, possibleloop.

but from Avaya Voice Portal (AVP), I was getting a slightly different error:

13:39:19,782 11/19 40B4472EDFDFECC090F458E225744DA0 INFO  callerInputLogger                   - request parameters for: exception/handleVoiceBrowserError [_message=Error fetching document /agent-ivr/identify/callGetServiceInfo.vxml, _event=error.badfetch.http.404]
13:39:19,797 11/19 40B4472EDFDFECC090F458E225744DA0 ERROR ExceptionController                 - An unhandled Voice Browser error occurred. event=error.badfetch.http.404 message=Errorfetchingdocument/agent-ivr/identify/callGetServiceInfo.vxml

This took some time to track down, as the error occurred in a location where I was expecting to have account balance TTS played, but then reported the error was getting Service information for the customer. Not to mention, I was getting a loop redirect in Voxeo, and a 404 error in AVP.

What I finally found, is that Voxeo seems to have  a redirect limit of 6 chained redirects (http).

This application is using Spring MVC to render VXML to the Voice Browser.

We typically use redirects like this

    @RequestMapping(method = RequestMethod.GET)
    public String pinUnknown(ModelMap model) {
        callSession.setTransferReason(TransferReason.PIN_NOT_KNOWN);
        callSession.setCallEndReason(CallEndReason.PIN_NOT_KNOWN);
        return "redirect:/goodbye/repTransfer_pp";
    }

Where ‘/goodbye/repTransfer_pp’ is actually a velocity template ‘/goodbye/repTransfer_pp.vm’ but we want to force a request redirect.

This is normally fine, as with the standard user interaction, there are only 2-4 redirects chained at the most. But by adding Auto Functions for the caller, we started jumping to 6-9 redirect hops.

Instead of trying to reset the voice browser limits, I wanted to come up with a different solution, mostly because I need to be able to support Voxeo, Avaya, Voice Genie, and Holly Connect in production. I did not want to change all the VB’s.

The solution was fairly simple.

First, I created a generic vm that would generate a simple vxml submit to the voice browser

<form>
    <block>
        <submit next="#springUrl("$nextNode")" />
    </block>
</form>

Then, in place of the redirect, I changed my method to this

    @RequestMapping(method = RequestMethod.GET)
    public String pinUnknown(ModelMap model) {
        callSession.setTransferReason(TransferReason.PIN_NOT_KNOWN);
        callSession.setCallEndReason(CallEndReason.PIN_NOT_KNOWN);

        model.addAttribute(NEXT_NODE, "/goodbye/repTransfer_pp.vxml");
        return "layout/submit";
    }

This acts as a standard vxml page to the voice browser, and does not introduce a redirect chain, or rather, would break up a redirect chain if one was created.

Conclusion

Working with multiple Voice Browser can, at times, be far more challenging that HTML Browsers. But ensuring that your solution will work on the all browsers will ensure a great working product.

Mick Knutson

Java, JavaEE, J2EE, WebLogic, WebSphere, JBoss, Tomcat, Oracle, Spring, Maven, Architecture, Design, Mentoring, Instructor and Agile Consulting. http://www.baselogic.com/blog/resume

View all posts

Java / JavaEE / Spring Boot Channel

BLiNC Supporters

BLiNC Adsense

Archives

Newsletter