We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

Transfer call via hardcode vs. User Input

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
dnagel
Posts: 18
Joined: Sat Feb 08, 2014 10:18 am

Transfer call via hardcode vs. User Input

Post 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

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Re: Transfer call via hardcode vs. User Input

Post 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

dnagel
Posts: 18
Joined: Sat Feb 08, 2014 10:18 am

Re: Transfer call via hardcode vs. User Input

Post by dnagel »

Thanks much, that was it.

Don

Post Reply