Asterisk OPUS patch for 11.11.0

Now it supports Asterisk 11.11.0 and 12.2.5. With VP8 in pass-through

WebRTC with Asterisk 11?

Tonight I have tried two WebRTC clients (JsSIP and sipML5) with Asterisk 11 and get them working – ulaw codec and echo test works, but with one-way audio if I call SIP softphone.

Opus and VP8 in Asterisk 11 (Experimental support)

Great news! Check github.com/meetecho/asterisk-opus for experimental OPUS support. Time to test with WebRTC!

Roaming PBX update

What’s new:

Family/Soho PBX - introduction

It is an hybrid PSTN/VoIP PBX platform with light IVR menu, initially built for MNVO operator in Sweden

Roaming PBX – first release

Today I have baked latest image (containing ruby, pcapsipdump, asterisk, silk codec). Because it is still a bit alpha, I was created shorted URL, download link, containing latest image: [j.mp/tinypbx](//j.mp/tinypbx).

Roaming PBX, first edition

Today I spent all day compiling various images of Roaming PBX. I am minimalist and perfectionist at same time – not always, but often, what slowing my work progress sometimes. Do not like to keep unfinished stuff.

Currently image was compiled, I removed GUI from it (just for now). Some tests... And it will be ready... hope in few hours! Instructions will follow.

Download link, containing latest image: http://j.mp/tinypbx). Standard flashing instructions: gunzip .gz file, insert SD card, flash with Linux DD command... This site for example, describing flashing procedure well.

SILK notes on ARM devices

Creating own image for Raspberry Pi

I wanted to create image builder and cross-compile environment, so based on code of Klaus Maria Pfeiffer (his blog post), I was created following project, hosted on github:

https://github.com/andrius/build-raspbian-image

Code works perfectly on Debian (tested with CrunchBangLinux) and Ubuntu. Install packages from install.sh script, execute ./raspbian/build_raspbian_sd_card.sh, and soon you'll get your IMG fine in /tmp/rpi folder.

Main milestone now is cross-compilation environment. Unfortunately, right now I have not much time, so in a middle of process, bulder requires you to do that manually:

echo \"execute all necessary commands, then type exit\"
echo \"asterisk install files located at /usr/src/asterisk\"
bash

Update: github updated, now installation script mounts delivery folder to target raspberry pi image and executes install.sh script there. So you may start bash command there for command line prompt or create your own script. Below is image with ruby 2.0 and Asterisk PBX:

Download link, containing latest image: http://j.mp/tinypbx). Standard flashing instructions: gunzip .gz file, insert SD card, flash with Linux DD command... This site for example, describing flashing procedure well.

Perfect results (SIP TCP vs UDP)

Yes, I knew that TCP is better for mobile VoIP, battery consumption is better, but I did not knew HOW BETTER!
Yesterday I have replaced UDP to TCP at my Android softphone (Bria) and... Usually by this time (2:20 PM), my cellphone battery has 50% charge and now it is 88 percent.

Voice quality... I do not feel any difference.

Raspberry Pi - how to create own image


Sorry, this post is nothing that a set of links!

It is not a good idea to compile packages right on Raspberry Pi. That could take hours.
Since, I am currently developing my own VoIP image, I need a tool for fast image creation and deployment.

Here is good introduction:
http://blog.kmp.or.at/2012/05/build-your-own-raspberry-pi-image/
http://www.kmp.or.at/~klaus/raspberry/build_rpi_sd_card.sh

And more links about cross compilation and QEMU (QEMU for emulation and compilation on "Raspberry Pi" environment):
http://ffmpeg.org/trac/ffmpeg/wiki/How%20to%20compile%20FFmpeg%20for%20Raspberry%20Pi%20(Raspbian)
http://www.raspbian.org/RaspbianDocumentation
http://hertaville.com/2012/09/28/development-environment-raspberry-pi-cross-compiler/
http://www.raspberrypiforums.com/forums/tutorials/article/16-a-raspberry-pi-emulated-environment-on-osx-lion/
http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=29&t=37386
http://igor.gold.ac.uk/~mas01mjy/wp/?p=95
http://elinux.org/Rpi_kernel_compilation#Cross_compiling_from_OSX

Asterisk with silk8 and amr-nb codecs

As part of my lab-work (roaming project), compiled SILK and AMR codecs for Asterisk. Will publish instructions –- currently newly compiled codecs are on stress test. Who wants to build prior my post could try, I was use this repository: github.com/mordak/codec_silk.

Debian installer (Asterisk and AGI library)

Sharing a script, which installs Asterisk PBX with fax support, MySQL, Ruby, Adhearsion AGI. Run it as root. Remove ImageMagick part (download and install) in case, if you don't need it.

Roaming solution based on Raspberry Pi + Asterisk + chan_dongle

I am lucky person, my hobbies match with my job. Start working on roaming solution. I am expat too and well understand needs of travelers and citizens of the world in telecommunications :)

What I am planning first:

  • A box, based on Raspberry Pi (OpenWRT system possible solution, but probably no, due of low performance);
  • Asterisk PBX on it;
  • chan_dongle (driver for Huawei USB modems / Asterisk) to handle two-way GSM calls (with support for more than single modem);
  • VPN to get it working in any location;
  • Monitoring scripts;
  • FreePBX for personal needs;
  • Asterisk2billing, preconfigured – to control expenses;
  • Keep-alive, monitoring scripts;
  • GUI to control;
  • Generator if image files to flash on Raspberry Pi;
  • Provisioning tool.
I would like to do a little survey first. Would you like to have this system? What else would you expect in it? 

Please answer in comment in a free form.

Update (March 19, 2013) – I have successfully created an image file with standard raspbian (from repositories) applications. Currently working on cross-compiler. Job completions is SOON!

Update 2 (May 6th, 2013)
Download link, containing latest image: http://j.mp/tinypbx). Standard flashing instructions: gunzip .gz file, insert SD card, flash with Linux DD command... This site for example, describing flashing procedure well.


Why create AGI?

Asterisk dial-plan is powerful, and possible to create a number of custom voice applications only with its functions... AEL looks like high-level language, of course, it is just a view of standard expressions, same as in extensions.conf, but.
You can manipulate database data through func_odbc, you can call a Linux system script and process result, in case if you want to send a notice about event to a web application, you can use a curl function.
No problem to send out email or jabber/google talk notification...

So, why and when you should use AGI? I believe, correct answers are:
  • Dial-plan is complex, you have a growing amount of huge macros and contexts;
  • System are hosted or cluster with various customers with different needs and functions;
  • You do integration with another application or web app and have to process inbound events (and send outbound);
  • Want to create an API to support 3rd apps;
  • Application API of another application;
  • And most important – database is a core part of application and should access data permanently.
There are many reasons too, but basically it is good to always keep in mind a KISS principle. If task can be resolved without using AGI, do that and use dial-plan. If dial-plan call a lot of external shell scripts – create AGI app.

Your own click-to-call with Asterisk

Have published one my ancient work for Asterisk PBX. Client-server click-to-call library.
Client should be compiled under windows to exe file (or can be executed from command line, if ruby installed on Windows).
System is very simple, sorry for lack of comments!
Here it is: https://github.com/andrius/asterisk-click-to-call-windows

How to unlock Huawei modem

After last post about GSM gateway based on Raspberry Pi and Huawei modem, I have received few mails asking, how to unlock it.. Well, here is YouTube video about this.

Asterisk on Raspberry Pi as GSM gateway

As usually, laconic post.

Time based conditions in AGI application

Currently I am re-writing an VoIP back-end with very flexible business time management.
I have an SOHO PBX system where processing of incoming call are time dependent:

  • During night call should be delivered to voicemail;
  • At morning, lunch time, evening should be forwarded to cell phone;
  • At business time - processed normally;
  • Friday's time is shorter, at Saturday company have custom business times, Sunday - closed (voicemail);
  • Calls on public holidays should be forwarded to the voicemail.

And also customer want to manage times and add any exceptions.

So, I have created (long-time ago) a following class. Below you see AR migration and model and test results as well.

Tests:

1.9.3-p327 :001 > Campaign.last.business_time.operational?
  Campaign Load (0.1ms)  SELECT "campaigns".* FROM "campaigns" ORDER BY "campaigns"."id" DESC LIMIT 1
  BusinessTime Load (0.2ms)  SELECT "business_times".* FROM "business_times" WHERE "business_times"."id" = 1 LIMIT 1
  BusinessTimeMember Load (0.3ms)  SELECT "business_time_members".* FROM "business_time_members" WHERE "business_time_members"."business_time_id" = 1 ORDER BY
 business_time_id,
 day_of_month desc,
 month desc,
 year desc,
 weekday desc,
 time_from desc,
 time_to asc

 => 0

Items is polymorphic association and are subject of another discussion, with class Items I can easily organize any kind of voice call processing.
Command operational? returns an nil if time conditions did not met (office closed!), or item_id (zero for "default" processing).
Just sharing this code, hope it could be useful for someone.

Code:

Delete voice recordings older than N-days

Disk space in loaded telephony systems such as call centre or PBX with call recording function or with heavy usage of voicemails will be full of voice files in very short time. It's better to remove them...