trixbox2 without tears

248 1.3K 0
trixbox2 without tears

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Asterisk là một phần mềm tự do nguồn mở, ban đầu do Mark Spencer viết, với mục đích tạo nên một hệ thống tổng đài cá nhân (PBX private branch exchange) kết nối đến hầu hết các mạng có sẵn như IP, PSTN, và sử dụng các chuẩn SIP, MGCP, H323. Asterisk còn có giao thức riêng là IAX (InterAsterisk eXchange). Như các PBX khác, Asterisk cho phép các máy điện thoại gắn kết với nhau qua phần mềm này thực hiện các cuộc gọi với nhau, và cho phép kết nối với các dịch vụ điện thoại khác, trong đó có mạng điện thoại chuyển mạch công cộng (PSTN). Asterisk đem đến cho người sử dụng các tính năng và ứng dụng của hệ thống tổng đài PBX và cung cấp nhiều tính năng mà tổng đài PBX không có, như sự kết hợp giữa chuyển mạch VOIP và chuyển mạch TDM, đó là khả năng mở rộng đáp ứng nhu cầu cho từng ứng dụng…

TRIXBOX-2 without Tears Incorporating PBX in a Flash The ICT serial following Trixbox without Tears If you find this book helpful and you are a private user, a small PayPal donation made to bensharif@gmail.com would be very highly appreciated If you are in Australia and don’t have Paypal, you may forward a cheque made to: Ben Sharif, PO Box 70 Kingswood NSW 2747, Australia (For business use or using this as manual for your customers, prior arrangement with the author is required) http://members.optusnet.com.au/bsharif/dumb-me-guide/ TRIXBOX-2 Without Tears Page of 248 Intentionally left blank TRIXBOX-2 Without Tears Page of 248 For TRIXBOX® 2.x with freePBX (Version 2.6.2) (Work is Perpetually in Progress) by Ben Sharif (The same author who brought you Asterisk@Home without tears and Trixbox without tears) About the Author Photography is my passion http://www.flickr.com/photos/bensharif/ Last updated on April 10, 2009 Please send comment or suggestions to me at the address below mailto:netvoice.solutions@gmail.com First Published on 1st January 2007 This document is released under the Creative Commons By-Attrib Non-Commercial Share-Alike 2.1 licence This work is dedicated to my wife, who has been very patient with me, Andrew Gillis, Ward ® ® ® Mundy and Rob Thomas whose devotions to TRIXBOX , PiaF and freePBX made it all possible * Asterisk™ is a trademark of Digium, Inc Digium™ is a trademark of Digium Inc Elastix™ is a trademark of PaloSanto Solutions SugarCRM™ is a trademark of SugarCRM Inc Vtiger CRM™ is a registered trademark of Vtiger, Plc Freepbx™ is a registered trademark of Atengo LLC Hylafax™ is a trademark of Silicon Graphics, Inc Stay tuned for our next episode – TRIXBOX version X TRIXBOX-2 Without Tears Page of 248 Intentionally left blank TRIXBOX-2 Without Tears Page of 248 TABLE OF CONTENT Going Forward 11 Introduction 12 1.1 Is VoIP for you? 12 1.1.1 What is it going to cost? 12 1.1.2 What will the quality of the phone calls be? 12 1.2 What is Trixbox? 12 1.3 The IP PBX Components 13 1.3.1 The IP PBX 13 1.3.2 Phones 14 1.3.3 SIP Gateway 14 1.3.4 Home Network 14 1.3.5 VOIP Service Providers 14 Initial Preparation and Planning 15 Installation 16 3.1 Initial Installation 16 3.2 Change Default Settings 19 3.2.1 To get Help 20 3.2.2 Change IP Address (set IP address to Static) 20 Set-up TRIXBOX 23 4.1 Installing Trixbox Modules 24 4.2 Installing freePBX Modules 26 Basic configuration using freePBX 30 5.1 General Settings 30 5.1.1 Dial Command Options 31 5.2 Extensions 34 5.2.1 Create Extensions 34 5.2.2 Enable Voicemail 36 5.3 Follow Me 37 5.4 Ring Groups 38 Set up softphones 40 6.1 CounterPath X-Lite Softphone 40 6.2 BOL SIPPhone 41 Profile Tab 41 Audio & Video Tab 42 Network Tab 42 STUN Tab 42 Call Forward 43 Trunks to the outside world 44 7.1 What is a Dial Pattern? 44 7.2 What is a Trunk? 44 7.3 Trunks and Outbound Routes – a circus of confusion 45 7.3.1 Outgoing Route Dial Pattern 45 7.3.2 Trunk Outgoing Dial Rules 45 7.4 Let’s Create The VoIP Trunks 46 7.4.1 Pennytel 46 7.4.2 Oztell (SIP) 48 6.4.3 Oztell (IAX) 49 Calls Handling 51 8.1 Inbound Routes (Incoming Calls) 51 8.1.1 Inbound Route from ZAP Trunk 52 8.2 Time Conditionds 53 8.2.1 Simple Time Condition 54 8.2.2 Complex Time Condition 54 8.3 Outbound Routes 55 8.3.1 What is an Outbound Route? 55 8.3.2 How does it work? 55 8.3.3 International 56 8.3.4 Domestic 57 TRIXBOX-2 Without Tears Page of 248 8.3.5 MobileAust 58 8.3.6 Oztellonly 58 8.4 ENUM 59 8.4.1 Setting up ENUM Trunk 59 8.4.2 Setting up ENUM Outbound Route 60 Custom Contexts Module 61 Downloading and unpacking module 61 Installing Custom Context Module 61 Add and Configure New Custom Context 62 Apply a Custom Context to Extension 63 10 System Recordings 64 10.1 Direct recording 65 10.2 Upload Pre-recorded Material 65 11 Digital Receptionist 67 11.1 Setting Up Digital Receptionist 67 11.2 Multi-Language IVR 70 11.2.1 Complimentary multi-language MOH 71 11.3 Multi-Tenants IVR 72 12 Get Under The Bonnet 74 12.1 Editing The conf Files 75 12.1.1 sip_general_custom.conf 75 12.1.2 sip_custom.conf 75 12.1.3 iax_general_custom.conf 75 12.1.4 iax_custom.conf 76 12.1.5 Indications.conf 76 12.1.6 enum.conf 76 12.1.7 extensions_custom.conf 76 12.1.8 features_general_custom.conf 76 13 Check your System 78 13.1 System Process Status 78 13.2 Asterisk Info 79 14 Interfacing Asterisk to PSTN 81 14.1 A100P FXO PCI Card 81 14.2 Create a ZAP trunk 82 14.2.1 zapata.conf 82 14.2.2 zapata-auto.conf 82 14.2.3 zaptel.conf 82 14.3 OpenVox A400P FXO/FXS Card 83 14.3.1 zapata-auto.conf 83 14.3.2 modprobe.conf 84 14.4 Is the A100P/A400P installed? 85 14.5 Caller ID (CID) using ZAP device 86 14.5.1 zapata.conf 86 14.6 Sipura SPA3000/3102 as a PSTN Interface 87 14.6.1 Log in to SPA3000/3102 87 14.6.2 Change the settings 87 14.6.3 Add SIP Trunk 89 14.6.4 SPA3000 as an outbound PSTN Trunk 90 14.7 SPA3000 remote management 90 14.8 Use STUN Server on SPA3000 91 15 PSTN to VOIP Gateway 92 16 DISA 93 16.1 DISA - Hand Coding Method 93 16.2 DISA – Using freePBX 94 17 Operator Panel 95 17.1 Flash Operator Panel (FOP) 95 17.1.1 Setting the Admin Password 96 17.1.2 Hang-up a Call 96 17.1.3 Transfer a Call 96 17.1.4 Initiate a Call 96 TRIXBOX-2 Without Tears Page of 248 17.1.5 Barge in or Create a Conference 96 17.2 HUDLite 97 17.2.1 Setting up HUDLite Admin 97 17.2.2 Setting Up HUDLite 98 17.2.3 What if it does not work? 101 18 Call parking and transfer 102 18.1 Call Transfer - Managed 102 18.1.1 How is it done? 102 18.2 Call Transfer – Blind 103 18.3 Put a Call On Hold 103 18.4 Call Pickup 103 18.5 Filter Your Incoming Calls - Only Accept Known Calls 104 19 Conference 106 meetme.conf 106 meetme_additional.conf 106 19.1 Create Conference 106 19.2 Invalid Conference number 107 20 Voicemail 109 20.1 Enabling Email Notification 109 20.1.1 Installing sendmail 109 20.1.2 /etc/hosts 110 20.2 Use Postfix Instead of Sendmail 112 20.2.1 Where Relay ISP does not require authentication 112 20.2.2 Where authentication is required 112 20.3 How to Retrieve Voicemail from External Phone 113 20.3.1 Method 113 20.3.2 Method 113 20.4 How to Change Voice Mail Greetings 114 21 Fax to E-Mail 115 21.1 Installing Fax for TRIXBOX 115 22 Weather Reports 116 22.1 Configure Weather Report – On Demand 116 22.1.1 Create Extension codes 117 22.2 Configure Weather Report – Background Method 117 22.2.1 Create Extension codes 118 22.3 Now put it in your Digital Receptionist 119 23 Remote Management 120 23.1 httpd.conf 120 24 How to set up a Remote Extension 121 24.1 Create a new extension 121 24.2 IAX_General_Custom.Conf 122 24.3 Sip_Nat.Conf 122 24.4 Setting up an IAX Softphone 122 24.4.1 First the general options 122 24.4.2 Accounts options 123 25 Calls Recordings 124 25.1 ARI Interface 124 25.1 Record all calls by default 125 25.2 Record calls on demand 125 26 STUN Servers 126 27 Dialing through MS Outlook® 126 27.1 Download AstTapi 126 27.2 Install AstTapi 127 27.3 Configure Outlook Address Book 127 28 Speed Dial 129 28.1 The Dumb-Me method 129 28.2 TRIXBOX’s method (Version 1.x) 130 28.3 TRIXBOX’s method (Version 2.x) 130 29 How to use Window Messenger® 5.x 132 30 How to interconnect boxes 134 TRIXBOX-2 Without Tears Page of 248 30.1 Method - With the Peer Asterisk box as Extensions 134 30.2 Method - In a Peer/User Arrangement 135 30.3 Method – Friend/Friend Arrangement 136 30.4 Thinking of more than boxes? 137 30.5 Redirect Incoming in Box A to Box B 137 31 Customised Voice 139 31.1 Customising Voice Prompts 139 31.2 Installing Other Languages 140 31.3 Converting WAV files 140 31.3.1 Converting WAV to GSM 140 31.3.2 Converting WAV to SLN 141 32 MOH (Music On Hold) 142 32.1 Customising MOH 142 32.2 MOH for different trunks 143 32.3 Streaming Music on Hold 144 Method 144 Method 145 33 Backup and restore 150 33.1 Schedule a Backup 150 33.2 To Restore a Backup 152 34 SugarCRM 153 35 USB Phone Support 155 36 Codec (Coder Decoder) 156 36.1 Installing G729 and G723 CODECs 157 36.2 To Install CODECS on PiaF 158 37 PSTN Trunk – Special Handling 160 37.1 Dial for Outside Line 160 37.1.1 Using Zaptel Card Method 160 37.1.2 Using SPA3K Method 160 37.2 Giving Priority to Emergency Numbers (E.g 000) 161 38 Advanced Trunks Handling 162 38.1 Balancing Trunk Usage 162 38.2 Cascading Trunk Usage 165 39 Port Forwarding and QOS – Routers 171 39.1 Port Forwarding 171 39.2 QOS – Routers 171 40 Upgrading your system 173 40.1 Upgrading Trixbox 173 40.2 Upgrading freePBX 173 41 Tools 174 41.1 Webmin for Trixbox 174 41.1.1 To update WebMin 175 41.2 Putty 175 41.3 WinSCP 175 42 Use ACCESS to connect to Database 177 42.1 Setting up a new MySQL user 177 42.2 Configure MySQL ODBC for Windows 178 42.3 Connecting using MSACCESS 180 43 My TRIXBOX® PBX Network 184 44 Trouble Shooting 185 44.1 Debug Messages and Log Files are your friends 185 44.2 Unable to log on to Packages? 186 44.3 Asterisk Feature Codes not working 186 44.4 Asterisk Drops Calls after a few seconds 186 44.5 Pennytel Asterisk Problem 186 44.6 Unable to receive Incoming Calls 186 44.7 Sipura SPA3000 – Not hanging up after PSTN Calls 187 44.8 System Not Working after changing to Static IP 187 44.9 No Audio on Analog line 188 44.10 Unexplained Crashes 188 TRIXBOX-2 Without Tears Page of 248 44.11 ZAP Inbound Route Does not Work 188 44.12 Occassional FATAL Error when defining extension 188 44.13 All extensions failed to work when Internet down 189 Appendix A 190 A.1 Asterisk Feature Codes 190 A.2 Asterisk CLI commands 191 A.2.1 General commands 191 A.2.2 AGI Commands 192 A.2.3 Database Handling 192 A.2.4 IAX Channel Commands 192 A.2.5 SIP Channel commands 193 A.2.6 Server management 193 A.3 Asterisk Special Extensions 193 A.4 Asterisk Common Variables 194 A.5 Indications for Various Countries 195 Appendix B 204 B.1 – Australian VSPs (trunks) 204 B.1.1 BBPglobal 204 B.1.2 Engin BYO 204 B.1.3 Faktortel (IAX) 205 B.1.4 iPrimus 205 B.1.5 MyNetFone 206 B.1.6 Nehos 206 B.1.7 Nodephone 207 B.1.8 SipMe 207 B.2 – New Zealand VSPs (trunks) 208 B.2.1 iTalk 208 B.2.2 Double Zero 64 (IAX) 208 B.3 – Other VSPs (trunks) 209 B.3.1 Broadvoice 209 B.3.2 FWD aka Pulver(IAX) 209 B.3.3 SipBroker 209 B.3.4 SipPhone 210 B.3.5 VOIP Buster 210 Appendix C 211 C.1 Voice for Asterisk Messages 211 C.2 Australian Voice and Language Set for Asterisk 212 C.3 More Australian Voice for Asterisk 212 Appendix D (ATAs and Routers) 213 D.1 Alcatel SpeedTouch 510/530 ADSL Router 213 D.2 Billion 7402 VL 213 D.3 Linksys PAP2 and Sipura SPA2000 214 Appendix E (Users’ Contributions) 216 E.1 Suggestions for Dial Plan and configuration 216 E.3 Eliminating Echo Problems in SPA-3000 219 E.4 Immediate Answer of PSTN Calls 221 E.5 Rebuild Zaptel Driver (Users’ Suggestions) 221 E.5.1 As experienced by marner – a Whirlpool Forum participant 221 E.5.2 As suggested by Rob Thomas (the FreePBX guru) 221 E.6 Zaptel card configuration for Australia 222 E.7 RAID1, LVM (logical volumes) – how to 224 E.8 V2.2 Trixbox Load Config to include IDE raid 233 E.9 TEST Bench Anyone? 236 Appendix F (Publications and References) 237 F.1 DUNDi – a guide to a Simple Setup 237 F.2 The future of Telephony by O’Reilly Publishing 237 F.3 Other Asterisk Forums, Tutorials and Wikis 237 F.4 Voice over IP – Per call bandwidth consumption 237 Notes 238 A2Billing 238 TRIXBOX-2 Without Tears Page of 248 Delete Call Records from CDR 238 Extension Numbers to avoid using 239 sip_nat.conf 239 How to restrict Outgoing Calls – Manual Method 239 Bugs Reports 243 Asterisk re-load issue 243 Are you still having problem? 243 Hangs on shutdown 243 Zaptel Not Detected on Trixbox 2.2.4 244 All phones UNUSABLE if internet connection is lost 244 Cheat Sheet 246 Some Linux commands in common use 246 Bibliography 247 Changes Made since last Update 248 TRIXBOX-2 Without Tears Page 10 of 248 #Package install information %packages resolvedeps alsa-utils audiofile-devel bind bison cpp curl curl-devel cvs dhcp flex gcc gcc-c++ gd glibc-devel glibc-headers glibc-kernheaders grub httpd kernel krb5-devel libc-client libcap libpcap libstdc++ libstdc++-devel libtermcap-devel libtiff libtiff-devel libxml2 lm_sensors mc mkisofs mysql mysql-devel mysql-server ncurses-devel newt-devel net-snmp ntp openssl096b openssl-devel perl perl-libwww-perl perl-DateManip perl-DBD-MySQL perl-DBI perl-Net-DNS perl-suidperl perl-Time-HiRes perl-XML-Parser php php-gd php-imap php-mbstring php-mysql php-snmp postgresql-libs readline readline-devel sendmail-cf subversion system-config-date system-config-keyboard rpm-build TRIXBOX-2 Without Tears Page 234 of 248 slang-devel sox speex unixODBC vsftpd zlib-devel %post mkdir mount mount nochroot /mnt/source /dev/md1 /mnt/source /tmp/cdrom /mnt/source mkdir /mnt/sysimage/var/trixbox_load cd /mnt/sysimage/var/trixbox_load tar xvfz /mnt/source/trixbox.tar.gz #unmount CD-ROM umount /mnt/source # -# Post install # -%post echo "/var/trixbox_load/install_all.sh" >> /etc/rc3.d/S99local echo "NETWORKING=yes" > /etc/sysconfig/network echo "HOSTNAME=asterisk1.local" >> /etc/sysconfig/network echo "# Do not remove the following line, or various programs" > /etc/hosts echo "# that require network functionality will fail." >> /etc/hosts echo "127.0.0.1 localhost" >> /etc/hosts echo "127.0.0.1 asterisk1.local" >> /etc/hosts echo echo echo echo echo echo "driftfile /var/lib/ntp/drift" > /etc/ntp.conf "server 0.pool.ntp.org" >> /etc/ntp.conf "server 1.pool.ntp.org" >> /etc/ntp.conf "server 2.pool.ntp.org" >> /etc/ntp.conf "server 127.127.1.0" >> /etc/ntp.conf "fudge 127.127.1.0 stratum 10" >> /etc/ntp.conf cp -f /var/trixbox_load/splash.xpm.gz /boot/grub cp -f /boot/grub/grub.conf /boot/grub/grub.conf.old sed -e "s/hiddenmenu/#hiddenmenu/" /boot/grub/grub.conf.old > /boot/grub/grub.conf # make both disks bootable /sbin/grub batch /dev/null device (hd0) /dev/hdc root (hd0,0) setup (hd0) device (hd0) /dev/hda root (hd0,0) setup (hd0) quit EOT eject TRIXBOX-2 Without Tears Page 235 of 248 E.9 TEST BENCH ANYONE? (Contribution from zforum69) Issue: I don't have any room for test machines, let alone spare TDM400 cards, to try out new releases of trixbox or other Asterisk distros like elastix I cannot have my main stable trixbox machine down for any length of time Solution: Install each different version on a separate partition, and change back to the production partition when you are done testing How: When booting a trixbox install CD, normally you just press enter after the boot prompt, where it will promptly delete everything on the disk and install trixbox to occupy the whole disk Instead of pressing enter, type advanced where you can control how the partitions are created and where trixbox will be installed During the install it is a matter of following your nose until it gets to the part about disk partitioning, which you will choose to manually rather take what ever the install is offering If this going to be the first install on this disk delete all existing partitions if they exist Create a new partition and set the mount point to "/" so it will install it into that partition Set the size at say 20GB Create a swap partition (2GB) Install the GRUB boot loader into the “Master Boot record” If this second or subsequent Asterisk install on this disk, just create a new primary partition, again with the mount point set to "/" so it will install it into the newly created partition You don't need to install another swap partition as there should already be one there from a previous installation Install the GRUB boot loader into the "First sector of boot partition" Only the GRUB boot loader from the first install in the MBR will ever be used The “grub.conf” generated by each other install is used to add to the grub.conf in the first install to get a menu of installs you can boot to Boot the first install and mount the other partitions to get to look at their “grub.conf” files Using those files edit the “grub.conf” in the first install to add the additional menu items for all your other installs Now when ever you boot up you can interrupt the GRUB boot loader and select which ever install you want to boot to next To it remotely without a remote console you need to modify the “default=0” line in the grub.conf That value determines which of the menu items the default is By changing that value the next boot up and every subsequent one will cause GRUB to default to the new menu item and boot that To change it back, mount the first partition, and change the default line back to "0" in the “grub.conf” file TRIXBOX-2 Without Tears Page 236 of 248 APPENDIX F (PUBLICATIONS AND REFERENCES) F.1 DUNDI – A GUIDE TO A SIMPLE SETUP You will find a guide to a simple DUNDi set-up at the GoldfishNet Blog: http://blog.thegoldfish.net/dundi-tutorial-for-asteriskhome/ F.2 THE FUTURE OF TELEPHONY BY O’REILLY PUBLISHING You may download the pdf version of this publication here: http://voipspeak.net/images/stories/orielly/AsteriskTFOT.zip O’Reilly has licensed the book under the creative commons license and as such, you are free to download and distribute it F.3 OTHER ASTERISK FORUMS, TUTORIALS AND WIKIS One of my favourite site is http://www.asteriskconnection.com.au/ Others that I refer to are: http://asteriskathome.sourceforge.net/ http://www.voip-info.org/wiki/view/Asterisk%40home+Handbook+Wiki http://asteriskathome.sourceforge.net/faq.html http://sourceforge.net/forum/?group_id=123387 http://amp.coalescentsystems.ca/ http://sourceforge.net/docman/?group_id=121515 The following are two tutorial sites that I recommend everyone who is serious about Trixbox and Asterisk generally http://mundy.org/blog/index.php?p=81 http://www.asteriskguru.com/tutorials/ General VOIP related: http://www.freewebs.com/voipformula/VoIP-HOWTO.html F.4 VOICE OVER IP – PER CALL BANDWIDTH CONSUMPTION The following is a reference from Cisco Systems that’s worth a look http://www.cisco.com/en/US/tech/tk652/tk698/technologies_tech_note09186a0080094ae2.shtml TRIXBOX-2 Without Tears Page 237 of 248 NOTES A2BILLING A2Billing is a calling card platform to manage calling card users’ accounts To log on to A2Billing through Web Interface, connect to asterisk.ip.address/a2billing e.g 192.168.0.101/a2billing Login as admin using the default password of mypassword A2Billing is not being covered in this guide, as it is a whole documentation exercise on its own Those interested in A2Billing may have to refer to other source for instructions available on the net such as the following link: http://sourceforge.net/forum/forum.php?thread_id=1398290&forum_id=420324 http://www.voip-info.org/wiki/view/Asterisk+billing DELETE CALL RECORDS FROM CDR There will be time when you need to delete the CDR records from your call details record One example is, those calls you made white testing will need to be deleted before going live where you will need clean record • • • • • • • These records are being kept in the SQL database and to delete them, the following: From Tools Menu (or from System menu for Trixbox 2.2) select phpmyadmin In the Database dropdown field, (top left), select the asteriskcdrdb Select the 'cdr' table in the tick box At the bottom of the list of table you will find a dropdown field “With Selected”, select EMPTY You will be asks to 'confirm truncate table cdr', If you click Yes at this point the content of the table will be erased MySQL Manager – “tbm-phpmyadmin.noarch” must be installed This can be done through Packages It is not installed by default Without this you will not be able to use phpadmin from the GUI Alternatively, you can it manually; Login to the shell (SSH) as root You can this using Putty Enter these commands manually, each on a new line mysql –p Enter password: passw0rd use asteriskcdrdb; delete from cdr; exit; Your CDR will now be empty TRIXBOX-2 Without Tears Page 238 of 248 EXTENSION NUMBERS TO AVOID USING Unless you are prepared to edit and change some codes, its best to avoid the following extension numbers: 200 300-399 666 70-79 700-799 7777 - Park Notify Reserved for speed dial Reserved for FAX testing Reserved for calls on hold Reserved for calls on hold Reserved extension for incoming calls simulation SIP_NAT.CONF To those who use this configuration (not all do), I have an issue with externip = I wasn’t able to accept incoming calls although SIP was registered Changing to externip= if you have a fixed IP or externhost= if you don’t have a fixed IP and use Dynamic DNS service, solved the issue or the alternative as I have outlined below This issue may not be apparent at first as Asterisk will show that it is registered and you will still be able to make a call out (except calls to another Asterisk that have this property set) Another telltale sign is, you may not hear the ring tone when you are calling a party or you may have audio problem This is caused by my /etc/hosts file where I have an entry (in red) 127.0.0.1 127.0.0.1 localhost netvoice.selfip.com asterisk1.local SipBroker will resolve pcnovation.homelinux.org as 127.0.0.1 which is what it is suppose to be as it is being defined as such by the offending line In actual fact pcnovation.homelinux.org should be resolved to the external IP address However I need that entry for my VoiceMail e-mail notification since most email server will not accept email from unknown source – grief time Taking my DNS name out solved the issue, but I cannot send e-mail notification of my voicemail To fix this problem (a kludge) I substituted pcnovation.homelinux.org with another valid domain name different to my DynDNS domain name such as yahoo.com thus: 127.0.0.1 yahoo.com asterisk1.local and problem solved… for now until something else pops up ☺ HOW TO RESTRICT OUTGOING CALLS – MANUAL METHOD This requirement often manifests itself in an office environment where management restricts staff from making International, long distance, or even local calls In many organizations, staffs are confined to making internal calls only There are ways that this can be handled One is by using the Custom Context module or by creating the necessary context manually Here, we will create the procedure manually TRIXBOX-2 Without Tears Page 239 of 248 It is somewhat complicated, but I will try to explain it here and provide an example Set up all your trunks and outbound routes as normal At this stage, users can make unrestricted calls This is the normal way of doing it with freePBX You probably would have already done this Through Config Edit of Trixbox, open extensions_additional.conf and locate the [outbound-allroutes] section of the file You will notice something like my example below [outbound-allroutes] include => outbound-allroutes-custom include => outrt-001-PSTN include => outrt-002-SPA3K include => outrt-003-Oztell include => outrt-004-Pennytel include => outrt-005-Domestic include => outrt-006-MobileAust include => outrt-007-International include => outrt-008-12Number include => outrt-009-13N1800Numbers include => outrt-010-e164 include => outrt-011-SingaporeLink include => outrt-012-KualaLumpurLink include => outrt-013-MalaccaLink exten => foo,1,Noop(bar) ; end of [outbound-allroutes] Highlight them, copy and paste in a notepad text file somewhere and will get back to this a little later Alternatively you can paste it directly to extensions_custom.conf Do not this if Trixbox is active as it may cause some problem while people using it Through Config Edit of Trixbox, open extensions_custom.conf and create a section like my example below You can get the codes from [from-internaladditional] of extensions_additional.conf So will have to some juggling because you can’t cut and paste this from another conf file without having to close one (you can cut and paste from here if you like) [from-restricted] ; ; These are all the applications that you will require ; include => app-cf-busy-off include => app-cf-busy-off-any include => app-cf-busy-on include => app-cf-off include => app-cf-off-any include => app-cf-on include => app-cf-unavailable-off include => app-cf-unavailable-on include => app-calltrace include => app-callwaiting-cwoff include => app-callwaiting-cwon include => app-dialvm include => app-directory include => app-dnd-off include => app-dnd-on include => app-echo-test TRIXBOX-2 Without Tears Page 240 of 248 include => app-recordings include => app-speakextennum include => app-speakingclock include => app-userlogonoff include => app-zapbarge include => app-vmmain include => ext-group include => ext-fax include => ext-meetme include => ext-findmefollow include => ext-paging include => ext-queues include => ext-test include => ext-local include => parkedcalls ; ; #### OutBound Routes ######## ; # Below are all restricted routes # ; ########################### ; Now copy your [outbound-allroutes] that was saved to the text file directly underneath the last line of the above context Remember to delete the [outbound-allroutes] label Unfortunately you can’t cut and paste my example because they are my routes NOT yours Your final handiwork will look something like the example below: [from-restricted] ; ; These are all the applications that you will require ; include => app-cf-busy-off include => app-cf-busy-off-any include => app-cf-busy-on include => app-cf-off include => app-cf-off-any include => app-cf-on include => app-cf-unavailable-off include => app-cf-unavailable-on include => app-calltrace include => app-callwaiting-cwoff include => app-callwaiting-cwon include => app-dialvm include => app-directory include => app-dnd-off include => app-dnd-on include => app-echo-test include => app-recordings include => app-speakextennum include => app-speakingclock include => app-userlogonoff include => app-zapbarge include => app-vmmain include => ext-group include => ext-fax include => ext-meetme include => ext-findmefollow include => ext-paging include => ext-queues include => ext-test TRIXBOX-2 Without Tears Page 241 of 248 include => ext-local include => parkedcalls ; ; #### OutBound Routes ######## ; # Below are all restricted routes # ; ########################### ; ; new outbound-restricted-routes include => outbound-allroutes-custom ;include => outrt-001-PSTN include => outrt-002-SPA3K include => outrt-003-Oztell include => outrt-004-Pennytel include => outrt-005-Domestic include => outrt-006-MobileAust include => outrt-007-International include => outrt-008-12Number include => outrt-009-13N1800Numbers include => outrt-010-e164 include => outrt-011-SingaporeLink include => outrt-012-KualaLumpurLink include => outrt-013-MalaccaLink exten => foo,1,Noop(bar) ; ; end of outbound-restricted-routes Now add the following codes underneath that to finish it off ; exten => h,1,Hangup exten => s,1,Macro(hangupcall) exten => h,1,Macro(hangupcall) You may now comment out the outbound routes you not want the restricted extensions to use E.g If you comment out include => outrt-001-PSTN, the restricted extension cannot use PSTN After you have done that, you need to go back to FreePBX and edit the extension that you want to restrict by change the context to from-restricted instead of from-internal Now go enjoy yourself with it TRIXBOX-2 Without Tears Page 242 of 248 BUGS REPORTS Software is not software if it is release without any bug It just goes against nature’s logic, not to mention our Mr Murphy ☺ ASTERISK RE-LOAD ISSUE After making changes to Trunks, IVR or DISA etc, the changes not translate to the system This is due to an inherent bug in the Asterisk binary in Trixbox 1.2 If this happens, run the following at the command prompt to force the reload: asterisk -rx restart now If the problem is related to Asterisk, this should get you going otherwise, it may be some other gremlin that has gotten into the system ARE YOU STILL HAVING PROBLEM? If you are still having problem installing Trixbox 1.2, it probably is time for you to some manual configuration as described in Rob Thomas’ blog Here is the link and as I have personally done it this way, I can assure you that it will solve your problem – I hope ☺ http://www.freepbx.org/2006/09/28/un-Trixbox-your-Trixbox/#more-7 HANGS ON SHUTDOWN Using X100P card caused Trixbox to hang on shutdown in Trixbox 2.x This happened to me on different make X100P This does not happen with TDM400 card To avoid this hanging anomaly amportal stop must be executed before a reboot or shutdown The following is the hack to stop the panic from occurring: Log in as root: Go to the /etc/rc.d directory cd /etc/rc.d Rename all of the K92zaptel files to K95zaptel so that they are invoked after the K94asterisk scripts: mv mv mv mv mv rc0.d/K92zaptel rc1.d/K92zaptel rc2.d/K92zaptel rc4.d/K92zaptel rc6.d/K92zaptel rc0.d/K95zaptel rc1.d/K95zaptel rc2.d/K95zaptel rc4.d/K95zaptel rc6.d/K95zaptel shutdown -r now The system will now shutdown or reboot without a panic TRIXBOX-2 Without Tears Page 243 of 248 ZAPTEL NOT DETECTED ON TRIXBOX 2.2.4 Trixbox 2.2.4 seems to have a problem detecting Zaptel cards e.g TDM400 from fresh install To remedy this problem, it may be necessary to run the following command: yum clean all yum install zaptel* ALL PHONES UNUSABLE IF INTERNET CONNECTION IS LOST This only happens if users are using SIP Trunks Luckyly, those using IAX trunks only are spared from this issue Some say it is not a bug but to me if users have to make modification to get all the phones to work locally and accept PSTN calls, something is terribly wrong and therefore it is a bug and I think it is a fundamental flaw in the design of Asterisk Asterisk is assuming that when a call is being made, the call is going to be made via a trunk IF a sip trunk is recorded and enabled Therefore Asterisk will scan for SIP trunks availability Once Asterisk finds a trunk it will start sip If it does not find an available trunk it will give up and start sip then you can make a call However if you have more than one SIP trunks, it will scan for all enabled SIP trunks until the verification times out If you also happen to have 10 SIP trunks, all 10 will be verified first before you can even use your phones In normal cases where internet connection is available, this will only take a couple of seconds to complete, but if internet connection is out, the verification process will take for ever till it just die away and all your extensions rendered useless If no SIP trunk is recorded or enabled at all, then it will start sip immediately and you can make a call This issue only appears for those using SIP trunks, especially multiple SIP trunks This is not a major issue if you only have sip trunk because when Asterisk failed on that trunk, it will give up and start sip The only thing you notice will be a slight delay between your dialling and the other phone ringing Normally it is just a slight irritation - nothing more The problem starts when you have multiple SIP trunks If you have SIP trunks, the delay before Asterisk gives up is a little longer and you can still dial internal number after a long delay In many cases the delay is enough for users to think that nothing is happening, but if you keep waiting it will dial However if you have or more trunks, the delay becomes so long for Asterisk to cycle through all your SIP trunks and the phone system becomes unusable, just gave up and dies This is where the fundamental flaw is Asterisk should dial the number without scanning for SIP trunk (even if you have SIP trunks) unless the number dialed is part of an outbound route that requires SIP trunk IAX is spared this hassle why not SIP? I tested this by adding sip trunk then sip trunks etc The delay becomes progressively longer and longer the more sip trunks I added which brought me to the above conclusion TRIXBOX-2 Without Tears Page 244 of 248 Question is; how we get around this? There is a way but it is a kludge It works and you don’t have to fiddle with codes or create a local DNS or BIND and what not that the normal digger would not know how This is a project you should try Hint: Create boxes Link both boxes using SIP Make the other box a SIP trunk of your live box Make sure that this SIP trunk appears as the first trunk in your sip_additional.conf Comment out externhost and exterip from sip.conf or sip_nat.conf TRIXBOX-2 Without Tears Page 245 of 248 CHEAT SHEET amportal restart asterisk -rvvvv Disable default voicemail message Enable Call waiting by default grep "AUTO FXO" /var/log/messages /etc/init.d/ntpd stop ntpdate ntp.netspace.net.au /etc/init.d/ntpd start rpm -qa | grep asterisk rpm -qa | grep zaptel-modules service asterisk restart service network restart Set System time on system clock core show features core show translation sip reload To restart Trixbox after configuration change without rebooting However certain changes will need rebooting To get to asterisk CLI This works in custom context e.g • Voicemail(s2000@default) - will not play default message • Voicemail(su2000@default) - will not play default message and instead play your unavailable custom message Edit ENABLECW=yes in amportal.conf Tells you what mode your TDM400 is running on To set the NTP time manually from the command line Tells you what version of Aterisk is installed Tells you what Zaptel modules you have installed To restart asterisk if required when something goes wrong To restart network service if connection goes down and did not come up again even though internet has been restored To set the system clock under Linux, you need touse the “date” command Example: To set the current time and date to May 12, 2007:10:15.30 seconds pm, type ``date 051222152007.30' (The time,in bold, is in 24 hour notation) To see what the current local time is, run “date” with no arguments This command run on the Asterisk CLI to tell you extra featuress in use This command run on the Asterisk CLI to tell you codecs in use To reload SIP This command is to be run from Asterisk CLI SOME LINUX COMMANDS IN COMMON USE chown TRIXBOX-2 Without Tears To change file ownership to the new owner Page 246 of 248 BIBLIOGRAPHY The real people behind this guide (Real Names used or aliases if real names unknown): I have also made references to a number of other online publications and forums whenever I need confirmations and further clarifications Some of the information in this document were sourced from these people and places Andrew Gillis Asterisk Guru Brian Bob Fryer Colin Swan 10 11 12 13 14 15 16 17 18 Graham Foote Greg Hind Jack Zimmermann Jeffrey Borg lusyn.com Mark Brooker Matt (daggo) Neilmc Nathan Poyner Openvoice Peter Quodling Rehan Rob Thomas 19 20 21 22 23 24 25 26 Sammy/sz Sean Mahon Shaun (Ewing) Sofoklis Sflomos Stefan Keller-Tuberg SteveM Steven D Thunderbird1/Chippy 27 28 29 30 31 voip-info.org VoipShop Voxilla.com Ward Mundy The PiaF Dev Team TRIXBOX-2 Without Tears The man who started it all – The Mahaguru http://www.asteriskguru.com Advise tips and tricks- Voice for Asterisk A friend from a long way back From the days I learned to use a PC and according to Bob, I still can’t use it Major assistance, advice, and basically a place to go when things go wrong Always giving me tips and corrections Advise, Tips and tricks Helping me with e164 Advise, Tips and tricks X100P Patch for UK Caller ID http://www.lusyn.com Another of my source for help when things go wrong Advise, Tips and tricks Advise, Tips and tricks Assistance with Scripts and also proofing the documents Source for Australian Voice Testbed and resident cynic Help with Raid configuration freePBX Developer and Super Hero – without which there will be no Trixbox Taken time to point out some of my mistakes Solution for Billion 7402 BL Advise, Tips and tricks on codecs and dial plan etc Changes and assistance with Raid configuration Helping me out with Cron Jobs and Scripts Advise, Tips and tricks on Webmin Help with detecting some error and proofing the document Giving me clues to some obscure processes It is Chippy who solved the Fax problem that has been bugging us all A site I often refer to when I require further clarification Source for Australian voice and others http://voxilla.com My hero http://mundy.org my place of salvation ☺ For giving us PiaF (Thanks Ward) Page 247 of 248 CHANGES MADE SINCE LAST UPDATE Included some changes that appears in Trixbox 2.6.2 Install postfix where authentication is needed Advanced Trunk Handling TRIXBOX-2 Without Tears Page 248 of 248 ... last Update 248 TRIXBOX-2 Without Tears Page 10 of 248 GOING FORWARD Following the tradition of Asterisk@Home without Tears and Trixbox without Tears, this guide is not meant to be... Stay tuned for our next episode – TRIXBOX version X TRIXBOX-2 Without Tears Page of 248 Intentionally left blank TRIXBOX-2 Without Tears Page of 248 TABLE OF CONTENT Going Forward ... TRIXBOX-2 Without Tears Page of 248 For TRIXBOX® 2.x with freePBX (Version 2.6.2) (Work is Perpetually in Progress) by Ben Sharif (The same author who brought you Asterisk@Home without tears and

Ngày đăng: 10/04/2017, 16:15

Từ khóa liên quan

Mục lục

  • GOING FORWARD

  • 1 INTRODUCTION

    • 1.1 Is VoIP for you?

      • 1.1.1 What is it going to cost?

      • 1.1.2 What will the quality of the phone calls be?

      • 1.2 What is Trixbox?

      • 1.3 The IP PBX Components

        • 1.3.1 The IP PBX

        • 1.3.2 Phones

        • 1.3.3 SIP Gateway

        • 1.3.4 Home Network

        • 1.3.5 VOIP Service Providers

        • 2 INITIAL PREPARATION AND PLANNING

        • 3 INSTALLATION

          • 3.1 Initial Installation

          • 3.2 Change Default Settings

            • 3.2.1 To get Help

            • 3.2.2 Change IP Address (set IP address to Static)

            • 4 SET-UP TRIXBOX

              • 4.1 Installing Trixbox Modules

              • 4.2 Installing freePBX Modules

              • 5 BASIC CONFIGURATION USING FREEPBX

                • 5.1 General Settings

                  • 5.1.1 Dial Command Options

                  • 5.2 Extensions

                    • 5.2.1 Create Extensions

                    • 5.2.2 Enable Voicemail

                    • 5.3 Follow Me

                    • 5.4 Ring Groups

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan