cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1275
Views
1
Helpful
6
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: Grant Bagdasarian on 14-10-2011 02:48:30 AM
 
Hello,
 
I'm writing a VXML application which does two HTTP POST calls to a Generic Handler writen in C#.
In the VXML script I'm calling the same URL twice, but the second time with more parameters.
The weird thing is that the second time the call is executed the values of the parameters are double and are comma seperated.
 
I have this configured under an incoming dial-peer as a service.
 
Cisco configuration:
 
http client cache refresh 1
ivr prompt streamed http
vxml version 2.0
 
dial-peer voice 2000 voip
service vxmlapplication
 
Why is this happening?
 
Thanks,
 
Grant
 
 
 
<form>
    <block>
      <var name="parameterA" expr="session.telephone.dnis"/>
      <var name="parameterB"  expr="session.telephone.ani"/>
      <var name="parameterC" expr="Hello" />
      <cisco-data src="http://10.0.0.1/handler.ashx"
            name="result"
            method="post"
            maxage="0"
            namelist="parameterA parameterB">
      </cisco-data>
      <var name="index" expr="result.indexOf('|')" />
      <var name="defaultVoiceFile" expr="result.substr(0, index)"/>
      <var name="firstVoiceFile" expr="result.substr(index+1, result.length)"/>
      <prompt>
        <audio expr="defaultVoiceFile" />
      </prompt>
      <prompt>
        <audio expr="firstVoiceFile" />
      </prompt>
      <cisco-data src="http://10.0.0.1/handler.ashx"
            name="result"
            method="post"
            maxage="0"
            namelist="parameterA parameterB parameterC">
      </cisco-data>
    </block>
  </form>
 
Comments
willwatts
Level 5
Level 5

How does this work if you use vxml 2.1 and the VXML 2.1 <data> tag?

hemal.mehta
Level 5
Level 5

The data tag from VXML 2.1 is typically used to fetch XML data and then parse it. For cisco data you can call any URL and post data to it and get a response back from the server.

Hemal

willwatts
Level 5
Level 5

Hemal,

Does this mean the <data> tag can be used for an HTTP post to a server, and then fetch XML for parsing? 

Second, I've found that the <data> or <cisco-data> tag don't support Basic Authentication, example given, where the server requires a username and password:

<var name="URL" />

<assign name="URL" expr="'http://username:password@IP/Service'" />

<data name="MyName" srcexpr="URL"  namelist="varA varB"  method="post" fetchtimeout="50000ms" />

How does Cisco recommend handling Basic Authentication for <data> HTTP POST requests?

Have you see this?

janinegraves

Thanks,

Will Watts

hemal.mehta
Level 5
Level 5

Bill,

. I have used data tag to fetch a xml doc based on certain criteria. So you can pass in the name for the dom. So for example I could have something like

Hope that makes sense.

Hemal

willwatts
Level 5
Level 5

Hemal,

Please type that again.  There is nothing on your comment for your example hemal.mehta.

Thank you,

Will

hemal.mehta
Level 5
Level 5

Sorry Bill.  Here you go...

Bill,

  .   I have used data tag to fetch a xml doc based on certain criteria.  So you can pass in the name for the dom.  So for example I could have something like

<address>

   <streetname>Berry dr</streetname>

   <streetnumber>246</streenumber>

<address>

<data name=”address” src=”address.xml”>

<!----Put java script code to retrieve the xml values -à

<script>

</script>

</data>

Hope that makes sense.

Hemal

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links