[Freeswitch-users] getting call duration with event socket
Brian West
brian at freeswitch.org
Wed Jan 7 03:42:14 MSK 2015
Use the CHANNEL_HANGUP_COMPLETE event for this purpose.
On Tue, Jan 6, 2015 at 5:34 PM, Bruce Lefko <blefko5361 at gmail.com> wrote:
> 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!
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
--
*Brian West*
brian at freeswitch.org
*Twitter: @FreeSWITCH , @briankwest*
http://www.freeswitchbook.com
http://www.freeswitchcookbook.com
*T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378)
*iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150106/3370a391/attachment.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list