Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Community Member

VXML transfer app with variable length phone number

In a vxml app running on a router I am trying to use a variable length in the telephone number entered by the caller / user.

This works just fine with the router dial-peers if the telephone number is 11 digits...

<form id="get_number">

<field name="phone_number" type="digits?minlength=7;maxlength=11">

<grammar type="application/grammar+regex">...........</grammar>

<prompt>

<audio>etc...

</prompt>

</field>

<transfer name="theCall" destexpr="'phone://'+phone_number" connecttimeout="30s" bridge="false">

etc...

This works just fine if the user enters 11 digits (i.e. US long distance call) but just hangs with 7 digits (a local call) waiting for the other 4 digits. Is there a way to make the grammar a variable length so the person can call single digit ("0"), or 3 digit ("411"), or 7 or 10 digit local calls, or 11 digit long distance calls? I would settle for calls between 7 and 11 digits.

Thanks,

Bud

2 REPLIES
Community Member

Re: VXML transfer app with variable length phone number

Your regexp only matches 11 characters, ie 11 dots. To match between 7 and 11 char you could do

.{7,11}

Note this would also match 8,9,10, and . matches ANY character including # or a-z.

Also, make sure you have dial-peers that will match the shorter number. There are more complicated ways to do it that would do 3,7,11, but this should get you started. Read up on regular expressions.

John Spade

webVoIP

Community Member

Re: VXML transfer app with variable length phone number

The answer to this question can be found at Cisco bug ID # CSCea15106.

346
Views
0
Helpful
2
Replies
CreatePlease to create content