I want to store user input on the side in a database.
as it seems (and please correct me if I am wrong) that a submit always jumps out of the script into the file indicated, its not really the slickest solution, or so it seems (two script lanugages in one file, rather not)
so I was looking at using the <script> tag to use ECMA/javascript to just launch a php script using my input data and then go ahead as if nothing happened.
The code below is supposed to record a single keypad number, store it in the database and go back to the formfield to wait for the next keypad number(the 'looping' functionality is not included yet).
As I am a flash and php guy, writing the right URL string to launch the script I at the moment guessing at best.
any help anyone?
---------------------------
<var name='callerId' expr='session.telephone.ani'/>
<form id="enterKey">
<prompt>
i am here.
</prompt>
<field name="keyCode" type="digits?length=1">
<grammar type="application/x-jsgf" mode="dtmf">1|2|3|4|5|6|7|8|9|0</grammar>
</field>
<filled namelist="keyCode" mode="all">
<prompt>
You pressed <value expr="keyCode" />
your number is. <say-as type="acronym"><value expr="callerId"/></say-as>
</prompt>
<script language="JavaScript" src="http://www.resonancedesign.co.uk/cgi/ph ... rId=<value expr='callerId'/>&keyCode=<value expr='keyCode'/>">
<script>
</filled>
</form>
-------------------------------
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
Javascript 'sidekick'?
-
- Posts: 16
- Joined: Mon Dec 10, 2007 6:33 am
okay i have it down to::
<?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1">
<var name="callerId" expr="session.telephone.ani"/>
<var name="scriptURL" expr="'http://www.resonancedesign.co.uk/cgi/ph ... ?callerId='"/>
<var name="inBetween" expr="'&keyCode='"/>
<form id="enterKey">
<block>
<prompt>
Your mobile just got cooler.
</prompt>
</block>
<field name="keyCode" type="digits?length=1">
<grammar type="application/x-jsgf" mode="dtmf">1|2|3|4|5|6|7|8|9|0</grammar>
</field>
<filled namelist="keyCode" mode="all">
<prompt>
You pressed <value expr="keyCode" />
your number is. <say-as type="acronym"><value expr="callerId"/></say-as>
</prompt>
<var name="myCGIScript" expr="scriptURL+callerId+inBetween+keyCode"/>
<script srcexpr="myCGIScript"></script>
<goto next="#enterKey"/>
</filled>
</form>
</vxml>
but the callerid still doesnt seem to exist AND a serious error yet again occurs
<?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1">
<var name="callerId" expr="session.telephone.ani"/>
<var name="scriptURL" expr="'http://www.resonancedesign.co.uk/cgi/ph ... ?callerId='"/>
<var name="inBetween" expr="'&keyCode='"/>
<form id="enterKey">
<block>
<prompt>
Your mobile just got cooler.
</prompt>
</block>
<field name="keyCode" type="digits?length=1">
<grammar type="application/x-jsgf" mode="dtmf">1|2|3|4|5|6|7|8|9|0</grammar>
</field>
<filled namelist="keyCode" mode="all">
<prompt>
You pressed <value expr="keyCode" />
your number is. <say-as type="acronym"><value expr="callerId"/></say-as>
</prompt>
<var name="myCGIScript" expr="scriptURL+callerId+inBetween+keyCode"/>
<script srcexpr="myCGIScript"></script>
<goto next="#enterKey"/>
</filled>
</form>
</vxml>
but the callerid still doesnt seem to exist AND a serious error yet again occurs
IVR issue with caller ID due to ANI being blocked
Hi,
The reason for the callerid not working has already been answered in another post (ANI being blocked).
As for your other IVR issue, you would want to use the <data> tag to push the caller ID and key code to your IVR server.
So, you'd want to replace this IVR code:
with this IVR code:
Hope this helps.
Regards,
Plum Support
The reason for the callerid not working has already been answered in another post (ANI being blocked).
As for your other IVR issue, you would want to use the <data> tag to push the caller ID and key code to your IVR server.
So, you'd want to replace this IVR code:
Code: Select all
<var name="myCGIScript" expr="scriptURL+callerId+inBetween+keyCode"/>
<script srcexpr="myCGIScript"></script>
Code: Select all
<data src="http://www.resonancedesign.co.uk/cgi/php/updateKeyCode.php" namelist="callerId keyCode"/>
Regards,
Plum Support
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com