Adding Extensions

A PBX without any extensions isn't very useful, so it's the first thing to do after installing FreePBX. Extensions let you test all kinds of things, so it's the first thing to get right.

Adding Extensions

Shown at right are a few test extensions on a FreePBX installation on my t42 Ubuntu laptop.



There are several pages of information here. We'll go through each of them.



Display Name: This is the name that is used, at least internally, when placing an outbound call. Most Caller Name services look up the name in a database, so this name setting might do nothing on your outbound VOIP or PRI calls. It will certainly do nothing on outbound POTS calls.

CID Num Alias: The CallerID to show when dialing intracompany. Example Usage: James has a office extension at 201, a softphone at 401, a home office phone at 601, and a FollowMe at 201 that rings them all. 401 and 601 can use a CID Num Alias of 201, so that all internal call recipients see “201”

SIP Alias: Every 'clever' presentation of VOIP has an example of dialing by email address. This is hard to do on most phones, but is nonetheless supported. Put only the name here, not the @ symbol or the fully-qualified-domain name. That's used by the calling application or device to locate your PBX on the Internet. To allow any party to call you, you'll need to have firewall rules that allow all SIP calls regardless of IP address. This is only advisable if your Asterisk installation is up-to-date, and has no current SIP security vulnerability.

Direct DID: This is where you enter the Direct Inward Dial (DID) you'd like to reach this extension. If you forget, all calls to that DID will end up at the main IVR. Putting a value here eliminates the need to create an Inbound Route.

DID Alert Info: Used for distinctive ring services



Music on Hold: Set a different Music On Hold (MOH) class for this extension. Great for having different music for different offices or companies that are served by the same PBX.

Outbound CID: Put the CallerID and preferred CallerIDName here for outbound usage.

Ring Time: How long to ring before a server-side transfer to voicemail. You'll usually use the default here, and set a system-wide value in General Settings.

Call Waiting: Set the call waiting value. Also accessible by feature code from an individual extension (by default *70 to activate and *71 to deactivate – see Feature Codes).

Emergency CID: The CallerID to be set when dialing a number labeled as emergency.

Device Options

Extensions - Device OptionsExtensions - Device Options

These options are the same as in a vanilla asterisk sip.conf file. In a FreePBX installation, they end up in sip_additional.conf. For more information, check out Asterisk: TFOT.

secret: The SIP password used in the authentication of this device to the server.

dtmfmode: How DTMF is expected by the server. Options are rfc2833, INFO, and in-band. rfc2833 seems the most reliable across many devices. Client devices (e.g. Linksys) often have an Auto setting, which is to be avoided.

canreinvite: Asterisk is a back-to-back useragent. This means that your phone calls it, and it calls your VOIP, PRI or POTs line. All audio (RTP stream) is carried through the Asterisk process during the call. Your VOIP service provider, for example, often will use a SIP REINVITE message to change the RTP destinations after the call is set up. This reduces load on the equipment, as it's only doing call setup and takedown.

Highly desirable if you're supporting remote users making VOIP calls and your VOIP provider supports REINVITE.

However, it's tricky to get any of your FreePBX features to work in this scenario. Play with this, but don't use it on a customer system unless you have tested the features you need.

context: Context is an Asterisk dialplan sphere-of-influence concept used to separate components from each other (multi-tenant, for example, or outward facing customer service from backoffice).

From-internal means you can dial like you're a phone on premises with access to other extensions and outbound trunks. Other common options are outbound-all-routes (dial out only), from-trunk (extensions only, no outbound dialing)

host: dynamic or a static IP address. dynamic allows any device that can pass the SIP challenge/authentication to register and make/receive calls.

type: friend or peer. Use friend for a phone. Peer is for SIP devices that are capable of carrying calls, like a Trunk.

nat: yes or never. SIP is a nat-unfriendly protocol in that it specifies the return IP address for the call audio stream deep inside a packet. NAT works by rewriting packet source and destination IP addresses, but doesn't understand SIP (unless a good SIP Application Layer Gateway is installed). NAT is therefore problem if both the phone and the server PBX are separated from the public Internet by different NATs (e.g. a home router and and corporate one.) In such a situation, audio won't work, but signaling will (phones will ring but no audio). To support remote home users behind conventional NATs, use yes, and either give the server PBX a public IP address or do a 1:1 IP mapping from a public IP to it's internal, then set IP_nat.conf to the public IP address of the system. NAT=yes instructs Asterisk to send audio to the IP it receives it from, regardless of what the SIP SDP says, and lets you have at least one NAT present and still have effective audio. Note that NATs vary widely as to how long they stay 'open'. Best practice when using Non-STUN phones is to have SIP registration expire every 60 seconds – the re-registration (outbound, by the phone) will keep the NAT open to receive calls. NAT=yes doesn't hurt anything when the client device is on the same LAN.

callgroup:

pickupgroup:

disallow: enter codec overrides here. An extension or group of extensions on a low-bandwidth link might want to disallow the higher-bandwidth codecs out of the general pool.

allow: enter any codec overrides here

dial: SIP/extension is the default.

accountcode: enter an account code for use by a billing module.

mailbox: extension@default is the default.


Related Content


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

How to call to a sip server without reg?

jackyzrk's picture

Now ,I get some problem with one sip server.Freepbx needn't to register to the sip server,but send a call to the sip server directly with a username and password.I have captured the packages,and show an invite below,how can freepbx send a call lile this way?
--------------------------------------------------------------------------------------------------------------------
Session Initiation Protocol
Request-Line: INVITE sip:8613318858199@203.208.198.208:5040 SIP/2.0
Method: INVITE
Resent Packet: False
Message Header
User-Agent: MRUA936_1.0.9_GP1
Contact: NUERA-ID
Contact Binding: NUERA-ID
URI: NUERA-ID
SIP Display info: NUERA-ID
SIP contact address: sip:123456789@192.168.0.200:5040
Supported: timer
Session-Expires: 20
ClientToken:

6.1.1.1.1;0ff70f48e569308031d88e07fc27c130adb27c559a89159087a30f41850e8df45ee3fa3bed7c1f6049c2ae1

c076d60db5d147142ec8e8153aea5101b16aeedb2
Via: SIP/2.0/UDP 192.168.0.200:5040;branch=z9hG4bK5052
From: ;tag=11980
SIP from address: sip:123456789@192.168.0.200:5040
SIP tag: 11980
To: 8613318858199
SIP Display info: 8613318858199
SIP to address: sip:8613318858199@203.208.198.208:5040
Call-ID: d4d300f0454b45e392bdce54418f8281@192.168.0.200
Max-Forwards: 10
CSeq: 871 INVITE
Content-Type:application/sdp
Content-Length: 130
Message body
Session Description Protocol
Session Description Protocol Version (v): 0
Owner/Creator, Session Id (o): MRUA936_1.0.9_GP1 7525484 7525484 IN IP4 192.168.0.200
Owner Username: MRUA936_1.0.9_GP1
Session ID: 7525484
Session Version: 7525484
Owner Network Type: IN
Owner Address Type: IP4
Owner Address: 192.168.0.200
Session Name (s): SIP Call
Connection Information (c): IN IP4 192.168.0.200
Connection Network Type: IN
Connection Address Type: IP4
Connection Address: 192.168.0.200
Time Description, active time (t): 0 0
Session Start Time: 0
Session Stop Time: 0
Media Description, name and address (m): audio 1024 RTP/AVP 4
Media Type: audio
Media Port: 1024
Media Proto: RTP/AVP
Media Format: ITU-T G.723
---------------------------------------------------------------------------------------------------------------------------

BLF and hinting

Rhombus's picture

In the default Asterisk, hints must be expressly added to the dialplan; by contrast FreePBX automatically adds hints when you configure an extension. You'll need hints to properly support Busy Lamp Field functionality in your SIP telephones.

For example: for an Aastra 480i, put the following in the set's {MAC_ADDR}.cfg file:

softkey2 type: blf
softkey2 value: 120
softkey2 label: "Name"
softkey2 line: 3

Then reboot the set. (This can be done from the Asterisk CLI provided that an event has been configured in sip_notify.conf. You can find instructions on this elsewhere.)

This will put a BLF field with the label "Name" on softkey 3.

You can check to see if the set is subscribed by doing "sip show subscriptions" from the Asterisk CLI. The output should look something like this:

pbx*CLI> sip show subscriptions
Peer             User        Call ID      Extension        Last state     Type 
10.101.211.91      121         3643c1cd3e0  120              Idle           dialog-info+xml
10.101.211.91      121         2201aa8c9f2  122              Idle           dialog-info+xml
2 active SIP subscriptions

Adding Extension

Makinde's picture

Please can anybody guide me on how to add extension to my freePBX and other basic things I need to do to make call using softphone. I installed X-Lite and I tried Ekiga but each time I dialled the extension, the reply I get is "the number you have dialled is not in service, pls check your number and try again" Please help me.

Makinde


you might or might not be

fskrotzki's picture

you might or might not be using trixbox. But either way try going here: http://www.sureteq.com/asterisk/ and get the latest manual. skip the sections about building the system and start where it has you setting up phones and creating extensions. they cover it.


Extensions not working

ngeves's picture

I have created 2 extensions on my FreePBX and in my softphones have logged in and status is shown as available, when i try *65, the system is telling the extension number however when i try calling other extensions calls just hangup.

Logs show as

[Mar 9 23:19:36] VERBOSE[3039] logger.c: dialparties.agi: Starting New Dialparties.agi
[Mar 9 23:19:36] VERBOSE[3039] logger.c: dialparties.agi: Caller ID name is 'Kavz1' number is '403'
[Mar 9 23:19:36] VERBOSE[3039] logger.c: dialparties.agi: Methodology of ring is 'none'
[Mar 9 23:19:36] VERBOSE[3039] logger.c: -- dialparties.agi: Added extension 402 to extension map
[Mar 9 23:19:36] VERBOSE[3039] logger.c: -- dialparties.agi: Extension 402 cf is disabled
[Mar 9 23:19:36] VERBOSE[3039] logger.c: -- dialparties.agi: Extension 402 do not disturb is disabled
[Mar 9 23:19:36] VERBOSE[3039] logger.c: dialparties.agi: EXTENSION_STATE: 4 (UNAVAILABLE)
[Mar 9 23:19:36] VERBOSE[3039] logger.c: -- dialparties.agi: dbset CALLTRACE/402 to 403
[Mar 9 23:19:36] VERBOSE[3039] logger.c: -- dialparties.agi: Filtered ARG3: 402
[Mar 9 23:19:36] VERBOSE[3039] logger.c: -- AGI Script dialparties.agi completed, returning 0
[Mar 9 23:19:36] VERBOSE[3039] logger.c: -- Executing [s@macro-dial:7] Dial("SIP/403-0000000d", "SIP/402,"",tr") in new stack
[Mar 9 23:19:36] VERBOSE[3039] logger.c: == Using SIP RTP TOS bits 184
[Mar 9 23:19:36] VERBOSE[3039] logger.c: == Using SIP RTP CoS mark 5
[Mar 9 23:19:36] WARNING[3039] app_dial.c: Unable to create channel of type 'SIP' (cause 20 - Unknown)
[Mar 9 23:19:36] VERBOSE[3039] logger.c: == Everyone is busy/congested at this time (1:0/0/1)