メニュー

Expand
ページを評価:

How to record a single side of a call

By default Twilio's voice recordings capture all audio from a call in a single mono-channel file. To separate audio tracks in two channels, you can use recordingChannel=dual

Single Party Call Recordings is a feature that provides flexibility over which parties should be recorded during a call and it allows you to programmatically record only one side of the call.

動作の仕組み

RecordingTrack is an optional parameter that can be used to select whether the inbound, outbound or both audio tracks of the call should be recorded. The inbound track represents the audio received by Twilio, and the outbound track represents the audio that Twilio generates on the call.

For example, if the caller is interacting with an IVR, the inbound track contains the caller's voice and the outbound track contains the audio generated via either <Say> or <Play>. Alternatively, if the caller is connected to agent via <Dial>, then the outbound track will contain the audio spoken by agent.

When inbound or outbound audio track is recorded, the resulting recording file will always be mono-channel. When audio is recorded using both, you can choose either separate channel (dual) or mixed (mono).

This table illustrates the expected outcome when using recordingTrack and attributes together to request a recording:

RecordingTrack

RecordingChannel

結果

-

-

Records the inbound and the outbound audio of the call mixed in a single channel of the recording file.

-

mono

Records the inbound and the outbound audio of the call mixed in a single channel of the recording file.

-

dual

Records the inbound and the outbound audio of the call in two separate channels of the recording file.

inbound

-

Records the inbound audio of the call in a single channel of the recording file. The inbound track is the audio that is received by Twilio from the call.

発信

-

Records the outbound audio of the call in a single channel of the recording file. The outbound track is the audio that is generated by Twilio.

both

-

Records the inbound and the outbound audio of the call mixed in a single channel of the recording file.

inbound

mono

Records the inbound audio of the call in a single channel of the recording file. The inbound track is the audio that is received by Twilio from the call.

inbound

dual (→ mono)

Records the inbound audio of the call in a single channel of the recording file. The inbound track is the audio that is received by Twilio from the call.


Note: if you set “RecordingChannel=dual”, this

will be ignored and automatically set to mono.

発信

mono

Records the outbound audio of the call in a single channel of the recording file. The outbound track is the audio that is generated by Twilio.

発信

dual (→ mono)

Records the outbound audio of the call in a single channel of the recording file. The outbound track is the audio that is generated by Twilio.


Note: if you set “RecordingChannel=dual”, this

will be ignored and automatically set to mono.

both

mono

Records the inbound and the outbound audio of the call mixed in a single channel of the recording file.

both

dual

Records the inbound and the outbound audio of the call in two separate channels of the recording file

How to configure Single Party Call Recording

You can enable single party recording for any given call using the following Twilio’s Programmable Voice APIs:

This feature is not yet available in TwiML <Record> or <Conference>. SIP Trunking calls also do not currently support this functionality.

        
        
        
        
        Ensure to set both Record and RecordingTrack

        Set RecordingTrack on a new outbound Call

        Ensure to set both Record and RecordingTrack

        The default value of the record attribute is do-not-record. Make sure you set this to true as it will not be automatically enabled regardless of RecordingTrack property.

              
              
              
              
              Use the Call Recording Controls to start and configure the recording

              Record a side of an ongoing call

              Use the Call Recording Controls to start and configure the recording
                    
                    
                    
                    
                    Ensure to set both Record and RecordingTrack

                    Configure recording party using <Dial>

                    Use <Dial> verb to dial a new participant from an active ongoing call and record the call specifying what audio should be recorded using recordingTrack parameter. The following example illustrates how to record the inbound audio:

                    The default value of the record attribute is do-not-record. Make sure you set this to true as it will not be automatically enabled regardless of RecordingTrack property.

                          
                          
                          
                          

                          How to determine which track has been recorded

                          The request made to recordingStatusCallback contains the track attribute to indicate which audio track was recorded. It is recommended to subscribe to the recordings callback in order to know which audio track has been chosen.

                          You can also check this information from the Recordings Logs section and Recording details page within the Programmable Voice area in the Twilio Console.

                          Craig Dennis
                          ページを評価:

                          ヘルプが必要ですか?

                          誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。

                                
                                
                                

                                フィードバックくださりありがとうございます!

                                We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

                                Sending your feedback...
                                🎉 Thank you for your feedback!
                                Something went wrong. Please try again.

                                Thanks for your feedback!

                                Refer us and get $10 in 3 simple steps!

                                ステップ1

                                Get link

                                Get a free personal referral link here

                                ステップ2:

                                Give $10

                                Your user signs up and upgrade using link

                                ステップ3

                                Get $10

                                1,250 free SMSes
                                OR 1,000 free voice mins
                                OR 12,000 chats
                                OR more