Professional Documents
Culture Documents
Here is a list of setup guides for trixbox from other websites. trixbox 1.2 - Complete setup guide for a small business
http://www.trixbox.org
Trixbox v1.2
Table of contents
1.0 - Hardware platform used in the creation of this document 2.0 - Download and install Trixbox v1.2 3.0 - Seting up your server 3.1 - Network configuration 3.2 - Install Webmin 4.0 - Zaptel driver 5.0 - General Trixbox setup and security 5.1 - Install Trixbox Dynamic UI v2.1 6.0 - Module install 7.0 - Dial plan 8.0 - Configure internal extensions 8.1 - Zaptel channels 8.2 - Soft phone extensions 8.3 - Endpoint Manager 9.0 - Outbound routes 9.1 - Outbound route with default Zap trunk 9.2 - Setting up an IAX2 trunk using VoipJet 9.3 - Setting the IAX2 trunk as a second outbound route 9.4 - Setting up a BroadVoice SIP trunk 10.0 - Incoming calls/IVR setup 10.1 - System recordings 10.2 - Digital receptionist 10.3 - Time conditions
http://www.sureteq.com/asterisk/trixboxv1.2.htm (1 di 24)12/03/2007 2.12.59
10.4 - Inbound route 11.0 - On hold music 12.0 - Forwarding calls to a cell phone / IAX2 setup 13.0 - Simple Queue setup 13.1 Forward to cell phones queue 14.0 - Panel configuration 15.0 - Hud-lite configuration 16.0 - SugarCRM configuration
3.1 - Network configuration Set up IP address information by typing netconfig. Select Yes when prompted about setting up networking.
Select to use DHCP if you want (not recommended) otherwise, enter in IP information for your Trixbox box. I will use the following information for my home setup: IP: 192.168.200.16 Netmask: 255.255.255.0 Gateway: 192.168.200.254 Primary nameserver: 4.2.2.2 (This is one of AT&T's public name servers. If you have your own DNS server, enter it in this field). Click OK and restart the network with service network restart. Secondary nameserver if you would like to add a secondary nameserver for backup DNS purposes, nano /etc/resolv.conf and add a line nameserver (ip address) underneath the primary nameserver information. My resolv.conf now looks like this: nameserver 4.2.2.2 nameserver 4.2.2.1 To exit nano, hit 'CTRL+X' and then 'Y' when asked if you want to save. 3.2 - Install Webmin Webmin is a valuable tool used for the configuration of Linux-based servers. I install Webmin by default on all of my Linux boxes simply due to it's ease of use. Webmin installs an HTTP-based GUI which you can get to by using port 10000 from a browser. To install Webmin, first you need to download the RPM file. There are two ways to do this. First, you can go to www.webmin.com, download the latest RPM, and then get it to your Trixbox box somehow (typically I would use FTP to do this). Alternatively, you can skip the middleman and download the Webmin RPM direct from the linux CLI using wget. I typically download installs to /usr/local. The wget command looks like this: cd /usr/local wget superb-east.dl.sourceforge.net/sourceforge/webadmin/webmin-1.290-1.noarch.rpm Once you have the RPM file downloaded, install it by running: rpm -ivh webmin-1.290-1.noarch.rpm You can now get to your Webmin console by putting the following into a browser that exists on your LAN: http://192.168.200.16:10000 (obviously, replace my IP with your Trixbox IP)
======================
Channel map: Channel 01: FXO Kewlstart (Default) (Slaves: 01) Channel 04: FXS Kewlstart (Default) (Slaves: 04) 2 channels configured. Or similar based on your Zaptel hardware configuration. The above output is from Digium's standard developer's kit TDM400 (mentioned in chapter 1). *** NOTE: If there are no channels showing up when doing 'ztcfg -vv', try running 'genzaptelconf' at the Linux CLI to see if it will detect your card. *** NOTE: If you are still having Zaptel driver issues, please follow the steps in my v1.1 Setup Guide, Chapter 4: http://www.sureteq.com/asterisk/trixbox.htm#4.0_-_Zaptel_Issues
#Port 22 #Protocol 2,1 #ListenAddress 0.0.0.0 #ListenAddress :: Uncomment the first three lines and change them to this: Port 22 Protocol 2 ListenAddress 192.168.200.16 #(your asterisk IP address) #ListenAddress :: (leave this commented out...unless you are using IPv6...which you are probably not). Type 'CTRL+X' to exit nano and 'Y' to save changes. From the Linux CLI, do: service sshd restart You can now connect to your Trixbox with SSH2 by using an SSH client such as PuTTY: http://www.chiark.greenend.org.uk/~sgtatham/putty/ 5.1 - Install Trixbox Dynamic UI v2.1 This is an ***optional*** step. The Trixbox Dynamic UI v2.1 is a nicer looking interface than the stock index.php that comes with Trixbox. It also allows you to customize what options you have from both a client and administrative standpoint. It is developed by Kennon Software and can be found at www.kennonsoft.org. First, download and install the UI. Open up a CLI and do the following: cd /var/www/html mv index.php index-old.php (backup your original index.php file) wget http://www.kennonsoft.org/projects/trixbox/admin-ui-21.tgz tar -xzf admin-ui-21.tgz rm admin-ui-21.tgz chmod 777 welcome/index.dat Your Dynamic UI is now installed. Next, we will want to configure it. Open up https://(your asterisk IP) in a browser. You should see the following:
Click on 'Administration...' in the bottom right-hand corner. Click on Menu Config. You can choose to uncheck 'Enable End-user Menu' at the top of the screen...this saves you a step by going straight to the administration menu when you browse to the Dynamic UI home page. Select all of the modules and click 'Update' followed by 'Done.' You should now see this when you browse to your Asterisk box:
Make sure Enable Selected is in the drop-down box and click Submit. See the red bar that just popped up at the top of the page? Click on the red bar anytime you make changes. This reloads the Asterisk configuration. You can now click on Setup in the upper right to get to the modules you have just activated.
Record Incoming: On Demand Record Outgoing: On Demand Channel: 1 Voicemail & Directory: Enabled Voicemail password: 111 (same as extension numberkeeping it simple) Email address: (my email address) Pager email address: <blank> Email attachment: Yes (since I like getting the messages in my email) Play CID: No Play Envelope: No Delete Vmail: Yes (this way, the voice mails are delivered to my email inbox onlyif set to no, once I delete the emails, I also have to go into the voicemail and delete the voicemail manually) Vm options: <blank> Vm context: default Hit Submit Click the red bar to apply the options. I now get a dial tone on my cordless phone. 8.2 - Soft phone extension Next, well set up a soft phone so that I can dial between internal extensions. I use the X-Lite soft phone which can be downloaded from http://www.xten.com/index.php?menu=download. In FreePBX, click on Setup and then Extensions. Click on SIP. I used these settings: Extension number: 102 Display name: Soft phone Direct DID: <blank> DID Alert Info: <blank> Outbound CID: <blank> Emergency CID: <blank> Record Incoming: On Demand Record Outgoing: On Demand Secret: 12345 (can be whatever you want) Dtmfmode: rfc2833 Voicemail & Directory: Enabled Voicemail password: 102 Email address: (my email address) Pager email address: <blank> Email attachment: Yes (since I like getting the messages in my email) Play CID: No Play Envelope: No Delete Vmail: Yes (this way, the voice mails are delivered to my email inbox onlyif set to no, once I delete the emails, I also have to go into the voicemail and delete the voicemail manually) Vm options: <blank> Vm context: default Hit Submit Click the red bar to apply the options. Now to configure the X-Lite soft phone.
http://www.sureteq.com/asterisk/trixboxv1.2.htm (9 di 24)12/03/2007 2.12.59
Upon first installing, the SIP configuration pops up automatically, otherwise, you can click on the down arrow at the top of the phone and choose SIP Account Settings. Click Add. Display Name: Soft Phone User Name: 102 Password: 12345 (my secret from above) Authorization user name: 102 Domain: 192.168.200.16 (your Trixbox IP address) Domain Proxy Register with domain and receive incoming calls (checked) Target domain selected
Click OK. Click Close on the SIP Accounts window. I now try dialing my cordless phone x111 and it works! From the cordless, I dial my Soft Phone x102 and it works as well. 8.3 - Endpoint Manager Trixbox v1.2 now comes with an endpoint manager which is really slick. I have a GrandStream GXP-2000 SIP phone on my desk and plugged into the network. It has already been configured as IP 192.168.200.107. I now need to create an extension for my GXP-2000. In FreePBX, click on Setup and then Extensions. Click on SIP. I used these settings: Extension number: 101 Display name: GXP-2000 Direct DID: <blank> DID Alert Info: <blank> Outbound CID: <blank> Emergency CID: <blank> Record Incoming: On Demand Record Outgoing: On Demand Secret: 12345 (can be whatever you want) Dtmfmode: rfc2833 Voicemail & Directory: Enabled
http://www.sureteq.com/asterisk/trixboxv1.2.htm (11 di 24)12/03/2007 2.12.59
Voicemail password: 101 Email address: (my email address) Pager email address: <blank> Email attachment: Yes (since I like getting the messages in my email) Play CID: No Play Envelope: No Delete Vmail: Yes (this way, the voice mails are delivered to my email inbox onlyif set to no, once I delete the emails, I also have to go into the voicemail and delete the voicemail manually) Vm options: <blank> Vm context: default Hit Submit Click the red bar to apply the options. Close out of FreePBX and open up your Asterisk Mgmt. screen. Click on 'Endpoint Manager' to access it. I see that the 'Map Devices' section has already filled in my local network, so I click 'Go.'
I click on the MAC Address of my GXP-2000, and I am now taken to the configuration screen:
I select the Budge Tone SIP extension I created above (101) and hit 'Submit.' My GrandStream phone is now configured.
By default, Trixbox has already created a trunk out of my FXO port in the Digium TDM400 card (trunk Zap/g0), and has already created a route which makes the user dial 9 to get an outside line (0 9_outside). Lets click on the 0 9_outside route on the right hand side of the screen and add a few more dial patterns for outbound dialing. The only dial pattern so far should be 9|. Under Dial Patterns, you should see Insert. This allows you to insert pre-defined dial patterns for commonly dialed numbers. I picked the following patterns: Local 7/10 digit Toll Free Information Emergency Click Submit Changes Click the red bar at the top of the screen to apply the changes. My Dial Pattern for route 0 9_outside now looks like this: 311 411 911 1800NXXXXXX 1866NXXXXXX 1877NXXXXXX 1888NXXXXXX 9|. NXXNXXXXXX NXXXXXX I try dialing my cell phone with my cordless x111, and it works! 9.2 - Setting up an IAX2 trunk using VoipJet Since I only have a single Vonage line out to the Internet, I'd like to use a VoIP provider to provide some redundancy. To accomplish this, I use an IAX VoipJet line (available from www.voipjet.com). This is a pretty solid service, and is easy to set up. Plus, it allows you to just put in as much money as you need, and is not a monthly-charge type of setup. First, I click on 'Trunks' and then click 'Add IAX2 trunk.' I used these settings: Outbound caller ID: "SureTeq" <my 10-digit phone number> Maximum channels: (leave blank) Dial Rules: 1NXXNXXXXXX 1818+NXXXXXX (These dial rules are 'as is' for a call outside my area code (10 digit), but for calls within 818, or 7 digit dialed numbers, it adds the 1818 to the front) Outgoing Settings Trunk Name: (userid)@voipjet (userid is a 4 digit number) PEER Details: auth=md5 context=from-internal host=test.voipjet.com secret=(my secret) type=peer Leave Incoming settings and the rest of the page blank.
http://www.sureteq.com/asterisk/trixboxv1.2.htm (15 di 24)12/03/2007 2.12.59
Click Submit and then the red bar at the top of the screen to apply these settings to Asterisk. Here is what it should look like once completed:
One more thing we need to do is to nano /etc/asterisk/iax_custom.conf and add the following: [voipjet] type=peer host=test.voipjet.com username= (your username) secret= (your secret) auth=md5 context=from-internal To test whether or not this worked, click on 'Outbound Routes', and then '0 9_outside.' Under 'Trunk Sequence,' change the drop-down box from 'Zap/g0' to 'IAX2/(username)@voipjet.' Click Submit and then click on the red bar at the top to apply the changes. Try making an outbound call to see if your IAX trunk works properly. 9.3 - Setting the IAX trunk as a second Outbound route Now that we've successfully set up our IAX trunk, we would like to use it as a backup for our Zap trunk. Click on 'Outbound Routes', and then '0 9_outside.' Under 'Trunk Sequence,' set the first drop-down box to 'Zap/g0' and the second drop-down box to 'IAX2/(username)@voipjet.' Click Submit and then click on the red bar at the top to apply the changes. You should now be able to make multiple outbound calls. 9.4 - Setting up a BroadVoice trunk (Chapter 9.4 submitted by Thomas Cirillo) I have a BroadVoice account (www.broadvoice.com) which provides me with a local area code to call my system. The FreePBX GUI is used to configure the trunk and no editing of sip.conf, extensions.conf or other conf files is necessary. Outbound Caller ID: Caller name <#######> Maximum Channels: (I left this blank) Outgoing dial rules were left blank also. Trunk Name: Broadvoice PEER Details: authname=<phone number> canreinvite=no context=from-pstn dtmf=inband dtmfmode=inband fromdomain=sip.broadvoice.com fromuser=<phone number> host=sip.broadvoice.com insecure=very secret=password *(read below on where to find this) type=peer user=phone username=<phone number> (*)The password used as the secret in peer details is not the same as the account password with the service provider. When you log into www.broadvoice.com with your account name and select the Account tab; To the right of the My Devices section there is an HTML tag for Show Settings; Select this and note the auth_id: & auth_password:
Now, I need to tell my Trixbox what to do with incoming calls. 10.1 - System recordings But first, lets take care of the necessary recordings for my Digital Receptionist. I want two different messagesone for during business hours, and one for when we are closed. The scripts will look something like this: Thanks.wav Thank you for calling Schw00ds Asterisk emporium. Please press 2 for Schw00d, 3 for Jim, and 4 for the next available associate. Thank you and have a wonderful day. Closed.wav Thank you for calling Schw00ds Asterisk emporium. Our office is now closed. Please call back between the hours of 8am and 7pm Pacific Standard time. Thank you. (click). To get these recorded first clear your throat and put on your best announcer voice. Click on System Recordings. You can either record your greetings as .WAV files in an external application (8-bit mono recordings work best over the phone lines), or straight into an extension. Well record using our extension. Put your extension number into the extension field and click Go. Pick up the extension that you put into the extension field and dial *77. You will hear a beepstart your recording. When you are done, hang up the extension. Type in a name for your recording and click Save. 10.2 - Digital Receptionist Click on Digital Receptionist and then click Add IVR. I used these settings for my initial IVR: Change Name: BusinessHours Timeout: 10 Enable Directory: Checked Directory Context: default Enable Direct Dial: checked Announcement: Thanks (my pre-recorded Thanks.wav file) For my options, I will have 3, so I leave the Increase/Decrease default, but if you have more or less options, feel free to add/remove them. Option 1: 2 Core Cordless <111> 3 Core Soft phone <102> 4 Core Budge Tone <101> Save Click on the red bar at the top of the screen. (Note: I know I said that I was going to have options 2 and 3 forward to cell phonesIm getting there, but I just want to get this set up and working with local extensions first). Click on Add IVR Change Name: AfterHours Timeout: 10 Enable Directory: Checked Directory Context: default Enable Direct Dial: checked Announcement: Closed (my pre-recorded Closed.wav file)
http://www.sureteq.com/asterisk/trixboxv1.2.htm (18 di 24)12/03/2007 2.12.59
Option 1: 2 Core Cordless <111> 3 Core Soft phone <102> 4 Core Budge Tone <101> (Note: The options are exactly the same as my BusinessHours IVR except for the name and the announcementwhy the heck did I do that? Wellbecause my Thanks.wav file lists the possible extensions (2,3,4), and my Closed.wav does nothowever I still want specific people to be able to call my extension after hours, so even though the after hours recording does not list the optionsthe options are still available). 10.3 - Time Conditions Setting up time conditions will be the next step. Click on Time Conditions. I used these settings: Time Condition Name: Incoming Time to match: Time to start: 08:00 Time to finish: 19:00 Week Day Start: Monday Week Day Finish: Sunday (were open 7 days!) (Leave the rest blank) Destination if time matches: IVR: BusinessHours (my daytime-created IVR) Destination if time does not match: IVR: AfterHours (my nighttime-created IVR) Click Submit Changes Click the red bar at the top of the screen to apply the settings. 10.4 - Inbound Route Next, we want to add our incoming route. Click on Inbound Routes. You can route based on DID channel, Caller ID Number, Zaptel channel, or if all of those are left blank, it will route all un-matched (by DID, CID or Zap channel) calls to your settings. DID Number: <blank> Caller ID Number: <blank> Zaptel Channel: <blank> Fax Extension: disabled (for now) (Leave the rest of the fax stuff default) Privacy Manager: No Alert Info: <blank> Set Destination: Time Conditions: Incoming (the one we just created) Click Submit Click the red bar at the top of the screen to apply changes. You will receive a warning stating that Leaving the DID and Caller ID Number empty will match all incoming calls received not routed using any other defined incoming Route. Are you sure? Click OK. Click the red bar at the top of the screen to apply the settings. At this point, we can simulate an incoming call by dialing 7777 from one of our extensions. You should hear one of the two recordings we did for the Digital Receptionist.
Next, we will set up our hold music. Click on On Hold Music. I typically delete all of the included mp3s and choose to upload my own. You have to always have 1 mp3 available for hold music, so youll have to upload at least one song prior to deleting all of the included music. Browse for a .wav or .mp3 file that you would like to be played as your hold music, and click Upload. Click on the red bar at the top of the screen to apply the settings. You can repeat this for as many songs as youd like to upload. One nice thing about Asterisk is that it only plays hold music while someone is actually on hold. So, if someone hears 30 seconds of an on-hold song, and then is taken off of hold, the song will pick up where it left off the next time someone is put on hold.
I would now like to set up a new queue which routes inbound callers to the cell phone extensions I created in chapter 12. I had set up extension 112, however lets say that I also have extension 113. This is the exact same concept for internal extension queues. Click on Queues on the left hand side of the FreePBX screen. I used the following information to set this up: Queue number (extension for the queue): 200 Queue name: CellRoundRobin Queue password: <blank> (since I am going to use static agents, there is no need to have the agents log into the queue) CID name prefix: <blank> Static agents: 112
http://www.sureteq.com/asterisk/trixboxv1.2.htm (20 di 24)12/03/2007 2.12.59
113 Agent announcement: <none> (I don't need one since this queue will end up being an option off of the Digital receptionist that I set up in chapter 10). Hold Music Category: Default (an interesting note...you can set up different hold music contexts for different applications such as standard on-hold, or separate queues...so for instance, if you would like callers to hear perhaps a song followed by an advertisement for your company, you would set that up as a different hold music category...for our purposes however, I will leave it default). Max wait time: Unlimited Max callers: 0 (unlimited) Join empty: Yes Leave when empty: No Ring Strategy: roundrobin Agent timeout: 15 seconds Retry: 5 seconds Wrap-up-time: 0 seconds Call recording: No Caller announcements: 0 seconds Announce position: No Announce Hold Time: No Voice Menu: None Join Announcement: None Fail Over Destination: Core: Voicemail box 111 (my cordless...since this ACD transfers calls to cell phones, this is kind of a moot point for the application). Click Submit Changes Click the red bar at the top of the screen to submit the changes. You should now be able to pop into Panel and see your new Queue. If you dial 200 from an internal extension, the call will go to extension 112 (my cell phone). If you dial it again, it will go to 113, and so forth.
Now, restart the panel with amportal restart from the CLI, and you're good to go. There are a few useful things you can do with the FOP. For instance, if a call is in session, you can click on the RED button to disconnect the call. If you would like to call an extension, you can drag the phone icon located to the right of the extension number to another extension. This initiates the call to both phones. To transfer a call, drag the phone icon from the extension you want to disconnect to the new extension, and the call is transferred. For more information on the FOP, please see http://www.aussievoip.com/wiki/TB-FOP.
For my Trixbox v1.2 installation, Hudlite-server wasn't installed by default, but I did find a file which did the trick. I ran: /usr/local/sbin/install-hudlite This ran through a quick install routine and started the hudlite service. I'm not sure if my installation was weird, or if this is how to get it installed with v1.2. If anyone knows for sure, please email me. Next, lets configure some extensions in the HUD Manager. Click on HUD Manager and then click on New Device. Let's add one of our extensions: Device: SIP102 Ext: 102 Name: Soft Phone Username: username (this is the HUD username only...can be anything) Password: password (this is the HUD password only...can be anything) Email/IM/Cell Phone are optional Click 'Save.' Repeat this for each extension you want monitored. Time to download and install HUD-Lite. You can get HUD-Lite at www.hudlite.org. Download the latest version and install onto your Windows PC using all defaults. Once inside HUD-Lite, choose File --> Settings. Click the '+' next to Advanced Settings and enter the following information: Username: (the username you used for one of your extensions above) Password: (the password you used for one of your extensions above) Server name: (the IP address of your Trixbox server) Password: (the HUD-Server password - by default it is 'password') Server port: 6600 Login timeout: 30 Park extension: 9000 Click 'Apply' and 'Close.' HUD-Lite should now connect to your Trixbox and show you the extensions you set up:
HUD-Lite tells you a few things when calls are in progress with colors: Green - extension is on an outside call Purple - extension is on an intra-office call Orange - extension is on a queue call Gray - extension is unavailable You can drag and drop your extension (upper-left corner extension 101) to another extension to call that extension (will dial your phone first and then call the 2nd extension once you have picked up). You can also drag and drop your call to the 'on hold' section in the upper left to put a call on hold (although this didn't seem to work too well for me). You can also drag and drop a call into the envelope icon of another extension to send that call directly to the voicemail of that extension. HUD-Lite also allows you to Barge/Monitor a call in progress by clicking the 'B' next to a call that is in progress. This will ring your extension and when you pick it up, you will hear the conversation that is going on between the two other extensions, or to the outside world. Muahahaha...big brother in the house.
Add another: Last name: GrandStream (my Grandstream SIP phone) Office phone: 101 Save Add another: First name: Chris Last name: Sherwood Office phone: (my cellular number) At this point, I try calling one of my extensions by clicking on contacts, and then clicking on the little phone icon next to their name. It rings my soft phone x102 which I pick up, then dials extension 111. It works!
I won't go much into SugarCRM, but as you can see, it can be a very powerful tool. You can add multiple users who will each have their own settings/contacts/etc.