Hi. Im wondering if someone can assist me with some strange behavior. Ive implemented a client app using SIP and the calls work perfectly with 2 way audio. Additionally i need the calls recorded so ive used the recorder plugin. Recordings do work but im having an issue where only the local audio is present on the recording. There is no audio for remote present even though it was working fine in the call itself.
Ive tried many different configurations in my template files with no luck.
Here is some of my configuration for reference:
Create Answer:
if(msg.result.status === "preparing" || msg.result.status === 'refreshing')
{
this.recorder.createAnswer(
{
jsep: jsep,
tracks: [
{ type: 'data' },
],
success:(jsep) => {
let body = { request: "start" };
this.recorder.send({ message: body, jsep: jsep });
},
error:(error) => {
Janus.error("WebRTC error:", error);
}
});
}
Create Offer:
this.recorder.createOffer({
media: {
audio: {
auto: true,
recv: true,
stereo: true
},
video: false
},
success: (jsep) => {
// Start recording with the generated SDP offer
this.recorder.send({
message: {
request: "record",
name: name,
video: false,
},
jsep: jsep,
});
this.logEvent("Recording started...");
},
error: (error) => {
this.logEvent("Error creating offer for recorder: " + error);
},
});
}
janus.plugin.sip.jcfg
general: {
sip_port = 5060 # SIP server port (UDP in this case)
transport = "udp" # Using UDP transport
voicemail = "*97" # Voicemail extension
# Enabled codecs for the media stream
codecs = "PCMA,G729"
# Enable WebSocket support (for Janus WebSocket connections)
ws = true
# Enable token-based authentication for the SIP plugin
token_auth = false # Token-based authentication enabled
# Max duration of a call in seconds
max_call_duration = 1200 # 20 minutes
use_sip_info = true
# Enable proper media handling for recording
media_mix = true # Ensures both directions are recorded
record_audio = true # Enable recording of both incoming and outgoing RTP streams
stereo = true # Ensures separate audio tracks for both parties
combined = true
force_audio = true
}
calls: {
dtmf_info = true
call_timeout = 30
auto_hangup = true
}
janus.plugin.recordplay.jcfg:
# General configuration for the recording plugin
general: {
# Path where to store the recorded files
path = "/usr/local/share/janus/recordings"
# Enable or disable the generation of recording-related events
# These events can be useful for monitoring and debugging
events = true
# Ensure bidirectional recording
media_mix = true
record_audio = true
stereo = true # Ensures separate audio channels for both parties
combined = true # Mix both RTP streams into one
}
# Configuration for the recording behavior
recording: {
# Whether to mix local and remote audio streams
# If true, the recording will contain a single mixed audio stream
media_mix = true
record_audio = true
stereo = true # Ensures separate audio channels for both parties
combined = true # Mix both RTP streams into one
# Sampling rate to use for audio recordings (optional, default is platform-dependent)
audio_sampling_rate = 48000
# Channels to use for audio recordings (optional, default is 1 for mono or 2 for stereo)
audio_channels = 2
# Whether to record video streams (optional, default is true)
record_video = false
# Whether to use the video keyframe or start recording immediately
start_on_keyframe = true
# Whether to force the format of recorded audio (optional, overrides default behavior)
force_audio_format = "opus"
allow_user_defined_names = true
}
# Debugging and logging options
debug: {
# Enable verbose logging for troubleshooting recording issues
enable_verbose_logging = true
}