Compiling
This document explains how to install and setup the app_mp4 application.
First, you need to have the source code of your Asterisk correctly installed on your system and the development libraries from the mpeg4ip project.
Note: If you have problems compiling the mpeg4ip libries try disabling the player
./configure --disable-player
Copy the app_mp4.c file into de Asterisk apps directory and append the following lines to the Makefile in the same directory:
app_mp4.so : app_mp4.o
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -lmp4 -lmp4v2
Goto the Asterisk parent directory and
make
make install
Setup
Enable video support and preferred codecs in sip.conf
videosupport=yes
disable=all
allow=ulaw
allow=alaw
allow=h263
allow=h263p
Now, you can use the application functions in your dialpan, a simple setup is like that:
[default]
exten => 201,1,Answer
exten => 201,2,mp4save(/tmp/save.mp4)
exten => 201,3,HangUp
exten => 202,1,Answer
exten => 202,2,mp4play(/tmp/save.mp4)
exten => 202,3,HangUp
Calling 201 will record the incoming audi/video in /tmp/save.mp4 and calling 202 will play it back.
You can see a more advanced example in the video demo.
|