SIP trunk for Asterisk

Connecting your Asterisk server to a SIP trunk for incoming and outgoing calls can be done easily – and at a low cost – or even for free.
In this article we will go through how you can connect a SIP-trunk to your Asterisk server in a matter of minutes.
Step-by-step setup of SIP-trunk
You can have your new SIP trunk up and running in a few minutes – at zero cost – by following these steps:
- Get a free Sonetel account
You can sign up for a free account here. - Get a free phone number for testing
On the phone numbers page you can select a free trial number, that allows you to test things a few days for free. If you install a free Business Messenger at your website, you can even have a number free forever. - Redirect incoming calls to your SIP address
Configure your free trial number to send incoming calls to the SIP address of your Asterisk. - Send us your IPs for outbound calls
Send the IP addresses of your SIP servers to support@sonetel.com so that we can whitelist them on our side for allowing your outbound calls. - Whitelist our IPs in your Asterisk
Whitelist all Sonetel IP’s on your Asterisk phone system. - Set up your Asterisk
Follow the steps in the next section to configure your Asterisk to receive and make calls via your new SIP trunk.

Configure your Asterisk server to use the SIP trunk
Follow the steps below to configure your Asterisk server to use your new SIP trunk.
- pjsip.conf
Add the following configuration to your pjsip.conf file (or copy it from this text file).[sip.sonetel.com] type=endpoint transport=transport-udp context=sonetel disallow=all allow=ulaw,alaw aors=sip.sonetel.com
[sip.sonetel.com]
type=aor qualify_frequency=60 contact=sip:sip.sonetel.com:5060
[sip.sonetel.com]
type=identify endpoint=sip.sonetel.com match=sip.sonetel.com
.
Setup your IP phones to make test calls via your Asterisk.
[1001] ; replace with a name or digits of your choice type=friend host=dynamic secret=password ;<password of your choice> allow=ulaw,alaw context=sonetel
Update the dial plan to instruct your Asterisk to send calls from your IP phones out via the new SIP-trunk. You can update the dial plan in extensions.conf.
[sonetel]
exten => _X.,1,NoOp(${EXTEN:1})
exten => _X.,n,Set(CALLERID(num)=+NUMBER
exten => _X.,n,Dial(SIP/${EXTEN}@sip.sonetel.com)

Things you can do next
If you are happy with your new SIP-trunk, you may consider taking additional steps.
- Add some funds to your prepaid account
Charges for calls are deducted from your Sonetel prepaid account which can be refilled with credit card, PayPal and more. - Add some more phone numbers
You can get more phone numbers in your hometown or anywhere else worldwide, and connect them to your Asterisk via your SIP trunk. You can also port existing numbers to Sonetel. - Set up an Avalanche message
Consider preparing a message using the Voice apps, that can be played to callers in case your Asterisk server becomes unavailable at any point in time. - Use the lower Intra-EU rates
If you make calls to European countries, consider using the methods available for minimizing your cost for calls.
Single
Enrich our growing community.
- General admission and member discounts for one adult
- One free ticket per special exhibition
- Two single-use guest passes per year
Family
Support special exhibitions.
- General admission and member discounts for two adults
- Four free tickets per special exhibition
- Four single-use guest passes per year
Patron
Take support to the next level.
- General admission and member discounts for two adults
- Five free tickets per special exhibition
- Six single-use guest passes per year
Header 1 | Header 2 | Header 3 |
---|---|---|
Sample Table | Column 2 | Column 3 |
Lorem ipsum dolor sit amet | Consectetur adipiscing elit | Duis blandit congue erat et venenatis |
Nullam | Leo ante |