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

few questions

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
simplee
Posts: 9
Joined: Mon May 02, 2016 4:47 am

few questions

Post by simplee »

Hi,

1. why is the "application/x-jsgf" input comes with spaces between the digits the user pressed? how can i get the string without the spaces?

2. Our application performs payments, and the credit card details need to be confidential. how can i hide the numbers in the logs? or if i cant do that, then disable the log option?

3. Is there a built-in way to identify the request came from plum api? for obvious security reasons.

thanks!

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

Re: few questions

Post by support »

simplee wrote:1. why is the "application/x-jsgf" input comes with spaces between the digits the user pressed? how can i get the string without the spaces?
Can you give us a small code example of what you're doing?
simplee wrote:2. Our application performs payments, and the credit card details need to be confidential. how can i hide the numbers in the logs? or if i cant do that, then disable the log option?
Yes, you can turn logging off for that portion of the app. For more details, please take a look at the logging property http://www.plumvoice.com/docs/dev/voice ... es:logging
simplee wrote:3. Is there a built-in way to identify the request came from plum api? for obvious security reasons.
Which API request are you referring to?

simplee
Posts: 9
Joined: Mon May 02, 2016 4:47 am

Re: few questions

Post by simplee »

support wrote:
simplee wrote:1. why is the "application/x-jsgf" input comes with spaces between the digits the user pressed? how can i get the string without the spaces?
Can you give us a small code example of what you're doing?
simplee wrote:2. Our application performs payments, and the credit card details need to be confidential. how can i hide the numbers in the logs? or if i cant do that, then disable the log option?
Yes, you can turn logging off for that portion of the app. For more details, please take a look at the logging property http://www.plumvoice.com/docs/dev/voice ... es:logging
simplee wrote:3. Is there a built-in way to identify the request came from plum api? for obvious security reasons.
Which API request are you referring to?

1. sure.
<vxml version="2.0">
<property name="inputmodes" value="dtmf"/>
<form id="main">
<field name="input" type="digits?maxlength=25">
<grammar type="application/x-jsgf" mode="dtmf">( 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 )+</grammar>
<prompt timeout="20s">
<voice name="mike">
please enter your account number followed by the pound sign. you can find the account number on your paper statement
</voice>
</prompt>
</field>
<filled>
<submit namelist="input " next="...."/>
</filled>
<catch event="nomatch noinput" count="1,2">
<reprompt/>
</catch>
<catch event="nomatch noinput" count="3">
<goto next="#redirect"/>
</catch>
</form>
<form id="redirect">
<transfer dest="(608) 775-8660">
<prompt>
<voice name="mike">you are being transfered to customer service</voice>
</prompt>
</transfer>
</form>
</vxml>


3. I will try to explain better. our app gets the response from plum, with the user input. we want our app to be able to recognize the request came from plum. an id? token? session param? something?

4.what is the recommended timeout to define for prompt? is the time includes the voice? sometimes if the voice is long, there is no time to enter the input...

5. is there a way to get the duration of the call?

thanks

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

Re: few questions

Post by support »

1. Right now you're defining your grammar twice when you only need to do it once. Here's a streamlined version of your code.

Code: Select all

<vxml version="2.0">
  <property name="inputmodes" value="dtmf"/>
  
  <form id="main">
    <field name="input" type="digits?maxlength=25">
      <prompt timeout="20s">
	<voice name="mike"> please enter your account number followed by the pound sign. you can find the account number on your paper statement </voice>
      </prompt>
    </field>
    
    <filled> <submit namelist="input " next="..."/> </filled>
   
    <catch event="nomatch noinput" count="1,2"> <reprompt/> </catch>
    
    <catch event="nomatch noinput" count="3"> <goto next="#redirect"/> </catch>
  </form>
  
  <form id="redirect">
    <transfer dest="16087758660">
      <prompt>
	<voice name="mike">you are being transferred to customer service</voice>
      </prompt>
    </transfer>
  </form>
  
</vxml>

3. You may use any method you'd like. The simplest way would be to send along a specific token with your request.


4. The default timeout is 3 seconds. Generally a 3-5 second timeout is sufficient. The time does not include the voice. The time starts when the IVR is done with the prompt.


5. You should store the time at the very beginning of the call. Then at the end of the call you send that data to your webservice. Your webservice can calculate the call duration that way.

Post Reply