Tag Archives: voip

Digium, WTF?

Today i visited Asterisk community forums and got this:

You have been permanently banned from this board.
Please contact the Board Administrator for more information.
A ban has been issued on your username.

My last post was a answer in thread were someone was asking for g.729 codec for the ARM platform. I proposed to test my patch for the bcg729 codec and was permanently banned with all my posts deleted 🙂

Just in case:

  1. I am not implementing g.729 functionality and using open-source GPLv2 project bcg729 available in the net.
  2. You might have to pay royalty fees to the G.729 patent holders for using their algorithm.
  3. The G.729 codec from Digium is supported for use only on Linux x86 and x86_64 environments.

I already wrote mail to the board administrator, but i think they are just banning everyone with non-blob g.729 implementation. I would recommend them to spend some time for porting their solution to more platforms instead 🙂

Tagged , , , , ,

Using g.729 codec with Asterisk on Raspberry Pi (or other ARM device)

I decided to build home PBX based on Asterisk VoIP server running on my Raspberry Pi device. One of the reasons for this was ability to build cheap GSM gate for home use using chan_dongle. But one of the problems i have found was lack of g.729 codec for the Asterisk on ARM.

On Intel platform it is possible to use codecs from asterisk.hosting.lv or to buy commercial codec from Digium. Unfortunately its not the case for the ARM. So i decided to see if it possible to port some existing g.729 codec.

Project asterisk-g72x is only Open Source g.729 for Asterisk implementation i am aware of. Internally it is using 2 libraries:

  • IPP from Intel
  • Or ITU based reference code.

It is not possible to compile recent IPP versions on ARM and a lot of ASM code making porting of it problematic. ITU g.729 code is on a plain C, but is painfully slow. It compiles on ARM, but performance is terrible. Asterisk eating 100% of CPU on recoding and drops frames. So it was not an option. So i decided to find alternative codec. In the net i found 2 Open Source projects with g.729 implementation suitable for ARM

  1. Experimental version of G.729 codec for ARM device. It seems to be ITU source code with ARM assembler code for some operations.This code also using many global variables so is not ready for multi-thread software like asterisk without additional changes. Also there are issues open from 2011 without any reaction from developers.
  2. Bcg729. It is a software G729A encoder and decoder library written in C, developed by Belledonne Communications, the company supporting the Linphone project. It was written from scratch and is NOT a derivative work of ITU reference source code in any kind.

BCG 729 also supports concurrent channel encoding/decoding for multi-call applications such as Asterisk. I was able to adopt bcg729 for use with asterisk-g72x project, instead of slow ITU code. If you want to test it – use my BitBucker fork. I will post benchmarks later, but now i see about 15-20% CPU load on g.729 encoding with Asterisk, so it should be able to support 4-5 concurrent channels in time.

Tagged , , , , , ,

Using Twinkle VoIP client or Asterisk to dial in into intercall conferences

As consulter I have a lot of daily meetings. My company now switched to InterCall conferencing service with DialIn bridge. After calling in I need to enter every time my meeting ID what is a little annoying. I am using VoIP to dial into conference bridge, so I decided to solve this task using scripting.

I found not too much good VoIP clients in Linux. Ekiga is very buggy, most of other clients are not providing any API, sflphone on my Ubunty provides very limited interface and it is possible to interact with it only using Python API. So after all I am using Twinkle – it is old and using QT3 but still works much better then many modern clients.
Also it provides command line interface to manage running instance. Resulted script provided below:


# intercall number, see http://www.intercallonline.com
# If no arguments given – ask conference number
if [ $# = 0 ]
echo -n “Enter conference number: ”
twinkle –immediate –call $INTERCALLNUM
sleep 7
twinkle –cmd “dtmf $NUMBER#”

This script will dial into bridge and then enter conference id + # sign. For the Cisco 7940/7960 users my old script with minimal changes should work fine.

Also i am planning to do this on Asterisk level, e.g. by sending command like <bridge_num>*<conf_num># to work from any SIP-enabled device.

Update: after reading asterisk documentation i found that its much easier to do in it, then inside VoIP client. Below is a part of the Asterisk configuration:

; intercall prg bridge, *10
exten => _*10ZX.,1,Progress
exten => _*10ZX.,2,Dial(SIP/800701065@siptrunk,,D(wwwwww${EXTEN:3}#))

Using this dialplan i need to enter *10<conf_code> to joint to the conference from any SIP enabled device. Also i found that it works more reliable then from Twinkle.

Tagged , , , ,

Command line dialing on Cisco 7940/7960 IP Phone

I decided to share my perl script which I am using to dial numbers on my Cisco 7960 from command line. It can be used for integration with callto:// links, PIM or just to dial from console. To dial script using telnet interface on the phone, so it must be enabled. Script using “test” which emulates buttons on the phone. Pause between commands is required to work correctly, without it phone will go mad.


use Net::Telnet;
use Time::HiRes;

# cisco phone host name
my $host='';
# cisco phone password
my $password='cisco';
# mute on a dial 0/1
my $mute=0;

my $sleeptime=.2;
my $prompt='/> $/';

my $argc = @ARGV;
if ($argc!=1){
    print "Usage: call.pl <number>\n";
my $number=@ARGV[0];

if($number!~/^[0-9*#]+$/) {
    print "Error: wrong characters in the numer\n";
    exit 2;
$telnet = new Net::Telnet ( Timeout=>3, Errmode=>'die');
# connecting
$telnet->waitfor('/Password :$/i'); 

$telnet->print('test open');
$telnet->print('test key spkr');
    $telnet->print('test key mute');
$telnet->print("test key ".$number."#");
$telnet->print('test close');
Tagged , , ,