Difference between revisions of "FreePBX"
(→Adding in your SIP Trunk) |
(→Outbound Trunk) |
||
Line 118: | Line 118: | ||
===Outbound Trunk=== | ===Outbound Trunk=== | ||
− | *Connectivity > Outbound Routes [[File:Fpbx39.PNG| | + | *Connectivity > Outbound Routes [[File:Fpbx39.PNG|250px|middle]] |
− | **Click "+ Add Outbound Route" [[File:Fpbx40.PNG| | + | **Click "+ Add Outbound Route" [[File:Fpbx40.PNG|250px|middle]] |
− | ***Route Settings: [[File:Fpbx41.PNG| | + | ***Route Settings: [[File:Fpbx41.PNG|250px|middle]] |
***Route Name: a friendly name | ***Route Name: a friendly name | ||
***Trunk Sequence for Matched Routes: choose your SIP trunk you set up before. | ***Trunk Sequence for Matched Routes: choose your SIP trunk you set up before. | ||
***Dial Patterns tab: [[File:Fpbx42.PNG|500px|middle]] | ***Dial Patterns tab: [[File:Fpbx42.PNG|500px|middle]] | ||
****Add two patterns: 1NXXNXXXXXX and 9 (prefix) 1NXXNXXXXXX | ****Add two patterns: 1NXXNXXXXXX and 9 (prefix) 1NXXNXXXXXX | ||
− | *Click Submit at the bottom right and Apply Config at the top. | + | *Click Submit at the bottom right and Apply Config at the top.[[File:Fpbx13.PNG|400px|middle]] |
[[#top|Return to Top]] | [[#top|Return to Top]] | ||
Revision as of 12:40, 18 August 2017
Contents
Initial Install
This is assuming you have a properly prepped VM, physical machine, etc and have already installed the ISO.
- Enter info
- Skip or do activation, depending if you want to register this instance
- skip/close any advert popups
- Enter the location of PBX
- Pacific (PST) (UTC-8): America/Los_Angeles
- Mountain (MST) (UTC-7): America/Denver
- Central(CST) (UTC-6): America/Chicago
- Eastern(EST) (UTC-5): America/Kentucky/Louisville
- Next you will get the "FIREWALL Enabled" screen, will come back to this later. Click "ABORT" since our system is already behind a firewall.
- Continue if you get an RMS add
- "Not now" on SIPStation free trial
- You should now see the main Admin screen, the initial setup is finished. To apply the above settings, click the red Apply Config button at the top right.
After install updates
Update your PBX
- Admin > Modual Admin in dropdown
- Click Check Online
- You will now see a few lines that will say "Online upgrade avalible"
- Clicking the arrow next to them, it will dropdown, click the "Download and Upgrade to" next to Action.
- That button will change color to a dark blue
- You will get a confirmation page, click confirm
- Next, go to System Updates and click Check Online
- The "Current System Update Status" will say "Working", and the "Refresh Page" will flash a few times, wait until you get a list below. Look for the lines in light red, and click Update System
- You will get an updating popup
(PIC ). Let this run, it might take quite awhile! It is updating the entire operating system. Eventually it will say Complete, click OK
- The "Current System Update Status" will say "Working", and the "Refresh Page" will flash a few times, wait until you get a list below. Look for the lines in light red, and click Update System
- Click Check Online
- It should now say Updates Available: No updates currently required!
Automatic Updates
Depending on your IT support situation, you may want to change the Automatic Updates on your PBX.
- Make sure the email address is one that is checked.
- The red arrows are areas you may want to change, ask your IT administrator or service provider for advise.
- Click Save to save any changes.
Setting the System Name
Change IP Address
The initial setup will usually use a DHCP address. You need to change this to a static IP. The actual address is depending on the local IP schema.
- Admin > System Admin
- A banner will come down from the top and say "undefined". At this point, you should open up a new window and use the new IP address. You will need to log back in. If this doesn't work, go ahead and just reboot this server.
Updating Hostname
Setting up extensions
CHAN_PJSIP
- From the drop-down, choose Applications > Extensions
- For a newer SIP phone, click +Add Extension and +Add New PJSIP Extension
- Secret: You either need to copy this into the phone itself, the phones config file, or change this to whatever the phone currently has.
- Everything else can be left alone. Click Submit to save it. Then click "Apply Config" at the top to actually save this.
- For a newer SIP phone, click +Add Extension and +Add New PJSIP Extension
CHAN_SIP
- From the drop-down, choose Applications > Extensions
- For an older SIP phone, click +Add Extension and +Add New CHAN_SIP Extension
- User Extension: The extension you will use
- Display Name: This is the name that will show when calling out
- Outbound CID: Only if you want it to be different than the default
- Secret: You either need to copy this into the phone itself, the phones config file, or change this to whatever the phone currently has.
- For an older SIP phone, click +Add Extension and +Add New CHAN_SIP Extension
- Everything else can be left alone. Click Submit to save it. Then click "Apply Config" at the top to actually save this.
Trunks and routes
Adding in your SIP Trunk
- Connectivity > Trunks
- +Add Trunk, +Add SIP (chan_sip) Trunk
- On the General Tab:
- Trunk Name
- Outbound Caller ID: The DID from your provider
- Continue if Busy: Click yes.
- Next, Click the sip Settings tab, Outgoing
- Give this a friendly Trunk Name
- Enter the rest from what your provider gave you.
- You may need to change the Context to "from-trunk"
- You will most likely need to add transport=UDP as it will try to default to TLS and will probably fail.
- You can add qualify=yes to show this as monitored in your sip peers list. This will allow you to see it as OK, UNREACHABLE, etc.
- Now click Incoming SEE BELOW NOTE
- Give a friendly USER context, put in the user details from your provider, and the Registration String from your provider
- On the General Tab:
- +Add Trunk, +Add SIP (chan_sip) Trunk
- Click Submit at the bottom right and Apply Config at the top.
NOTE: If your Outgoing has the setting "type=friend" then you do NOT have to enter any info in the Incoming tab as freePBX will use the same info as you have in Outgoing. Return to Top
Outbound Trunk
Inbound Route
Alternate CHAN_SIP only
Some phones do not play well with the newer PJSIP protocal. For these, you will need to disable the PJSIP and just use CHAN_SIP. You will get a popup about needing to restart Asterisk, we will do that after all of this.
PJSAN to CHAN_SIP
- Settings > Advanced Settings
- Scroll down to "Dialplan and Operational"
- Line "SIP Channel Driver", change in dropdown to "chan_sip"
- Click Submit at the bottom right and Apply Config at the top.
- Settings > Asterisk SIP Settings
- Click the Chan SIP Settings tab
- Scroll down to "Advanced General Settings"
- Change Bind Port to 5060
- Change TLS Bind Port to 5061
- Click the Yes on "Enable TCP" button
- In the "Other SIP Settings", add in: tcpenable=yes, tlsenable=yes, tcpbindaddr=0.0.0.0, and transport=tcp,udp,tls. You will need to click "Add field" to get the additional lines.
- Click Submit at the bottom right and Apply Config at the top.
- Now, you need to restart the server itself.
- SSH into the machine as root
- Give the "shutdown -r now" command; the machine will reboot.
Extension updates
If you have set any extensions to use CHAN_PJSIP, you will need to convert them:
- Applications > Extensions
- Click the Edit icon for the PJSIP extension.
- Click the "Advanced" tab
- Under "-Edit Extension" click "Change to CHAN_SIP Driver"
- Click "Yes" on the "Can Reinvite" button.
- Click the Edit icon for the PJSIP extension.
- Click Submit at the bottom right and Apply Config at the top.
- You may also need to restart the phone itself
Notes for SonicWall
You may need to go uncheck the "Enforce Host Tag search for CFS" in the diag.html section and hit Accept. See https://wiki.freepbx.org/display/PPS/SonicWall+Basic+Troubleshooting for details.
Troubleshooting
- Command line:
- to launch the command line at full debug: rasterisk -vvvvvr
- Turn on CHAN_SIP debugging: sip set debug on
- Turn on CHAN_PJSIP debugging: pjsip set logger on
Useful links
- freePBX support forums
- List of SIP responses
- SIP trunk templates