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

How to use name$.duration

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
rakesh2404
Posts: 2
Joined: Mon May 06, 2013 3:33 am

How to use name$.duration

Post by rakesh2404 »

Hi,

I want to capture the duration of time in which a call transfer is done. I am using below block of code to transfer.

Code: Select all

<vxml version="2.0" xml:lang="en">
	<form id="formcheck">
		<var name="sessionid" expr="session.id"/>
		<var name="lang" expr="''"/>
		<block>
			<audio src="test.mp3"></audio>
		</block>
		<transfer name="forwardedcall" dest="tel:01111111111" bridge="true" connecttimeout="60s" transferaudio="helloworld.wav">
			<filled>
				<if cond="forwardedcall=='busy'"><submit next="busy.php" namelist="sessionid lang" method="post"/>
				<elseif cond="forwardedcall=='noanswer'"/><submit next="noanswer.php" namelist="sessionid lang" method="post"/>
				<else/><assign name="Duration" expr="CallOperator$.duration"/><submit next="forwardedcall_duration.php" namelist="Duration sessionid lang" method="post"/> 
				</if>
			</filled>
		</transfer>
	</form>
</vxml>
I have used name$.duration But it is not captured in forwardedcall_duration.php. Am I missing something? Please help.

rakesh2404
Posts: 2
Joined: Mon May 06, 2013 3:33 am

Re: How to use name$.duration

Post by rakesh2404 »

Please could somebody reply to my post?

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

Re: How to use name$.duration

Post by support »

Hi,

In order to capture the duration of a transfer, you can use the name$.duration variable where "name" is replaced by the name attribute of the transfer element. All of the code in your example is valid except for the following correction:

Code: Select all

<var name="Duration" expr="forwardedcall$.duration"/>
Regards,
Plum Support

Post Reply