how to access call_parameters in vxml file.
Posted: Thu Jun 04, 2015 11:10 am
Hi,
Can you please clarify me below questions,
1. What is the role of "call_parameters" in voice calls?
2. Can we access the data of "call_parameters" in VXML file which is stored in plum file repository?
ex:
1. I am calling the vxml file which is stored in plum file repository from JAVA as follow,
String url = "http://outbound.plumgroup.com/webservice/queuecall.php";
String login = "xxxxxxxxxxx";
String pin = "xxxxxxx";
String phone_number = "xxxxxxxxx";
String start_url = "http://repo.local.plumgroup.com/xxxx/xx ... cecall.xml";
String urlParameters = "login="+login+"&pin="+pin+"&phone_number="+phone_number+"&start_url="+start_url+"&call_parameters=2 5 8 7 4";
URL obj = new URL(url);
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("enctype", "multipart/form-data");
con.setDoOutput(true);
DataOutputStream wr = new DataOutputStream(con.getOutputStream());
wr.writeBytes(urlParameters);
wr.flush();
wr.close();
2. Below is the VXML file,
<vxml version="2.0">
<var name="varCallID" expr="call_parameters" />
<form>
<block>
<prompt>
Your call parameter is: <value expr="varCallID"/>.
</prompt>
</block>
</form>
</vxml>
-------
Now, i would like to access the value of call_parameters, inside the vxml file. is this possible?
If not, how can we pass the values to vxml file dynamically, can you please suggest me your best solution?
We already tried using the <value> & <data> tags by giving the source as xml file and getting the value from that xml file as below, thedata.documentElement.childNodes.item(0).firstChild.toString(). But, this will not work out in our case because if multiple users are accessing the same VXML file at the same time, the last updated xml value sent to all the users.
We are going through a high priority requirement so if you can help us out ASAP that would be a great help.
Thanks,
Gouse
Can you please clarify me below questions,
1. What is the role of "call_parameters" in voice calls?
2. Can we access the data of "call_parameters" in VXML file which is stored in plum file repository?
ex:
1. I am calling the vxml file which is stored in plum file repository from JAVA as follow,
String url = "http://outbound.plumgroup.com/webservice/queuecall.php";
String login = "xxxxxxxxxxx";
String pin = "xxxxxxx";
String phone_number = "xxxxxxxxx";
String start_url = "http://repo.local.plumgroup.com/xxxx/xx ... cecall.xml";
String urlParameters = "login="+login+"&pin="+pin+"&phone_number="+phone_number+"&start_url="+start_url+"&call_parameters=2 5 8 7 4";
URL obj = new URL(url);
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("enctype", "multipart/form-data");
con.setDoOutput(true);
DataOutputStream wr = new DataOutputStream(con.getOutputStream());
wr.writeBytes(urlParameters);
wr.flush();
wr.close();
2. Below is the VXML file,
<vxml version="2.0">
<var name="varCallID" expr="call_parameters" />
<form>
<block>
<prompt>
Your call parameter is: <value expr="varCallID"/>.
</prompt>
</block>
</form>
</vxml>
-------
Now, i would like to access the value of call_parameters, inside the vxml file. is this possible?
If not, how can we pass the values to vxml file dynamically, can you please suggest me your best solution?
We already tried using the <value> & <data> tags by giving the source as xml file and getting the value from that xml file as below, thedata.documentElement.childNodes.item(0).firstChild.toString(). But, this will not work out in our case because if multiple users are accessing the same VXML file at the same time, the last updated xml value sent to all the users.
We are going through a high priority requirement so if you can help us out ASAP that would be a great help.
Thanks,
Gouse