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

multiple voice/language when answering a call

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
sasa
Posts: 8
Joined: Mon Dec 27, 2010 5:36 am

multiple voice/language when answering a call

Post by sasa »

Hi,

I'm trying to have the call answered and speak in english, then spanish then french. However it generates 500error whenever i have the 2nd <speak> tag in the xml.

it didnt work like this

Code: Select all

<vxml version = "2.0" ><property name="inputmodes" value="dtmf"/><property name="interdigittimeout" value="5s"/><form id="getInput"><field name="pin" type="digits?minlength=1;maxlength=15"><prompt><voice name="Tom">Please, enter your pin now.</voice><speak xml:lang="es-MX"><voice name="Javier">Hola!  Para el espagñol, por favor, pulse dos.<break/><break/></voice></speak>[b]<speak xml:lang="fr-CA">[/b]<voice name="Julie">Pour continuer en français, presser trois</speak></voice></prompt></field><noinput>We did not receive your request<reprompt/></noinput><noinput count="3">Sorry, I can't hear you, please try you call again later. Goodbye.<disconnect/></noinput><block><submit namelist="session.telephone.ani pin session.telephone.dnis session.id" next="vxml_plum.pl"/></block></form></vxml>
it worked like this

Code: Select all

<vxml version = "2.0" ><property name="inputmodes" value="dtmf"/><property name="interdigittimeout" value="5s"/><form id="getInput"><field name="pin" type="digits?minlength=1;maxlength=15"><prompt><voice name="Tom">Please, enter your pin now.</voice><speak xml:lang="es-MX"><voice name="Javier">Hola!  Para el espagñol, por favor, pulse dos.<break/><break/></voice></speak><voice name="Julie">Pour continuer en français, presser trois</voice></prompt></field><noinput>We did not receive your request<reprompt/></noinput><noinput count="3">Sorry, I can't hear you, please try you call again later. Goodbye.<disconnect/></noinput><block><submit namelist="session.telephone.ani pin session.telephone.dnis session.id" next="vxml_plum.pl"/></block></form></vxml>
any idea what is wrong in my code?
http://www.plumvoice.com/docs/dev/voicexml:tags:speak
http://www.plumvoice.com/docs/dev/voicexml:tags:voice

i tried
<voice xml:lang="fr_fr"> and
<speak xml:lang="fr-CA">

thank you
sasa

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

Re: multiple voice/language when answering a call

Post by support »

Hi sasa,

The only issue we could find with your code was that you had your </speak> and </voice> tags backwards here:

Code: Select all

<speak xml:lang="fr-CA">
	<voice name="Julie">
	  Pour continuer en français, presser trois
      </speak>
        </voice>
The correct code looks like this:

Code: Select all

<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
?>
<vxml version = "2.0" >
<property name="inputmodes" value="dtmf"/>
<property name="interdigittimeout" value="5s"/>
<form id="getInput">
  <field name="pin" type="digits?minlength=1;maxlength=15">
    <prompt>
      <voice name="Tom">
	Please, enter your pin now.
      </voice>
      <speak xml:lang="es-MX">
	<voice name="Javier">
	  Hola!  Para el espagñol, por favor, pulse dos.
	  <break/><break/>
	</voice>
      </speak>
      <speak xml:lang="fr-CA">
	<voice name="Julie">
	  Pour continuer en français, presser trois
	</voice>
      </speak>
    </prompt>
  </field>
  <noinput>
    We did not receive your request
    <reprompt/>
  </noinput>
  <noinput count="3">
    Sorry, I can't hear you, please try you call again later. Goodbye.
    <disconnect/>
  </noinput>
  <block>
    <submit namelist="session.telephone.ani pin session.telephone.dnis session.id" next="vxml_plum.pl"/>
  </block>
</form>
</vxml>
We tested the above code and it worked, please let us know if you have any problems.

Regards,
Plum Support

Post Reply