Recording 2 legs of a channel separately or in stereo


I have a situation that is requiring me to record inbound audio from the SIP trunk provider. I must be able to differentiate between the inbound audio sent by the SIP trunk provider, and the outbound audio generated by the Polycom phone or asterisk.

I have reviewed a few existing references on this (or similar topics). Thus far I am only getting a single mono audio recording that contains the audio from both directions. Because it is mono I am unable to differentiate between the audio sent from either side.

I need to either be able to do one of the following:

  1. Record the audio from each direction in a separate file.
  2. Record only the inbound audio received from the SIP trunk provider.
  3. Record in stereo so that one side audio plays in the right speaker, and the other side in the left speaker.

Whichever option is easiest will work fine for me.

I am using FreePBX 12 on FreePBX distro.

Here’s what I’ve tried thus far:

  1. Enabled call recording on the “inbound route” and set it to “force”.
  2. Disabled MixMonitor recordings in Settings > Advanced Settings
  3. Applied Settings
  4. Performed a test call (the call was created with both call paths merged into a single mono file)
  5. Enabled MixMonitor in Settings > Advanced Settings
  6. Applied Settings
  7. Performed another test call (this call was also created with both call paths merged into a single mono file).

I would really appreciate some guidance on how I can distinguish between the inbound/outbound audio on a call recording.

Thank you very much for your help!


Doug Mortensen

Anybody know how to do this?

You would have to do it in custom code, meetme() called with the m (mix) option will mix them so you would need to call it without that ‘-m’, but if as you probably are , using confbridge, the recording is done by the monitor() application.

rasterisk -x “core show application monitor”

might give you a clue to locally define ${MONITOR_EXEC} which would be set to call sox, using args 1 and 2 (rx/tx channels) as inputs to a stereo mix onto the arg3 (the resultant sound recording) , be aware that asterisk cannot play stereo files though.

Danke. Do you know what the setting at Advanced > Disable MixMonitor Recordings is for?

Sorry, I don’t have that in FBX 13

OK. It’s an older box from 3-4 years ago running a prior AsteriskNOW distro that can’t easily be upgraded. Kind of a tough situation. No easy way out without building up a new box & probably manually migrating settings, etc.