subdialog to catch session vars
Posted: Thu Nov 05, 2015 5:22 pm
Since we need the calle rid upon incoming call initiation (for user validation), we added a subdialog element to the form like so:
<subdialog name='session' src='http://secure.homecaregps.net/ivr/plum.session.vxml'/>
then field elements to assign the variables:
<field name="session_callerid" expr="session.callerid"/>
<field name="session_calledid" expr="session.calledid"/>
<field name="session_sessionid" expr="session.sessionid"/>
and inside plum.session.vxml, we wrote the following:
<?xml version="1.0"?>
<vxml version="2.0">
<form>
<block>
<field name='session_callerid' expr="session.telephone.ani"/>
<field name='session_calledid' expr="session.telephone.dnis"/>
<field name='session_sessionid' expr="session.id"/>
<return namelist="session_callerid session_calledid session_sessionid"/>
</block>
</form>
</vxml>
Both the application URL (http://secure.homecaregps.net/ivr/.php) and the small vxml file validate as true with your xml validator. However, the error reads as
TypeError: session has no properties line 1
Are we doing something incorrect here?
<subdialog name='session' src='http://secure.homecaregps.net/ivr/plum.session.vxml'/>
then field elements to assign the variables:
<field name="session_callerid" expr="session.callerid"/>
<field name="session_calledid" expr="session.calledid"/>
<field name="session_sessionid" expr="session.sessionid"/>
and inside plum.session.vxml, we wrote the following:
<?xml version="1.0"?>
<vxml version="2.0">
<form>
<block>
<field name='session_callerid' expr="session.telephone.ani"/>
<field name='session_calledid' expr="session.telephone.dnis"/>
<field name='session_sessionid' expr="session.id"/>
<return namelist="session_callerid session_calledid session_sessionid"/>
</block>
</form>
</vxml>
Both the application URL (http://secure.homecaregps.net/ivr/.php) and the small vxml file validate as true with your xml validator. However, the error reads as
TypeError: session has no properties line 1
Are we doing something incorrect here?