Sunday, December 1, 2019

Transcoding Using Kamailio and Rtpengine

Transcoding of audio and video codec is complex and costly it is fulfilled with the giant legacy telecom company. Please follow the below example if you want to transcode using opensource and free of cost.


Step 1 - Launch a VM with ubuntu 18.04

Step 2 - Login and Run below command
#apt update && apt-get install -y debhelper=12.1.1ubuntu1~ubuntu18.04.1 dh-autoreconf libmysqlclient-dev iptables-dev libavcodec-dev libavfilter-dev libavformat-dev libavutil-dev libcurl4-openssl-dev libevent-dev libglib2.0-dev libhiredis-dev libjson-glib-dev libpcap-dev libpcre3-dev libsystemd-dev libssl-dev libswresample-dev libxmlrpc-core-c3-dev markdown gperf libbencode-perl libdigest-crc-perl  libcrypt-openssl-rsa-perl       libcrypt-rijndael-perl  libdigest-hmac-perl libio-multiplex-perl  libio-socket-inet6-perl libnet-interface-perl libsocket6-perl default-libmysqlclient-dev libiptc-dev libspandsp-dev libhiredis-dev libjson-glib-dev libpcap0.8-dev libpcre3-dev libssl-dev libswresample-dev libsystemd-dev  git gcc g++ flex bison libmysqlclient-dev make autoconf libssl-dev libcurl4-openssl-dev libxml2-dev libpcre3-dev libxmlrpc-core-c3-dev zlib1g-dev fakeroot unzip redis-server init-system-helpers sngrep wget libconfig-tiny-perl dkms module-assistant nfs-common keyutils libnfsidmap2 libtirpc1 nfs-common rpcbind keyutils libnfsidmap2 libtirpc1 nfs-common rpcbind watchdog


Step 3 - Install Kamailio
#cd /usr/local/src && git clone --depth 1 --no-single-branch https://github.com/kamailio/kamailio kamailio
#cd kamailio && git checkout -b 5.3 origin/5.3
#make include_modules="db_mysql dialplan" cfg
#make PREFIX="/usr/local/kamailio-5.3" include_modules="db_mysql dialplan" cfg
#make all



Step 4: Install RTPEngine with G729 supports
#cd /usr/local/src && git clone https://github.com/sipwise/rtpengine.git
#cd rtpengine && git checkout mr8.2.1.1
#cd /usr/local/src  
VER=1.0.4 && curl   https://codeload.github.com/BelledonneCommunications/bcg729/tar.gz/$VER   >bcg729_$VER.orig.tar.gz
#tar zxf bcg729_$VER.orig.tar.gz && cd bcg729-$VER
#git clone https://github.com/ossobv/bcg729-deb.git debian
#dpkg-buildpackage -us -uc -sa
#cd ..
#dpkg -i libbcg729-0_1.0.4-0osso3+deb9_amd64.deb
#dpkg -i libbcg729-dev_1.0.4-0osso3+deb9_amd64.deb
#dpkg -i libbcg729-0-dbg_1.0.4-0osso3+deb9_amd64.deb
#cd rtpengine/
#dpkg-checkbuilddeps 
#dpkg-buildpackage -rfakeroot
#cd ..
#apt-get -f install && apt --fix-broken install
#dpkg -i ngcp-rtpengine-daemon_8.2.1.1+0~mr8.2.1.1_amd64.deb
#dpkg -i ngcp-rtpengine-iptables_8.2.1.1+0~mr8.2.1.1_amd64.deb
#dpkg -i ngcp-rtpengine-kernel-dkms_8.2.1.1+0~mr8.2.1.1_all.deb
#dpkg -i ngcp-rtpengine-kernel-source_8.2.1.1+0~mr8.2.1.1_all.deb
#dpkg -i ngcp-rtpengine-recording-daemon_8.2.1.1+0~mr8.2.1.1_amd64.deb
#dpkg --install ngcp-rtpengine-utils_8.2.1.1+0~mr8.2.1.1_all.deb
#dpkg -i ngcp-rtpengine_8.2.1.1+0~mr8.2.1.1_all.deb
#dpkg -i ngcp-rtpengine-kernel-source_8.2.1.1+0~mr8.2.1.1_all.deb
#dpkg -i ngcp-rtpengine-daemon-dbgsym_8.2.1.1+0~mr8.2.1.1_amd64.ddeb

# rtpengine --codecs
                PCMA: fully supported
                PCMU: fully supported
                G723: fully supported
                G722: fully supported
               QCELP: supported for decoding only
                G729: fully supported
               speex: fully supported
                 GSM: fully supported
                iLBC: not supported
                opus: fully supported
              vorbis: fully supported
                 ac3: fully supported
                eac3: fully supported
              ATRAC3: supported for decoding only
             ATRAC-X: supported for decoding only
                EVRC: supported for decoding only
               EVRC0: supported for decoding only
               EVRC1: supported for decoding only
                 AMR: supported for decoding only
              AMR-WB: supported for decoding only
           PCM-S16LE: fully supported
                 MP3: fully supported



Step 5: Modify Kamailio configuration
...if (is_method("INVITE")) {
  if (has_body("application/sdp")) {
    rtpengine_manage("codec-mask-all codec-transcode-PCMA");
...


For any support please contact us at support@pstncall.com. www.pstncall.com

Monday, July 1, 2019

How does a SIP Trunk work - Pstncall

How does a SIP Trunk work? Discover the features of SIP Trunking

SIP Trunk technology is not very widespread in the knowledge of most companies, it is the telecommunications manager of a business who knows how it works and what are the best options to configure it according to the communication needs of each company. Discover how does a SIP Trunk work.
That is why in this post we want to explain in a simple way how a SIP Trunk works and what are the advantages of using this channel to send and receive calls.

Are you wondering what a SIP Trunk is?

SIP Trunking is an internet connection channel that connects your virtual switchboard (PBX) with the public telephone network.
We tell you how a SIP Trunk works, the best telephony solution for your business.

How a SIP Trunk works



SIP Trunk technology works through the internet network. It transforms the voice into data packets so it can be transmitted over the internet. Just with an internet connection you can send and receive calls through a SIP channel.
The calls leave the virtual switchboard of the company and travel through the Internet thanks to the SIP Trunking channel, which sends it to a mobile or landline phone. SIP trunks establish a connection channel for small switchboards or countless connections for large companies and call centres.
The SIP Trunk replaces traditional analogue connections with a public or private internet connection of a company through a SIP provider.
The rates offered in the market are usually two. On the one hand, you can pay for the minutes of calls made or use plans with unlimited minutes, but we must take into account the number of channels contracted since that will limit the simultaneous calls. For example, if a company has 10 SIP Trunk channels, it can make only 10 simultaneous calls.

What do you need for a SIP Trunk to work?

For a company to use this online service, it needs to have the following features:
  1. An IP enabled switchboard
  2. High-quality internet connection
  3. VoIP telephone provider 
  4. A phone that supports IP technology

Advantages of using a SIP Trunk

With the SIP Trunk service, you can get the following benefits:
  1. Savings: the costs of the minutes of SIP calls are much lower than traditional telephony. Also, monthly fixed fees decrease or disappear, you only pay for the minutes used. On the other hand, charges for incoming calls, long-distance calls and IT and maintenance costs are drastically reduced or eliminated.
  2. Flexibility: with SIP calls you can connect one or several telephone numbers with many telephone lines, which offers the possibility of hiring lines or channels depending on the volume of calls the company has. Something that is a benefit compared to traditional telephony, which is more rigid and expensive, since they force you to hire a certain number of lines as a package.
  3. Telecommuting: the SIP Trunk and the virtual switchboard are connected through the internet, so an employee can work remotely and make calls from anywhere in the world. The distances do not matter and still maintain the same cost of calls.
  4. Integration: allows integration with a PBX or virtual switchboard. This integration also offers us the possibility of including a CRM, ERP or the company’s applications, as well as software for call centres.
  5. Security and stability: it is a very reliable technology since having no cables prevents electrical failures or circuit breakages. Furthermore, IP phones can be diverted to other data lines to ensure that calls continue to come in case there is a problem with the provider being used.

Try the SIP Trunk service for free

Now you know how a SIP Trunk works, so if you want to try it you can access a free trial by clicking here.
Installation is quick and you will have immediate online access. The main suppliers we work with are:
  • SIP Trunk Cisco
  • SIP Trunk Avaya
  • SIP Trunk Asterisk
  • SIP Trunk Elastic
  • SIP Trunk 3CX
  • SIP Trunk FreePBX
Maximize and make your calls profitable with a SIP Trunk service.
Do you have any doubts or questions? Leave us a comment or contact us here.