Page 1 of 1

How to use name$.duration

Posted: Mon May 06, 2013 3:45 am
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.

Re: How to use name$.duration

Posted: Mon May 06, 2013 10:26 am
by rakesh2404
Please could somebody reply to my post?

Re: How to use name$.duration

Posted: Mon May 06, 2013 10:30 am
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