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

Passing a variable from one xml file to another - (Scope)

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Chris
Posts: 64
Joined: Wed Jul 23, 2008 12:50 pm

Post by Chris »

Yes here's the log.
And I've noticed the strangest thing.
It's calling on a different file than it should.
It's seeking "e01_Enrollment.php"
When it should be looking for "e01_Enrollment-r.vxml"

Thu 07 Aug 2008 04:20:03 PM EDT:
Call Start Event: ANII DNIS 5734 VURL http://www.PHARMACALL.mobi/VXML/INBOUND ... lobals.php
DocumentParser::FetchDocument()
DocumentParser::FetchDocument(http://www.PHARMACALL.mobi/VXML/INBOUND ... lobals.php)
Cache Miss: http://www.PHARMACALL.mobi/VXML/INBOUND ... lobals.php
Attempting to fetch http://www.PHARMACALL.mobi/VXML/INBOUND ... lobals.php
Click here to view saved VoiceXML script
VXI::var_element(name="program_name" expr = " 'Pharma Call' ")
VXI::assign_element(name="application.ProgramName" expr = "program_name")
VXI::var_element(name="product_id" expr = " ' medication ' ")
VXI::assign_element(name="application.ProductName" expr = "product_id")
VXI::var_element(name="generic_name" expr = " '' ")
VXI::assign_element(name="application.GenericName" expr = "generic_name")
DocumentParser::FetchDocument(e01_Enrollment-r.vxml)
Cache Hit: http://www.PHARMACALL.mobi/VXML/INBOUND ... ent-r.vxml
Click here to view saved VoiceXML script
DocumentParser::FetchDocument(e00_OpenDB_Globals.php)
Cache Miss: http://www.PHARMACALL.mobi/VXML/INBOUND ... lobals.php
Attempting to fetch http://www.PHARMACALL.mobi/VXML/INBOUND ... lobals.php
Click here to view saved VoiceXML script
bargein set to false
INPUTMODES set to "DTMF VOICE"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak>Hello! Thanks for calling Pharma Call .
This is a free service for people taking medication , ,
and requires a touchtone phone.
</speak>
---------
Newly queued prompts are now being played

Thu 07 Aug 2008 04:20:12 PM EDT:
DocumentParser::FetchDocument(e02_EnrollmentUpdateSwitch.vxml)
Cache Hit: http://www.PHARMACALL.mobi/VXML/INBOUND ... witch.vxml
Click here to view saved VoiceXML script
DocumentParser::FetchDocument(e01_Enrollment.php)
Cache Miss: http://www.PHARMACALL.mobi/VXML/INBOUND ... llment.php
Attempting to fetch http://www.PHARMACALL.mobi/VXML/INBOUND ... llment.php
Click here to view saved VoiceXML script
GrammarManager::CreateGrammarFromString(application/x-jsgf):
---------
<?xml version='1.0'?>
<grammar xml:lang="en-us" mode="voice">
(enroll)+
</grammar>
---------
GrammarManager::CreateGrammarFromString(application/x-jsgf):
---------
<?xml version='1.0'?>
<grammar xml:lang="en-us" mode="dtmf">
(enroll)+
</grammar>
---------
GrammarManager::CreateGrammarFromString(application/x-jsgf):
---------
<?xml version='1.0'?>
<grammar xml:lang="en-us" mode="dtmf">
(1)+
</grammar>
---------

Thu 07 Aug 2008 04:20:13 PM EDT:
GrammarManager::CreateGrammarFromString(application/x-jsgf):
---------
<?xml version='1.0'?>
<grammar xml:lang="en-us" mode="voice">
(make|changes)+
</grammar>
---------
GrammarManager::CreateGrammarFromString(application/x-jsgf):
---------
<?xml version='1.0'?>
<grammar xml:lang="en-us" mode="dtmf">
(make|changes)+
</grammar>
---------
GrammarManager::CreateGrammarFromString(application/x-jsgf):
---------
<?xml version='1.0'?>
<grammar xml:lang="en-us" mode="dtmf">
(2)+
</grammar>
---------
bargein set to true
INPUTMODES set to "DTMF VOICE"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak><voice gender="male">
Welcome!
</voice></speak>
---------
VXI::queue_prompts()
bargein set to true
INPUTMODES set to "DTMF VOICE"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak><voice gender="male">
If you are calling to enroll for the first time,
press 1, or just say Enroll.
If you have already enrolled in the program, and want to make changes to your account,
press 2, or say Make Changes.
</voice></speak>
---------
VXI::do_recognition()
PromptManager::Play()
Newly queued prompts are now being played

Thu 07 Aug 2008 04:20:26 PM EDT:
Found grammar match
hypothesis #0: make (0.3940)
hypothesis #1: enroll (0.0890)
DocumentParser::FetchDocument(../UPDATE/u01_PasswordRequest.vxml)
Cache Hit: http://www.PHARMACALL.mobi/VXML/UPDATE/ ... quest.vxml
Click here to view saved VoiceXML script
DocumentParser::FetchDocument - Parse error in file "../UPDATE/u01_PasswordRequest.vxml", line 30, column 15 - Expected end of tag 'if'
errno: 205 uri ../UPDATE/u01_PasswordRequest.vxml
received event: error.badfetch:
bargein set to true
INPUTMODES set to "DTMF VOICE"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak><voice gender="male">
A serious error of type </voice></speak>
---------
bargein set to true
INPUTMODES set to "DTMF VOICE"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak><voice gender="male">error.badfetch</voice></speak>
---------
bargein set to true
INPUTMODES set to "DTMF VOICE"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak><voice gender="male"> has occurred. Exiting. </voice></speak>
---------
VXI::exit_element()
Call End Event
Ending session
Ending Session On Channel 19
Thanks,
Chris

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

IVR application references its root document

Post by support »

Hi,

When we look at this IVR file: http://www.pharmacall.mobi/VXML/INBOUND ... witch.vxml

we notice that it references "e01_Enrollment.php" as its root document.

This could be why it's seeking "e01_Enrollment.php".

Regards,
Plum Support
Last edited by support on Sun Dec 27, 2009 3:57 pm, edited 1 time in total.

Chris
Posts: 64
Joined: Wed Jul 23, 2008 12:50 pm

Wrong files in log file

Post by Chris »

That's what's really amazing about this whole thing.

http://www.pharmacall.mobi/VXML/INBOUND ... witch.vxml
Is not called on from any of the 3 scripts we are working with:
e00_OpenDB_Globals.php
e01_Enrollment-r.vxml
e02g_Switch_EnrollOrUpdate.vxml


The log file is also giving us errors that involve:
e01_Enrollment.vxml
e02_EnrollmentUpdateSwitch.vxml

Neither of those two files are called on by any of the 3 scripts in question.
The file names are similar, but they are indeed different.
Is there a problem using a "-" (hyphen) in a vxml file name?

Also, the log file claims that there is a missing </if>
in u01_PasswordRequest.vxml but that's not true.
DocumentParser::FetchDocument - Parse error in file "../UPDATE/u01_PasswordRequest.vxml", line 30, column 15 - Expected end of tag 'if'

See for yourself. Here's the code for u01_PasswordRequest.vxml

Code: Select all

<?xml version="1.0"?>
<vxml version="2.1"
 xmlns="http://www.w3.org/2001/vxml" >
 

  <form id="PIN">
     <block>
        I'll need your password before I can make any changes to your account information.
        <goto next="#EnterPIN"/>
     </block>
  </form>

  <form>
    <field name="EnterPIN" type="digits">
    <prompt>
Please enter your 4-digit PIN number - now.
    </prompt>

<filled>
 <if cond="EnterPIN.length == 4">
 <assign name="PIN" expr="EnterPIN"/>
Thank you. You entered  <value expr="EnterPIN"/>
</if>
      </filled>
    </field>
  </form>


 <choice dtmf="1" next="../INBOUND/03_ContinueEnrollmentMenu.vxml" accept="approximate">enroll [me]</choice>

 <choice dtmf="2" next="PasswordRequest.vxml" accept="approximate">make changes</choice>

    <catch event="nomatch noinput help">
      <reprompt />
    </catch>
  </menu>
</vxml>
You can see the </if> as plain as day!
Besides, why is it even looking into u01_PasswordRequest.vxml at this point?
Thanks,
Chris

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

IVR code fix for wrong files in log file

Post by support »

Hi Chris,

As for the "wrong files" being called upon, this is most likely due to caching, where one of your cached files is being retrieved instead of a fresh copy.

To ensure that a fresh copy of your file is always retrieved, you should set maxage=0 and maxstale=0 in your IVR tags, <goto>.

For an IVR code example:

<goto next="test3.xml#frmQ002" maxage="0" maxstale="0"/>

Regards,
Plum Support
Last edited by support on Fri Feb 26, 2010 10:58 am, edited 5 times in total.

Chris
Posts: 64
Joined: Wed Jul 23, 2008 12:50 pm

caching

Post by Chris »

Thanks,
I'll give that a try and let you know what happens.
Thanks,
Chris

Chris
Posts: 64
Joined: Wed Jul 23, 2008 12:50 pm

No Luck

Post by Chris »

Alright, I added maxage="0" maxstale="0"/> to every <goto> in all three documents just as you suggested.
And here are the results.

First call:
Skips "e01_Enrollment-r.vxml"
Pauses for a very long 15seconds.
Then goes to "e02g_Switch_EnrollOrUpdate.vxml"
Within "e02g_Switch_EnrollOrUpdate.vxml" it skips "<form id="switch">"
Pauses for a very long 15seconds.
Then goes to <menu id="EnrollmentUpdateSwitch">
and finially plays the variable, which it never did before!

Second call:
Plays "e00_OpenDB_Globals.php" I added 'Hello' so I could tell.
Skips "e01_Enrollment-r.vxml" goes to "e02g_Switch_EnrollOrUpdate.vxml"
This time it plays "<form id="switch">"
Pauses again for another 15seconds.
Then goes to <menu id="EnrollmentUpdateSwitch">
and finially plays the variable, which it never did before!

Third call:
Does not play 'Hello' in "e00_OpenDB_Globals.php"
Skips "e01_Enrollment-r.vxml"
Pauses for a very long 15seconds.
Then goes to "e02g_Switch_EnrollOrUpdate.vxml"
This time it plays "<form id="switch">"
Pauses for yet another 15 second vacation.
Then goes to <menu id="EnrollmentUpdateSwitch">
and finially plays the variable, which it never did before!

So what's with all the skipping and the 15 second lags???
How can we fix this? It's been going on for days!
Thanks,
Chris

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

IVR developers hear prompts without lags

Post by support »

Hi Chris,

We've made 5 calls into your IVR application (http://www.pharmacall.mobi/VXML/INBOUND ... lobals.php), but haven't been able to reproduce the IVR issue that you described. We are able to hear all of the prompts just fine.

Please try calling into your IVR application again to test this and let us know if you are able to reproduce the IVR issue again.

Regards,
Plum Support
Last edited by support on Thu Feb 18, 2010 3:48 pm, edited 2 times in total.

Chris
Posts: 64
Joined: Wed Jul 23, 2008 12:50 pm

Post by Chris »

Yes, it's still skipping. How many times did you call in?

I just made 3 calls after getting your message.

The first call did not play the first "Hello!" that is in the root document.
It did go to and play the second document "e01_EnrollmentR.vxml" in its entirety with the proper variables from the root.
But when playing the third document "e02g_Switch_EnrollOrUpdate.vxml" it skipped the "Welcome" in <form id="switch">
and went straight to <menu id="EnrollmentUpdateSwitch"> playing the variables from the root as it's supposed to.

During my second call, it skipped playing "Hello!" the root document "e00_OpenDB_Globals.php"
It then skipped the second document "e01_EnrollmentR.vxml" altogether.
And went straight to the third doucment "e02g_Switch_EnrollOrUpdate.vxml"
where it again skipped the "Welcome" in <form id="switch">
and went straight to <menu id="EnrollmentUpdateSwitch">

In my third call (using a different phone & number)
It played the root document okay.
But it skipped the second document "e01_EnrollmentR.vxml"
going directly to the thrid doucment "e02g_Switch_EnrollOrUpdate.vxml" where this time it did play the "Welcome" in <form id="switch">
But put in a very long 15 second pause before playing the <menu id="EnrollmentUpdateSwitch">

So, it still skips and it still pauses!
This is really something!


FYI, while I've been waiting for your resopnse I have been working with another file, trying to work out what seems to be an erronious error message "Expected end of tag 'vxml'".
When I call in, sometimes I hear absolutely nothing then the click of an on-hook.
Other times I hear a partial error message.
I have not heard a complete message all day.
This may be part of the problem I'm having above.

Please resolve this.
Thanks,
Chris

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

IVR developers hear prompts without lags

Post by support »

Hi Chris,

Could you provide us with the phone number that you are using to call into your IVR application? When we assign your IVR application to one of our phone numbers, we aren't experiencing any of the IVR issues that you mention.

Regards,
Plum Support
Last edited by support on Thu Feb 18, 2010 3:48 pm, edited 2 times in total.

Chris
Posts: 64
Joined: Wed Jul 23, 2008 12:50 pm

Post by Chris »

1-617-284-5734
Thanks,
Chris

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

IVR issue resolved

Post by support »

Chris,

The IVR issue ended up being a configuration issue with your account. There was a problem with having RealSpeak enabled on your IVR account that was causing some TTS requests to fail. This should now be resolved, please let us know if you experience any further IVR issues with this.

Regards,
Plum Support
Last edited by support on Thu Feb 18, 2010 3:48 pm, edited 3 times in total.

Chris
Posts: 64
Joined: Wed Jul 23, 2008 12:50 pm

Post by Chris »

So I drove myself crazy for 4 full days...
And in the end...
The problem was at your end not mine.
Right?
Thanks,
Chris

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

IVR developers fix configuration issue

Post by support »

Hi Chris,

This thread has actually dealt with multiple IVR issues over the last week. However, the final IVR issue was in fact a configuration issue with your account.

Regards,
Plum Support
Last edited by support on Thu Feb 18, 2010 3:49 pm, edited 2 times in total.

Chris
Posts: 64
Joined: Wed Jul 23, 2008 12:50 pm

Post by Chris »

Guess what?
It's skipping again!!!
It's not skipping documents that I can tell,
but I don't know that for sure, because I'm using only one document.
It's skipping prompts, and cutting many short.
It's starting prompts in the middle of sentences.


Is this due to the same problem you discovered earlier?
Press 1 for yes, 2 for no.
The issue ended up being a configuration issue with your account. There was a problem with having RealSpeak enabled on your account that was causing some TTS requests to fail. This should now be resolved, please let us know if you experience any further issues with this.

Regards,
Plum Support
This can be an extremely serious issue if it persists.
Thanks,
Chris

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

IVR prompts to fix bargein

Post by support »

Hi Chris,

This could also be a result of bargein. Have you made all of your IVR prompts set like this?

Code: Select all

<prompt bargein="false">
Regards,
Plum Support
Last edited by support on Mon Jan 11, 2010 2:35 pm, edited 3 times in total.

Post Reply