Not Logged in - No Account?

Don't have an account? Registering an account with us allows you to post to the forums, easily track new posts, subscribe to threads, pm (private message) other forum members, and receive periodic news letters (you can opt out if you desire). Once you are logged in this message will no longer appear. If you don't have an account, you can create one by registering here. Lost your password, request a new password. We respect your privacy which means we collect minimal information when you register and we do not resell that information or use it in any objectionable way. You can review our privacy policy for full details.


Trunks

What are trunks?

You use a trunk to carry a call (or any number of calls) to a VSP
or a device that cares about what number you send to it (eg, another
Asterisk/FreePBX Machine). There are 5 types of trunks supported:

  • Zap Trunk
  • Define-IAX2 Trunk
  • SIP Trunk
  • Define-ENUM Trunk
  • Custom Trunk

All the trunks are configured mainly in the same way:

General Settings

Outbound Caller ID

Setting this option will override all clients' caller IDs for calls placed out this trunk. The format is

"caller name" <#######>

Leave this field blank to simply pass client caller IDs. Quotes are optional around the caller name, but highly recommended.

Never Override CallerID

Some VoIP providers will drop the call if you try to send an invalid CallerID (one you don't 'own.') Use this to never send a CallerID that you haven't explicitly specified in this trunks Outbound Caller ID field or the Outbound CID of an extension/user. You might notice this problem if you discover that follow-me or RingGroups with external numbers don't work properly. Checking this box has the effect of disabling 'foreign' caller IDs from going out this trunk. You must define an Outbound Caller ID on the this trunk when checking this.

Maximum channels

This limits the maximum number of channels (simultaneous calls)
that can be used on this trunk, including both incoming and outgoing
calls. Leave blank to specify no maximum.

Dial Rules

Dial rules are very powerful, but quite simple to learn.They tell
the server how calls will be dialed on this trunk. It can be used to
add or remove prefixes. Numbers that don't match any patterns defined
here will be dialed as-is. Note that a pattern without a + or | (to add
or remove a prefix) is useless.

Rules:

  • X - matches any digit from 0-9
  • Z - matches any digit from 1-9
  • N - matches any digit from 2-9
  • [1237-9] -matches any digit or letter in the brackets (in this example, 1,2,3,7,8,9)
  • . - wildcard, matches one or more characters (not allowed before a | or +)
  • | - removes a dialing prefix from the number (for example,
    613|NXXXXXX would match when some dialed "6135551234" but would only
    pass "5551234" to the trunk)
  • + - adds a dialing prefix from the number (for example,
    1613+NXXXXXX would match when some dialed "5551234" and would pass
    "16135551234" to the trunk)

Examples:

You're in Melbourne, Australia. You normally dial 8888-1234, but
your VSP requires you to have an area code on all calls. This means
that a user dialing an 8 digit number wants to have the Melbourne area
code put on the front (03)

  • 03+NXXXXXXX

You're in England, but your VSP is in the US. You want to be
able to dial UK Numbers without having to dial the whole 01144 string

  • 01144+NXXXXX.

ENUM Trunks

There's not all that much configuration to be done, as enum
lookups are done automatically on the e164.org domain. e164.org allows
you to register your normal, home, telephone line as a VoIP line
without needing government or offical supervision. e164.org is run by
volunteers and is donation supported.

Some example Dial Rules for an E164 trunk would be:

  • Australia (07 Area Code)
    • 617+NXXXXXX
    • 61+0|NXXXXXXXX
    • 0011|.
  • North America (613 area code)
    • 1613+NXXXXXX
    • 1+NXXNXXXXXX
    • 011|.

IAX2 and SIP Trunks

The configuration is as per above, but with the additional
requirement of Incoming and Outgoing settings. These are available from
your VSP, or, from the VSP Hints page.

ZAP Trunks

Zap trunks consist of physical hardware in your machine that uses
the Zapata interface. This is configured in /etc/zaptel.conf and
/etc/asterisk/zapata.conf. Documentation on these files is available on
the voip-info wiki.

Custom Trunks

If you're using H323, Chan_capi, or any other non-standard trunk,
you can explicitly configure the Dial string to usew with this trunk
type, replacing the number to be dialed with $OUTNUM$. Eg:

  • CAPI/XXXXXXXX/$OUTNUM$/b
    • You can use either gX or ContrX to identify CAPI groups or individual controllers
  • H323/$OUTNUM$@XX.XX.XX.XX
  • OH323/$OUTNUM$@XX.XX.XX.XX:XXXX
  • vpb/1-1/$OUTNUM$: