signalwire / freeswitch

FreeSWITCH is a Software Defined Telecom Stack enabling the digital transformation from proprietary telecom switches to a versatile software implementation that runs on any commodity hardware. From a Raspberry PI to a multi-core server, FreeSWITCH can unlock the telecommunications potential of any device.
https://freeswitch.com/#getting-started
Other
3.66k stars 1.45k forks source link

playing a wav file makes the following recording operation fail #1831

Open github-cyz opened 2 years ago

github-cyz commented 2 years ago

Describe the bug Play a certain wav file makes the following record operation fail.

To Reproduce

1 play a wav file (format: 16000Hz 16bit mono Signed Integer PCM) 2 record for several seconds 3 press # to interrup the record 4 record for several seconds (RECORD_APPEND=true , record to same file as in step 2) 5 hangup

now playback the record file ,you will find the second phase of the record is lost.

Expected behavior the record file should contain full record phase data.

Package version or git hash

dialplan :

 <extension name="test">
        <condition field="destination_number" expression="^9999$">
                <action application="set" data="playback_terminators=#"/>
                <action application="set" data="RECORD_APPEND=true"/>
                <action application="playback" data="/tmp/wait.wav"/>
                <action application="record" data="/tmp/testrecordsession.wav 300 0"/>
                <action application="record" data="/tmp/testrecordsession.wav 300 0"/>
        </condition>
        </extension>

wait.wav file is attached below as wait.zip. wait.zip

dragos-oancea commented 1 year ago

Is the RECORD_DISCARDED chan var being set after the 2nd record ? It might remove the recording for being too short (< 3 seconds) . You can try set chan var RECORD_MIN_SEC=1 before recording.