Setting up SIP Trunk in Asterisk from Kyivstar

I will give an example of setting up a SIP Trunk in Asterisk from Kyivstar. Once it was necessary to increase the number of incoming lines, at first I used Goip4 gateways and 6 Kyivstar SIM cards, but when all the lines were busy, the clients could not get through, even hear the answering machine / voice menu, so I signed a contract for SIP Trunk with the Kyivstar manager.

To make forwarding from the last GSM SIM card to a SIP number free, the manager added this GSM and SIP number to the same group. I left everything with GSM SIM cards, since they will work even when there is no Internet in the call center, and the SIP number works via the Internet. With USSD requests, I set up forwarding on “Busy” and “Unavailable”, example:

For a SIP number and a group, the monthly fee was about a little over $30 per month.

Enabling and activating call forwarding on “Unavailable” (check *#62#):


Enabling and activating forwarding when “Busy” (check *#67#):


Read more about forwarding on the official website
You can contact the manager by submitting an application on the page

The Kyivstar manager reported the following parameters:
UDP protocol, G.711a codec, packetization: 20ms; without CN(RFC3389).
DTMF transmission method: RFC2833, payload type: 101

Well g711a is alaw (G.711 A-law), let’s see the list of available codecs:

asterisk -rvv
core show codecs

Since the connection will be via UDP protocol, registration does not need to be performed, and authorization will be based on the IP address of the server with Asterisk, which I told the manager.

In the /etc/asterisk/users.conf file I added the following parameters:

host=x.x.x.x(IP Kyivstar)
fromuser=xxx(SIP number)
fromdomain=x.x.x.x(IP Kyivstar)

Next, set up as usual, a simple example for incoming calls:

exten => s,1,DIAL(SIP/205,60)
exten => s,n,Hangup()

After changing the configuration, restart Asterisk or tell it to reread the configuration files.

See also my articles:
Configuring SIP Trunk in Asterisk from Ukrtelecom
My other articles about Asterisk

Leave a comment

Leave a Reply