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

Call length

Questions and answers about Plum iOn systems

Moderators: admin, support

Post Reply
mparzych
Posts: 11
Joined: Tue Jul 10, 2007 12:31 pm
Location: SF
Contact:

Call length

Post by mparzych »

My application requires access to the call length records. Ideally,
this value would be returned to me in the PostCallResult call (but, it doesn't appear to be - any plans to add that in the very near future?)
Otherwise, I need access to the session logs via my software progams - these records, according to the documentation I've seen, contains the call length. But, so far, I've not found a way to access session logs via a software program. Even if the session logs are available via my login account, is there a way I can access them via an API? I need programmatic access to this data (how long each call was - associating call ids with call lengths).
Thanks -
Matt

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

IVR example for getting call length

Post by support »

Hi,

We plan to have an API for IVR session logs in the future, however, there is currently no time frame for this implementation. For now, you can try using an alternate method that will give you a ROUGH estimate of how long an IVR call takes.

For an IVR example that shows how to get IVR call length (see what's in the <value> tag below in the last <block>:

Code: Select all

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

<script>
     var start=new Date();
</script>

<form id="intro">
     <block>
          <prompt>
               Hello. Welcome to the Chocolate Factory!
          </prompt>
     </block>

     <field name="id" type="digits?length=7">
          <prompt>
               Enter your seven digit customer
               identification number.
           </prompt>
           <filled>
                You entered <value expr="id"/>.
                <goto next="#end"/>
           </filled>
     </field>
</form>

<form id="end">
     <script>
          var end=new Date();
     </script>

     <block>
          <prompt>
               You have been on this call for <value expr="end.getTime() - start.getTime()"/> 
               milliseconds.
          </prompt>
     </block>

</form>
</vxml>
This does not take into account the fetch time for start_url and result_url. So, you would probably want to add a few seconds for a closer estimate. Hope this helps.

Regards,
Plum Support
Last edited by support on Fri Feb 26, 2010 1:07 pm, edited 5 times in total.

mparzych
Posts: 11
Joined: Tue Jul 10, 2007 12:31 pm
Location: SF
Contact:

Post by mparzych »

Thanks.
Actually, my app only has outbound calls (at least for now).

Would it be relatively accurate to track the amount of time (on my server) between the start_url and result_url calls?

I see that I can pass a unique ID that gets passed back to me in both these calls.

Are these 'near real time? That is - are they _always_ called just before an outbound call is made and just after a call completes?

Are we being charged for the time of the call or for the entire time between start_url and result_url?

Thanks again.
Matt

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

call length on IVR system

Post by support »

Yes, in your IVR applications you can track the amount of time between start_url and result_url. There will be two requests to these URLs. The first two requests will be GET requests occur when the IVR call is queued. The second two requests will be POST requests once the IVR call is connected and after the IVR call is disconnected. You should make sure to log the start and end times only on the POST requests. This should allow you to track the amount of time that is relatively accurate. Finally, the billing time is the time between start_url and result_url.
Last edited by support on Fri Feb 26, 2010 1:08 pm, edited 2 times in total.

mparzych
Posts: 11
Joined: Tue Jul 10, 2007 12:31 pm
Location: SF
Contact:

Post by mparzych »

Ok, it sounds like I can do what I need to, but this response is very confusing and doesn't correspond with the documentation I've read. I've ony read that the start_url is called when the call is queued and the result_url is called when the call completes. Now, it sounds like there are 4 callbacks per outbound call made.

From what I gather (in the last response) - I will receive 2 GET requests when the call is queued. I don't understand why I would need 2. What's the difference between them? Which URL is being called in both cases - start_url?

Also, from what I understand (in the last response), I can understand the approximate call length by measuring the time between the 2 subsequent POST calls. Are these bot calls to result_url? If so, what's the difference between the parameters passed?

Ultimately, are you saying I should measure the time difference between the 1st of 2 start_url calls and the 2nd of 2 result_url calls?

Finally, you recommended logging the start and end times on the POST requests. This doesn't seem to make sense if I'm ultimately being billed for the time between start_url and result_url.

Would you please clarify and perhaps point me at some updated API documentation?

Thank you.
Matt

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

IVR clarification for call lengths

Post by support »

Sorry for the confusing response. Let me try to clarify this IVR issue. Here are the steps of what would happen:

1) The IVR call gets queued.

2) start_url and result_url get fetched via GET request (to verify that these URLs exist)

3) The IVR call gets connected.

4) start_url gets fetched via POST request.

5) The IVR call gets executed.

6) The call gets disconnected.

7) result_url receives POST request.

So, by logging the time difference between the POST requests, you would have a close estimate of the IVR call length.

Regards,
Plum Support
Last edited by support on Fri Feb 26, 2010 1:09 pm, edited 2 times in total.

mparzych
Posts: 11
Joined: Tue Jul 10, 2007 12:31 pm
Location: SF
Contact:

Post by mparzych »

Aaah, got it now.
Thank you for the clarification.
Matt

Post Reply