Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

My FreePBX Installation

Options
  • 15-07-2014 11:37am
    #1
    Registered Users Posts: 2,100 ✭✭✭


    I'm about to embark on a FreePBX installation in work, and I thought it might be interesting to document it here as I go, and perhaps get help along the way, if the mods will suffer me.

    We're a manufacturing plant with around 300 staff, but we'll only have about 35 phone users. The existing PBX is a Nortel Meridian 1 system, it's about 30 years old, with no spare parts, and a few extensions that have just disappeared into the ether over the years. There's a hodge-podge of about a dozen lines feeding into it, including a hunting group of a hundred numbers. Here it is in all it's glory:
    314603.jpg314602.jpg

    I have two HP ProLiant DL120 servers upon which I plan to install FreeBPX, with one being the master and the other a hot failover. They'll have Digium TE133 PRI cards to talk to the FRA line that we've ordered from Eircom to consolidate our lines.

    For the users I have a variety of Grandstream handsets and also plan on using softphones both on desktop PCs and mobiles. To ensure QoS for the VoIP traffic I'll also have to segment our network into VLANs and will be upgrading our wireless to use Ruckus access points. I'll also be installing a DECT network using a RTX 8660 base unit + repeaters. There's also a few fax lines and a PA system than will need to magically work as well.

    There's a lot of work involved, so the project is split into ten stages:
    1. Server Configuration
    2. Handset Configuration
    3. Network Configuration
    4. Trial Preperation
    5. Initial Trial
    6. Auxiliary Services
    7. Final Configuration
    8. Full Deployment
    9. Decommissioning
    10. Review
    It's hoped that this will all be up and running by September, so I'll post updates as I go along. My own background is in development and system administration so while it'll be a learning experience I'm pretty confident it'll go well. My biggest uncertainty in concerning the network infrastucture, at present we've another hodge-podge of almost a dozen switches from D-Link, ZyXel, Netgear, and Cisco, although we do have upgrades for this planned too.


Comments

  • Registered Users Posts: 2,100 ✭✭✭ectoraige


    FreePBX Installation

    First task is to get a base installation up and running. Normally I’d burn a CD, but i didn’t have any handy so I’ll installed from USB instead.
    • Download the ISO for FreePBX. I used the latest stable version of the USB ISO which was Stable-5.211.65-14
    • Write the image to the USB stick - I’m using Ubuntu which automatically mounted my USB key so I first had to unmount the partition, and then write to the entire disk
    $ sudo umount /dev/sdb1
    $ sudo dd if=FreePBX-5.211.65-14-x86_64-Full-1402716429.img of=/dev/sdb
    

    • Insert the USB key and boot from it. You may need to configure BIOS to allow booting from USB
    • The installer gives a choice of FreePBX 11 or FreePBX 1.8. As far as I can tell there’s no reason not to use 11 so I selected that. There’s a further subset of options:
      • Full Install
      • Full Install -- No RAID
      • Full Install -- Advanced
      • HA Install
    I took the first option, it detected I had two disks and configured RAID 1 accordingly. The HA Install prepares the way for the propriety High Availability FreePBX module. While I do want some form of HA, I’ll be rolling my own. Possibly I’ve missed out on some tools that I’ll need, but I don’t like installing things just for the sake of it.

    The install took about half an hour, with just a bit of interaction required for network, timezone, and root password config. After this, I rebooted the machine and it did a few more updates which took about 10 minutes. I was then able to log in to the web GUI. Here you’re asked to create an admin user and password, which is distinct from the root password. Once this is done, the server is up and running and ready to configure, which will be my next job.

    There’s further details on this stage on the FreePBX wiki. Also I came across an excellent looking document on how to plan your deployment, which I probably should have read before reaching this stage :)


  • Moderators, Technology & Internet Moderators Posts: 4,621 Mod ✭✭✭✭Mr. G


    You might want to change the voiceovers to a UK version also.

    http://www.boards.ie/vbulletin/showpost.php?p=90018396&postcount=4


  • Registered Users Posts: 320 ✭✭domeld


    From my experience you may no need hardware cancellation - software is enough using oslec this depend on you.
    Shmooze distribution of freepbx has a commercial module called high availability so you will be able to use to servers, however this will not work instantly (fra/pri connected to one server). To do full failover you will need to use fra/pri gateway and high availability module.
    You have to check with provider if fra is using crc4 or not - remember about timing as well ;)


  • Registered Users Posts: 2,100 ✭✭✭ectoraige


    domeld wrote: »
    From my experience you may no need hardware cancellation - software is enough using oslec this depend on you.
    Shmooze distribution of freepbx has a commercial module called high availability so you will be able to use to servers, however this will not work instantly (fra/pri connected to one server). To do full failover you will need to use fra/pri gateway and high availability module.
    You have to check with provider if fra is using crc4 or not - remember about timing as well ;)

    Thanks for that, I won't be aiming for full failover, waiting for somebody to swap a plug is acceptable to us, and in fact I may even consider going for a cold-standby over hot. An entirely unrelated issue cropped up last week in work so I haven't touched this for a few days as we carry out a bug-squashing/testing exercise this week.


  • Registered Users Posts: 802 ✭✭✭Mylow


    Did you get to stage 2? ;)


  • Advertisement
  • Registered Users Posts: 2,100 ✭✭✭ectoraige


    Mylow wrote: »
    Did you get to stage 2? ;)

    Sigh, sadly not yet, a series of other projects cropped up that had meant this has been put on hold. I haven't forgotten though :)


  • Registered Users Posts: 320 ✭✭domeld


    Wait until freepbx 12 will be released, some cool futures!


  • Moderators, Technology & Internet Moderators Posts: 4,621 Mod ✭✭✭✭Mr. G


    domeld wrote: »
    Wait until freepbx 12 will be released, some cool futures!

    Very true :) Have you tried out the Beta version?

    I tried the Alpha one when that was out and found it buggy, but that's to be expected.


  • Registered Users Posts: 2,100 ✭✭✭ectoraige


    domeld wrote: »
    Wait until freepbx 12 will be released, some cool futures!

    The ways things have fine the last few weeks it'll be version 21 I'll be installing, as Nidgy would say, it's doing me nut in!


  • Moderators, Technology & Internet Moderators Posts: 4,621 Mod ✭✭✭✭Mr. G


    I know that feeling.. Thank god for the R&R forum!


  • Advertisement
  • Registered Users Posts: 2,100 ✭✭✭ectoraige


    So, after a slight (17-week!) delay, I continue...

    Logging into the admin panel shows me this:

    328351.png

    The Notices section provides a good overview of administrative tasks, the first of which is a set of upgrades that are available, including one security-related issue. To upgrade the modules, open the Admin menu and select “Module Admin”. There is an button “Check Online” which lists the latest updates available. As I haven’t used any modules yet, I just “Upgrade All” and “Process”.

    A few could not be immediately upgraded due to an unmet dependency, so I selected the remaining modules and installed these, and repeated the process. There was still one that could not be upgraded, the following message showed:
    EndPoint Manager cannot be upgraded:
    Module restart is required.
    Please try again after the dependencies have been installed.

    At first I looked for an option to restart the module, but it turns out that this is just a badly worded message - what is actually required is that I first install a module that happens to be called “restart”.

    I didn’t see a way to do this from the GUI so using the CLI I did:
    # amportal a ma download restart
    # amportal a ma install restart
    

    This downloaded and installed the “restart” module. Checking the GUI again I was now able to update the EndPoint Manager module. At this point, all the modules were upgraded.

    The base FreePBX system itself does also have updates available, but I will leave this for another day.

    Returning to the dashboard (Reports->FreePBX System Status), the next issue is that the default manager user is set for Asterisk, this needs to be changed. To do this, go to:

    Admin->Advanced Settings

    328349.png

    Change the settings "Display Readonly Settings" and "Override Readonly Settings" to "True", and click "Apply Config" at the top. This now allows you to change the falue for "Asterisk Manager Password", entering a new value where the default "amp111" is. Once you have this done, click the green tickmark icon to the right, and then change the Display and Override Readonly options back to False.

    There was one other notice on the FreePBX Status panel was simply informing me that the system had changed a setting itself which allowed it to use wget to download files. There was no action for me to take so I just clicked the “X” beside it.

    That's all for today, I'm liking the GUI, there's lots of tool-tips explaining the options and seems well laid-out. I'll be able to do more next week, thankfully.


  • Moderators, Technology & Internet Moderators Posts: 4,621 Mod ✭✭✭✭Mr. G


    Don't forget to change the tone indications in Advanced Settings :). It's sort-of hidden, always better to set it to the UK one. I think the Irish tones are in for FreePBX 12.


  • Registered Users Posts: 2,100 ✭✭✭ectoraige


    Asterisk SIP
    Next I had to tell Asterisk a little about the network in Settings->Asterisk SIP Settings. There's a "Auto-configure" button which got everything right when I used it. Note, I won't be using VoIP for outbound calls as we'll have an E1 line instead so if I got the NAT settings wrong I probably won't notice. The local network was recognised correctly, 10.222.0.0 with netmask 255.255.0.0.

    There's many other settings that I don't yet understand but I presume the defaults are reasonable. I left the codecs as they are at the moment, although I imagine I'll may have to revisit it as I configure the clients. For the moment the enabled codecs are:
    1. ulaw
    2. alaw
    3. gsm
    Emails
    The system will send emails in a number of situations, so next I made sure I had the correct addresses in the following places:

    Admin->System Admin->Notifications
    The "From" address is the address that will appear in emails that are sent out. There are fields then for who should receive notifications for "Storage Notifications", "Intrusion Detection Notifications", and "Abnormal Call Volume". The latter one is possible duplicated in Admin->System Admin->Abnormal Call Volume. I just entered mine everywhere for now.

    There are additional fields for email addresses in
    Settings->Advanced Settings "Backup module",
    Settings->Fax Configuration "Outgoing Email address" and "Email address",
    Settings->Voicemail admin->settings "fromstring", "pagerfromstring", and "serveremail".

    Misc Settings
    A few other changes I made in Settings->Advanced Settings were:
    • Device Settings->Show all device settings on Add = "True" - this should show all options available to me when adding new devices, which I imagine will be handy until I'm more familiar with it all.
    • Dialplan and Operational->Country Indication Tones = "United Kingdom" (Thanks Mr. G)
    • Dialplan and Operational->Speaking Clock time format = "24 Hours"
    • Ring Group Module->Display Extension Ring Group Members = "True" - this will show me which groups an extension is in when I'm editing it, which may be useful as I will probably end up with some complex groups.
    • System Setup->User & Devices Mode = "deviceanduser" - this is probably the most significant change as it will allow me to configure devices independently of users, and allow users to have multiple devices. This is quite important as we have multiple shifts, and supervisors and other operators will have roaming devices when away from stations. This isn't needed for a traditional phone-at-desk scenario.

    Don't forget to hit "Apply Config" at the top after making changes.

    All this before lunchtime! Fridays are the only day I'm allowed work on this, unless our other system goes on fire. :o


  • Moderators, Technology & Internet Moderators Posts: 4,621 Mod ✭✭✭✭Mr. G


    LOL- I know that feeling. You're better doing it on Friday so if something goes wrong at least you have the weekend.

    Backup the whole system when it's done. You'll never know. Get a USB an auto regular backup freepbx and call logs to it also. But that's when it's working!


  • Registered Users Posts: 320 ✭✭domeld


    Now upgrade to freepbx 12 :)


  • Moderators, Technology & Internet Moderators Posts: 4,621 Mod ✭✭✭✭Mr. G


    domeld wrote: »
    Now upgrade to freepbx 12 :)

    Have you tried it? Is there a big difference?


  • Registered Users Posts: 2,100 ✭✭✭ectoraige


    domeld wrote: »
    Now upgrade to freepbx 12 :)

    I plan to do that once I have a working tested system, but before it's in production use, so that I'm familiar with the possible impact of upgrading a live system.


  • Registered Users Posts: 2,100 ✭✭✭ectoraige


    Today, I finally started playing with the phones themselves. I’m using a mix of Grandstream units, so I’ll set up one of each, a GXP1405, GXP2100, and GXP2120. The 2120 also has an extension module for use as a reception phone. These all work with PoE so once I assembled them and configured the DHCP server, I just had to plug them into the network to bring them online.

    As I has previously selected "Device and User mode", the Extensions module is not available. Instead, I have to configure each device, and map the user to it.

    First I added some users using their current extension numbers.

    To add a new user go to Applications->Users

    I provided information for the following fields, and left everything else at default settings:

    Add New User
    User Extension: 338
    User Password: ********
    Display Name: Joseph Bloggs

    Recording Options
    On Demand Recording: Enable

    User Manager Settings
    Link to a Default User: Create New User
    Use Custom Username: Ticked
    Username: joseph
    Password: ********

    Voicemail
    Status: Enabled
    Voicemail Password: ********
    Email Address: joseph@example.org

    I didn't set this up to actually email voice messages, but at least the user details are configured should it be required.

    I did this for a number of test users, and then set up three devices.

    Add a device
    To add a new device go to Applications -> Devices -> Generic SIP Device

    329863.jpg

    Here the secret is pre-generated. As these are internal devices only, I changed the value for "nat" to "No - RFC3581". I'm not sure if perhaps some mobiles etc. may need this changed, but for now I'll leave it at "No". The PBX isn't going to be front-facing at the moment so I don't think this has any ramifications.

    The "Device ID" has to be an integer, I'm starting at 1 and working the way up. As the devices are independent of the roles I didn't bother trying to correlate with extension numbers etc. I assume over time physical devices will be replaced or moved. The "Description" is just the hostname that will be on the network. I decided to enter the company address for the field for "Emergency CID", with the specific area of the plant that the phone will be deployed in. I can't see it doing any harm anyway.

    For "Device Type" I selected "Fixed" for now as I just want to get it up and running with a single user per phone. I can easily change this to ad-hoc for any phones that will be used with multiple sign-ins. I selected an appropriate default user for each for the time being.

    Once I had a few devices and users entered, I then entered the SIP account details to the individual phones. For the Grandstreams you can manually enter the SIP account details on their user menu by going to Menu->config->SIP and provide values for "SIP Proxy" (the freepbx server IP), "SIP User ID" (the Device ID), and the "SIP Password" (secret). Once this was done, they registered successfully, and I was able to place calls between them using the extensions I'd assigned.

    I'll detail this more next week and see what I can do to automatically provision them, instead of entering the details through the keypad. I also need to look into the codecs in more detail, these handsets all support HD audio, so I should make use of it.

    Anyway, at this point I've proved I can call internally so proof-of-concept is ticked :D


  • Registered Users Posts: 21 eamo4648


    Set your codec to alaw ... ulaw is the states


  • Registered Users Posts: 320 ✭✭domeld


    @eamo4648 better to do this in trunk config or sip_general_custom.conf ;)


  • Advertisement
  • Registered Users Posts: 21 eamo4648


    on the trunk side and device if you have the option


  • Registered Users Posts: 2,100 ✭✭✭ectoraige


    Not a whole lot to add from today's work, I configured more handsets, and some SIP clients. Full steps for configuring the Grandstream GXP2120/GXP2100/GXP1405 are:
    1. Ensure DHCP is configured
    2. Press the "Menu" button (dot in middle of directional keypad)
    3. Scroll to "Config" and select "SIP"
    4. For "SIP Proxy", enter the IP address of the server. Note, the hostname might work, I couldn't test it though as our domain contains a "-" and there's no way to enter this on the keypad that I can see.
    5. "SIP User ID" should be the device ID
    6. "SIP Password" should be the "secret" for the device.
    7. Press "Save".

    The phone should now be registered.

    I installed the "Zoiper" SIP client on an Android phone, an iPhone, and a Mac. The procedure here is:
    1. Install the app
    2. Go to "Config", "Accounts", "Add Account"
    3. Answer "Yes" to the question of whether you have an account already
    4. Select "Manual Configuration"
    5. Choose "SIP" for account type
    6. For Host, enter the server IP address or hostname.
    7. Username should be the Device ID
    8. Password is again the "secret"
    9. Hit Save, and the device should register.

    When adding the devices, I followed the following conventions for the device ID:
    For the Grandstream handsets themselves, I began at 1.
    For PCs, I began at 101,
    For Mobiles, I began at 201.

    I don't know whether I'll have any benefit from doing this, but I'm guessing it might be useful if writing advanced rules, such as not diverting to a mobile after a given time, or something. I don't really know, but I figured having a structure isn't going to cause any problems, and might save me down the road.

    I tested having a user mapped to both a mobile and a deskphone, and when ringing their extension both the mobile and deskphone rang. Result!

    I did find though that the Mac client took longer to start ringing than the desktops and android app, not sure why, but it may well be to do with the mac itself.

    I had a look at some of the provisioning scripts out there, will play with them soon, but next thing on my list is to split the network into two vlans so that I can do QoS for the VoIP traffic. Given that I've about ten switches from about 5 different vendors, it should be a new level of fun.


Advertisement