IMX6 audio streaming solution using SIP protocol
Here described IMX6 audio streaming VOIP solution using NetSoM development board based on IMX6ULL SoM as SIP client.
Hardware requirements.
You have to stick WM8960 audio module to NetSoM development board. This setup will act as SIP client allowing to make a voice calls to/from another devices in network.
Software requirements.
You have to use audio_stream_ethernet or audio_stream_wifi images. Steps to update NetSoM firmware described here.
SIP Server setup.
Easiest way to get it – is running Freeswitch SIP server in docker container.
Look here if you don’t have docker installed yet. In short it removes the headache of installing software with all its dependencies.
Clone the project:
$ cd docker-freeswitch
build Docker image:
and run it:
where /home/user/docker-freeswitch/freeswitch_config_example is path to freeswitch_config_example folder of the repo you clone above. This config defines three client’s IDs: 1000, 1001 and 1002 with passwords same as ID. Server address set to 192.168.0.118. You have to change it to IP address of your server in dialplan/default/20-interconnect.xml and directory/private.xml files. Here and below you can use domain name of your server instead of IP address.
You have to configure following ports accessible outside: 5060, 5080, 16384-16393. On ubuntu you can do it by typing:
$ sudo ufw allow 5060
$ sudo ufw allow 5080
$ sudo ufw allow 16384
$ sudo ufw allow 16385
…
$ sudo ufw allow 16393
$ sudo ufw status
After you got SIP server it is time to run SIP client. One on NetSoM development board and the second on any another PC/laptop.
Running baresip client on NetSoM.
First edit config file:
comment everything in that file and add just one line:
You should see logmessage similar to following:
All 1 useragent registered successfully! (14 ms)
Running baresip client on PC/laptop.
Just install baresip:
Edit config file (probably ~/.baresip/accounts):
Similar to previous chapter comment everything in that file and add following line:
Make a call.
Now everything should be ready to make a call: you have SIP server running and two SIP clients (1001 on NetSoM development board and 1002 on laptop). Probably you have to place them in different rooms far away from each other.
So, finally, let’s make a call from NetSoM to laptop. Just type d and then address of laptop 1002. After that laptop should inform you that “the phone is ringing“. Type a to answer a call. Enjoy it!
Here you can find guide of audio playing/recording from/to file.