Page 1 of 1

Can i assign a variable a combined values from two vars

Posted: Fri Mar 27, 2009 4:13 am
by amitkhosla
HI,

I have a requirement where i want to assign a variable a combined value of two other variable. something like this

<var name="countryCode" expr="'+91'"/>

<var name="telNumber" expr="'9899478866'"/>

Now the provider number variable should have been assigned a value which is combination of values of two variable.

<var name="providerNumber" expr="'+919899478866'"/>

<transfer destexpr="providerNumber"/>

Regards,
Arvind

IVR code to combine two variables

Posted: Fri Mar 27, 2009 9:32 am
by support
Hi,

Here is an example of the IVR tag, <transfer>, used in IVR code that should help you combine two variables:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
<form>

<var name="countryCode" expr="'+91'"/> 

<var name="telNumber" expr="'9899478866'"/> 

<block>
<prompt>
The provider number is <value expr="countryCode + telNumber"/>.
</prompt>
</block>


<transfer name="DestinationPhone" destexpr="'tel:+1' + countryCode + telNumber" bridge="true" connecttimeout="15s">
...
</transfer> 
</form>
</vxml> 
Hope this helps.

Regards,
Plum Support