SIP video recording

Hi all,
i’m trying to record a video call between two SIP client using Asterisk 11.23.0 The extensions is very simple and video call works fine using H264 (for video) and G711a (for audio).

exten => 77XX,1,Set(CallTime=${STRFTIME(${EPOCH},%C%y%m%d%H%M)})
exten => 77XX,n,Set(CALLFILENAME=${EXTEN}${CallTime}
exten => _77XX,n,MixMonitor(${CALLFILENAME}.h264)
exten => _77XX,n,Dial(SIP/${EXTEN:1})

when the called user answers the call, get the error:

[2016-11-08 17:57:48] – SIP/704-00000104 answered SIP/708-00000103
[2016-11-08 17:57:48] == Extension Changed 704[local] new state Busy for Notify User 701
[2016-11-08 17:57:48] > 0x9a584f8 – Probation passed - setting RTP source address to
[2016-11-08 17:57:49] > 0x9259fa0 – Probation passed - setting RTP source address to
[2016-11-08 17:57:49] > 0x9a584f8 – Probation passed - setting RTP source address to
[2016-11-08 17:57:49] WARNING[7314][C-00005eb3]: translate.c:420 ast_translator_build_path: No translator path: (ending codec is not valid)
[2016-11-08 17:57:49] WARNING[7314][C-00005eb3]: file.c:188 ast_writestream: Unable to translate to format h263, source format slin

video-demo*CLI> core show file formats

ilbc iLBC ilbc
h264 h264 h264
h263 h263 h263

Any help?
Thanks in advance.

you can’t record video or transcode video in asterisk.

The Wiki seems to disagree with you @sum

You should be able to record video, as well as play it back. That’s handled by the respective format modules, and should happen automatically when you record or playback a stream. Generally, when you record a file with a particular format, you specify the audio format that you want to save the file in, e.g., wav, and a corresponding video file (h264, etc.) will be created with the same underlying name.

Transcoding is not implemented for video streams, nor is combining the audio with the video into a single container format.

If that’s not happening, please file a bug on the issue tracker.

Part of your problem is your dialplan. Specifically, you are attempting to save audio to an h264 file - which should only contain video.

exten => _77XX,n,MixMonitor(${CALLFILENAME}.h264)

This is causing Asterisk to try and save audio frames to a video format, which is why you’re getting codec translation rejections.

Try instead:

exten => _77XX,n,MixMonitor(${CALLFILENAME}.wav)

If there’s h264 video frames being passed along that channel, you should see a ${CALLFILENAME}.h264 video file get created alongside the .wav file.


Thanks to all, mjordan, i tryied extensions as you suggest but got always one .wav audio, just audio stream. I filed a new bug on issue tracker.
Thanks again.


sorry I was talking about transcoded video since the log Unable to translate to format h263, source format slin, and PJSIP seems to be not supported, anyway you are using chan_sip

The MixMonitor application currently only does recording of audio. There is no capability to record a mixed video stream in that configuration or even individual ones as of this time.

Ugh. Sorry about that.

I was looking at the stream functionality ‘under the hood’ in MixMonitor, and forgot that it uses audio hooks (emphasis on audio) to pull the frames off the channel. Nuts.

(As an aside, Record would work fine…)