问题描述
我正在构建一个非常简单的 voiceXML 应用程序,以允许人们进行录音.但首先,我需要通过电话号码和/或 PIN 对来电者进行身份验证.
I'm building a very simple voiceXML app to allow people to make recordings.But first, I need to authenticate callers by phone number and/or PIN.
我可以从 voiceXML 调用网络服务吗?看起来我想使用 voiceXML数据"元素来调用我的网络服务.但是,我需要动态计算URL,看起来它只需要一个静态字符串作为src"参数.
Can I call a webservice from voiceXML? Looks like I want to use the voiceXML "data" element to call my webservice. However, I need to dynamically calculate the URL, and it looks like it only takes a static string as the "src" parameter.
我是 voiceXML 的新手,所以给我指点一个好的教程也会有帮助!我正在使用 voxeo 文档.
I'm new to voiceXML, so pointing me to a good tutorial would help too! I'm working from the voxeo documentation.
推荐答案
您对需要数据元素的看法是正确的,我会查看该元素的 screxpr 属性.
you're right about needing the data element, and i'd have a look at the screxpr attribute of that element.
http://www.vxml.org/frame.jsp?page=data.htm
不言自明:
<data srcexpr="'http://example.com/?key=' + myValue" />
这篇关于如何从 voiceXML 调用网络服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!