Announcement Announcement Module
Collapse
No announcement yet.
Spring Webflow with VoiceXML - need help getting going (specifically, cookie related) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Webflow with VoiceXML - need help getting going (specifically, cookie related)

    Using the voice browser of Voxeo, I am having an issue where the redirect to the second page is never working properly.



    my execution keys and flow keys are remapped.

    The request / responses from the voicexml browser look like this:
    Code:
    GET /foo/incident.vxml?incidentUID=53E2E7D4-FA0A-12DA-D12C-0299E5D61C33 HTTP/1.0
    user-agent: Voxeo-VXML/8.0.257.0
    accept: application/voicexml+xml, application/srgs+xml, application/srgs, text/x-vxml, */*
    pragma: no-cache
    content-type: application/x-www-form-urlencoded
    host: someserverhopto.org:8080
    via: 1.1 squid201:3128 (squid/2.6.STABLE19)
    x-forwarded-for: 10.6.65.202
    cache-control: no-cache, max-age=691200
    connection: keep-alive
    
    
    
    HTTP/1.1 302 Found
    Expires: Thu, 01 Jan 1970 00:00:00 GMT
    Location: http://someserverhopto.org:8080/foo/incident.vxml;jsessionid=DC298C2207491551639A3F329672DE14?execution=e1s1
    Set-Cookie: JSESSIONID=DC298C2207491551639A3F329672DE14; Path=/foo
    Cache-Control: no-cache
    Pragma: no-cache
    (user responds, generates some action - then browser resubmits with eventID=respond)

    Code:
    GET /foo/incident.vxml?eventID=respond&execution=e1s1 HTTP/1.0 
    user-agent: Voxeo-VXML/8.0.257.0 
    accept: application/voicexml+xml, application/srgs+xml, application/srgs, text/x-vxml, */* 
    pragma: no-cache 
    referer: http://someserverhopto.org:8080/foo/...613eeb6f7f3a0e 
    content-type: application/x-www-form-urlencoded 
    host: someserverhopto.org:8080 
    via: 1.1 squid201:3128 (squid/2.6.STABLE19) 
    x-forwarded-for: 10.6.65.202 
    cache-control: no-cache, max-age=691200 
    connection: keep-alive 
    
    
    
    HTTP/1.1 302 Found 
    Expires: Thu, 01 Jan 1970 00:00:00 GMT 
    Location: http://someserverhopto.org:8080/foo/incident 
    Set-Cookie: JSESSIONID=64E9EE097E8A2EC001F674017BF98561; Path=/foo 
    Cache-Control: no-cache 
    Pragma: no-cache 
    
    
    
    GET /foo/incident HTTP/1.0 
    user-agent: Voxeo-VXML/8.0.257.0 
    accept: application/voicexml+xml, application/srgs+xml, application/srgs, text/x-vxml, */* 
    pragma: no-cache 
    referer: http://someserverhopto.org:8080/foo/...613eeb6f7f3a0e 
    content-type: application/x-www-form-urlencoded 
    host: someserverhopto.org:8080 
    via: 1.0 squid201:3128 (squid/2.6.STABLE19) 
    x-forwarded-for: 10.6.65.202 
    cache-control: no-cache, max-age=691200 
    connection: keep-alive
    /foo/incident is where the name of the flow. It will get a 404 on that page since - well - that page doesn't exist.

    The desktop browser looks like this:
    Code:
    GET /foo/incident.vxml?eventID=respond&execution=e1s1 HTTP/1.1 
    user-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/530.4+ (KHTML, like Gecko) Version/4.0 Safari/528.16 
    accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 
    accept-language: en-us 
    accept-encoding: gzip, deflate 
    cookie: JSESSIONID=46AEE37A8ECC65C64A2D835023965C69 
    connection: keep-alive 
    host: localhost:8080 
    
    
    
    HTTP/1.1 303 See Other 
    Expires: Thu, 01 Jan 1970 00:00:00 GMT 
    Location: /foo/incident.vxml?execution=e1s2 
    Cache-Control: no-cache 
    Pragma: no-cache 
    
    
    GET /foo/incident.vxml?execution=e1s2 HTTP/1.1 
    user-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/530.4+ (KHTML, like Gecko) Version/4.0 Safari/528.16 
    accept-encoding: gzip, deflate 
    accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 
    accept-language: en-us 
    cookie: JSESSIONID=46AEE37A8ECC65C64A2D835023965C69 
    connection: keep-alive 
    host: localhost:8080
    On the desktop browser it actually works properly - unless I disable cookies - then it redirects me back to the /foo/incident page the same way the voicexml browser gets redirected there.

    I'm also curious why the voice browser isn't using the ;JSESSIONID in the url but just tossing it out.

    I know a handful of people here are using SWF with voicexml - but even those who aren't - any help on getting it to work properly with cookies disabled would be great.

  • #2
    solved it

    Since the browser isn't accepting cookies, I need to have the jsessionID in the URL.

    After dusting off my brain, and with a little bit of searching I remembered that c:url will encode a URL and throw the jsessionID on the url automatically if the browser doesn't accept cookies.

    so this is the magic way for me to set up my links to be cookieless voice-browser friendly. (it should also work for cookie-friendly voice browsers since it wont throw the jsessionid on there if the client accepts cookies)

    Code:
     <submit next="<c:url value='${flowExecutionUrl}' context="/" />" namelist="eventID"  method = "get"/>
    The reason for the "/" in the context is because the flowExecutionUrl already has the context in it. It would be nice if the flowExecutionUrl would also throw the sessionID on there if it was needed.

    I think I'm going to write a tutorial on getting voiceXML working with spring webflow. Using webflow behind voiceXML means you can just use the very easy bits of voiceXML (i.e. prompts, recognition, etc) but then rely entirely on your server to do the navigation between pages etc. and not have to become some kind of super voiceXML genius to get a basic app to work.

    Comment


    • #3
      I think I'm going to write a tutorial on getting voiceXML working with spring webflow. Using webflow behind voiceXML means you can just use the very easy bits of voiceXML (i.e. prompts, recognition, etc) but then rely entirely on your server to do the navigation between pages etc. and not have to become some kind of super voiceXML genius to get a basic app to work.
      Great to hear you're using Web Flow successfully with Voice XML to implement a voice response system. A tutorial on working with Web Flow and voice XML for IVR apps would be awesome. We'd happily link to it prominently from springsource.org. Feel free to create a JIRA once you have the tutorial posted and we'll post a corresponding news item.

      The flow execution URL is now also being encoded as of 2.0.7. Good catch.

      Thanks

      Keith
      Last edited by Keith Donald; Apr 20th, 2009, 03:32 PM.

      Comment


      • #4
        Any update on this tutorial?

        I really want to use Webflow in my current VXML application.

        Comment


        • #5
          tutorial

          I haven't written it up yet... I should. If I get a chance to soon I'll post the details here.

          If you are doing straight voicexml it word great once you tweak a few things. If you are doing combined ccxml+ voicexml it still works but there are some quirks to getting it se up since both ccxml and webflow are state machines.

          Comment

          Working...
          X