Page 1 of 1

How do I call a <subdialog> tag in VXML, and how do I

Posted: Wed Aug 27, 2003 4:41 pm
by jcanter
Am I able to call another vxml script using the <subdialog> tag. The end goal is to call a log_call.vxml script when I am ending a call and pass if some information about this call. This is an example of what I am trying to do:

Code: Select all

    <subdialog name="oResult" src="../global/log_call.vxml">
      <param name="doc_appname"  expr="app_appname"/>
      <param name="doc_origdate" expr="app_origdate"/>
    </subdialog>

If I look at the call log, this is throwing an error.semantic when it hits the <form> tag in the log_call.vxml. However, it does seem to initialize all of the variable declared outside of the <form> tag:

(name="sqlMethod" expr = "'NEW'")
Wed 27 Aug 2003 05:39:44 PM EDT (000000;000;1062019949) [vxi] EVENT: VXI::var_element(name="dbName" expr = "'plum'")
Wed 27 Aug 2003 05:39:44 PM EDT (000000;000;1062019949) [vxi] EVENT: VXI::var_element(name="sqlQuery" expr = "")
Wed 27 Aug 2003 05:39:44 PM EDT (000000;000;1062019949) [vxi] EVENT: VXI::var_element(name="dbHost" expr = "")
Wed 27 Aug 2003 05:39:44 PM EDT (000000;000;1062019949) [vxi] EVENT: VXI::var_element(name="doc_origdate" expr = "")
Wed 27 Aug 2003 05:39:44 PM EDT (000000;000;1062019949) [vxi] EVENT: VXI::var_element(name="doc_appname" expr = "")
Wed 27 Aug 2003 05:39:44 PM EDT (000000;000;1062019949) [vxi] EVENT: VXI::var_element(name="doc_dnis" expr = "session.telephone.dnis")
Wed 27 Aug 2003 05:39:44 PM EDT (000000;000;1062019949) [vxi] EVENT: VXI::var_element(name="doc_ani" expr = "session.telephone.ani")
Wed 27 Aug 2003 05:39:44 PM EDT (000000;000;1062019949) [vxi] EVENT: VXI::var_element(name="doc_id" expr = "session.id")
Wed 27 Aug 2003 05:39:44 PM EDT (000000;000;1062019949) [vxi] EVENT: VXI::var_element(name="doc_invalid_dnis" expr = "0")
Wed 27 Aug 2003 05:39:44 PM EDT (000000;000;1062019949) [vxi] EVENT: VXI::var_element(name="doc_enddate" expr = "")
Wed 27 Aug 2003 05:39:44 PM EDT (000000;000;1062019949) [vxi] DEBUG: VXI::ProcessRootScripts - done
Wed 27 Aug 2003 05:39:44 PM EDT (000000;000;1062019949) [vxi] DEBUG: VXI::RunOuterLoop - new document
Wed 27 Aug 2003 05:39:44 PM EDT (000000;000;1062019949) [vxi] DEBUG: VXI::RunInnerLoop()
Wed 27 Aug 2003 05:39:44 PM EDT (000000;000;1062019949) [vxi] DEBUG: VXI::FormInit()
Wed 27 Aug 2003 05:39:44 PM EDT (000000;000;1062019949) [vxi] EVENT: received event: error.semantic

IVR "error.sematic" usually refers to a parse erro

Posted: Thu Aug 28, 2003 11:38 am
by support
The IVR error "error.sematic" usually refers to a parse error in the document. Have you tried to use the validator for the page you are trying to go to? Or better yet, just try pointing the vxml platform to that page directly. I suspect that the vxml being generated by the "../global/log_call.vxml" page is invalid.

As a side note, people often have a end of IVR call log page as a separate page entirely. You can simply use the <submit> tag and post variables to accomplish the same thing. Hope this helps :).

Posted: Fri Aug 29, 2003 12:55 pm
by jcanter
I can call the log_call.vxml by doing a <goto> and it works fine. The reason I was using a <subdialog> was so I could use <param> to pass variables to log_call.vxml.

IVR example for subdialog code

Posted: Fri Aug 29, 2003 4:40 pm
by support
When using <param> to pass a value to a <subdialog>, you must redeclare the variable name in the subdialog IVR script you are using. IVR example:

Calling Page:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
  <var name="local_parm1" expr="'A B C D'"/>
  <var name="local_parm2" expr="'1 2 3 4'"/>
  <form>
    <subdialog src="subdialog.vxml">
      <param name="parm1" expr="local_parm1"/>
      <param name="parm2" expr="local_parm2"/>
    </subdialog>
  </form>
</vxml>
Subdialog Page:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
  <form id="subdialog1">
    <var name="parm1"/>
    <var name="parm2"/>
    <block>
      parm 1 is <value expr="parm1"/>.
      parm 2 is <value expr="parm2"/>
      <return/>
    </block>
  </form>
</vxml>
Notice that in the subdialog page it is we redeclare the variables parm1 and parm2. Using undeclared variables in vxml throw an error.semantic event.

If this does not resolve your IVR issue, perhaps you could post all or part of your subdialog IVR code.

Posted: Fri Sep 05, 2003 2:55 pm
by jcanter
I am actually declaring the vars in the document.

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">

  <var name="sqlMethod" expr="'NEW'"/>
  <var name="dbName" expr="'plum'"/>
  <var name="sqlQuery"/>
  <var name="dbHost"/>
  <var name="doc_origdate"/>
  <var name="doc_appname"/>
  <var name="doc_dnis" expr="session.telephone.dnis"/>
  <var name="doc_ani" expr="session.telephone.ani"/>
  <var name="doc_id" expr="session.id"/>
  <var name="doc_invalid_dnis" expr="0"/>
  <var name="doc_enddate"/>

  <form id="LogCall">
    <block>
    <log>
      Logging call..
    </log>
    </block>
  </form>

</vxml>

Posted: Fri Sep 05, 2003 3:12 pm
by jcanter
Actually, I guess the problem is that I need to declare the vars I am passing inside of a form tag. This works for me:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">

  <form id="LogCall">
    <var name="doc_origdate"/>
    <var name="doc_appname"/>
      <block>
        <log>
         Logging call..
        </log>
    </block>
  </form>

</vxml>

But this gives the error.semantic:
<?xml version="1.0"?>
<vxml version="2.0">
<var name="doc_origdate"/>
<var name="doc_appname"/>

<form id="LogCall">

<block>
<log>
Logging call..
</log>
</block>
</form>

</vxml>
[/code]

My goal here was that I wanted to give doc_appname and doc_origdate document scope in the subdialog form.[/code]