Nuitari's Asterisk stuff

Hello Everybody!

This is a quick page for various stuff I did with Asterisk. It was tested on 1.4.5, but of course it might work on other versions. Your mileage may vary. No guarantee is made. Ever. Do not try this in production before testing it completely.


Device States across PBXes

I've written a small PHP program that communicates with many PBXes to transfer blf/presence status across them. It requires a CLI PHP with the sockets extension to work. Instructions are split from the top of the php file and the sample config.

You can get a working func_devstate for Asterisk 1.4.x from Russell's blog

devstate-1.0.tgz

G722 (Wideband) Codec on Asterisk 1.4.5

  1. What you need:
  2. You need to copy the following files and directories from the asterisk-trunk to asterisk-1.4
  3. Now open the codecs/Makefile of asterisk-1.4, add the following lines to it at the end:
  4.   LIBG722:=g722/libg722.a
      $(LIBG722):
              @$(MAKE) -C g722 all
    
      $(if $(filter codec_g722,$(EMBEDDED_MODS)),modules.link,codec_g722.so): $(LIBG722)
      
  5. Under clean:: add the following:
  6. $(MAKE) -C g722 clean
  7. Now recompile the whole source and you should get a codec_g722.so in the codecs directory.
  8. You can now copy it to your /usr/lib/asterisk/modules directory and do
    load codec_g722.so

If you get this error:

asterisk: symbol lookup error: /usr/lib/asterisk/modules/codec_g722.so: undefined symbol: g722_decode_init
it means that the g722.a file didn't get linked properly. Check that you did the Makefile changes above.

You can now do:

core show translation
to verify that the codec is present


Contacting Me

You can contact me at nuitari-asterisk _ a _ t _ this _ domain.

Get more information here!