freeswitch1.6 Recording function

Source: Internet
Author: User

Record_session when recording, if the saved file does not have a suffix,
The Mod_native_file module is used, and audio is not encoded, and the received sound data is saved directly to two files.
The file name has in, which represents the sound that was received by the caller.
The file name is out and represents the voice to the caller.

View supported audio file commands

Freeswitch@pc-201705271510>show file
file,l16,mod_native_file
file,pcma,mod_native_file
file, Pcmu,mod_native_file
file,proxy,mod_native_file
file,proxy-vid,mod_native_file
file,SPEEX,mod_ Native_file
file,vp8,mod_native_file
file,vp9,mod_native_file
file,adpcm,mod_sndfile
File,aiff , Mod_sndfile
file,al,mod_sndfile
file,alaw,mod_sndfile
file,au,mod_sndfile
file,avr,mod_ Sndfile
file,caf,mod_sndfile
file,file,mod_dptools
file,file_string,mod_dptools
file,gsm, Mod_sndfile .....

As in DialPlan increase

<action application= "record_session" Data= "$${recordings_dir}/${caller_id_number}-${strftime (%Y-%m-%d-%H-%M-% S)} "/>

I only recorded the voice of the caller.

<action application= "Set" Data= "Record_read_only=true"/>

Only the voice that is transmitted to the caller is recorded.

<action application= "Set" Data= "Record_write_only=true"/>

Record_write_only and Record_read_only are also set to true to record only read

Using Mod_native_file module recording, Record_answer_req, Record_bridge_req, record_append, etc., have become invalid. See the Switch_ivr_record_session function to clear the flags.

if (ext = strrchr (file, '. '))) {
     ...

    } else {
        int tflags = 0;

        ......

        if ((Flags & Smbf_write_stream)) {
            tflags |= smbf_tap_native_write;
        }

        if ((Flags & Smbf_read_stream)) {
            tflags |= smbf_tap_native_read;
        }

        **flags = tflags;**
    }

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.