platform : sandbox testing place
I would like to add one more snippet set
The below snippet will get the mobile number from caller, and post the caller entered number into another page, Code working fine,
but i want to check the that number in the table and pull the " Entered phone number details", that is in contact_tbl holds the phone number, firstname, lastname, address, now i want to pull these details for the given phone number.
<?php
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
?>
<vxml version = "2.1">
<meta name="maintainer" content="your_email_address@wherever.com"/>
<property name="inputmodes" value="dtmf" />
<form id="get_mobile_no">
<field name="mobileno" type="digits?minlength=10;maxlength=10">
<prompt>
<prosody rate="slow"> please enter your 10 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 10 digit mobile number !</prompt>
<reprompt/>
</noinput>
<catch event="noinput nomatch" count="3">
<prompt>Please try again later. Good bye.</prompt>
<exit/> </catch>
<filled>
<prompt>
<prosody rate="slow"> you said
<value expr="mobileno"/>
! Thanks for calling, you may now hang up.</prosody>
</prompt>
</filled>
</field>
<block name="sendData">
<prompt>Entering entering...</prompt>
<submit next="get_dtmf_ip.php" namelist="mobileno" method="post" />
</block>
</form>
</vxml>
sample VXML ivr application which get input from user and play caller entered number.
below code working fine, but when i remove grammer tag, it playing some error code, i am not able to track that error code.
now i want to make little change, that user can enter more than one number.
exactly caller have to enter their their mobile number.
how to change the code to accept multiple number.
<?php
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
?>
<vxml version = "2.1">
<meta name="maintainer" content="your_email_address@wherever.com"/>
<form id="guessNumber">
<field name="guess">
<grammar type="text/gsl">
[dtmf-1 dtmf-2 dtmf-3 dtmf-4 dtmf-5 dtmf-6 dtmf-6 dtmf-7 dtmf-8 dtmf-9]
</grammar>
<prompt>
<prosody rate="slow">
Guess what the computer is thinking! Pick a number between 0 and 9.
</prosody>
</prompt>
<nomatch>
<prompt>
<prosody rate="slow">
Is that a number? Please try again.
</prosody>
</prompt>
<reprompt/>
</nomatch>
<filled>
<prompt>
<prosody rate="slow">
you said
<value expr="guess"/>
!
</prosody>
</prompt>
</filled>
</field>
</form>
</vxml>