Page 1 of 1

Connect time

Posted: Mon Sep 17, 2007 2:19 pm
by gutsmith
Basically I'm trying to get a timestamp of the exact moment a call is picked up (connected) with a <transfer>.

The easiest way I could think of was to get a transfer.duration then subtract it from the already existing disconnect timestamp. however i cannot seem to get the duration to work correctly on plum.

If anyone has suggestions or ideas that would be great!

Thanks,
-Gut.

IVR code for Connect time

Posted: Mon Sep 17, 2007 4:31 pm
by support
Hi,

You could try something like this IVR code:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">

<form id="xfer">
   <var name="mydur" expr="0"/>
   <block>
            <prompt>
                 Hi. You're being transferred to a number. Please wait.
            </prompt>
   </block> 
   
   <transfer name="mycall" dest="tel:+X-XXX-XXX-XXXX"
        transferaudio="music.wav" connecttimeout="20s" bridge="true">

     <filled>
       <assign name="mydur" expr="mycall$.duration"/>
       Your duration was <value expr="mydur"/> seconds.
     </filled>
   </transfer>

</form>
</vxml>
When the person who picks up on the transfer end of the phone call decides to hang up, you will hear the duration of the length of the IVR call.

Hope this helps.

Regards,
Plum Support