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

variable seemingly not updating

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
marguin
Posts: 12
Joined: Thu Nov 12, 2009 11:01 am
Location: Newton, MA
Contact:

variable seemingly not updating

Post by marguin »

I have a scratch pad in which i am sending call logs out to a server that i have running. I have defined a variable at the top of the script outside of any blocks or such. I initially defined it with a value of 'call_received'.

i then have an if loop that detects various events such as busy, noanswer etc. they all log to the Plum logs correctly. I have also added an 'assign name="status" for each of these events in their part of the if loop ending with:

<else/>
<assign name="status" expr="'MAA_Ext_Log_Call_Received'"/>

but when the log comes across to my server it does not have a value for the status. is there something simple that i am just looking right over here?

Code: Select all

<vxml version="2.0" application="root.php">

 <meta name="maintainer" content="marguin@jpr-inc.com"/>
         <var name="status"/>
         <var name="level" expr="'INFO'"/>
  	 <form id="TransferForm">

		<block>
			<log label="MAA_Ext_Log_call_received">Received Call</log> 

		</block>
		<transfer name="MyCall" dest="tel:+17811234567" connecttimeout="60s">
			<grammar type="text/gsl">[dtmf-1]</grammar>
			<filled>
			
				<if cond="MyCall == 'busy'">
					<log label="MAA_Ext_Log_transfer_busy">Transfer Busy</log>
                    <assign name="status" expr="'MAA_Ext_Log_transfer_busy'"/>
					<disconnect/>
				<elseif cond="MyCall == 'near_end_disconnect'"/>
                    <assign name="status" expr="'MAA_Ext_Log_near_end_disconnect'"/>
					<disconnect/>
				
				<else/>
                    <assign name="status" expr="'MAA_Ext_Log_Call_Received'"/>
	
				</if>
			</filled>

		</transfer>
	        <catch event="connection.disconnect.hangup">
                     <var name="callerID" expr="session.telephone.ani"/>
      		     <submit next="http://serveronthenet/logger" method="get" namelist="level callerID status"/>
		</catch>
	</form>
</vxml>

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

Understanding IVR events that occur for a <transfer>

Post by support »

Hi,

Looking at your IVR code, you would only see the following statuses in your IVR logs for the following situations:

MAA_Ext_Log_transfer_busy - the callee that you were attempting to transfer to had a busy line and has no voicemail system

MAA_Ext_Log_Call_Received - the callee hung up first during the transfer call

The status, "near_end_disconnect", would never show in your IVR logs because this status is not supported by our IVR platform. According to the VoiceXML 2.0 Specification on the transfer element (http://www.w3.org/TR/voicexml20/#dml2.3.7), the reason for a near_end_disconnect is when: "The caller forced the callee to disconnect via a DTMF or voice command."

This term, "near_end_disconnect", had been misused in past forum posts since it had been incorrectly believed to handle cases of where the caller who made the transfer disconnects first.

However, the correct understanding of the caller disconnecting first during the IVR transfer call is that it immediately throws a connection.disconnect.hangup event, which is most likely why you are not seeing a "status" in your logs. So, if at any time during the transfer, the caller who made the transfer disconnects first, it wouldn't hit any of the conditionals in your code because the connection.disconnect.hangup event would be thrown immediately.

Hope this clarifies things.

Regards,
Plum Support

Post Reply