[asterisk-users] Recompile Asterisk

Tzafrir Cohen tzafrir.cohen at xorcom.com
Sat Dec 31 04:03:21 CST 2011


On Fri, Dec 30, 2011 at 05:11:45PM +0000, LL wrote:
> I'm sorry if I gave conflicting information but I didn't setup this
> specific freepbx/asterisk and I'm not sure if it was compiled from
> source, probably not, but I'll have to double check it the person
> that  installed it. I know that I currently running asterisk 1.4.13
> + FreePBX 2.9.0.7 on  CentOS 5 x64.
> I need to compile app_mp4 and I've read that I need to compile
> asterisk from source in order to achieve this, does this make any
> sense ?

Maybe. I believe that the headers of Asterisk (installed to
/usr/include/asterisk ) include anything you need to build an external
module. Though I wouldn't be completely surprised if those were not
complete in 1.4.13 .

> I'm following a tutorial on how to compile app_mp4  at http://web.archive.org/web/20090322060930/http://sip.fontventa.com/content/view/15/44/,

Furthermore, they instruct you to re-run configure, but then they don't
really rely on that and manually add the extra libraries to the build
line. I don't see why you'll need to re-run configure if you already
have the built source directory.

Building it independently would be something along the lines of:

  gcc $CFLAGS -DAST_MODULE="app_mp4" -shared -o app_mp4.so app_mp4.c -lmp4 -lmp4v2 

Where CFLAGS would typically be -O2  and such.

This should hopefully build you app_mp4.so . Next, make sure it does not
load automatically until you verified it to work: in modules.conf:

  unload => app_mp4.so

At this point you may crash Asterisk. So do it in the off-hours or on a
different instance.

Try loading it manually in the Asterisk CLI:

  module load app_mp4.so

Check if it actually works.

If all goes well, disable the "unload" entry in modules.conf .

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the asterisk-users mailing list