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

connection.disconnect event issue

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
agfa
Posts: 40
Joined: Thu Jun 15, 2006 12:56 pm

connection.disconnect event issue

Post by agfa »

I have put the following code at the vxml file

<?xml version="1.0"?>
<vxml version="2.0" application="global.vxml">
<catch event="connection.disconnect">
<goto next="disconnect.vxml"/>
/catch>

Then I have
<form...
<field...
<prompt....
...
....
...
<noinput..

When I hang up for some reason the connection.disconnect is not picking up. It does 3 times retry and application exits..

Any suggestions?

I even tried moving it along with other catches for the prompt like noinput, nomatch.. but still it doesn't seem to know that I hang up the phone.

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

IVR code needed to understand user's issue

Post by support »

Can you post a little more of your IVR code? Also, what are you trying to do with this IVR script? Are you trying to do some IVR post-call processing after the far-end has disconnected?

Thanks!
Last edited by support on Sat Feb 20, 2010 2:56 pm, edited 2 times in total.

agfa
Posts: 40
Joined: Thu Jun 15, 2006 12:56 pm

Post by agfa »

When a prompt is playing and I hang up the phone, I can see the call log for time out and then saying good bye. So when do think "Connection.disconnect" event will / will not work. Or is there something I should to to detect the call disconnect..

admin
Site Admin
Posts: 35
Joined: Thu May 29, 2003 3:12 pm

More IVR code needed if user's issue persists

Post by admin »

Hi,

You shouldn't have to do any more than include a handler (at the appropriate scope) that catches the "connection.disconnect" event (which you have already done).

If this still isn't working, please provide a link to more/all of the above IVR code page so we can review it.


Regards,
Plum support

agfa
Posts: 40
Joined: Thu Jun 15, 2006 12:56 pm

Post by agfa »

Quite a big posting....but for some reason the connection.disconnect event is not triggered to close the call. We can see the application still running in the call log.

***********************************
<?xml version="1.0"?>
<vxml version="2.0" application="global.vxml">
<catch event="connection.disconnect">
<goto next="disconnect.vxml"/>
</catch>
<catch event="error">
<prompt bargein="false">
<audio src="generalerror.wav">
I am sorry, this system is experiencing technical difficulties. Please try your call again later.
</audio>
</prompt>
<goto next="disconnect.vxml"/>
</catch>
<property name="interdigittimeout" value="15000ms"/>
<var name="userPin"/>
<var name="passWord"/>
<var name="sessionId" expr="session.id"/>
<var name="iCount" expr="0"/>
<!--
DEVELOPER NOTES
The variables are assigned to a function within the WebService TeleReport.asmx
which resides in the same folder as these vxml files.
The function name is case sensitive.
To see a list of function names, use your browser to visit the service.
Each page created will generally need access to GetNextPage() and GetErrorPage()
Every function returns a very basic xml document that is parsed by JScript
-->
<var name="wsLogon" expr="'telereport.asmx/Logon'"/>
<var name="wsNextPage" expr="'telereport.asmx/GetNextPage'"/>
<var name="wsErrorPage" expr="'telereport.asmx/GetErrorPage'"/>
<!--
DEVELOPER NOTES
We must have a variable defined which tells us the name of the current page;
this is used later to find where we ought to be going next. Unfortunately
fetching the current URL from inside the webservice does not catch the
vxml page name so we need to pass it as a variable.
-->
<var name="pageName" expr="'user_authentication.vxml'"/>
<form id="get_username">

<!--
These variable names must match the names of the variables for the webservice
function to be called; they are also case sensitive.
To see a list of functions and variable names, use your browser to visit
the web service and add "?wsdl" to the url
-->
<block>
<if cond="iCount > 2">
<goto next="disconnect.vxml"/>
</if>
</block>

<!-- This script file is used later to parse the xml document returned -->
<script src="fetchAnswer.js"/>
<script src="utilities.js"/>
<!-- Fetch the user id. -->
<field name="f_userid" type="digits">
<prompt>
<audio src="get_user_id.wav">
Please enter your user I D then press pound
</audio>
</prompt>
<filled>
<log label="User_Authentication">UserId: <value expr="f_userid"/></log>
<assign name="userPin" expr="trimString(f_userid)"/>
<goto next="#get_password"/>
</filled>
<catch event="noinput">
<reprompt/>
</catch>
<catch event="nomatch">
<prompt>
<audio src="input_nomatch.wav">
That entry is not valid.
</audio>
</prompt>
<reprompt/>
</catch>
<catch event="noinput nomatch" count="3">
<prompt>
<audio src="retries_exceeded.wav">
You have exceeded the maximum number of attempts.
</audio>
</prompt>
<goto next="disconnect.vxml"/>
</catch>
<catch event="connection.disconnect">
<goto next="disconnect.vxml"/>
</catch>
</field>
</form>
<form id="get_password">
<script src="fetchAnswer.js"/>
<script src="utilities.js"/>
<!-- Fetch the user password/pin number. -->
<field name="f_password" type="digits">
<prompt>
<audio src="get_password.wav">
Please enter your password then press pound.
</audio>
</prompt>
<filled>
<log label="User_Authentication">Password: <value expr="f_password"/></log>
<assign name="passWord" expr="trimString(f_password)"/>
<goto next="#user_authentication"/>
</filled>
<catch event="noinput">
<reprompt/>
</catch>
<catch event="nomatch">
<prompt>
<audio src="input_nomatch.wav">
That entry is not valid.
</audio>
</prompt>
<reprompt/>
</catch>
<catch event="noinput nomatch" count="3">
<prompt>
<audio src="retries_exceeded.wav">
You have exceeded the maximum number of attempts.
</audio>
</prompt>
<goto next="disconnect.vxml"/>
</catch>
<catch event="connection.disconnect">
<goto next="disconnect.vxml"/>
</catch>
</field>
</form>

<form id="user_authentication">
<script src="fetchAnswer.js"/>
<script src="utilities.js"/>
<!-- Process the login material -->
<block>
<data name="domTeleReport" srcexpr="wsLogon" namelist="sessionId userPin passWord" method="post"/>
<var name="bLogon" expr="GetStringVal(domTeleReport)"/>
<log label="User_Authentication">Logon: <value expr="bLogon"/></log>
<if cond="bLogon=='True'">
<!-- User logged on successfully, ask the webservice where to go next. -->
<data name="domNextPage" srcexpr="wsNextPage" namelist="pageName" method="post"/>
<goto expr="GetNextPageName(domNextPage)"/>
<else/>
<assign name="iCount" expr="iCount + 1"/>
<!-- User log on failed, ask the webservice where to go next. -->
<!-- The web service should return an error form listed below. -->
<data name="domErrorPage" srcexpr="wsErrorPage" method="post"/>
<goto expr="GetNextPageName(domErrorPage)"/>
</if>
</block>
</form>

<!-- Error Conditions -->
<form id="invalid_user">
<block>
<prompt bargein="false">
<audio src="user_invalid.wav">
The login details you entered is not valid.
</audio>
</prompt>
<goto next="#get_username"/>
</block>
</form>
<form id="permission_denied">
<block>
<prompt bargein="false">
<audio src="user_permission_denied.wav">
Access denied. Please contact your system administrator.
</audio>
</prompt>
<goto next="disconnect.vxml"/>
</block>
</form>
<form id="user_already_login">
<block>
<prompt bargein="false">
<audio src="user.wav">
User
</audio>
</prompt>
<prompt>
<audio>
<say-as type="acronym">
<value expr="userPin"/>
</say-as>
</audio>
</prompt>
<prompt>
<audio src="user_already_login.wav">
is already logged on.
</audio>
</prompt>
<goto next="disconnect.vxml"/>
</block>
</form>
</vxml>

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

no way for IVR platform to detect a far end disconnect

Post by support »

Hello,

With certain phone lines there is no way for our IVR platform to detect a far end disconnect. If the IVR system is unable to detect the disconnect then the IVR code you write will have to take extra precautions and assume that if the noinput event is triggered several times the caller must have disconnected and then explicitly drop the IVR call. The code should change where ever you have a noinput handler:

Code:

<catch event="noinput">
<reprompt/>
</catch>
<!-- This catch prevents infinite loops -->
<catch event="noinput" count="3">
<disconnect/>
</catch>


Without this additional noinput catch where count is 3 the IVR system will just continue to reprompt forever until the it eventually hits an internal infinite loop counter. The infinite loop counter does not throw a connection.disconnect, instead it throws an uncatchable error event that will drop the call and stop any executing VoiceXML. Adding the additional noinput catch handler to prevent these infinite loops from occurring.

Regards,
Plum Support
Last edited by support on Wed Feb 24, 2010 5:41 pm, edited 4 times in total.

agfa
Posts: 40
Joined: Thu Jun 15, 2006 12:56 pm

Post by agfa »

We already have a noinput handler that waits for 3 times and then we disconnect the call.

<catch event="noinput nomatch" count="3">
<prompt>
<audio src="retries_exceeded.wav">
You have exceeded the maximum number of attempts.
</audio>
</prompt>

Any idea about, what we need to setup in our phone systems to get the disconnect to happen immidiately.

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

not all analog lines send disconnect event to IVR sysem

Post by support »

Hello,

Unfortunately not all analog lines send the disconnect event to our IVR system. If you have a PBX that does not send a disconnect event you will have to wait for the IVR system to reprompt 3 times before the disconnect can occur. This is a limitation of analog phone systems, there is nothing in our IVR system that can be done to change this.

Regards,
Plum Support

Post Reply