Page 1 of 1

Transfer call via hardcode vs. User Input

Posted: Sat Feb 22, 2014 1:51 pm
by dnagel
<Script 1: (No issues)
---------------------------------
<?xml version="1.0"?>
<vxml version="2.0">
<form>
<field name="targetnumber" type="digits">
<prompt>
What phone number would you like to dial?
</prompt>
</field>
<transfer destexpr="targetnumber" >
<prompt>
Transferring to
<say-as type="number:digits">
<value expr="targetnumber"/>
</say-as>
</prompt>
</transfer>
</form>
</vxml>

Computer: What phone number would you like to dial?
Human: 1231231234
Computer: Transferring to 1231231234


Result: The call is completed
---------------------------------
<?xml version="1.0"?>
<vxml version="2.0">
<form>
<transfer destexpr="tel:+1231231234" >
<prompt>
Transferring to someone
</prompt>
</transfer>
</form>
</vxml>

Computer: Tranferring
Result: the call does not go through.

I also tried
<transfer destexpr="tel:1231231234" >
and
<transfer destexpr="1231231234" >
<transfer destexpr="+1231231234">

Can you shed some light what I might be doing wrong on the second script?

Thanks,
Don

Re: Transfer call via hardcode vs. User Input

Posted: Sat Feb 22, 2014 9:08 pm
by support
Hi Don,

The issue is just a minor detail with you transfer tag. As described in the <transfer> tag documentation at:
http://www.plumvoice.com/docs/dev/voice ... s:transfer

You would simply want to use the attribute 'dest' instead of 'destexpr'. The reason for this is that destsxpr expects an ECMAScript expression (i.e. in this case a variable) as the transfer number whereas the 'dest' attribute expects the literal telephone number for transfer prefixed with 'tel:+1'.

In this case, for using a hardcoded value, you would want to use the 'dest' attribute as such (being sure to prefix the number with 'tel:+1'):

<transfer dest="tel:+11231231234">

Regards,
Plum Support

Re: Transfer call via hardcode vs. User Input

Posted: Sun Feb 23, 2014 5:16 pm
by dnagel
Thanks much, that was it.

Don