but still have a question.
I need to have a short message played if an answering machine or voicemail system answers, and give a list of menu choices if a person answers.
I also understand that callee_type detection is not perfect, but that's not an issue.
With the voiceXML below, the menu choices always play even when the callee_type is correctly detected as answering machine.
I've x'd out the real names including our URL, but the call is made correctly; I just need to fix the conditional portion.
Please tell me where I went wrong:
Code: Select all
1 <?xml version="1.0" ?>
2 <!DOCTYPE vxml PUBLIC "-//The Plum Group//DTD VOICEXML 2.1//EN" "/usr/local/plumvp/vxml.dtd">
3 <vxml version="2.0">
4 <property name="inputmodes" value="dtmf"/>
5 <form id="mainmenu">
6 <var name="callee_type" expr="'answeringmachine'"/>
7 <record cond="callee_type=='answeringmachine'" finalsilence="2000ms">
8 <noinput>
9 <prompt>
10 <voice name="Diane">
11 (patient name fills in here)
12 This is Dr. xxxxx's office.
13 </voice>
14 </prompt>
15 <disconnect/>
16 </noinput>
17 </record>
18 <field name="menuchoice">
19 <grammar type="application/x-jsgf" mode="dtmf">
20 1|2|3|4
21 </grammar>
22 <prompt>
23 <voice name="Diane">
24 (patient name fills in here)
25 This is Dr. xxxxx's office.
26 To confirm your appointment, press 1.
27 To cancel your appointment, press 2.
28 To speak to an operator, press 3.
29 To repeat these options, press 4.
30 </voice>
31 </prompt>
32 <filled>
33 <if cond="menuchoice==1">
34 <prompt bargein="false">
35 <voice name="Diane">
36 Your appointment is confirmed.</voice>
37 </prompt>
38 <submit next="http://xxxxxx/PhoneReminderProcessCall.aspx?message_reference=&call_parameters=&call_id=0" method="get" namelist="menuchoice"/>
39 <elseif cond="menuchoice==2"/>
40 <prompt bargein="false">
41 <voice name="Diane">
42 Connecting to an attendant to re-schedule.</voice>
43 </prompt>
44 <submit next="http://xxxxxx/PhoneReminderProcessCall.aspx?message_reference=&call_parameters=&call_id=0" method="get" namelist="menuchoice"/>
45 <elseif cond="menuchoice==3"/>
46 <prompt bargein="false">
47 <voice name="Diane">
48 Transferring to the operator.</voice>
49 </prompt>
50 <submit next="http://xxxxxx/PhoneReminderProcessCall.aspx?message_reference=&call_parameters=&call_id=0" method="get" namelist="menuchoice"/>
51 <elseif cond="menuchoice==4"/>
52 <clear namelist="menuchoice"/>
53 <reprompt/>
54 </if>
55 </filled>
56 <noinput>
57 <reprompt/>
58 </noinput>
59 <nomatch>
60 <prompt>Input not recognized</prompt>
61 <reprompt/>
62 </nomatch>
63 </field>
64 <catch event="connection.disconnect">
65 <submit next="http://xxxxxx/PhoneReminderProcessCall.aspx?hangup=true&message_reference=&call_parameters=&call_id=0" method="get" namelist="menuchoice"/>
66 </catch>
67 </form>
68 </vxml>
Thank you.