[Freeswitch-users] Inaccurate variable_record_ms
Adam Kelloway
adam.kelloway at newpace.ca
Wed Sep 21 19:08:58 MSD 2011
Hi there,
I've noticed that the variable_record_ms and variable_record_seconds
values are often inaccurate. Is there any explanation for this?
The example below shows that while the RECORD_START and RECORD_STOP
events were about 4 seconds apart, the variables claim that the file is
7 seconds long. See the soxi output at the end, which shows that the
length of the file is 00:00:03.50, thus more in line with what the event
timestamps suggest.
RECV EVENT
Event-Name: RECORD_START
Core-UUID: 235bab4c-36c6-48af-87d7-0f30a1140d52
*Event-Date-GMT: Wed, 21 Sep 2011 14:52:24 GMT*
Event-Date-Timestamp: 1316616744483384
Event-Calling-File: switch_ivr_play_say.c
Event-Calling-Function: switch_ivr_record_file
Event-Calling-Line-Number: 615
Unique-ID: fa39d249-c9da-4072-aebe-4b606e661e5f
Caller-Profile-Created-Time: 1316616744483384
Caller-Channel-Created-Time: 1316616740683382
Caller-Channel-Answered-Time: 1316616740683382
*variable_current_application_data:
/tmp/fa39d249-c9da-4072-aebe-4b606e661e5f.wav 120 200 2*
variable_current_application: record
Record-File-Path: /tmp/fa39d249-c9da-4072-aebe-4b606e661e5f.wav
RECV EVENT
Event-Name: RECORD_STOP
Core-UUID: 235bab4c-36c6-48af-87d7-0f30a1140d52
*Event-Date-GMT: Wed, 21 Sep 2011 14:52:28 GMT*
Event-Date-Timestamp: 1316616748083413
Event-Calling-File: switch_ivr_play_say.c
Event-Calling-Function: switch_ivr_record_file
Event-Calling-Line-Number: 790
Unique-ID: fa39d249-c9da-4072-aebe-4b606e661e5f
Caller-Profile-Created-Time: 1316616744483384
Caller-Channel-Created-Time: 1316616740683382
Caller-Channel-Answered-Time: 1316616740683382
*variable_current_application_data:
/tmp/fa39d249-c9da-4072-aebe-4b606e661e5f.wav 120 200 2*
variable_current_application: record
*variable_record_seconds: 7*
*variable_record_ms: 7000*
variable_record_samples: 56000
Record-File-Path: /tmp/fa39d249-c9da-4072-aebe-4b606e661e5f.wav
root at dev:/usr/local/freeswitch# soxi
/tmp/fa39d249-c9da-4072-aebe-4b606e661e5f.wav
Input File : '/tmp/fa39d249-c9da-4072-aebe-4b606e661e5f.wav'
Channels : 1
Sample Rate : 8000
Precision : 16-bit
Duration : *00:00:03.50* = 28000 samples ~ 262.5 CDDA sectors
File Size : 56.0k
Bit Rate : 128k
Sample Encoding: 16-bit Signed Integer PCM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110921/829e551b/attachment.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list