【问题标题】:VXML use the input for transferVXML 使用输入进行传输
【发布时间】:2016-12-12 10:12:32
【问题描述】:

我正在尝试获取用户输入(国家代码 + 电话号码),以便稍后使用转移元素调用它。

我的问题出现在传输元素上,它只是挂断了。我不知道如何调试它们。我使用 NEXMO 作为提供者。我事先搜索并尝试了很多东西,包括单独测试每个功能(这有效!)。

<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.1">
   <property name="inputmodes" value="dtmf" />
   <form id="get_mobile_number">
      <field name="mobileno" type="digits?minlength=7;maxlength=13">
         <prompt>
            <prosody rate="slow"> please enter your 7 to 13 digit mobile number !</prosody>
         </prompt>
         <!--INVALID-->
         <nomatch count="1">
            <prompt>
               <prosody rate="slow"> Is that a number? Please try again. </prosody>
            </prompt>
            <reprompt/>
         </nomatch>
         <!--TIMEOUT-->
         <noinput count="1">
            <prompt>Again, please enter your 7 to 13 digit mobile number !</prompt>
            <reprompt/>
         </noinput>
         <catch event="noinput nomatch" count="3">
            <prompt>Please try again later. Good bye.</prompt>
            <exit/>
         </catch>
         <filled>
            <goto next="#call_number"/>
         </filled>
      </field>
   </form>

   <form id="call_number">
      <transfer name="result" destexpr="'tel:+'+ mobileno" bridge="true">
         <prompt>Please wait while we transfer you.</prompt>
         <grammar xml:lang="en-US" root = "TOPLEVEL" mode="voice">
            <rule id="TOPLEVEL" scope="public">
               <one-of>
                  <item> disconnect </item>
               </one-of>
            </rule>
         </grammar>
      </transfer>
      <filled>
         <if cond="result == 'busy'">
            <prompt>Sorry, they're busy.</prompt>
            <elseif cond="result == 'noanswer'" />
            <prompt>Sorry, they didn't answer.</prompt>
            <else />
            <prompt>
               You spoke for <value expr="result$.duration" /> seconds.
            </prompt>
         </if>
         <if cond="result$.inputmode == 'voice'">
            You ended the call by saying,<value expr="result$.utterance" />.
         </if>
      </filled>
   </form>
</vxml>

有人知道它有什么问题吗?

【问题讨论】:

    标签: input phone-number phone-call transfer vxml


    【解决方案1】:

    从表面上看,逻辑似乎是正确的。

    为了调试它,我建议只运行call_number 表单(没有get_mobile_number 表单)并在“call_number”表单中输入实际号码而不是+ mobileno。然后,您将知道呼叫是否确实正在通过。

    如果仍然没有通过,那么您可能必须按照提供者的预期使用正确的格式(它可能不是 VXML 错误)。

    或者,您可以检查 IVR 日志并查看正在拨入的号码(以及您是否可以识别出任何明显的错误)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-16
      • 2014-05-09
      • 2018-01-27
      • 2011-12-04
      • 1970-01-01
      相关资源
      最近更新 更多