Create the smallest Crystal-lang docker image based on scratch

Official Crystal-lang docker image is Ubuntu-based and relatively big, but production-ready image could be tiny, if we will use docker multi-stage builds. The smallest image could be created using scratch image, but if it’s needed to do some processing before actual code starts, busybox or alpine is recommended.

All-in-one (Crystal-lang library that handle all the Asterisk PBX interfaces)

I’ve created and open-sourced a Crystal-lang shard (library) that handle all the Asterisk PBX interfaces (ARI, AMI and all types of AGI). Get it here:

How to install software on firewalled server

Quick answer: Reverse SSH proxy. Create dynamic tunnel: ssh -D 51010 localhost, ssh to the remote machine: ssh -R 51010: firewalled-server and install the software using proxychains command.

Digital Ocean, Floating IP and VoIP

Digital Ocean (here is an referral link, claim your $100 credit) were introduced floating IP in the 2015, but I never use it with VoIP. Time to fix it.

Tiny docker image with ngrok

I've found an excellent tiny Docker image for ngrok (wernight/ngrok). From now just using it to handle this blog.

Asterisk OPUS patch for 11.11.0

Released updated patch, now it supports Asterisk 11.11.0 and 12.2.5. With VP8 in pass-through mode, tested — it works well. Get it here!

WebRTC with Asterisk 11?

Tonight I have tried two WebRTC clients (JsSIP and sipML5) with Asterisk 11 and get both of them working — echo test calls with ulaw (g711u) codec works, but with one-way audio if I call from WebRTC to the SIP softphone.

Opus and VP8 in Asterisk 11 (Experimental support)

Great news! Meetecho just introduced experimental OPUS support in Asterisk 11. Time to test it with WebRTC!

Roaming PBX update

What's new: Asterisk 11.4 / SILK codec / Watchdog, so Raspberry Pi board works better.

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: [](//

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: 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 your own custom image for Raspberry Pi

I wanted to create image builder for cross-compile environment, so say hello to it:

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 your own image

Currently I do developing my own Roaming VoIP PBX as a Rasbbrry Pi image, and have to rebuild project packages often. It is not best idea to compile packages right on Raspberry Pi. That would take hours. I was searching for a tool that can create image base — on my laptop or VPS.

Asterisk with silk8 and amr-nb codecs

As part of lab-project (roaming PBX), I’ve compiled SILK and AMR codecs for Asterisk. AMR by googling and researching and SILK following instructions in this repository:

Update (20 March, 2013)

Tested SILK8 (SILK-NB) on Android (with CSIPSimple and Bria) – it does not work well, quality is not fantastic definitaly. Have tried both versions: compiled by myself and official Digium SILK codec.

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 PBX with Raspberry Pi, Asterisk and chan_dongle

As an frequent tralveller, I well understand the needs of another travelers and citizens of the world in telecommunications ;) While ago I’ve decided to spent my free time building Roaming PBX solution.

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.

Click-to-call script

Sharing one my ancient projects with Asterisk: click-to-call library with client and server part. Windows user could activate callto.rb script, the customer just integrated it with their CRM application; after user start script, his SIP phone rings. Here it is: