[Freeswitch-users] getting call duration with event socket

Bruce Lefko blefko5361 at gmail.com
Wed Jan 7 02:34:09 MSK 2015


Hi there.

I'm trying to get the call duration in seconds using ESL, but it looks like
the channel variables are not being set correctly.

In CHANNEL_HANGUP events, I see the following variables:

  'Caller-Profile-Created-Time' => '1420586926995761',
  'Caller-Channel-Created-Time' => '1420586926995761',
  'Caller-Channel-Answered-Time' => '1420586929503733',
  'Caller-Channel-Progress-Time' => '0',
  'Caller-Channel-Progress-Media-Time' => '1420586929203735',
  'Caller-Channel-Hangup-Time' => '0',

I would expect to generate the duration of the call by subtracting
Caller-Channel-Answered-Time from Caller-Channel-Hangup-Time, but the
hangup time is 0.  The actual call in this case was 45 seconds long.

What can I do use Freeswitch events to compute call duration?

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150106/b7a2cba0/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list