# Sip Trunk Explanation

**URL:** <https://community.asterisk.org/t/sip-trunk-explanation/41842>\
**Category:** Asterisk Support\
**Created:** [February 11, 2013, 6:28pm UTC](https://community.asterisk.org/t/sip-trunk-explanation/41842 "2013-02-11T18:28:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gwedertz](https://avatars.discourse-cdn.com/v4/letter/g/ba8739/32.png) [@gwedertz](https://community.asterisk.org/u/gwedertz)\
**Post date:** [February 11, 2013, 6:28pm UTC](https://community.asterisk.org/t/sip-trunk-explanation/41842/1 "2013-02-11T18:28:41Z")

</div>

Hi all,

In the past I’ve setup an Asterisk system using version 1.8. It had analog lines running to a Digium card. Runs very well.

I’m working on a new system using the 11-r378934 branch with a single span Digium 1TE122BF T1 card. I have a sip trunk from Voxox with 4 DIDs. Only 1 is really needed. I’m confused as to how the provider and the Asterisk box communicate with each other. Hopefully someone can help.

To communicate with the provider using a sip trunk, a digital T1 card is needed, correct? I live in the USA.

Does the digital card receive and IP from the dhcp server on the network like any other device? The Asterisk seems to know it exists, but other than that I don’t know what to expect. Running “dahdi\_hardware -v” produces…

```auto
pci:0000:0b:08.0 wcte12xp+ d161:8000 Wildcard TE121
```

Voxox gave me the following instructions, which I followed.

> [@](#):
>
> Information you will need  
> ● Voice Gateway:  
> ○ Use the IP in your SIP Trunk form to send and receive calls  
> ○ Host=xx.xx.xx.xx  
> ● Domestic Dialplan:  
> ○ Send and Receive calls as 11 digits  
> ○ 8585551212 should be sent as 18585551212  
> ● International Dialplan:  
> ○ Send calls excluding 011  
> ○ 011440205551212 should be sent as 440205551212
> 
> Configuring the Voxox SIP Trunk  
> We will need to edit 2 files located in /etc/config in most Asterisk builds.  
> ● sip.conf: This file contains your SIP Trunk Definition  
> ● extensions.conf: This file contains your Dialplans for sending to and receiving calls from your SIP Trunk
> 
> For your SIP Trunk Definition, paste in the text below into the top of your sip.conf file replacing voicegateway with Voice Gateway IP address provided in your SIP Trunk form.  
> [voxox]  
> type=friend  
> host=voicegateway  
> dtmfmode=rfc2833  
> nat=no  
> canreinvite=no  
> disallow=all  
> allow=ulaw  
> allow=alaw  
> insecure=port,invite  
> context=incoming
> 
> NOTE: For inbound call routing modify context=incoming where incoming is replaced with the name of your main inbound call context. This instructs Asterisk to drop inbound calls in this section of your  
> dialplan.
> 
> For Demonstration purposes the dialplan example uses 12345678 as the Outbound Prefix. This would be replaced with your prefix provided in the SIP Trunk form.
> 
> In the extensions.conf file we will add the following contexts in your dialplan that can direct outbound calls to the SIP Trunk created above. US and International have been segmented for clarity, and ease of administration. The dialplan below  
> accommodates for US 11, 10, or 7 digit dialing in that order as well as International dialing using 011. For 7 digit dialing,  
> replace 1858 with your own 3 digit area code prefixed with a 1. The example below uses 858 as the area code.
> 
> [outbound-us]  
> exten =\> \_NXXNXXXXXX,1,Dial(SIP/voxox/1${EXTEN})  
> exten =\> \_NXXXXXX,1,Dial(SIP/voxox/1858${EXTEN})  
> [outbound-intl]  
> exten =\> \_011.,1,Dial(SIP/voxox/${EXTEN:3})
> 
> After the SIP Trunk outbound contexts have been added we  
> will then identify your main outbound context for internal users where your internal extensions are dropped into when they make a call. Paste in the following include statements into your users context.
> 
> include =\> outbound-us  
> include =\> outbound-intl
> 
> Save your configurations, reload Asterisk and your Provisioning is complete

I was hoping there was something simple I was missing. Otherwise I will start adding configuration files. I did double check with the provider and they said everything looked fine on their end. Please educate me.

---

<div class="post-metadata">

**Author:** ![david55](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@david55](https://community.asterisk.org/u/david55)\
**Post date:** [February 11, 2013, 7:05pm UTC](https://community.asterisk.org/t/sip-trunk-explanation/41842/2 "2013-02-11T19:05:24Z")

</div>

Please read the book at [asteriskdocs.org/](http://www.asteriskdocs.org/)

SIP trunks use the same infrastructure as your other internet connections.
