You are on page 1of 164

Without Tears

http://creativecommons.org/licenses/by-nc-sa/2.1/au/
The Dumb-Me Guide
(Australianised for AU&NZ brethren)

Incorporating elements of versions 1.x and 2.x up to v2.7 using AMP
(From version 2.8 onwards, AMP has been replaced by FreePBX)
(Version 2.8 Draft 4c)

by

Ben Sharif
About the Author
Last updated on May 30, 2006
Please send comment or suggestions to me at the address below
mailto:bensharif@gmail.com

Please do not send questions directly to me. Instead post all questions in
the Whirlpool Forum below so others may also benefit from it.

http://forums.whirlpool.net.au/forum-threads.cfm?f=107

First Published on 15th June 2005

This document is released under the Creative Commons By-Attrib Non-Commercial Share-Alike 2.1 licence.

*

Asterisk@Home Without Tears Page 1 of 164

TABLE OF CONTENT
Forward ............................................................................................................................ 7
1 Introduction ................................................................................................................. 8
1.1 The Components...............................................................................................8
1.1.1 The IP PBX.................................................................................................8
1.1.2 Phones .......................................................................................................9
1.1.3 SIP Gateway ..............................................................................................9
1.1.4 Home Network............................................................................................9
1.1.5 VOIP Service Providers..............................................................................9
2 Is VOIP for You?........................................................................................................10
2.1 What is it going to cost ? .................................................................................10
2.2 What will the Quality of the phone calls be? ...................................................10
3 Installation ................................................................................................................. 11
3.1 Change default Settings..................................................................................12
3.1.1 To get Help...............................................................................................12
3.1.2 Change Linux Password ..........................................................................13
3.1.3 Change IP Address (set IP address to Static)..........................................13
3.1.4 Set Time Zone..........................................................................................14
3.2 Connect to AMP (or FreePBX) from Web Browser ........................................15
3.2.1 Log in to Asterisk Management Portal (AMP) ..........................................15
or FreePBX Administration.................................................................................15
3.3 General Settings .............................................................................................18
3.3.1 General Settings for AAH 2.7 or Earlier ....................................................18
3.3.2 General Settings for AAH 2.8 or Later.......................................................19
3.3.3 Dial Command Options ............................................................................19
3.4 Extensions.......................................................................................................22
3.5 Follow Me (AAH 2.8 with freePBX) .................................................................24
3.6 Ring Groups ....................................................................................................25
3.6.1 Now it’s a good time to set up your softphone. ........................................26
4 Incoming Calls Handling ..........................................................................................27
4.1 Incoming Calls (Prior to AAH 2.8 with FreePBX) ............................................27
4.2 Incoming Calls (AAH 2.8 with FreePBX) .........................................................27
4.2.1 Time Conditionds .....................................................................................28
5 Trunks And Routes ...................................................................................................29
5.1 What is a Dial Pattern? ...................................................................................29
5.2 What is a Trunk? .............................................................................................29
5.3 Let’s Create The Trunks..................................................................................30
5.3.1 Pennytel ...................................................................................................30
5.3.2 Oztell (SIP) ...............................................................................................32
5.3.3 Oztell (IAX) ...............................................................................................33
5.3.4 Astratel .....................................................................................................34
5.4 Create Outbound Routing ...............................................................................37
5.4.1 What is an Outbound Route? ...................................................................37
5.4.2 How does it work? ....................................................................................37
5.4.3 International..............................................................................................38
5.4.4 Domestic ..................................................................................................38
5.4.5 MobileAust................................................................................................39
5.4.6 Oztellonly..................................................................................................39
5.4.7 Astratelonly...............................................................................................40
5.5 ENUM..............................................................................................................41
5.5.1 Setting up ENUM Trunk ...........................................................................41
5.5.2 Setting up ENUM Outbound Route ..........................................................42
5.6 Inbound Route (DID Routes A@H version 1.x)...............................................44

Asterisk@Home Without Tears Page 2 of 164

5.6.1 Inbound Route (AAH version 2.7 with AMP and earlier) ..........................44
5.6.2 Inbound Route (AAH version 2.8 with freePBX).......................................44
6 Digital Receptionist...................................................................................................46
6.1 Setting Up Digital Receptionist........................................................................46
6.2 Customising Individual Extension ...................................................................50
7 Get Under The Bonnet ..............................................................................................51
7.1 Editing The .conf Files.....................................................................................52
7.1.1 iax.conf .....................................................................................................52
7.1.2 Indications.conf ........................................................................................52
7.1.3 enum.conf.................................................................................................52
7.1.4 extensions.conf ........................................................................................52
7.1.5 extensions_custom.conf...........................................................................53
7.1.6 sip.conf .....................................................................................................53
7.2 Port Forwarding – Routers ..............................................................................54
7.3 QOS – Routers................................................................................................54
8 Check your System...................................................................................................56
8.1 System Status .................................................................................................56
8.2 Asterisk Info ....................................................................................................57
9 Interfacing Asterisk to PSTN....................................................................................58
9.1 Digium Wildcard X100P FXO PCI Card ..........................................................58
9.1.1 zapata.conf...............................................................................................58
9.1.2 zaptel.conf ................................................................................................59
9.1.3 modules.conf (modprobe.conf for AAH 2.x) .............................................59
9.2 Digium TDM400P FXO/FXS Card...................................................................59
9.2.1 zapata-auto.conf.......................................................................................59
9.2.2 modules.conf (modprobe.conf for AAH 2.x) .............................................60
9.3 Rebuilding Zaptel Driver..................................................................................61
9.4 Sipura SPA3000 as a PSTN Interface ............................................................62
9.4.1 Log in to SPA3000 ...................................................................................62
9.4.2 Change the settings .................................................................................62
9.4.3 Add SIP Trunk ..........................................................................................64
9.4.4 SPA3000 as an outbound PSTN Trunk....................................................65
10 PSTN to VOIP Gateway...........................................................................................66
11 DISA.......................................................................................................................... 67
11.1 DISA prior to AAH version 2.8 using AMP ....................................................67
11.2 DISA – AAH version 2.8 using FreePBX.......................................................68
12 Setting Up a Soft Phone .........................................................................................69
Profile Tab ..........................................................................................................69
Audio & Video Tab .............................................................................................69
Network Tab .......................................................................................................70
STUN Tab ..........................................................................................................70
Call Forward .......................................................................................................71
13 Flash Operator Panel (FOP) ...................................................................................72
13.1 Setting Up .....................................................................................................73
13.1.2 Setting the Admin Password ..................................................................73
13.1.3 Hang-up a Call .......................................................................................73
13.1.4 Transfer a Call........................................................................................73
13.1.5 Initiate a Call...........................................................................................73
13.1.6 Barge in or Create a Conference ...........................................................73
13.1.7 Alternative Flash Operator Panel. ..........................................................73
14 Call parking and transfer........................................................................................74
14.1 Call Transfer - Managed ...............................................................................74
14.1.1 How is it done?.......................................................................................74
14.2 Call Transfer – Blind......................................................................................75
14.3 Put a Call On Hold ........................................................................................75

Asterisk@Home Without Tears Page 3 of 164

.....................93 20....3 Now put it in your Digital Receptionist..................2 Install AstTapi................................3 WinSCP...............................................................97 22 STUN Servers ..4.............................conf......................................2 Accounts options ..............1 meetme..........................................99 23...................................92 19...................................95 20...........................................................4.......................................88 18........112 30 Publications and References ...........98 23..........................................................................................conf ..............................................................................1 Webmin ......................................................92 20 How to set up a Remote Extension ..................................96 20..........................................................................1 Customised Voice Prompts ..........................91 19 Remote Management ..................................1 Creating a Backup using the console.............................................................................conf ...................... Tutorials and Wikis...108 27.........113 30.......................................................2 Voice over IP – Per call bandwidth consumption ...................................2 Asterisk@Home’s method..............1 Configure Weather Report – On Demand.....4 .........83 17........................................................................... 14.....80 16....................................1........................................................................................................................1 Create Extension codes..............109 28 Customised Voice (prior to AAH 2..78 15........................................3 Maintaining multiple backups .............................................106 27 Backup and restore...........................................................................................................................78 16 Voicemail Email Notification .........2 Configure Weather Report – Background Method................................3/2..................99 24 Speed Dial..............108 27............................................................. 97 21.........1 First the general options........................113 30.....................................................................................................................75 14............3 Sip_Nat......................2 Putty ......................................................................................93 20.......................90 18.........................................................111 29 My Asterisk® IP PBX Network ......97 21.............3 Configure Outlook Address Book.............3 extensions.......Only Accept Known Calls..................1 Create a new extension ................................................................................2 Installing Fax in AAH version 2.............................................110 28.....................1 Create Extension codes.....................78 15......Conf..................................................89 18.................5 Filter Your Incoming Calls .......................................... .. ........101 24...................1 The Dumb-Me method ..76 15 MeetMe – Teleconference......................................78 15.....2.......4 The correct softphone for IAX ....................................................................................x.................................................With the Peer Asterisk box as Extensions .......108 27.................................80 16...97 21...................98 23..................................98 23 Dialing through MS Outlook® .....................................................................................................3 Other Asterisk@Home Forums......................1 Method 1 ..2 /etc/hosts........................................................2 IAX...........................................................2 meetme_additional..........1 httpd......86 18 Weather Forecast .........................................1 The future of Telephony by O’Reilly Publishing .........................................................................113 Asterisk@Home Without Tears Page 4 of 164 ...............................................................................................................2 Method 2 ...............................................................88 18.....................................................96 21 Tools.......................................................................................1 Installing sendmail....................102 25 How to use Window Messenger® 5........................101 24...............................................................................................90 18......... .......................................In a Peer/User Arrangement ..................................................................113 30..........................105 26......................................103 26 How to interconnect 2 boxes ...............................................95 20..................................................................8 with FreePBX .................................8 with freePBX) ..................................................95 20...............105 26.....81 17 Fax through AAH (fax to e-mail) ......................... 110 28......................................83 17...............conf ........2 Restoring a Backup using the console................4 Call Pickup ......................................................................................1 Installing Fax in AAH version 2........................................Conf.................................................................2 Installing Other Languages ....................................1 Download AstTapi ........ .............................................................

........1..125 B....................1.........................................................129 B....................15 VOIP Buster .4 IAX Channel Commands ......................126 B...............3 Pennytel Asterisk Problem .............................................120 A..........127 B............117 32............2 Related Links – (for vsp TRUNK settings) ...122 A.................................................................129 B...........................................................................................................116 32..........................................................1 Corrected in version 2..................................................122 A.............1..............................................4 Unable to receive Incoming Calls....................................................................................................114 32 Bugs Reports.......4 .........8 .....................................125 B....120 A.................................6) ........................1......................................1 – More trunks.............127 B.......1..............................2........5 SIP Channel commands ..........................119 33.......................................................6 iTalk (New Zealand).....119 Appendix A ...............1.........6 Server management ...............................128 B.....................................................................................115 32................................................10 Nodephone .......1 Asterisk Feature Codes not working ..............................118 33 Touble Shooting......................................................................123 A........................................2 MyFone settings...................................1 BBPglobal ............................31 USB Phone Support.................130 B...........................................................................................................2)...............3 Asterisk Special Extensions.........4 FWD aka Pulver................................132 Asterisk@Home Without Tears Page 5 of 164 ......................................2...........................................6.............................................119 33........................8 MyNetFone .............9 Nehos (IAX) ............1............125 B..........................................................................................................................................................1...............115 32......1.................120 A...............2 Conflict between ZAP Card and FAX Module ................5 Codec (Coder Decoder).1 Trunk and Route Settings .............................1.......................116 32....................................................1 Corrected in version 2......................12 SipMe.......................................2 AGI Commands .................0) ...............................................................4 Endless Loop during Directory search (v2...........................................................................................................130 B.122 A..............................8 Securing Asterisk@Home console Alt+F9 ............................7 Koala............................................126 B...........117 32..............126 B.117 32........................2 and v2................................121 A.....................................2........................................2......2................................1.............3) ...........119 33............................................2 Asterisk Drops Calls after a few seconds.......................................................3 Editing email notification message ................2..............................................................1.........................................................................................................................................115 32.....125 B.....14 TelephoneGlobal..............................119 33...................118 32.........1 Asterisk Feature Codes ......................5).............9 Sound Directory Permission (v2....................8 .................131 B.132 C......1 Backup and Restore........................................................................................................................................................................................123 A.....................................................2 Asterisk CLI commands ....131 B.3 Setting up FaktorTel for Asterisk@Home ...............2...............................1 General commands........................................................6 Max Channels Bug.................10 WakeUp Calls (V2............1 Voice for Asterisk Messages ..........................................................................13 SipPhone ....................................128 B...........7..........................................................................................................................................115 32.....117 32.....................................................4 Asterisk Common Variables ...2 Engin BYO ..............................120 A.........................5 iinet .......131 Appendix C .........................................11 SipBroker .............................131 B.....128 B............1...........................1 Corrected in version 2................................................................................7 Ring Group Hunt Syntax Bug (v2.......................................................5 Flash Operator Panel (Bug Detected in version 1...3 Faktortel (IAX)........................1..........121 A.........2.....................129 B...........................3 Database Handling ...............1.....................................................................................................................10..............................116 32......115 32.........................2........................................124 Appendix B ...........

C.2 Australian Voice and Language Set for Asterisk ..........................................133
C.3 More Australian Voice for Asterisk ...............................................................133
Appendix D (ATAs and Routers) ...............................................................................135
D.1 Alcatel SpeedTouch 510/530 ADSL Router .................................................135
D.2 Billion 7402 VL..............................................................................................135
D.3 Linksys PAP2 and Sipura SPA2000 .............................................................136
Appendix E (Users’ suggestions)..............................................................................138
E.1 Suggestions for Dial Plan and configuration .................................................138
E.1.1 Astratel on Asterisk@Home...................................................................138
E.1.2 Further .conf modifications by Colin.......................................................139
E.2 MeetMe – Teleconferencing without Zaptel Card .........................................141
E.3 Multiple TDM400P Installation ......................................................................142
E.4 Eliminating Echo Problems in SPA-3000......................................................144
E.5 Immediate Answer of PSTN Calls ................................................................146
E.6 RAID 1 and Asterisk@Home 2.6 ..................................................................147
E.7 Rebuild Zaptel Driver (Users’ Suggestions).................................................148
E.7.1 As experienced by marner – a Whirlpool Forum participant. .................148
E.7.2 As suggested by Rob Thomas (the FreePBX guru)...............................148
E.8 Zaptel card configuration for Australia ..........................................................148
Notes ............................................................................................................................ 151
A2Billing ...............................................................................................................151
Setup A2Billing in Asterisk@home 2.2.............................................................151
Dial 0 for Outside Line..........................................................................................153
Using Zaptel Card Method ...............................................................................153
Using SPA3K Method.......................................................................................153
Delete Call Records from CDR ............................................................................154
Extension Numbers to avoid using.......................................................................154
Genzaptelconf ......................................................................................................155
Giving Priority to Emergency Numbers (E.g. 000) ...............................................155
MOH (Music On Hold) ..........................................................................................155
sip_nat.conf..........................................................................................................156
Sipura SPA3000 – Not hanging up after PSTN Calls ..........................................157
Trunks and Outbound Routes – a source of confusion........................................158
Outgoing Route Dial Pattern ............................................................................158
Trunk Outgoing Dial Rules ...............................................................................158
Updating Asterisk to Version 1.2.5.......................................................................159
Upgrading FreePBX from version 2.0.1 to 2.1+ ...................................................159
Adding the missing Maintenance Modules to freePBX 2.1.0 ...............................159
Webmin ................................................................................................................160
X100P Patch for UK Caller ID ..............................................................................161
Obtaining the patches ......................................................................................161
Bibliography ................................................................................................................163
Changes Made since last Update ..............................................................................164

Asterisk@Home Without Tears Page 6 of 164

FORWARD

This guide is not meant to be a detailed Manual for Asterisk@Home®; instead it
is just a quick and dirty guide and a resource to assist you get started with
minimum pain. Use this document only as a guide, not as a Gospel. It does not
cover all minute details, variations and possibilities of AAH neither will it provide
you with a complete solution.

If a complete solution is required for your specific requirement, I suggest you
obtain the service of a VOIP consultant who will design your solution for a fee.

This document was compiled with input from dozens of participants in the
Whirlpool and other forums to whom I owe a great deal while learning how to
configure AAH. These people have helped me whenever I get into some
difficulties – and there are many difficulties and counting☺.

If this document is of some use to you, I take no credit for it. I invite others to
participate in improving this document. Please send me your feedbacks; so
together we can make this document a valuable resource for our peers,
experienced and new alike.

- Ben Sharif June 15, 2005.

Caveat: (Don’t you just hate having to say this..)
In its Basic form, all that I have outlined worked for me but it may contain many errors,
omissions and typos that can do with a lot of extra corrections. While I have taken due
care in compiling this document, however, it may not necessarily be suitable for your
individual configuration. I do not take; neither will I accept any responsibility for any
losses incurred due to actions or inaction conducted as a result of method or advice found
in this document.

Footnote:

I DO NOT provide AAH support and NEITHER do DIGIUM. If assistance is
required, please post in the forum. Participants in the forum may have a
number of solutions and at the same time providing the opportunity for
others with similar questions to benefit from the solutions provided.

http://forums.whirlpool.net.au/forum-threads.cfm?f=107

I have received numerous emails asking for assistance. The volume of email has
become unmanageable. I am not an expert on Asterisk. While I will try to assist
within my limited knowledge, I hope you will understand if I don’t answer each
and every email. I ask those requiring assistance to post their questions in the
Whirlpool Forum (forum participants may not answer any question if the
solution is already in this guide) where there are many knowledgeable Asterisk
and Linux savvy participants who will be able to assist.

Asterisk@Home Without Tears Page 7 of 164

1 INTRODUCTION
Asterisk © is a Linux based IPBX application developed by Mark Spencer of
Digium™, the company behind Asterisk. Asterisk@Home © evolved from the
core Asterisk. It is made up of several major components. These were developed
under GPL supported relatively by users themselves. It consists of applications, a
provisioning system, an installer, and an operating system that, together, make a
complete package ready for use as an out of the box PBX.

The major components that make up Asterisk@Home are

• Asterisk, the core PBX
• Sugar, a CRM system
• A2Billing – Calling Card platform (AAH 2.x)
• Flash Operator Panel, a screen-based operator’s console
• Web Meet Me Control, a meet me conferencing control application
• freePBX (AMP – prior to AAH version 2.8); a web-based provisioning tool
for Asterisk.
• A report system – the part of AMP which provides CDR reporting tools
• A Maintenance system, also part of AMP, which provides low level
interfaces to some components and real time system information
• CentOS, a version of Linux related to a very well known Enterprise Linux
(but without the branding and support).

1.1 THE COMPONENTS
Four main components need to be set up:

• the Asterisk powered IP PBX
• the phones (or softphones) and
• the VOIP gateway service that lets you call other VOIP users and people
on the PSTN.
• have a home network and broadband access with a router and
hubs/switches if needed.

I will attempt to describe the set up of each of these. It does not matter if you are
behind a firewall. You are not required to do anything special like running the IP
PBX outside the NAT or in the DMZ. However, it is important to ensure that you
have enough bandwidth (upstream and downstream) to carry voice traffic.

1.1.1 The IP PBX
You will need a computer to run the IP PBX. It is recommended that you run
a dedicated PC for this purpose. The PC described below will be sufficient to
power the IPBX in a small office or home environment. Therefore don’t throw
away that old Pentium II you have in the attic.

• 250Mhz Pentium II PC or better.
• 128MB RAM – the more the better
• 4 GB Hard disk space - minimum.
• 10/100 NIC
• CD-ROM Drive
• 10/100 4 or 8 ports Ethernet hub/switch (not required if your router has
spare ports)

Asterisk@Home Without Tears Page 8 of 164

Since part of the call is being carried on the circuit switched network. it costs real money. 1.net.1.whirlpool. Setting up gateways will be covered in the installation section below.1. http://www. This means that you will have to pay for this part of the system. 1.3 SIP Gateway It is likely that you want to communicate with others on the PSTN network. It will take it over – it starts by formatting the hard disk. Detailed instructions are given in the installation section.sipgate.co. To get started.168. Cisco etc. 1.au/forum-replies. it is easiest to get a softphone and run it on another computer. which enables you to use an analog phone. SNOM. Register with a VSP such as Faktortel.2 Phones You can buy SIP phones from Grandstream.1.g.php?aktion=artikel&type=faq&rubrik=024&id=398&lang=de Install Asterisk@Home on this “old” computer. To keep it simple. Note* If you are using Telstra Alcatel SpeedTouch 510/530 ADSL Router. The choice is yours. you will need to unbind port 5060. please refer to this link (or see Appendix D). so make sure there is nothing on the machine that you want to keep. The Netcomm and Linksys ATAs can be bought from Harris Technology and a number of VSPs. Netcomm or Sipura. so you need to obtain a VOIP gateway service. set up behind a Gateway Router of some sort (otherwise known as a NAT firewall). Or you can buy an ATA (Analogue Telephone Adapter) produced by Linksys.0.5 VOIP Service Providers Whirlpool VOIP forum has a list of VOIP providers in Australia at the following link: http://forums.4 Home Network The fact that you are reading this and contemplating on installing an Asterisk PBX. please ensure that the Asterisk box is in the same network segment of your existing LAN.uk/faq/index. 192. 1.101. You will need to pick a static IP address for your IP PBX that is on your home network e. See the section on installation of Softphone later in this document.1.cfm?t=370536 Asterisk@Home Without Tears Page 9 of 164 . Oztell and several other VOIP Service Providers (VSPs) or you may buy Engin locked ATAs from Harvey Norman and Dick Smith Electronic. a broadband service. I assume that you have a home network. To do this.

and a Windows PC to run the softphone. then you may be able to buy one from your local swap meets for under $200.00 or so activation fee to Oztel (or other VSP of your choice). the cost will be minimal. If you do not have a spare PC with the above specification. VOIP via the Public Internet is very much dependant on a number of factors – available bandwidth not withstanding.2 IS VOIP FOR YOU? Whether VOIP is for you or not rely on a number of or combination of factors.whirlpool. Spantalk etc will register you for SIP communication for free provided that you do not need to make PSTN calls. you might be in luck. Ensure that the PC has an Ethernet NIC for connecting to your home network. but if you will be happy with a quality that is not quite but close to your existing PSTN calls. If you want to restrict all your calls to VOIP only. amongst others.cfm?a=wiki&tag=VOIP_Quality Asterisk@Home Without Tears Page 10 of 164 . which may include a monitor. Astratel. your usage habit of the internet and LAN traffic and equipment quality.00. you will be somewhat disappointed.net. If you already have a spare computer to dedicate to this task.1 WHAT IS IT GOING TO COST ? Assuming that you already have a broadband service. Some VSPs like Pennytel. if you want the ability to make PSTN calls. For further information please refer to the link below: http://forums.au/index. a router. Your only other initial cost will be the $20. All these “Major Expenses” will be recovered when you receive your monthly Telstra or Optus phone bills ☺ 2. 2. Some economic and quality considerations should be examined.2 WHAT WILL THE QUALITY OF THE PHONE CALLS BE? If you are expecting the quality to be as good as your existing PSTN calls. then the cost is almost nothing unless you need to buy an audio headset ($15. it may not cost you anything at all.00 from Dick Smith) for the softphone. also play very important roles.

3 INSTALLATION (The dumb-me way) Download the ISO from here http://sourceforge. From this point it will take about 30-45 minutes for the installation to be complete ready for the configuration stage. wait for it to finish. • During this stage. Asterisk@Home Without Tears Page 11 of 164 . • Boot your Asterisk PC with the CD in the CD Drive and press enter. If necessary change the BIOS settings to reflect this.beware. you will see screens similar to the following. All you do is. • Press the Enter key to start the installation. • **NOTE: This will erase all data on the hard drives of the PC. Linux and the required files are being installed. • Ensure that your PC will boot from the CD. If you have 2 drives.php?group_id=123387 • Burn the ISO image that you have just downloaded to a blank CD.net/project/showfiles. both may be blown away as well .

you will be presented with lots of lines of codes. password: password) 3. When it does. • After Linux is loaded the CD will eject. Asterisk@Home Without Tears Page 12 of 164 . type help-aah A list of help will be displayed – see illustration below.1 CHANGE DEFAULT SETTINGS Once Asterisk@Home has been installed. Take the CD out and wait for the system to reboot.1 To get Help At the command line. some default system changes need to be made to Asterisk.1. Log in to your new Asterisk@Home box (user: root. This process will take a while because it is building Asterisk. 3.

Enter the IP address that is to be allocated to the Asterisk box.3 Change IP Address (set IP address to Static) Change Asterisk IP address from DHCP to Static. You will then see the following screen.8 you will be prompted to enter the root password during installation. set your date. 3.1. You may need to change some of the other default passwords as well and while you are at it. the Netmask (subnet mask). 3.2 Change Linux Password **NOTE: CHANGE YOUR ROOT PASSWORD IMMEDIATELY by typing passwd **In AAH 2. Default Gateway Asterisk@Home Without Tears Page 13 of 164 . At the command prompt enter: Netconfig Select [Yes] to set up networking and hit enter. and the IP address of your box to a static address. Use the Tab key to cycle through the fields.1.

1.4a above. Choose OK and you are done.x type the following at the command line: redhat-config-date You will get the screen on the right and choose the appropriate time zone. • Default gateway IP is the address of your router. usually your domain server if you have a network domainserver but if you are running workgroup. and Primary nameserve as per the example above. select OK. Set your Time zone and you are done.1 Once done. For AAH 1.168.168. my router address is 192.255. • In the IP address field.1.5 and newer type the following at the command line: config You will get the prompt as per the screen on the right. In my case. Press D You will then be presented with the time zone screen just like the one in illustration 3. • Netmask is normally 255.1. use the address of your default gateway eg: 192.x or AAH 2. Check the system clock use UTC if you want to.255.1 • Primary nameserver is the address of your Name Server. might as well set to the correct time zone. The following examples depend on whether you are setting up AAH 1.4 Set Time Zone While you are at it. 3.1.x.168. Illustration 3. In my example above.0 unless your network has different Network mask. Asterisk@Home Without Tears Page 14 of 164 .4a For AAH 1. enter an IP address that you want to allocate to your asterisk box (making sure it is within your network range) eg: 192.7. I used my existing network regime.1.1.

Shutdown –r now Asterisk will now start with the new IP address.100) to configure Asterisk@Home.168. log off Linux and reboot using the following command.2 CONNECT TO AMP (OR FREEPBX) FROM WEB BROWSER Now you can connect to http://ipaddress/ (e. http:192. These are the absolute changes that require attention. 3.2 Asterisk@Home Without Tears Page 15 of 164 . 3. If you are using FreePBX. Once done. You will be presented with AMP as illustrated below. The others are optional although it is recommended that you change them. or AAH 2.2. use user: maint.1.g. you will be greeted with the following screen.8 with FreePBX.1 Log in to Asterisk Management Portal (AMP) or FreePBX Administration **To log in to Asterisk Management Portal or FreePBX.1. password: password unless you have changed the password during initial set up in 3.

AMP Screen after selecting Setup Asterisk@Home Without Tears Page 16 of 164 . AMP Welcome Screen FreePBX Welcome Screen At this stage select the Setup Tab and you will be presented with the following screen (there will be a noticeable difference between AMP and FreePBX screens). you will be presented with the following screen. Once you logged in to AMP.

You will be required to enable and installs all the modules that you are likely to need. Queue.8 with FreePBX. you will need to activate all the Administration/Management modules that you require eg: Extensions. select Module Admin option on the left right under the FreePBX decal and you will be presented with the Module Administration screen. creating new extensions. you are ready to start. Now you can start configuring Asterisk@Home. Trunks etc. Selecting each option will display configuration screen for that particular function e.g. Once you have enabled all the required modules. The screen below is FreePBX. creating new trunks etc. FreePBX Setup Screen If you are using Aah 2. Asterisk@Home Without Tears Page 17 of 164 . It does not matter if you enabled modules that you do not require as all it will do is making FreePBX refresh a little slower. This is where most of the action begins. From this point onward. To do this. the setup process are similar the difference being the presentation of the management screen and some extra options in FreePBX. Notice the selection options on the left. Digital Receptionists.

3 GENERAL SETTINGS The first thing I do is select General Setting and set it up as illustrated below. this will not apply to you. 3.7 or Earlier The following illustration is for General setting required in AAH version 2.7 or earlier.1 General Settings for AAH 2. It is self-explanatory so I will not try to explain. Asterisk@Home Without Tears Page 18 of 164 .3. If you have since changed to freePBX. 3.7 or earlier. as it is quite minimal and nothing substantial that warrants explanation. AMP is the default interface for AAH versions 2. Hovering your mouse on the corresponding field description with a yellow/amber underline will display the purpose of the fields.

it was necessary to edit the sip.8 or later. After setting up the General Settings. In AAH versions prior to 2.3. click on Submit Changes button and the red bar on top of the screen for the change to take effect. There are other options of course – refer to the chapter on Dial Command Options.conf and extensions. you may replace the “r” with an “m”. all inbound unidentified SIP calls will not be accepted). if you want the caller to hear music instead of the standard ringing sound.g.3 Dial Command Options In the Asterisk Dial command option.8. or “m” if you want music instead. For further Asterisk@Home Without Tears Page 19 of 164 .2 General Settings for AAH 2. freePBX is the default interface for AAH versions 2. 3. Notice that the following extra information that will define the way AAH behave. you may customise your preference to the way asterisk behave e. You will notice that freePBX requires more information compared to that required from the requirements of previous versions that was using AMP as the user interface. Countryl setting: Australia Allow Anonymous Inbound SIP Calls?: Yes (if this is not set you ‘Yes’.3.conf files. but from versions 2. are also required in freePBX. Set the fields to the following (these are vital information): Asterisk Outbound Dial command option: “r” which generate the ring when you dial out.8 or Later The following illustration is for General setting required in AAH version 2.8 or later. this is where they are defined.8 onwards. 3.

Allow the calling party to hang up by hitting the '*' H DTMF digit. using 'x' as A(x) the file C Reset the CDR for this call Allow the calling user to dial a 1 digit extension while waiting for a call to be answered. options. hover your mouse on the label and you will be informed of the other options. Arguments can be. Limit the call to 'x' ms. Play a warning when 'y' ms are left. • LIMIT_PLAYAUDIO_CALLEE yes|no - L(x[:y][:z]) Play sounds to the callee. Otherwise. The Macro can set the variable MACRO_RESULT to specify the following actions after the Macro is finished Asterisk@Home Without Tears Page 20 of 164 . M(x[^arg]) specified to the Macro using '^' as a delimeter. or the context defined in the EXITCONTEXT variable. and the 'calling' DTMF string is sent to the calling party. Allow the called party to hang up by sending the '*' h DTMF digit. Jump to priority n+101 if all of the requested channels i were busy. some PSTNs do not allow CallerID to be set to anything other than the number assigned to the caller. if it exists. Send the specified DTMF strings *after* the called party has answered. The default is to say the time remaining. Repeat the warning every 'z' ms. Proceed with dialplan execution at the current g extension if the destination channel hangs up If the call is answered. Exit to that extension d if it exists in the current context. • LIMIT_TIMEOUT_FILE File to play when time is up. an extension. The following special variables can be used with this option: • LIMIT_PLAYAUDIO_CALLER yes|no (default yes) . Both parameters can be used alone. D([called][:calling]) The 'called' DTMF string is sent to the called party. Provide hold music to the calling party until a m([class]) requested channel answers. Execute the Macro for the *called* channel before connecting to the calling channel. but before the call gets bridged. the current extension is used. For example. • LIMIT_CONNECT_FILE File to play when call begins. • LIMIT_WARNING_FILE File to play as warning if 'y' is defined.Play sounds to the caller. Force the callerid of the *calling* channel to be set as the extension associated with the channel using a f dialplan 'hint'. A specific MusicOnHold class can be specified. transfer both parties to the specified priority. The following are the dial command options available to you: Options: Play an announcement to the called party. Optionally. or extension G(context^exten^pri) and context may be specified.

This was the behavior of Asterisk 1. n It specifies that no introductions are to be saved in the priv-callerintros directory. This is basically p Privacy mode without memory. Enable privacy mode. executing • ABORT Hangup both legs of the call. an extension. Allow the called party to transfer the calling party by t sending the DTMF sequence defined in features. The current extension is used if a database family/key is not specified. Allow the calling party to enable recording of the call by W sending the DTMF sequence defined for one-touch recording in features. This option is a modifier for the screen/privacy mode.0 and earlier. Hang up the call after 'x' seconds *after* the called S(x) party has answered the call. Asterisk@Home Without Tears Page 21 of 164 .conf. do not screen the call. This option is a modifier for the screen/privacy mode. Specify that the CallerID that was present on the *calling* channel be set as the CallerID on the *called* o channel. Pass no audio to r the calling party until the called channel has answered. Use 'x' as the family/key in the P([x]) database if it is provided.conf. • CONTINUE Hangup the called party and allow the calling party to continue dialplan execution at the next priority. Optionally.conf. Allow the calling party to transfer the called party by T sending the DTMF sequence defined in features. This option enables screening mode. • BUSY Behave as if a busy signal was encountered. N It specifies that if callerID is present. This will also have the application jump to priority n+101 if the 'j' option is set. Indicate ringing to the calling party. • GOTO:<context>^<exten>^<priority> - Transfer the call to the specified priority. • CONGESTION Behave as if line congestion was encountered. or extension and priority can be specified.

4 EXTENSIONS The number of extensions to be set up depends on you.x and 2. to select the type of trunk e.g. the basic underlying concept is the same. SIP.x. is done from the Create Extension main menu illustrated below: The AAH v2. IAX2. 3.x differs slightly.x Add Extension Screen While the presentation between AAH v1. AAH v2.x and v2. In my case I have 4 extensions to experiment with – 3 soft phones and one ATA. There are a number of extension numbers you should avoid using see Notes. In AAH 2.x you have to actually type out “rfc2833” in the dtmfmode field. You can have soft phones installed in 4 or 5 computers or mixture of ATAs and SIP SoftPhones. Asterisk@Home Without Tears Page 22 of 164 .7) differs in look but the basic concept is similar.x’s screen where you actually create an extension looks like the illustration below: Unlike v1.x (up to 2. The Extension set-up screen between AAH 1. ZAP or Custom.

You may also nominate an email address for Voicemail Email Notification – it’s up to you. I allocated passwords to be the same as the extension numbers. If you enabled Voicemail. 201. My extensions are 200. 2000 and 2001 For simplicity. This is covered in more detail in the Chapter a little later in this document. For SIP extension I have selected SIP in the phone protocol drop down box.x Add Extension Screen Click on the Add Extension button to add more extensions.x. you may allocate the same password as well but you don’t have to. Asterisk@Home Without Tears Page 23 of 164 . AAH v1. The extension set up screen illustrated below is for AAH v1. For DTMF Mode. I have selected “rfc2833” from the drop down box adjacent to the SIP dropdown box.

Setup -> Follow Me. 3.8 WITH FREEPBX) After setting up my extensions. This is where I will define it as per the illustrations below: To do this I select the Follow me option. Select the extensions that I want to define (the extension selection is on the right of the screen).5 FOLLOW ME (AAH 2. I will be presented with the following screen: . I will pick my extension – ‘Ben Sharif <2001> add’ Asterisk@Home Without Tears Page 24 of 164 . I need to decide if I want Asterisk to call another pre-arranged extension. if the extensions called do not answer (this facility is new to freePBX – it was not obvious in AMP).

I entered the following information. For mobile phone to wok. 3. If you don’t require a ring group. Asterisk will try to connect to extension 2001 and if no answer. you may ignore this section.6 RING GROUPS A ring group is a group of extensions that will ring when there is an external incoming call. the phones nominated in the selected group will ring. You may select different ring group for each of the incoming trunk or you may nominate the same group for all the trunks. You may not want a ring group – it’s entirely up to you. it will drop to my mailbox. let’s not get too fancy ☺ The ring group screen is illustrated below: Asterisk@Home Without Tears Page 25 of 164 . The 04XXXXXXXX# is my mobile phone (see illustration below). it will call my mobile. When there is an incoming call. Note*: If you use to control this function using ring group in previous versions of AAH. I have only defined 1 ring group for all incoming calls from all trunks – at this stage. If still no answer. in which case you will only need to define only one ring group. For simplicity. In the screen that follows (see the illustration above). You can even put your Mobile Phone number in the ring group if you want to. in AAH 2. you must have the appropriate route and trunk set up. • Ring strategy: hunt (to call the numbers in sequence) • Extension List: 2001 (my extension) followed by my Mobile phone number 04040444444# (notice the ‘#’ after my mobile number – this is required) • Ring time: 40 seconds • Destination if no answer: Core – mailbox 2001 Every time my extension is called. you may now use this facility to do the same function.8.

1 Now it’s a good time to set up your softphone.6. Asterisk@Home Without Tears Page 26 of 164 . you should be able to make and receive calls between your internal extensions. 3. go to the chapter – Setting up Soft Phone and come back to the next chapter after that is done. If not. Let’s take a break and test the soft phone extensions by making calls to each extension. To do this. If everything has been done as explained above. it is time to re- inspect what we have done above and make the necessary correction before attempting to go any further.

8 WITH FREEPBX) This is where the behaviour of incoming calls from PSTN is being handled. to a specific extension. I have set all incoming calls to be directed to Ring Group 1 as illustrated below (later on in this guide I will create a digital receptionist for this purpose). asterisk need to know where to direct it. the options are there and the “no override” option will allow you to nominate your incoming calls handling. If you do. When an incoming call from PSTN is received.8 WITH FREEPBX) AAH 2. Asterisk@Home Without Tears Page 27 of 164 .8 with FreePBX does not have this option.2 INCOMING CALLS (AAH 2. You may want to do it differently.1 INCOMING CALLS (PRIOR TO AAH 2. The call can be directed to a ring group. 4. Digital Receptionist or Queue. Select the Incoming Calls selection in the left bar of the screen. Incoming Calls options need to be set up for this purpose. Initially. I do not discriminate between regular hour and after hour calls thus I have forced asterisk to treat all calls as regular hour calls. All incoming calls from trunks or PSTN are treated individually and may need its own Inbound Call Route.4 INCOMING CALLS HANDLING 4.

1 Time Conditionds You can create various time conditions and use these time conditions in conjunction with your Inbound Route to individualise each of the incoming trunk’s behaviour. 4. in a way is more flexible than method employed in earlier versions of Asterisk@Home. These time conditions can then be assigned to each individual Inbound Route if you choose to do so. All incoming calls from all the different trunks that you may have can have their own individual characteristic by judicious deployment of the time condition facility available in FreePBX (which is not available in previous versions except for in the PSTN Incoming Calls setting).2. This will have the effect of handling all calls from trunks that does not have an Inbound Route created (which includes all calls from PSTN and incorrectly created incoming route). This. Asterisk@Home Without Tears Page 28 of 164 . I simply create an Inbound Route with the DID Number and Calling ID Number fields left blank. You may create several time conditions and give each of the time condition a Short Name to identify it. In my case. the simplest method is to create a catchall Inbound Route. Therefore to handle incoming calls from PSTN (if you have FXO cards installed).

you can use this as a trunk for that purpose otherwise.) 5. — Wildcard. any number between 2 and 6 inclusive. please allow for what the ATA will be sending to asterisk when you are preparing you rules and patterns. They act like a filter for matching numbers dialed with trunks. 5. Points to keep in mind.2 WHAT IS A TRUNK? A trunk is the telephony service line that you will be using to make an external call on. • . e. The reason why asterisk users have several trunks can be explained as follows: Asterisk@Home Without Tears Page 29 of 164 . PSTN or VOIP calls. A VOIP service provider (VSP) that you have signed up with is also a trunk. but not sending it to the trunk.g. To make external. the Telstra telephone line that you have at home is a trunk (or it can be used as a trunk if you wish but not necessarily so).1 WHAT IS A DIAL PATTERN? Dial patterns are part of Outbound Routing. it is best to ensure that your ATA is sending exactly what you dialed to Asterisk – just delete your dialling rule from your ATA and replace it with (*x. Or. A further explanation can be found under Notes. you can only use it for making calls using VOIP between subscribers of the VSP only (unless there are peering arrangements with other VSPs). Must match *something*. 1 to 9) • [Various] — Match only one character that matches any of the one in the square brackets. Match any number of anything.|xx. * and #. another way of saying this would be 'Match * or #. If you want asterisk to take care of all the rules. You can have Telstra and/or Optus telephone lines and use them as trunks. you must have at least one trunk. If you have paid for VOIP service to enabled you to make calls out through PSTN. [02-68*#] would match 0. Beware!!! If you are using an ATA. The various patterns you can enter are similar to Asterisk's definition of them: • X — Refers to any digit between 0 and 9 • N — Refers to any digit between 2 and 9 • Z — Any digit that is not zero.5 TRUNKS AND ROUTES (and things that go bump in the night) This is a simplified guide to give the budding Asterisk@Home users some understanding in setting up Trunks and Routes. and you can also have a few VSPs that you subscribed to as additional trunks.7 or 9') –Avoid using this notation in your Trunk Dial Rule as it does not seem to work.g. Use this only in your Outgoing Route Dial Pattern. • | — This lets you use a '0 to dial out' (or '9' in the US) by matching anything before the line. You can have several trunks if you want to.g. 8. (E. or a number that isn't 1. (E.

select Setup tab and then select the Trunks option from the vertical menu on the left.g.3 LET’S CREATE THE TRUNKS For this example. click on the Add Trunk option (first option on the right of the screen).1 Pennytel In this example. Asterisk@Home Without Tears Page 30 of 164 . To call an overseas destination you would normally dial 0011+country code + phone number. Astratel will be used for international calls To create a new Trunk. The 61 is the Australian 61+4XXXXXXXX Country code that will be added to the mobile phone number. • Trunk (a) charges the best rate for Local calls but is expensive for Mobile calls and not so great for international calls. E. First create a Pennytel. and to dial France is 0011 33 <phone number>.3. to call New Zealand is 0011 64 <phone number>. This pattern dials numbers start with 60 followed by a one-digit 60NXXXXXXX number in the range of 2-9 followed by 7 more digits. Pattern Explanation This pattern tells Pennytel to dial all Malaysian Mobile numbers 601XXXXXXXX starts with 601 followed by 8 more digits. Oztell and Astratel SIP Trunks that we will call pennysip. • Trunk (c ) has good mobile rate and will allow 1300 numbers while the other 2 do not. Pennytel requires numbers dialed to follow the international format Country code + area code + phone number. 5.g. we will use Pennytel for all international and mobile calls only. To create a new trunk using AMP. Pennytel. the route (that we will create later) will not pass the 0011 to the trunk. let’s create 3 SIP trunks. • Trunk (b) has great rate for international call. Similarly. which instruct the trunk to dial whatever is sent by the appropriate route. and Australian Mobile phones. when you make an international call. asterisk will route your call via trunk (b). We will require the following Outgoing Dialing Rules for this trunk. oztellsip and astrasip respectively and define their dialing patterns. When you make a call to a Mobile phone. asterisk will route your call via trunk (c) while it will route your call to trunk (a) if you make a local call. Oztell and Astratel Pennytel will be used for all International and mobile calls Oztell will be used for all local and mobile calls. Since Pennytel only requires the country code and the phone number but does not require the 0011. For dialing Australian Mobile phone. E. 5. A properly planned route will direct the phone calls you make to the appropriate trunk that will provide you with maximum effectiveness and savings. This example is for dialing Malaysia with a country code of 60.

it is necessary to add the following in the general section of your sip.pennytel.Port to bind to (SIP is 5060) bindaddr=0.Address to bind to (all addresses on machines) disallow=all allow=alaw allow=ulaw Asterisk@Home Without Tears Page 31 of 164 . enter the following: 888XXXXX:Password@sip. Incoming Settings and Registration for Pennytel.160 Pennytel preferred codecs are: g729. disallow=all host=203. My sip. [general] port=5060 . enter the Pennytel User ID: 888XXXXX canreinvite=no In the User Details we will have the context=from-trunk following: fromuser=888XXXXX qualify=no secret= Password type=user username=888XXXXX Registration In the registration field.conf looks like this. 61+4XXXXXXXX Next we need to create the Outgoing Setting. as long as it is NOT Asterisk. click on the Submit Changes button and click on the red bar across the top of the screen.0. To overcome this problem.0 .6. useragent = My PABX *Note: The useragent can be any name.0. insecure=very gsm and g723 but g729 and g723 are not secret= Password installed as default in AAH type=peer username=8880XXXX Incoming Settings In the User Context. we will 60NXXXXXXX enter the following.conf.166. ** Note: It seems that Pennytel is rejecting Asterisk. 601XXXXXXXX In your Outgoing Dial Rules box. Outgoing Settings In the Trunk Name field we will enter the name of this trunk: pennytelsip allow=alaw&ulaw&gsm canredirect=no In the Peer Details enter the canreinvite=no following.com/888XXXXX After all these have been done.

In your Outgoing Dial Rules box. Incoming Settings and Registration for Oztell. yours will no doubt be different. Outgoing Settings In the Trunk Name. this: – this is simply an example based on my 06612+NXXXXXXX 0661+NXXXXXXXX setting. digits from 0 -9. 61+1300XXXXXX Dials 1300 numbers 61+13ZXXX Dials 13 numbers 61+1800XXXXXX Dials 1800 numbers 899060X.conf 5. it will look like 60ZXX.conf #include sip_custom. fromuser=899060xxxxx host=sip. This can be an international number with a Country code of 60 followed by a number between 1 and 9 inclusive. enter the name of this trunk: oztellsip (as an example) allow=ulaw&alaw In the Peer Details we will need the following. Send unknown SIP callers to this context context = from-pstn callerid = Unknown progressinband = yes useragent = My PABX #include sip_nat. 06612+NXXXXXXX Using the Oztell 06 rate to dial any NSW number.context = from-sip-external . To call Sydney 67541234. Therefore the dialling rule will be in this form: We need various patterns here: Pattern Explanation 899060X. 0661+NXXXXXXXX Using Oztell 06 rate to dial any Australian number.conf #include sip_additional.oztralia.com insecure=very secret=Password type=peer username=899060XXXXX Asterisk@Home Without Tears Page 32 of 164 .3. . Oztell requires it in the following format 61 267541234. 61+1300XXXXXX 61+13ZXXX 61+1800XXXXXX Next we need to create the Outgoing Setting.2 Oztell (SIP) Oztell requires the numbers dialled to follow international format Country code + area code + phone number. To use Oztell family cheap rate you can also prefix it with 09. This pattern tells Oztell to dial the inter Oztell’s numbers This pattern dials numbers start with 60 followed by a one digit number 1-9 followed by other numbers minimum of 2 60ZXX. canredirect=no disallow=all You must enable all the codecs that you want to use fromdomain=oztralia through Oztell’s web page.

enter the Oztell User ID: 899060XXXXX canreinvite=no In the User Details enter the following: context=from-trunk fromuser=899060XXXXX insecure=very qualify=no secret=Password type=user username=899060XXXXX Registration In the registration field. click on the Submit Changes button and click on the red bar across the top of the screen.oztralia. yours will no doubt be different. I might as well include my Oztell IAX trunk setting here for general information. it will look like 60ZXX. Incoming Settings In the User Context.3 Oztell (IAX) Since I only have IAX trunk with Oztell.oztralia.com/899060XXXXX After all have been done.3. enter the name of this trunk: oztelliax (as an example) allow=ulaw&alaw In the Peer Details we will need the following. disallow=all host=iax. 61+1300XXXXXX 61+13ZXXX 61+1800XXXXXX Next we need to create the Outgoing Setting. Outgoing Settings In the Trunk Name. 899060X.conf file. Note* Don’t forget to Forward UDP Port 4569 to your Asterisk IP address and edit your iax. enter the following: 899060XXXXX:Password@sip. In your Outgoing Dial Rules box. username=899060XXXXX Incoming Settings In the User Context. Incoming Settings and Registration for Oztell. 5. enter the Oztell User ID: 899060XXXXX context=from-trunk In the User Details enter the following: secret=Password type=user Asterisk@Home Without Tears Page 33 of 164 . this – this is simply an example based on my 06612+NXXXXXXX 0661+NXXXXXXXX setting.com Note: You must enable all the codecs that you want secret=Password type=peer to use through Oztell’s web page.

g.au fromuser=8888XXXX *Note: Astratel requires host=sip03. Astratel requires the numbers dialed to follow the international format Access Code (0011) + Country code + area code + phone number e. Entries secret= Password in bold are mandatory.com.4 Astratel To make an international call.g. Area Code + Phone number e. To call an Australian number e. 0011 60 6123456.com After all have been done.com.astrasip. Astratel requires it in the following Australian format.au insecure=very without which it may not work. Outgoing Settings In the Trunk Name field we will enter the name of this trunk: astrasip (you can call it whatever you like) In the Peer Details we will have the allow=alaw&ulaw following. Incoming Settings and Registration. 0+4XXXXXXXX Next we need to create the Outgoing Setting. username=8888XXXX Asterisk@Home Without Tears Page 34 of 164 . Therefore the dialing rule will be in this form: We need several patterns here: Pattern Explanation 8888XXXX This pattern tells Astratel to dial the inter Astratel’s numbers This pattern dials all international numbers by prefixing it with 0011+ZXX. enter the following: 899060XXXXX:Password@iax. Sydney 67541234.g. 5. Registration In the registration field. 0+4XXXXXXXX Using Astratel to dial any Australian Mobile number 8888XXXX Your Outgoing Dial Rules box will look like this. disallow=all fromdomain=sip03.au fromdomain=sip03.astrasip.astrasip. 0011+ZXX. click on the Submit Changes button and click on the red bar across the top of the screen. 0011 since the Outgoing routing stripped the 0011 before the number is sent to the trunk. 02 67541234.com.oztralia.3. while the rest type=peer can be left out.

fromuser=8888XXXX Others can be left out). insecure=very qualify=no secret=Password type=user username=8888XXXX Registration In the registration field.astrasip. Incoming Settings In the User Context.com. we will enter the following: 8888XXXX:Password@sip03. click on the Submit Changes button and click on the red bar across the top of the screen. we enter the Astratel issued User ID: 8888XXXX canreinvite=no In the User Details we will have the context=from-trunk following (entries in bold are mandatory. The Trunks screen in AMP will look like the following illustration below: Asterisk@Home Without Tears Page 35 of 164 .au/8888XXXX After all these have been done.

Asterisk@Home Without Tears Page 36 of 164 . please refer to APPENDIX B Now that you know what the trunk will do. * For more trunk settings. you may create the outbound route.

you will need at least one trunk and one route. select Setup tab and then select the Outbound Routing option from the vertical menu on the left.1 What is an Outbound Route? An outbound route works like a traffic cop giving directions to road users to use a predefined route to reach a predefined destination.2 How does it work? Every time you dial a number.4. 5. To create a new route using AMP. In my case I created 5 routes: • International • Domestic • MobileAust • OztellOnly • AstratelOnly The International Route will be used for all international phone calls.4 CREATE OUTBOUND ROUTING 5. asterisk will do the following in strict order. If it does not match. • Compare the number with the pattern that you have defined in your route 1 and if matches. it will initiate the call using that trunk. • Pass the number to the appropriate trunk to make the call.4. The Domestic Route will take care of the Australian phone and mobile. To make a call out (except inter extension calls). if will compare the number with the pattern you have defined with route 2 and so on. Asterisk@Home Without Tears Page 37 of 164 . • Examine the number you dialled. The other three will do as the names suggest. 5.

Before the 0011|[7-9]XX. Pattern Explanation You will dial Australian telephone number as normal using 03. 13 etc. the Malaysian PSTN pattern here. If you dial local number and not use the STD prefix. 5. it will send to the trunk as is and the trunk will insert [2-9]XXXXXXX the 02 if required (this is a NSW pattern. If you are in Victoria you will need to modify the trunk).4. You will then need to pick the Trunk Sequent. start with a 0 such as 1300. I have defined 0011|60NXX.4 Domestic You need the following pattern to match the Australian Telephone numbers and the Australian Mobile numbers. 1800. 5. the trunk will insert it. you will see something like this.4.3 International You will need the following pattern to match international dialing. This is the catchall international dialling including International 0011|NXX. In your Dial Patterns box. In my case I need Astratel as the trunk for this route and if it fails. number is sent to the trunk the 0011 will be stripped. Click on the Add Route in the menu on the right of the screen. Asterisk@Home Without Tears Page 38 of 164 . Pattern Explanation Most of my International calls are to Malaysia. the trunk will insert the 0011. If the trunk requires the 0. Mobile (excluding USA which is a 1). This is the catchall dialing for numbers that does not ZXX. I want Pennytel as a second choice/backup Any number dialed with the 0011 prefix will be routed through the Astratel trunk and should it fail. This pattern dials all international numbers by prefixing it with 0011 and any digit between 7 and nine inclusive. 02 prefix but the route will strip the leading 0|[23478]XXXXXXXX 0 before it is sent to the trunk. If required by the trunk. it will be routed to Pennytel.

The 0011 will be stripped before the number is sent to Oztell.6 Oztellonly I have the following pattern in my Oztellonly route.4. 0011|601XX. I use Oztell for a number of call types therefore some explanation may be in order. you will see something like this. 02 prefix but the route will strip the leading 0 before it is sent to 0|[378]NXXXXXXX the trunk. For dialing Oztell inter Oztell users NXXXXXXX Catchall for dialing a local number that doesn’t start with 1 Asterisk@Home Without Tears Page 39 of 164 . In this case I need Oztell as the trunk for this route and if it fails. I want all my domestic mobile calls to be routed via Pennytel and I have not nominated a second trunk. 5. 899060XX. it will be routed via Astratel. Oztell does not require the 0011. Pattern Explanation This pattern will allow me to dial a Malaysian Mobile number. In your Dial Patterns box. This is for dialing 1300. 5. the trunk will insert it. as I don’t have a second trunk nominated. If it fails then I will not be able to make a Mobile call.4. It only requires the Country code. You will then need to pick the Trunk Sequent. 1[38]XX. You will dial Australian telephone number as normal using 03. If the trunk requires the 0. I want Astratel to take over as a second choice/backup All numbers dialed matching the above pattern will be routed through Oztell and if it failed.5 MobileAust I have only a single pattern for calling Australian mobile – illustrated below. 1800 and 13 numbers.

5. In the dial pattern box you will see something like the illustration below. Correspondingly. in my trunk sequence.4. I use 1278 as a unique number to identify that this number must be dialed through Astratel.7 Astratelonly There is only one pattern for Astratel only calls. Asterisk@Home Without Tears Page 40 of 164 . Since the above pattern is for Oztell only. Oztell was chosen to be the only trunk for any of these calls. there is only one trunk selected. It is the Astratel DID for calling inter-Astratel users.

assuming your telephone number in Sydney is 0246123456.1 Setting up ENUM Trunk 1. 2. Note: ENUM only works between ENUM enabled Asterisk (or other ENUM enabled VOIP) users. (including the dot) for dialing International numbers – see example below: Asterisk@Home Without Tears Page 41 of 164 . On the outgoing Dial Rule enter 612+NXXXXXXX (for local calls without having to dial the 02) 4. On the next line enter ZXXXXXXXX. I will not enter into any elaborate explanation how enum works. In essence.5 ENUM ENUM is a way for us to use VOIP to establish calls between VOIP systems without using PSTN even though the numbers called are PSTN numbers provided that the numbers called are registered with ENUM. Click the Add Enum Trunk link. 5. 03) 5. 3. 5. When an ENUM enabled Asterisk user calls your phone number. If it finds your phone number it will use the infomation to setup a call directly between his Asterisk server and yours. as there are already a number of articles describing this. resorting to PSTN only if your number is not found. it will first attempt to find your phone number in the ENUM DNS zone. In short. In the Outbound Caller ID field enter your callerid information in the format of "Your Name" <61246123456> (Including the quotes).5. On the second line enter 61+NXXXXXXXX (for dialing Australian numbers where you need to dial the prefic (eg. ENUM offers you the ability to call other telephones directly over the Internet without involving a third party. your phone number and server information are stored in a special DNS zone (very similar to a reverse lookup zone).

5. On the second line I have 1640011|NXX. click the route you would like to enable with ENUM. 6. 10. In the routes window on the right-hand side. 3. Note: Changes to extensions. 7. In the Dial Pattern. 2. 9.when finished.conf (for AAH version 2. Click the Submit Changes button at the bottom of the page. If you are using freePBX you may ignore this as this is handled by freePBX. 5. 6. Make the ENUM trunk the first route in your Trunk Sequence. Click the Outbound Routing link on the left hand side. This enamels me to dial NSW local number without having to dial 02. On the third line I have 164|NXX. Click the You have made changes .conf. Click the You have made changes . 8. You may also add other trunks in the sequence in case ENUM failed. To call Malaysia I will dial 16400116062861234 and only the 6062861234 will be sent to the ENUM trunk. on the first line. I call my route e164. This will allow me to call an International number eg. Asterisk@Home Without Tears Page 42 of 164 . click here to APPLY them at the top of the page. I had 1640|[378]NXX.7 and earlier) If you are using AMP with AAH version 2. You may try calling someone while monitoring Asterisk CLI and you should see the Enumlookup scroll by. Click the Submit Changes button at the bottom of the page 7. click here to APPLY them at the top of the page.2 Setting up ENUM Outbound Route 1.7 and earlier you may need to make the following correction under [macro-dialout-enum] in your extensions. This will allow me to dial an STD number such as 0732123456 where only the 732123456 will be sent to the ENUM trunk.when finished. I decided to use the prefix 164 to force dial through ENUM 4. 5.

x the ENumLook line should read: exten => s. Click here for a Step-by-Step instruction on how to set up an ENUM account.EnumLookup(+${DIAL_NUMBER}) If not change your system to match and click Update at the bottom of the screen and re-read your conf file.EnumLookup(${DIAL_NUMBER}) On AAH servers version 2. Asterisk@Home Without Tears Page 43 of 164 .12.9.x the ENumLook line should read: exten => s. On AAH version 1.

6 INBOUND ROUTE (DID ROUTES A@H VERSION 1. Asterisk@Home Without Tears Page 44 of 164 .2 Inbound Route (AAH version 2. navigate to the Setup Screen and select Inbound Route option then choose Add inbound Route if required.8 with freePBX) In version 2. there are more options where you can route your incoming calls to (the rest of the process is similar to prior versions of AAH).6. 5. In my case.x Inbound Routing Screen for AAH version 2. To create Inbound Route. which is definable when setting up the individual route. all calls that come in through all the trunks are routed to Ring Group 1 as shown in the illustration below.7 with AMP and earlier) I use the following naming convention: 899060194748 for Oztell 88881346 for Astratel 88801609 for Pennytel Incoming calls from any of these trunks can be routed to specific extension/s or Ring Group. I have set up my DID/Inbound Routes for all the trunks that I have and use the respective User Numbers allocated to me by the VSPs as the DID/Inbound Route names.6.1 Inbound Route (AAH version 2.x) for every trunk you wish to receive calls from.x 5.X) You must have an Inbound Route (or DID Route for A@H Version 1. 5. DID Routes Screen for AAH version 1.8 with freePBX .

I have set the following in the relevant fields: • DID Number: 60386572572 (My Malaysian DID) • Fax Extension: Disabled • Privacy Manager: No • Core: 2001 (My private extension) The rest of the fields I have left them as they were. followed by clicking the red bar on top of the screen. Asterisk@Home Without Tears Page 45 of 164 . In the illustration above. In the illustration below for AAH version 2. Click Add DID or Inbound Routing to add more DIDs (Inbound Routing) and click submit after creating each route.8 with freePBX. I have my incoming calls from my Pennytel provided Malaysian DID of 60386572572 routed directly to my personal extension of 2001. You may set up more inbound routes if you have more trunks. all my calls coming in vis my Malaysia DID will be sent directly to my private extension.

. If no one answers your call. Asterisk@Home Without Tears Page 46 of 164 . 3 for Norsurya. As in most households. I simply say. Yours truly usually is the one who will pick it up and has to look for the recipient… usually my teenage daughter. One is waiting for the other. or you may hold for someone to answer your call if anyone is available. You will be making your recording using the telephone on this extension (or the microphone of the softphone).6 DIGITAL RECEPTIONIST I found that the digital receptionist is very handy to filter some of the phone calls I have been receiving. click on the Digital Receptionist option and get the following screen. you have reached the Sharif’s household. Press 1 for Ben. Follow the prompt on the screen. please leave a message”. In my message. Enter the extension number of the mouthpiece that you will be using to record your message in the appropriate field.wav format you can simply upload that recording otherwise you may dial *77 on your phone and do your recording now. no one will pick up the phone when it rings. 2 for Rohani. “Hi. 6.Then hang up. Click continue. If you have a recording that you have prepared in a .1 SETTING UP DIGITAL RECEPTIONIST In the Setup tab.

I gave the recording a name “MyMenu” and a description of what that menu does. I then entered the number of options I would like for this menu. Once I am happy with the recording. Asterisk@Home Without Tears Page 47 of 164 . I can go to step 1 again if I am not happy with the recording. I then verify my recording by dialing *99. Click Continue. Keep doing this till you are satisfied. Click Continue. In my case it will be 4 (see example of my recording above) plus 1 extra for timeout – total 5.

On this screen. I will define the action I required when the caller presses the appropriate option. Asterisk@Home Without Tears Page 48 of 164 .

Once done. I selected Custom App: for DISA (we will get to DISA a little later).Dial(SIP/6140XXXXXXX@pennytelsip. I selected Extension. For number 1 & 2. You may now go back to Set-up Tab and select Incoming Calls and direct PSTN incoming calls to your Digital Receptionist (see illustration below). exten => s. Don’t forget to click on the red bar on top of the screen. I selected my extension from the drop down selection list. For 2.playback(pls-wait-connect-call) exten => s. in case the DTMF tone does not register. For 4. the call will be sent to Ring Group 1.60.conf file. I have selected Custom App: to call her mobile. if the caller does not press any option or. Test it by dialling 7777. I selected Ring Group 1 To call Norsurya’s mobile I have included the following context in the extension_custom. (I changed it to read “t” for timeout). to direct calls to Norsurya’s mobile number. For 3. for 3 & 4 I have selected Custom App: and for 5 which I have changes to the letter “t”. For 1. (Asterisk will simulate an incoming call) and you will hear your Digital receptionist in action.Hangup The last extension (which I have changed to the letter “t”) is to capture timeout.r) exten => s. which is for Norsurya.3. Click Continue and submit it. I selected Ring Group. For 5.1. [custom-callmobile] . Asterisk@Home Without Tears Page 49 of 164 .2. I selected Rohani’s extension.

See example below: [custom-myextension] . 6. Asterisk@Home Without Tears Page 50 of 164 . When the Digital Receptionist answers the call and directing the call to the appropriate extension.2 CUSTOMISING INDIVIDUAL EXTENSION Note for home users Most of the config files manual tweaks and extra configurations in this guide are meant for AMP users.4.1.Macro(vm. Ben’s extension exten => s. voice mail to my extension exten => s. or.Macro(vm.x.60. it sounds more pleasant. While waiting for me to answer the call. if “r” the caller will hear the ringing tone instead. • Line 1 (priority 1) will tell the caller to wait while he/she is being connected. To do this. instead of selection my extension for my option. instead of nominating my extension number for the choice in Digital Receptionist.playback(pls-wait-connect-call) exten => s. I use a custom extension. the caller will hear another ringing tone until the extension is answered. This is boring.2. Unless you have a compelling reason to do so.4.1 You can do this to all the individual extension or you can call a number of extensions simultaneously like a ring group – like so.s.conf called [custom-myextension]. as I prefer music instead. • Line 3 (priority 3) will direct it to my voicemail if the call is not answered within 60 seconds.2001).60.Hangup In the example above.3. However I have not investigated why.2. I create a custom extension in the extensions_custom. exten => s.playback(pls-wait-connect-call) exten => s.1.Dial(SIP/2001&SIP/2002&SIP/2003.Hangup Note: It was reported to me that this method does not seem to work with Version 1. • Line 2 (priority 2) will call extension 2001 (my extension) and will try calling the extension for 60 seconds. besides.2001) exten => s.3.Dial(SIP/2001. freePBX users are advised against any manual config file tweaks as these are being handled in freePBX by design.m) . In digital receptionist. To achieve this.m) exten => s. I will nominate Custom App: Custom App custom-myextension. the caller will be listening to soothing music – hence the “m”. exten => s.

Asterisk@Home Without Tears Page 51 of 164 . This is true with Asterisk@Home as well. Select Config Edit (marked with black arrow) and you will see a new screen with a list of all the . Unless you have a compelling reason to do so. you realized something else requires attention.conf files you need to log in to AMP and select the Maintenance Tab. You may scroll down the page to find the file that you wish to edit. which can be edited from AMP. freePBX users are advised against any manual config file tweaks as these are being handled in freePBX by design.conf files.conf) that reside both in the /etc/asterisk directory and /etc directories.7 GET UNDER THE BONNET Note for home users Most of the config files manual tweaks and extra configurations in this guide are meant for AMP users. To start editing the . To do this you need to edit some configuration files (. AMP will present you with the following screen. Just as you think that all is OK. Configuration files in the /etc/asterisk are generally editable through AMP Maintenance Tab.

conf In the general section.8. . sip. zaptel.conf files may require editing to get asterisk to work. we will be looking at iax.conf file and edit the lines to the following: Asterisk@Home Without Tears Page 52 of 164 . extension. *Note: The contents of these . participants in the Whirlpool VOIP Forum. indications.conf files examples were contributed by Anil.h323driver => H323 .8 and above).4 extensions.8 (There should only be the two entries above or three entries in v2. Locate the Inbound Contexts [from] in the extensions.conf and modules. enum. depending on the individual requirements. This issue has been solved in freePBX 2.1 or greater.conf.g.x. or modprobe. search => e164.conf – if you are running AAH 2. After 2. zapata.x (the last 2 files live in the /etc directory and need to be edited if you have a FXO card e. FreePBX 2. but not really necessary if you are just running SIP).3 enum.conf Note:* If you are using AAH 2. 7.1.8 with freePBX 2. 7. 7.conf. The search list for domains may be customized.conf [general] .1 EDITING THE . Domains are searched in the order they are listed here.1 or higher) there's an 'Allow Anonymous Incoming SIP Calls' in general settings. . (The default is country = us.conf (just in case you want IAX. X100P installed). In this guide.conf.1.conf.1 Make a couple of changes in the extensions. therefore replace “us” with “au”) 7.conf.1 iax.CONF FILES A number of . you may ignore these changes on extensions.conf In the general section ensure the following exist: [general] country = au . this line exists in AAH v2. This is only required up to and including 2. .conf – if you are running AAH 1.1.org search => e164.arpa .conf.1.conf. add the following lines if it is not already there: [general] delayreject=yes jitterbuffer=yes mailboxdetail=yes 7. Colin Swan and Mark Brooker. as a base.8 (eg. You can do this through the AMP Config Edit.2 Indications.

you may add the following codes in the extensions_custom. 7. you need to enable 'overlapdial' in /etc/asterisk/zapata.exten => _.1) . insert the following codes: exten => 0.exten => _.conf file. you will not be able to receive external calls.conf as suggested below.3. Inbound Contexts [from] .Goto(from-pstn-timecheck. .You do not need to edit sip. Immediately after the line following the [from-internal-custom] context.1.context = from-sip-external .conf for this to work. If you don’t comment out the three exten lines.give external sip users congestion and hangup .Congestion ..Hangup This will allow you to dial 0 and you will get a second dial tone from PSTN.1.1b2 and above. 7.AbsoluteTimeout(15) . This lets you accept anonymous incoming SIP calls.1.8 or earlier versions.8 with freePBX 2.########################################################## . edit the line in the general section by placing a semi-colon in front of it.s.4 above. [general] .conf If you have a ZAP trunk and you want to get an external line and be presented with a dial tone first before you dial the external line.########################################################## [from-sip-external] include => from-pstn . required if you are with Pennytel Leave the rest of the content of the file unchanged. The example below assumes that your ZAP is on channel 1. this is now in general setting.send unknown sip caller to this context Add the following lines underneath it: context = from-pstn defaultexpirey = 600 .1. Following which you can dial a PSTN number that you wish to call.exten => _.1.Dial(ZAP/1/{EXTEN}) exten => 0. Note*: In AAH 2.6 sip.2.1. This does the same as 7. Note:* If you're using a PRI line. don’t forget to include this line exten => _X. include this only if necessary progressinband = yes useragent = My PABX . it lets you accept anonymous incoming SIP calls. include this only if necessary maxexpirey = 3600 .. Asterisk@Home Without Tears Page 53 of 164 .Hangup This will allow external callers to come in and not get the congested signal.2.conf If you are using AAH 2.5 extensions_custom...

which is 192. There have been a number of discussions on the effectiveness of QOS on broadband utilising the public Internet circuit. It is beyond this guide to document the effectiveness or otherwise of enabling QOS on your router. 7. In the example below. I am using the LinkSys WRT54G wireless router. It is highly recommended that you enable this function if your router supports it. I restrict the PCs according to their MAC addresses. 7. For a start.5082 (UDP and TCP). Asterisk@Home Without Tears Page 54 of 164 .3 QOS – ROUTERS Some routers have QOS facility while some routers haven’t. I use the Linksys™ WRT54G®. more if you want to.1. IAX Port 4569 (UDP) Sip ports 5004 . I have forwarded all the ports mentioned above to my asterisk box IP. Taking the easy way out.101 These should be enough for starters. there are just too many routers there for me to give any meaningful examples. I simply restrict the PCs (see below) that more often than not will be used as a P2P client or chatting on the MSN chat channels.168.2 PORT FORWARDING – ROUTERS While most domestic routers using UPnP do not require port forwarding. Even if your router does not require port forwarding for Asterisk@Home to work. do yourself a favour and forward a few of the relevant ports to your Asterisk IP address anyway – it doesn’t hurt. RTP ports 10000 – 10500 (UDP) – this should be enough. some routers do.

My recommendation is. leeching files and music. please let me know). I have defined the various ports that I want priority to be accorded the highest priority. it will prioritise traffic within your own LAN especially when you have sons and daughters (for that matter you too can be the culprit) who are always on the P2P. (Note: This may not be the best solution. use it. If anyone has a better solution for the Linksys WRT54G. At the very least. if your router has the function. In this case I have defined the port ranges related to my VOIP requirement. Asterisk@Home Without Tears Page 55 of 164 . In the application priority section (see below).

If all four services are not green then you have a “Your Asterisk is not running” problem ☺ and the cause could be anything from drivers. If all processes are running then your battle is half won. all the processes should be running and highlighted in green.1 SYSTEM STATUS First you must ensure that asterisk is well and running or you may not be able to make or receive any call. The following are some basic steps for you to do – at least to ensure that your Asterisk@Home installation is running correctly and is registered to the appropriate VSP before you start doing anything more adventurous. you should try to disable the related .8 CHECK YOUR SYSTEM After doing all of the above. Start with the Maintenance tab: When your maintenance screen is presented to you. A probable cause can be wrong configuration of your zaptel drivers. maybe its time to start the installation again. and yet it is not working. you will no doubt feel frustrated if your VOIP does not work or unable to dial out or receive a call. select and click Asterisk Info to verify your status. device or hardware problems. 8. This may be a good time to ensure that the minimum requirements have been met. If the minimum and the right type of hardware requirements have been met. If you don’t have a zaptel devise.conf files. Next. If any of them aren’t running. Asterisk@Home Without Tears Page 56 of 164 . chances are something is wrong and your Asterisk will not be working correctly or not working at all.

In the majority of cases. See illustration below. However there are always times when you think that the weather is going to be fine and yet you are pelted by a thunderstorm. as different people has different requirements and different VSP have different dialling rules. your Asterisk@Home installation is working (although not necessarily that you can make or receive calls). the most common causes are Trunk Registrations. 8. Routings and Dialling rules errors.if you are registered. the chances of your installation working are pretty good. Asterisk@Home Without Tears Page 57 of 164 . You will only be able to make and receive external calls – hopefully . if you have done everything as described in the preceding chapters. the choice of Codecs. If all trunks are registered. you can be almost certain that at the very least.2 ASTERISK INFO When presented with the info page. If you are not able to make or receive calls. Routings and Dialling rules are something that needs to be thought out logically with no simple way of determining. scroll down to the SIP (or IAX if you are using IAX) section and ensure that you are registered to your trunks.

It is located at the end of the file. 9.Include AMP Configs channel => 1 #include zapata_additional. zapata. Asterisk@Home Without Tears Page 58 of 164 .conf for AAH 1. Set a dial rule you want for this trunk 4. To make outbound calls you will need to set an outbound route as well.conf and modules.x or modprobe.1 DIGIUM WILDCARD X100P FXO PCI CARD This card allows you to connect a POTS (plain Old Telephone System) line to your Asterisk@Home box (See Notes for Patch information).conf Under [channels] edit the following lines: [channels] busydetect=yes busycount=6 For my installation to function correctly. you will need to edit the following files. I have also changed the following setting to obtain a good compromise on volume/echoing: rxgain=10. You need to edit this.x. Select an outbound dial prefix to select this trunk when dialing 5.conf.1 zapata. Enter 1 for Maximum channels 3.conf Leave the rest of the file as it is.conf for AAH 2.0 (you may have to experiment a little with this setting) txgain=8. .conf.9 INTERFACING ASTERISK TO PSTN 9.0 (you may have to experiment a little with this setting) Ensure the following exist in zapata. To do that. If you have this card installed. If this card is added after Asterisk has been configured. Enter the phone number for you pots line in the Caller ID field 2. it may be necessary to configure it by using the zaptel card auto-config utility so the correct zaptel driver will be set up. enter the following from the command line.1. 1. rebuild_zaptel (restart after each command) genzaptelconf (see notes re command switch) Next go into the AMP web interface to create a trunk and you will notice that there is already a trunk called ZAP/g0. you must add a route for Incoming Calls or asterisk will not answer this line Click on Incoming Calls in AMP and set up an incoming route. The last 2 files live in the /etc directory – use a text editor (I use nano) to edit them as you cannot edit them through Config Edit. zaptel. Set the Zap Identifier to 1 (the default is g0) Once the card is configured.

conf Change the loadzone and defaultzone to “au” # Global data loadzone = au defaultzone = au 9. When you open the zapata_auto.Note: this is a trunk.x) For AAH 1.conf Next. Set up the trunks as trunks and the extensions as extensions in AMP.conf .conf file. this card allows you to connect a POTS (plain Old Telephone System) line to your Asterisk@Home box. you will need to configure it just like the X100P by using the following command on the command line: genzaptelconf 9.conf file and you will see a list of all your channels in your TDM400P.2. 9.1 zapata-auto. add this line install tor2 /sbin/modprobe --ignore-install tor2 && /sbin/ztcfg . Create a ZAP extension in AMP for Channel 1 channel => 1 < .-this would have been defined already by the config signaling=fxs_ks . Note: this is an extension. using config edit.conf for AAH 2. locate the post-install wcfxo entry and edit it to reflect this: post-install wcfxo /sbin/ztcfg opermode=AUSTRALIA For AAH 2. Unlike the X100P. 9. If this card is installed after Asterisk has been loaded.x.3 modules. Span 1: WCTDM/0 “Wildcard TDM400P REV E/F Board 1” signaling=fxo_ks .-this would have been defined already by the config Asterisk@Home Without Tears Page 59 of 164 . add the line highlighted in Bold Red below: .1. look in the zapata-auto. it will look something like the illustration below (see the red highlight) zapata-auto. this card has 4 module ports that can be loaded with FXS or FXO modules. alias char-major-196 torisa options wcfxo opermode=AUSTRALIA .conf (modprobe.1.2 DIGIUM TDM400P FXO/FXS CARD Like the Digium Wildcard X100P. Create a ZAP trunk in AMP for Channel 2 context=from-pstn channel => 2 < . Channel 1 is the top RJ-45 on the back of the TDM400P card.2 zaptel.x.

conf. or modprobe. Similarly. you may also do the following: Locate the line “install wctdm /sbin/ztcfg-. If you have this card installed.x) should look like the example below: alias eth0 e100 alias sound-slot-0 es1370 post-install sound-slot-0 /bin/aumix-minimal -f /etc/.conf (AAH 1. 9.x) You will need to edit the modules. by selecting opermode=AUSTRALIA the zaptel drivers automatically add the "boostringer=1 .x.conf (modprobe.--ignore-install wctdm && /sbin/ztcfg” and edit it to reflect the following: install wctdm opermode=AUSTRALIA fxshonormode=1 boostringer=1 /sbin/ztcfg-.aumixrc -L >/dev/null 2>&1 || : pre-remove sound-slot-0 /bin/aumix-minimal -f /etc/. Do not change anything else. in AAH Ver. fxshonormode=1" Also see Appendix E. use AMP to add a route for incoming calls or asterisk will not answer your trunk.conf and zaptel. .2. Once this is done.aumixrc -S >/dev/null 2>&1 || : alias usb-controller usb-uhci alias char-major-196 torisa options wctdm opermode=AUSTRALIA fxshonormode=1 boostringer=1 options torisa base=0xd0000 post-install tor2 /sbin/ztcfg post-install torisa /sbin/ztcfg post-install wcusb /sbin/ztcfg post-install wcfxo /sbin/ztcfg post-install wctdm /sbin/ztcfg post-install ztdynamic /sbin/ztcfg .conf as per the X100P card in the previous section. where you need to add the following line. zapata.conf for AAH 2.3 (Users Suggestions) Asterisk@Home Without Tears Page 60 of 164 . options wctdm opermode=AUSTRALIA fxshonormode=1 bootstringer=1 Your modules.1. Set them up as per setting up routes in the earlier chapters of this document. reboot your PC and when Asterisk starts. you will need to edit the following files. The example below is for AAH 1.2.2 modules.4. You will only need to add the line in red.2.conf to add the necessary option for usage in Australia.-- ignore-install wctdm && /sbin/ztcfg Note: as of Zaptel Drivers 1. Or. If in the illustration it shows channel 1 is your Zap extension then add a zap extension for channel 1 in AMP and if it shows your Zap trunk is channel 2 you should create a zap trunk for channel 2 in AMP. to make outbound calls you will need an outbound route.

reboot using the following command: shutdown -r now When the reboot completes. 9.and you're done.com/index. (See also user Users’ Suggestions) Asterisk@Home Without Tears Page 61 of 164 . Unfortunately.old wget http://nerdvittles. you can start rebuilding the support for your ZAP devices or for that matter.EL-i686/ include/linux mv spinlock. this will cause a slight problem as RedHat bug caused the rebuilding process to fail.com/aah27/spinlock.php?p=123 ) Log into your new server as root and issue the following commands: cd /usr/src/kernels/2. The following is the fix (source Nerd Vittles http://nerdvittles.h spinlock. ztdummy if you don’t have any ZAP devices.h. Log in as root and type the following command: rebuild_zaptel Then reboot your system: shutdown -r now Now log in as root again and enter the following command: amportal stop genzaptelconf Reboot once again: shutdown -r now .9-34. ZAP device support needs to be rebuilt using the new kernel.3 REBUILDING ZAPTEL DRIVER Every time there is a kernel update with yum (which is the case with Asterisk and CentOS)..6.h Once the file has been retrieved.

4/2.4.168.g.2 Change the settings System tab DHCP: No Static IP: something on your local subnet e.g.35 Secondary DNS: your ISP's secondary DNS address e.g.e.254 Primary DNS: your ISP's primary DNS address e.4.4/...4/.. Take another snapshot for good measure.g.168. it's 3.4/2.2. 9.4) Hook Flash Timer Min: .html page) of your current SPA-3000 configuration.4/...4/2. While it is directed mainly at standalone ATA users.4/.12.2..4/2.2/4.2/1+2+3. If you're not already running the latest SPA-3000 firmware..1.168.2..2/...1..425@-19.2.2. 203.2.425@-19.4/2. 192. I'd suggest taking a snapshot (i.4/2.07 Hook Flash Timer Max: .2.0 Gateway: your router's IP address e. 9. except that you have a few extra options that you didn't have before.4/. as no one single source of information that I've found so far has a config that would actually work for me.4/.200 NetMask: 255. 192. FXS Port Impedance: 220+820||120nF Line 1 tab Proxy: IP address of your Asterisk box e.4/1) Reorder Tone: 425@-10.2..4/. 9.450@-19. there is a simplified installation and configuration instruction by JMG Technology...160. it gives a good insight of the Sipura SPA3000’s capabilities. I have come across a few people in the various forums wanting to use their Sipura SPA-3000s as FXO front-end to their Asterisk@Home boxes.10(. just in case you ever need to refer back to your own customisations.5/3. 203.2/..4/2) CWT8 Cadence: 30(. just save the . because I'm only going to list the minimum changes required to keep things simple.2/1+2+3.4/2.4.4 SIPURA SPA3000 AS A PSTN INTERFACE To those new to the SPA3000.1 Log in to SPA3000 Login to your SPA-3000 as admin/advanced.160.5/3.2/1) Ring Back Tone: 400@-19. 192..g.4/.10(*/0/1+2) Busy Tone: 425@-10. To help them in their endeavours...5a).4/.1.234 Asterisk@Home Without Tears Page 62 of 164 .. in case you ever want to know what the defaults were.10(.4/2.4/.1.255.2.4/.4/2 .12.. I've put the following together.4/.. Take another snapshot now too.255.. Nothing should have changed in your settings... Before you change anything.. then upgrade it to the latest version (at the time of writing.0/2/0) Ring 1 Cadence: 60(1..4/.36 Regional tab Dial Tone: 400@-19. Now reset SPA-3000 back to factory defaults.13 Delete all the Vertical Service Activation Codes.2.*(.4) Ring 3 Cadence: 60(1..2.

etc..425@-30.234 Register: no Make Call Without Reg: yes Ans Call Without Reg: yes Display Name: No name User ID: PSTN Password: password Asterisk@Home Without Tears Page 63 of 164 .1... which I am currently using.) for example (*xx.1 Disconnect Tone: 425@-30.|0[23478]xxxxxxxx|09xxxxxx|1100 |122[135]|1222xxxxxxx|12510[12]|12554|1[38]00xxxxxx|13[1-9]xxx |1747xxxxxxx|2xx|393xxxxxx|3xxxx.g. 200 Password: password for that extension Silence Threshold: medium DTMF Tx Method: INFO Hook Flash Tx Method: INFO Dial Plan: (*xx|000|0011xxxxxxxxxxx.168. PSTN Line tab (method 2) Proxy: IP address of your Asterisk box e.234 Register: no Make Call Without Reg: yes Ans Call Without Reg: yes Display Name: No name User ID: PSTN Password: password Silence Supp Enable: no Echo Canc Enable: no Echo Canc Adapt Enable: no Echo Supp Enable: no FAX CED Detect Enable: yes FAX CNG Detect Enable: yes FAX Passthru Codec: G711u FAX Codec Symmetric: no FAX Passthru Method: None DTMF Tx Method: INFO FAX Process NSE: no Dial Plan 1: (S0<:T0298765432>) for example VoIP Caller Default DP: none PSTN Ring Thru Line 1: no PSTN CID For VoIP CID: yes PSTN Answer Delay: 2 PSTN Ring Thru Delay: 3 PSTN Ring Timeout: 4 PSTN Hook Flash Len: . 192.|x. Register Expires: 60 Display Name: Whatever User ID: Asterisk extension number e.375/.375/1+2) FXO Port Impedance: 220+820||120nF On-Hook Speed: 26ms (Australia) (Source reference: Colin Swan) Or alternatively you may want to adopt the second method for the PSTN Line Tab.g.168.1.g.) will work. but I like to do a bit of sanity checking. |[4689]xxxxxxx|7777|899060xxxxx. PSTN Line tab (method 1) Proxy: IP address of your Asterisk box e. 192.1(.

Outbound Caller ID: <0298765432> (for example) Maximum Channels: 1 Dial Rules: 0+NXXXXXXXX (for example) 0011+ZXXXXXXXXXX.4.1 Disconnect Tone: 425@-30. add a SIP trunk.1(. Silence Supp Enable: no Echo Canc Enable: no Echo Canc Adapt Enable: no Echo Supp Enable: no FAX CED Detect Enable: yes FAX CNG Detect Enable: yes FAX Passthru Codec: G711u FAX Codec Symmetric: no FAX Passthru Method: None DTMF Tx Method: INFO FAX Process NSE: no Dial Plan 1: (S0<:s@YourAsteriskIP>) e.g.0.200) insecure=very nat=no port=5061 (for example) qualify=yes secret=password type=peer username=PSTN Asterisk@Home Without Tears Page 64 of 164 .425@-30.168. (S0<:s@192. 192. You may also get CLID if your Telco has activated incoming Caller ID on your phone.3 Add SIP Trunk Then in AMP. Trunk Name: telstra (for example) Peer Details: canreinvite=no context=from-pstn host=the IP address of your SPA-3000 (for example.101:5060>)or try w/o the port designation VoIP Caller Default DP: none PSTN Ring Thru Line 1: no PSTN CID For VoIP CID: yes PSTN Answer Delay: 2 PSTN Ring Thru Delay: 3 PSTN Ring Timeout: 4 PSTN Hook Flash Len: . you will not need to create an Inbound Route for this channel as the call is sent directly to your “s” extension as defined in your incoming call setting.168.375/1+2) FXO Port Impedance: 220+820||120nF On-Hook Speed: 26ms (Australia) Using this alternative method. User 1 tab Default Ring: 3 Default CWT: 8 9.375/.1.

192.4 SPA3000 as an outbound PSTN Trunk To make PSTN calls using the SPA3000 you simply select the SPA3000 trunk which you have named Telstra (see trunk name that you have given to this trunk above) as the first choice in your outbound route.4.200) insecure=very nat=no port=5061 for example secret=password type=user username=PSTN Leave "Register String" empty Then add a DID/Inbound Route of T0298765432 (for example. Also see Eliminating echo problems in Appendix E.4 in Sipura SPA-3000 Asterisk@Home Without Tears Page 65 of 164 . User Context: telstra-incoming (for example) User Details: canreinvite=no context=from-pstn host=the IP address of your SPA-3000 (for example. you do not need to create an inbound Route. 9.1.168. which goes to your chosen Destination. If you use PSTN Line Tab method 2. if you use PSTN Line Tab method 1).

10 PSTN TO VOIP GATEWAY Note: If you are using AAH version 2.2.DigitTimeout(5) exten => s.s.3. and 3 for Nosurya. This option can be directed to a Ring Group or to a human receptionist if you are using Asterisk in a business environment. it requires a password. prior to AAH 2.conf.5. Option 5. a dial tone will be heard. Asterisk@Home Without Tears Page 66 of 164 . you can start dialling the number you wish to call. besides. Asterisk@Home can be turned into a PSTN to VOIP Gateway. In the previous section I have 5 options in Digital receptionist e. we don’t make private overseas calls from the office phone.. Press 1 for Ben. Now that the SPA-3000 has been set-up to accept PSTN. [custom-pstn2voip] .4. I have to edit the extensions_custom.g.Authenticate(my password) exten => s. (which I have changes to the letter ‘t’. At this stage.s. I use this to call VOIP from PSTN exten => s. the one defined in the example above.8 with freePBX.Answer exten => s.1 When 4 is pressed. by adding the following entries at the end of the file. For option 4. I chose the radio button next to Custom App. You will not need a SPA-3000 if you have an FXO card installed. I can then use asterisk to call overseas. the following instruction may not apply as you can create DISA from FreePBX option without having to resort to the manual configuration below – see DISA.8 with FreePBX. during the announcement. for timeout) is invoked if the caller does not select any option or if the DTMF tone is not recognised. I accomplished this through DISA. 2 for Rohani.ResponseTimeout(10) exten => s. Needless to say. To do this.DISA(no-password|from-internal) I have Digital Receptionist answers all incoming calls (refer to Digital Receptionist in the previous section). On entering the correct password. I overcame this by calling my Asterisk box from the office and when it answered. followed by the # key. I need such a gateway because I often have to call overseas from my office. I did not announce the 4th option as I use it for DISA and is only known to me. In the custom app field I entered custom-pstn2voip.1 Custom App custom-pstn2voip. the digital receptionist will ask for a password.1.

3. [custom-pstn2voip] < -.conf. 3 for Norsurya etc…” I have created an extra option – option 4 (best if you use a few digits) that has an "Action" of "Custom App".ResponseTimeout(10) exten => s. “Hi. The example below is how I have implemented my DISA. Normally you can do this via the Digital Receptionist and enter the unannounced option number known only to selected callers. The caller enters his/her password. DISA (Direct Inward System Access) allows you to dial in from outside to the Asterisk switch (PBX) to obtain an "internal" system dial tone. I am sure there are other better ways of doing this but this seems to work for me.11 DISA 11. the user is then given system dial tone on which an external call may be placed. Press 1 for Ben. You can place calls from it as if they were placed from within.1. 2 for Rohani.DISA(no-password|from-internal) Change "12345678" to whatever digits you want your "DISA password" to be. and GREAT care must be taken NOT to compromise your security.1".1 DISA PRIOR TO AAH VERSION 2.4. which reads.Authenticate(12345678) exten => s. followed by the pound sign (#).DigitTimeout(5) exten => s. I have added (do this towards the end of the file).2. If the password is correct. (Source reference: Colin Swan) Asterisk@Home Without Tears Page 67 of 164 .5. "custom-pstn2voip. In my "MyMenu" menu that says.you can name it to whatever you like exten => s. you have reached the Sharif’s household.8 USING AMP I use this function in my PSTN to VOIP gateway above. This type of access has SERIOUS security implications.s.Answer exten => s. Then in extensions_custom.

This pin number will be asked when you want to use this service) • Response Timeout: 10 (time needed for a response from the you in seconds) The rest you can leave at the default value. 11. From this setting.8 USING FREEPBX Those using AAH version 2. Asterisk@Home Without Tears Page 68 of 164 . I have populated the various fields thus: • DISA name: PSTNtoVoIP (This is the name I gave to this application) • PIN: 1234 (or whatever you think is appropriate. freePBX will configure DISA without you having to create the manual change to the extensions_custom. When you set up your digital receptionist.8 utilising FreePBX as the User Interface will be able to configure DISA from FreePBX without having to do the above manual configuration as illustrated in the screenshot below.conf file. simply select PSTNtoVOIP as your DISA application. in the DISA dropdown selection.2 DISA – AAH VERSION 2.

101 Port: 5060 Check the Auto Login and Keep Password. Domain/Realm: <leave it blank> Proxy: Your Asterisk network address e. Audio & Video Tab Next Click on the Audio & Video Tab to ensure that audio properties set is consistent with the Audio card installed in your PC/Notebook. These are the only information required: Account: <enter the extension number e. Then click OK. Asterisk@Home Without Tears Page 69 of 164 . I use the same password when I set up the extension in Asterisk).g.1. 201> Password: 201 (I use the same number as password for simplicity.g.bol2000.12 SETTING UP A SOFT PHONE I have found the BOL SIPPhone extremely simple to set up for use with Asterisk and it also has a call forward facility that I use from time to time.com/download/sipphone/ After downloading and set up you will see the following when it is run: To configure the softphone. http://www. click on the hammer icon and you will see the following. You may obtain a copy of the BOL 2000 sipphone from the link below. Profile Tab This is the only screen that is required to be filled in.168. 192.

I checked it anyway. click on the STUN tab and enter the STUN server you want to use. If you need to use it. • Check Auto Send Video (if you are using Video). I do not use STUN and therefore I left that section blank and Enable STUN check box un-ticked. You may ignore the Information of Network field. Click OK STUN Tab You may or may not need to use a STUN server. I checked it anyway. The illustration above depicts the sound device installed in my Notebook. Asterisk@Home Without Tears Page 70 of 164 . • Click on the Tuning Wizard to tune your audio input and output. a list of publicly available STUN server is listed in the section referring to STUN Servers later in this document. In my case. If you do. • Check Auto Receive Video (if you are using Video). Click OK Network Tab Ensure that your Internet Connection Type is set to LAN. Click OK to close.

However this facility is only available if your PC is on and the softphone is active. Asterisk@Home Without Tears Page 71 of 164 . Call Forward This is pretty simple to set-up. you may test your softphone connection to Asterisk. Asterisk will simulate an incoming call. To forward an unanswered call to this extension. On Busy or On No Answer. You might want to set-up a couple of PCs with the softphone after which you may start testing your brand new Phone System by dialling each extension in turn. If you use one of the softphone and dial 7777. Click OK when done. all you need to do is click on the Call Forward tab and enter the telephone number you want to forward your incoming calls to. You have 3 options of call forwarding – Always. Once done.

The following information are displayed on FOP: • Which extensions are busy. etc). context. ringing or available • Who is talking and to whom (CLID.asternic. It runs on a web browser with the flash plug in. It can integrate with CRM software. It also supports contexts: you can have one server running and many different client displays (for hosted PBX. You can have more than 100 buttons active per screen. It is able to display information about your PBX activity in real time. different departments.org/ Asterisk@Home Without Tears Page 72 of 164 . priority) • SIP and IAX registration status and reachability • Meetme room status (number of participants) • Queue status (number of users waiting) • Message Waiting Indicator and count • Parked channels • Logged in Agents Functions you can perform on FOP: • Hang-up a channel • Using drag-&-drop to transfer a call • Initiate calls by drag-&-drop • Barge in on a call using drag-&-drop • Set the caller id when transferring or originating a call • Automatically pop up web page with customer details • Click-to-Dial from a web page • Mute/Unmute meet-me participants For more details refer to: http://www.13 FLASH OPERATOR PANEL (FOP) Flash Operator Panel is a switchboard type application for the Asterisk PBX. etc). icons. The layout is configurable (button sizes and colours. by popping up a web page (and passing the CLID) when a specified button is ringing.

4 Transfer a Call Simply drag the little telephone over to the new extension and it will transfer the call. change the directory to /var/www/html/panel cd /var/www/html/panel Using nano as the editor. 13.1 SETTING UP 13. open the configuration file op_server. 13. 13. Open your web browser and go to FOP. Asterisk@Home Without Tears Page 73 of 164 .cfg Go to the line that says security code=passw0rd (in FOP that comes with Asterisk@Home 1.1. put in your password and you will see it lock up. 13. Putty is used to log in remotely to the Asterisk@Home box. security_code=cowscomehome Close off nano and putty. The simple method is by logging in to your asterisk box either remotely using putty or directly on your box console.6 Barge in or Create a Conference Say there is a call already going and you want to jump in. like me.1.2 Setting the Admin Password It is desirable to change the FOP password to something easy and simple to remember such as the number 2 for example.x.5 Initiate a Call If you are lazy.7 Alternative Flash Operator Panel.x and 2. you can drag and drop your little telephone to another extension it will start by ringing your phone. Well all you have to do is grab your little phone in the flash panel and drop it into the conversation and it will connect you.3 Hang-up a Call You can end a call by clicking the big red button.1. Now you can begin to have some fun. the default password is “passw0rd”) Replace the “passw0rd” with the password of your choice.1.1.1. There are a number of alternative to the existing FOP that can be installed if you wish to.cfg nano op_server. not bothered to pick up the phone and dial. 13. Once the destination phone is picked up it will initiate the call. Great if you want to see if your employees are making lots of private calls. In this example. You should now be able to click on the little lock. when you pick up and then it will ring the other extension. 13. Once logged in. One that comes to kmind can be found at SOFTPEDIA.

Simply change the appropriate extension number in the feature. Sample Parking configuration . add it to extensions.g. After the announcement. Dial #70 . Which context parked calls are in #parkingtime => 60 .conf . In later versions of Asterisk@Home.conf and it contains the following lines: features. 73 and so on. the extension to park a call to is ext. Asterisk@Home Without Tears Page 74 of 164 . 72 and the next ext. 14.conf file. 14. 2. if you have 3 calls that you need to park. In this case it will be 71.1 How is it done? When you answer a call and want to transfer that call. Number of seconds a call can be .conf under [from-internal] context.MANAGED The definition of this facility is found in features. the caller will be listening to the music on hold. you may hang up and dial the extension of the person you wish to transfer the call to and inform him to dial 71 to accept the call.1 CALL TRANSFER . 71. While all this is happening.3.the call will be transferred to a park extension and the number will be announced to you. the next call will be automatically allocated ext. Each call parked will be parked at that extension +1 e.conf. This is handy if you want to manage the calls to be transfer.conf [from-internal] include => parkedcalls If that entry does not exist. After parking the call. parked for (default is 45 seconds) The companion entry is found in extensions. to dial to park parkpos => 71-79 . What extensions to park calls on context => parkedcalls . the first call parked will be parked at ext.70.14 CALL PARKING AND TRANSFER Asterisk@Home provides this facility. extensions. The person can then dial 71 and get the parked call. In the above example. this facility is pre-configured for extension 700 however the fundamental method is the same. you may call the person you are transferring it to and tell him/her that there is a call on extension 71.conf Ensure the following entry exist in the extensions. do the following: 1. [general] parkext => 70 . In fact this facility is already available and pre-configured in Asterisk@Home 1. What ext.1.

Group call pickup is typically invoked by dialing *8# or *8 from another phone in the call pickup group. You are wondering if it is your phone that is ringing.2 CALL TRANSFER – BLIND To do a blind call transfer (where you simply transfer the call and bad luck if the extension does not answer). you simply dial #2001 and hang up. 14. 14. There are two type of call pickups:- • Group call pickup This allows you to pickup a call from any ringing phone that is in the same pickup group as you. you hang up. your husband is busy with his secretary and his office door is locked from the inside” ☺ and the next time Mr.g. to transfer to extension 2001.org/wiki/view/Asterisk+config+features. you would have no control over which call will be transferred to you. This is simply a work around for those that do not have the hold function on the telephone. In this case you simply dial the pickup number and your extension number.conf Asterisk@Home Without Tears Page 75 of 164 . the caller will be listening to your MOH music (see MOH in Notes). E. you are sitting at your desk and the phone in the next office is ringing but there is no one there to answer the phone.4 CALL PICKUP Call Pickup is the ability to pick up a call on a phone that is ringing from other than the ringing phone. If the ringing phone is your phone. When you are ready to take the call. You then use the phone on your desk to pick up the call. you simply dial # followed by the extension that the call is meant for. Smith will always accept the calls. such as when you are in another office and a phone rings in the general direction of your office. While the call is being parked. dial 71 (or whatever the park extension is) and the call will be picked up again. Smith. if there were more than one phone ringing. However. 14.g. see http://www. • Directed pickup This allows you to pickup a call that was made to a specific extension. E. you dial #70 and after the parked extension announcement. you then hang up and dial 71 to pick up the call back to you and speak to the caller making the usual excuses “I am afraid Mrs.3 PUT A CALL ON HOLD Just like the managed call transfer above. You can also change *8 to something else if you wish. If for any reason the person refused to take the call. the call will be transferred to you. 3.voip-info.

1) (Note: DO NOT create extension 111 in AMP.1) exten => s.net. .2.5.Wait(2) exten => s.org/blog/index.Hangup [parkedcalls] exten => 70. I create this extension for silent Auto attendant 30-10-2005 exten => 111. After receiving the call and if you wish to take the call. Asterisk@Home Without Tears Page 76 of 164 .6.ParkAndAnnounce(asterisk-friend:/tmp/asterisk- stranger:vm-isonphone:at-following- number:PARKED|40|local/2001@from-internal|who-r-u.2.70.4.Hangup (*The codes in red must be in one continuous line) I forward all calls that were parked to my existing extension 2001 (in bold type) and direct voicemail for unanswered calls to the same extension as well. exten => 111.Background(privacy-unident) exten => s. I just take the low road make it really simple. just hang up and the caller will just have to leave a message in the voicemail.Goto(parkedcalls.5 FILTER YOUR INCOMING CALLS .2.whirlpool.VoiceMail(2001@default) exten => s. Real nifty ☺ This is how I did it with my Asterisk. I added the following 2 blocks of extra codes. I add the following scripts in my extensions_custom. this is only a dummy extension) At the end of the extensions_custom.9.s.au/forum-replies. Otherwise.1.7.ONLY ACCEPT KNOWN CALLS (Good for filtering Telemarketers and ex-girlfriends) There is a good article on this site http://mundy.Goto(who-r-u.Answer exten => 70. 14.php?p=66 relating to filtering incoming calls and also some discussions here http://forums.g.conf. Since I am pretty simple myself.4. hang up and dial 71 and you will be connected to the caller.conf [from-internal-custom] .1. experimental as per above 30-10-2005 [who-r-u] exten => s.3.1.Playback(Goodbye) exten => s.3. you will be informed that there is a call waiting for you in a parked extension e.8..Background(pls-hold-while-try) exten => s.7) exten => 70.Record(/tmp/asterisk-stranger:gsm|5|15) exten => s. The extension that you nominate will ring and on answering.s.Background(vm-rec-name) exten => s.Answer .SetMusicOnHold(default) exten => 70.cfm?t=418909 This feature will force callers to record their names before the calls will be parked. 71.

Next I create a new extension using AMP e.g. 222. Using a softphone, I connect
to extension 222 and unconditionally forward all calls to extension 222 to
extension 111 by dialling *72111

I then direct all my incoming calls from my PSTN trunk to extension 222.

The result is, when there is an oncoming call from PSTN, the call will be sent to
extension 222 and in turn, the call will be forwarded to extension 111.

When the call gets to extension 111, the caller will hear a message saying that,
unrecognised calls are not accepted and asking the caller to record his/her name after the
tone (or something to that effect). After the caller has complied and press the #
key, the call will be parked.

Extension 2001 will be called by Asterisk. When you answer the call, Asterisk will
announce that there is a call by <name as recorded> on extension 71 (or 72
depending on how many calls are being parked). If you recognize the name
recorded, or if you want to take the call, simply hang up and dial 71. You will be
connected to the caller. While this is all happening, the caller will be put on hold
listening to your MOH.

If however you do not wish to accept the call, you simply hang up and do not dial
71. The caller will be asked to leave a message instead.

This will really screw up the telemarketers ☺ - got my revenge.

Asterisk@Home Without Tears Page 77 of 164

15 MEETME – TELECONFERENCE
The examples below refer to AAH versions prior to version 2.8. From version 2.8
onwards where FreePBX is being used instead of AMP, Meetme Tele-conference
can be configured through FreePBX.

Meetme is pretty easy to set up as there is very little to do. However, to set up
Meetme, a Zaptel card will be required.(at least in my case as I don’t seem to be
able to get it working without a Zaptel card installed). There may be a
workaround for it and I hope someone will be able to tell me what it is so it can be
included in this guide (see Appendix E - user suggestions for work around).

The Meetme function of Asterisk is similar to a Tele-conference call where
multiple callers can call in and participate in a two-way conference like in a party
room where everyone can talk and listen to one another or just to listen to a Tele-
presentation.

In Asterisk@Home, there are 3 .conf files that require attention. They are:

meetme.conf
meetme_additional.conf
extensions.conf

15.1 meetme.conf
Ensure that you have the following 2 lines (the only 2 lines in the file):

[rooms]
#include meetme_additional.conf

All these lines do is point to the meetme_additional.conf where the conference
room extensions are being declared.

15.2 meetme_additional.conf
This is where you declare the extensions for the meeting rooms. One line per
room. You may have just one extension for your meeting room or you may have
several meeting rooms. In my case, I have 2 meeting rooms and therefore my
meetme_additional.conf contains the following 2 extensions:

; Extensions for my meeting rooms
conf => 8200
conf => 8201

15.3 extensions.conf
In extensions.cont, enter the following lines if they are not already there. In
some implementations of Aserisk@Home, all these .conf files are already
populated appropriately. You merely need to edit them to suit your requirements.

[ext-meetme]
exten => _8XXX,1,Answer
exten => _8XXX,2,Wait(1)
exten => _8XXX,3,GotoIf($[${CALLERIDNUM} = ${EXTEN:1}]?5:4)
exten => _8XXX,4,MeetMe(${EXTEN}|sM)
exten => _8XXX,5,MeetMe(${EXTEN}|asM)

Once these are done, restart Asterisk@Home.

Asterisk@Home Without Tears Page 78 of 164

Once Asterisk is restarted, from one of your phones dial, 8200 (or 8201). You will
be told that you are the only one in the conference and hear background music.

Next, go to another phone and also dial 8200. You should hear a tone (if you are
listening on the first phone), signifying that someone has joined the conference.

The background music will now stop playing and both the phones should now be
in a conference. If there are 2 (or more) of you, you will be able to talk to each
other. If one of you hangs up, a beep will be heard signifying that someone has
left the conference. If you are the only one left, the background music will start
playing again.

Asterisk@Home Without Tears Page 79 of 164

yourprovider') Replace ‘smtp.cf file.g.yourprovider') and edit it as per the example below define(`SMART_HOST'. this is not mentioned anywhere and has caused me major grief. Next you will need to do a little editing. you can do it on the Asterisk box itself or connect through SSH (I use putty to connect). However in the later versions (the current version I am running as at writing this. v2. and you hear a stutter tone (not the normal dial tone) when you initially pick up your phone. restart sendmail thus. you may enter your email address in the email address field.com. is v2. v2.`smtp. hit enter. I use nano to edit. you will be able to send VM email notification without having to install sendmail. thus: nano /etc/mail/sendmail. Asterisk@Home Without Tears Page 80 of 164 . Next. ‘smtp.ozemail. Select “y” for yes when prompted and sendmail will be installed.`smtp. it means you have a voice mail waiting. If you require email notification of your voicemail. and type in Y.au’ Then press CTRL-X. sendmail need to be installed for this function to work (thanks Thunderbird1 for pointing this out to me). by logging in as root. and hit enter.mc Locate the following line: dnl define(`SMART_HOST'.7). 16.yourprovider’ with your real smtp provider e.1. To install sendmail with yam.1 INSTALLING SENDMAIL I have noticed that in the earlier versions of AAH e. Do these commands at the command prompt: yum install sendmail-cf This installs the necessary files for configuration of the sendmail client. At the command prompt.2 etc.16 VOICEMAIL EMAIL NOTIFICATION If you have enabled voice mail when setting up your extension. do the following: make -C /etc/mail Once done. You'll be asked for the file name you want "File Name To Write: /etc/mail/sendmail. Sadly. To enable voicemail on an extension simply "enable" it when you create the extensions from the AMP GUI.g.mc". you will need to rebuild your /etc/mail/sendmail.

com.0.myasterisk.g.0.d/sendmail restart You should now be able to have your voice mails sent to you via email.myasterisk.1 pbx.local Your mail server will not accept this as a valid DNS. Using Nano.php?msg_id=3432175 16. or various programs # that require network functionality will fail.x and 2.0.local asterisk1 localhost In AAH 2.2 /ETC/HOSTS There is a couple of things that you will need to do otherwise your email. you should obtain one through DynDNS.com asterisk1. pbx.1 # Do not remove the following line.0. 127.x and 2.com asterisk1. By default. Therefore you will need to use your valid Domain Name e.0.local You may use an editor (such as nano) to edit /etc/hosts file through CLI.0.1 asterisk1. although sent to the email address. To overcome this I substitute my DNS hostname with another valid DNS name such as yahoo.net/forum/message. Asterisk@Home Without Tears Page 81 of 164 . /etc/init.php?msg_id=3387743 and http://sourceforge.0.1 as defined in the hosts file and not your actual external IP address.0.0 # Do not remove the following line. your host will look like this: In AAH 1.1 asterisk1. Refer to Notes for a kludge fix if you are experiencing difficulties. or various programs # that require network functionality will fail. its best not to make this change as describe above. or various programs # that require network functionality will fail.0.1 localhost 127.1 # Do not remove the following line.1 localhost 127. If you are using SipBroker or Pennytel. If you are like me.myasterisk.com (as I have an account with Yahoo – not sure about the legality side of this though). 127.local asterisk1 localhost In AAH 2.0. 127. The above instruction is also mentioned in this link: http://sourceforge.1 pbx. as SipBroker and Pennytel will resolve your DNS name as the local host address of 127. you will need to edit your /etc/hosts file from command line to this: In AAH 1.0 # Do not remove the following line.net/forum/message.0. without a valid Domain Name. your email host may not accept the email if you do not have a valid DNS.0.0. 127.0. or various programs # that require network functionality will fail.

variables: VM_NAME.\nVisit http://pbx. Visit http://pbx. Asterisk@Home Without Tears Page 82 of 164 . VM_DATE emailbody=${VM_NAME}. I have found that this is best done through a text editor (e. message playback review=yes . July 29. VM_MSGNUM. You may start testing it and your email received will look something like this: From: The Stud To: Ben Sharif Subject: New Message 1 in mailbox 201 Ben Sharif.g.com:8080/cgi- bin/vmail. Don't put [PBX]: in the subject line serveremail=vm@asterisk . Nano) as AMP tends loose the formatting character.inc file and to include the actual IP address of your asterisk PC. Who the e-mail notification should appear to come from fromstring=Voicemail System . VM_CALLERID.g you may change vm@asterisk to My Super PBX and change Voice mail System to read The Stud ☺ Once these are done. Real name of email sender maxmessage=180 . Change the email body. VM_DUR.myhome. Minimum length of a voicemail message in seconds maxsilence=5 . deleted or save Change the entry in red to reflect your requirement e. 1st listed format gets emailed format=wav49|wav attach=yes pbxskip=yes . Allow caller to press 0 nextaftercmd=yes .\n\nThere is a new voicemail in mailbox ${VM_MAILBOX}:\n\n\tFrom:\t${VM_CALLERID}\n\tLength:\t${VM_DUR} seconds\n\tDate:\t${VM_DATE}\n\nDial *98 to access your voicemail by phone.com:8080/cgi-bin/vmail.cgi?action=login&mailbox=${VM_MAILBOX} to check your voicemail with a web browser. 2005 at 11:16:38 PM Dial *98 to access your voicemail by phone. Automagically play next message when current message is . VM_MAILBOX. . There is a new voicemail in mailbox 201: From: "Mary" <321> Length: 0:20 seconds Date: Friday. . max length of vm message minmessage=3 . Wait for 5 silent seconds and end the voicemail silencethreshold=128 . you will receive email notification of voicemail left in your voicemail box. you will need to customize your email notification message in /etc/asterisk/vm_email. Next.\n You can be aggressive and change /etc/asterisk/vm_general. if you wish.cgi?action=login&mailbox=201 to check your voicemail with a web browser. What do we consider to be silence skipms=3000 .inc as well. How many miliseconds to skip forward/back when rew/ff in .myasterisk. Allow sender to review/rerecord their message before saving it operator=yes .

1 INSTALLING FAX IN AAH VERSION 2. you need to log in to Centos either locally or remotely.php?p=88 17. you will need to install the support for encoding incoming faxes as PDF.pdf file in /var/spool/asterisk/fax and emailed to you. This support is not pre-installed with Asterisk@Home although the necessary files are there for you to manually install.org/wiki-Asterisk+fax The fax received is converted into a . processor speed. SpanDSP allows Asterisk to receive faxes by converting the received data to .org/blog/index. line quality etc.3/2. for the fax facility to work reliably. if you require faxes to be emailed as pdf files.4 The developer of AAH and Asterisk 1. from the console. For further reference try this link: http://www.pdf format. For more detail instructions. there is a good tutorial for installing fax here: http://mundy. During initial testing it was found that the default contexts "from-pstn-reghours". Prior to AAH version 2. If you want to have this function. you will also need Newman Telecom’s NVfaxdetect. installing fax is not without its woes. Once this is done. your chances of getting fax through Asterisk@Home is increased dramatically. This service must be installed. To install this support.2 have included NVfaxdetect in Asterisk starting versions of AAH 2. This may require some modification and recompiling. unlike previous versions where it has to be installed separately.3 and Asterisk 1.2. IAX & ZAP channel. However.3. The Whirlpool Forum community have been working on solutions to get this facility to play nicely and a solution was published by one of the participants which have been reproduced below: You also need to run install-pdf. "from-pstn-afthours" & "ext-fax" have not been modified accordingly to incorporate the application correctly. there have been reports of various degree of success.2 which allows incoming faxes to be received over SIP. This can be downloaded FREE. Using the info available on mundy.php?p=88 and Asterisk@Home Without Tears Page 83 of 164 .2. This is very much dependant on the type of equipment used such as PC. At the command prompt type: install-pdf This will install support for encoding incoming faxes as PDFs.voip-info.org/blog/index.17 FAX THROUGH AAH (FAX TO E-MAIL) While sending and receiving Faxes is one of the available functions in Asterisk@Home.

11. if fax detection is disabled.Goto(${INCOMING}.1 ) exten => s.exten => s.conf from the default of 0.3.2.GotoIf($[${intype} = GRP]?10:12) .org/forum_topic_2058.GotoIf($[${FAX_RX} = disabled]?from-pstn-reghours-nofax .8.13.exten => s.8.Cut(intype=intype.Wait(1) .in_fax.[from-pstn-afthours] Asterisk@Home Without Tears Page 84 of 164 .1) exten => s.goes to "fax" extension if detected exten => s.exten => s.Answer .Answer exten => s.1) exten => s.conf and reformat accordingly as there will be some formatting errors due to text wrapping and functionality comments.GotoIf($[${FAX_RX} = disabled]?from-pstn-reghours-nofax .9. If INCOMING starts with EXT.exten => s.s.wait 3 more second to make sure this isn't a fax before dialing someone . Changes were made in extensions.Goto(ext-group.it's an auto attendant exten => fax.Goto(ext-group.[from-pstn-reghours] .${INCOMING:4} . 1) .2.10.${INCOMING:4}. voipuser. then assume its an extension exten => s.${INCOMING:4}.exten => s.exten => s.1) .1) . If INCOMING starts with GRP.GotoIf($[${intype} = EXT]?7:9) .conf file as follows: Note* If you experience problems with incoming PSTN faxes. See .GotoIf($[${intype} = QUE]?13:15) .1:2) . If INCOMING starts with GRP.6.4.1. then jump to from-pstn-nofax .Goto(${INCOMING}.NVFaxDetect(4) .15.${INCOMING:4} .s.exten => s.Wait(3) .Hangup And replace with:- [from-pstn-reghours] exten => s.1. not EXT or GR1 .5.1) .Goto(ext-fax.${INCOMING:4}.1.13.Wait(3) .Cut(intype=intype. then assume its an extension .Goto(ext-local.Playtones(ring) . exten => s.Wait(3) .else continue .1.1) .GotoIf($[${intype} = QUE]?12:13) exten => s.6.7.SetVar(intype=${INCOMING}) exten => s.1) exten => h.exten => s.3.Goto(ext-local. then assume its a ring group . then assume its a ring group exten => s.Goto(ext-queues.forum- replies.s.exten => s.exten => h.exten => s.else continue exten => s.0. detect faxes while playing ring sound .12.Goto(ext-queues.4. if fax detection is disabled.9.14. If INCOMING starts with EXT.s.11.12.it's an auto attendant .cfm?t=451077#r9 and the following posts for further details.exten => s.1) .SetVar(intype=${INCOMING}) . play fake ring so caller doesn't wonder what's going on exten => s.10.${INCOMING:4}. 1) exten => s. changes were made on the anomalies in the numbering of priorities.-.5.7.-.GotoIf($[${intype} = EXT]?8:9) . The following modified contexts could be copy & pasted directly into your extensions.1.GotoIf($[${intype} = GRP]?10:11) .exten => s.Goto(ext-fax. then jump to from-pstn-nofax . not EXT or GR1 .exten => s.1:2) .1) . Delete or comment out original:- .exten => fax. you will most probably need to increase the rxgain setting in zapata.exten => s.Hangup Delete or comment out original:- .1.in_fax.

exten => s. if fax detection is disabled.wait(7) exten => out_fax.system(rm ${FAXFILE} ${FAXFILE}.2.1) exten => in_fax. then jump to from-pstn-nofax .GotoIf($[${intype} = QUE]?12:13) exten => s.1.exten => s.SetVar(intype=${AFTER_INCOMING }) .5.1) exten => s.2.1.SetVar(intype=${AFTER_INCOMING }) exten => s. If INCOMING starts with EXT.4.Cut(intype=intype.7.${AFTER_INCOMIN G:4}.exten => s.exten => fax.system(tiff2ps -2eaz -w 8.GotoIf($[${intype} = GRP]?10:11) .exten => s.Answer exten => s.1.13.Wait(3) .Goto(ext-group. If INCOMING starts with GRP. then assume its a ring group .Cut(intype=intype.Hangup .Hangup exten => h. If INCOMING starts with GRP.2. not EXT or GR1 .1.1:2) .-.Playtones(ring) .GotoIf($[${FAX_RX} = system]?2:analog_fax.1) . .in_fax.Answer exten => s. exten => analog_fax.pdf) exten => in_fax.Goto(ext-queues.GotoIf($[${intype} = EXT]?7:9) .1) exten => s.goes to "fax" extension if detected exten => s.8.exten => s.it's an auto attendant exten => fax.${AFTER_INCOMI NG:4}.${AFTER_INCOM ING:4}.7.GotoIf($[${intype} = EXT]?8:9) .Dial(${DIAL}. then jump to from-pstn-nofax .Hangup exten => analog_fax.2. not EXT or GR1 .6.1) .Wait(3) .Hangup() Asterisk@Home Without Tears Page 85 of 164 .1) exten => s.Hangup Delete or comment out original:- [ext-fax] exten => s.1.6.in_fax.exten => s.-.9. play fake ring so caller doesn't wonder what's going on exten => s.pdf) exten => in_fax.1.NVFaxDetect(4) .1:2) .exten => s.5.3.6.Goto(ext-local.1.GotoIf($[${intype} = GRP]?10:12) .1.else continue exten => s.else continue .1.GotoIf($[“${FAX_RX}” = “disabled”]?from-pstn-afthours-nofax .4.d) exten => analog_fax.4.5 -h 11 ${FAXFILE} | ps2pdf .exten => s.1) .Wait(1) .s.1) .Macro(faxreceive) exten => in_fax.12.1) exten => in_fax.1.exten => s. then assume its an extension exten => s.it's an auto attendant .5.Answer .exten => s.20.3.${AFTER_INCOM ING:4}.Goto(ext-local.3.15.Goto(ext-queues. If INCOMING starts with EXT.12.10.GotoIf($[${FAX_RX} = disabled]?3:2) .exten => s.Goto(${AFTER_INCOMING}. then assume its an extension .pdf --type application/pdf --file ${FAXFILE}.10.1) exten => h.Wait(3) .14.${AFTER_INCOMI NG:4}.Goto(ext-fax.s.13.9.exten => h.GotoIf($[${intype} = QUE]?13:15) . if fax detection is disabled.pdf) exten => in_fax.if fax is disabled.Goto(ext-fax.2. just hang up exten => analog_fax.Goto(${AFTER_INCOMING}.1) .2.3.exten => s.11.s.${AFTER_INCOMIN G:4}. then assume its a ring group exten => s.1.8.exten => s.system(mime-construct --to ${EMAILADDR} --subject "Fax from ${CALLERIDNUM} ${CALLERIDNAME}" --attachment ${CALLERIDNUM}.exten => out_fax.1) .GotoIf($[${FAX_RX} = disabled]?from-pstn-afthours-nofax .DBGet(DIAL=DEVICE/${FAX_RX}/dial).wait 3 more second to make sure this isn't a fax before dialing someone .1) exten => s.4. detect faxes while playing ring sound .Goto(in_fax.Hangup And replace with:- [from-pstn-afthours] exten => s.${FAXFILE}.Goto(ext-group.exten => s.1.txfax(${TXFAX_NAME}|caller) exten => out_fax.exten => s.11.s.1) .

1.system(rm ${FAXFILE} ${FAXFILE}.system(tiff2ps -2eaz ${FAXFILE} | ps2pdf .Answer exten => s.2.1. run install-pdf.Goto(in_fax. At the command prompt. This will ensure that you will get an email for fax that uses the default AMP setting eg.pdf --type application/pdf --file ${FAXFILE}.2 INSTALLING FAX IN AAH VERSION 2.Macro(faxreceive) exten => in_fax.1) exten => in_fax.3.3.2. you must do this or it will play ring sounds over your fax exten => in_fax.1) Asterisk@Home Without Tears Page 86 of 164 .if fax is disabled. log on to FreePBX. exten => analog_fax.Hangup exten => h.txfax(${TXFAX_NAME}|caller) exten => out_fax.1.20.8.4. And replace with:- [ext-fax] exten => s. 17. the following is another method found to be suitable for AAH 2.d) exten => analog_fax.exten => out_fax. • In freePBX go to General Settings -> Fax Machine & set to system & enter your email address.${FAXFILE}.wait(7) exten => out_fax. edit the [ext-fax] context in extensions. • Go to Inbound Routes & create an incoming route if you haven't already done so.conf Existing: [ext-fax] exten => s.pdf) exten => h. • Set Immediate Answer to Yes & Pause after answer to 4 Save your changes.Dial(${DIAL}.pdf) exten => h.Hangup exten => analog_fax.1.1.2.Hangup() (Source Reference: ThunderBird1) Note* You will also need to make sure you add the email address for faxes in Setup : General Settings.GotoIf($[“${FAX_RX} “= “system”]?3:analog_fax.GotoIf($[“${FAX_RX}“= “disabled”]?3:2) . Fax from PSTN Zap trunk that does not have an inbound route.Goto(in_fax.8 with FreePBX.8 WITH FREEPBX Since the method described above does not actually function on AAH 2.Answer exten => s. just hang up exten => analog_fax.1. Next. either from the local machine or through putty.StopPlaytones .4.DBGet(DIAL=DEVICE/${F AX_RX}/dial). Next.system(mime-construct --to ${EMAILADDR} --subject "Fax from ${CALLERIDNUM} ${CALLERIDNAME}" --attachment ${CALLERIDNUM}. First you need to install pdf support (if you haven't already done so earlier).4.Hangup . • Set Fax Extension to freePBX default.2.3.2. Log on to Asterisk.1.1) exten => in_fax.pdf) exten => h.2.

1.Hangup exten => h.pdf --type application/pdf --file ${FAXFILE}.1.2.system(tiff2ps -2eaz -w 8.Dial(${DIAL}.GotoIf($["${FAX_RX}" = "disabled"]?3:2) .pdf) exten => h.wait(7) exten => out_fax.pdf) exten => in_fax.txfax(${TXFAX_NAME}|caller) exten => out_fax.1.Hangup() If you copy the modified context from within this post.20. Testing Testing consisted of connecting a fax machine to a SPA-2000 configured as ext 200 & then dialling 7777 to simulate an incoming call. type exit.2.5 -h 11 ${FAXFILE} | ps2pdf .4. To monitor the progress of the call.4. open an Asterisk console by typing asterisk -rvvvvv at the CLI.Answer exten => s.d) exten => analog_fax.5 -h 11 has been removed from the h.pdf) exten => in_fax. the service will re-try after 3 mins. exten => in_fax. in bold.${FAXFILE}.conf.pdf) exten => in_fax. For testing incoming PSTN faxes.0 to receive PSTN faxes.1.system(mime-construct --to ${EMAILADDR} --subject "Fax from ${CALLERID(number)} ${CALLERID(name)}" --attachment ${CALLERID(number)}.1.Macro(faxreceive) exten => in_fax.Macro(faxreceive) exten => in_fax.txfax(${TXFAX_NAME}|caller) exten => out_fax.system(rm ${FAXFILE} ${FAXFILE}.3. At lower settings the faxes failed .1.system(mime-construct --to ${EMAILADDR} --subject "Fax from ${CALLERID(number)} ${CALLERID(name)}" --attachment ${CALLERID(number)}.1) exten => in_fax.GotoIf($["${FAX_RX}" = "system"]?2:analog_fax.5.Set(DIAL=${DB(DEVICE/ ${FAX_RX}/dial)}). send a normal fax to 1300 368 999 (Telstra's test fax service) & within a short period of time you will get a response fax.1.if fax is disabled.1) exten => in_fax.2. just hang up exten => analog_fax.pdf --type application/pdf --file ${FAXFILE}.${FAXFILE}.4.wait(7) exten => out_fax. just double check that the Whirlcode formatting hasn't inadvertently inserted any extra spaces.4.StopPlaytones .20.GotoIf($["${FAX_RX}" = "system"]?3:analog_fax. To exit.Hangup exten => analog_fax.Hangup() Replace with: [ext-fax] exten => s.1.exten => out_fax. just hang up exten => analog_fax.d) exten => analog_fax.1. Highlighted. Depending on the quality of your line.system(rm ${FAXFILE} ${FAXFILE}.Set(DIAL=${DB(DEVICE/${FAX_RX}/dial)}). Using a TDM400P I had to set my rxgain to 7. you must do this or it will play ring sounds over your fax exten => in_fax. exten => analog_fax.GotoIf($[“${FAX_RX}" = "disabled”]?3:2) . exten => analog_fax.system extension that converts the tiff to a pdf otherwise leaving the width & height parameters creates a blank pdf when emailed.Hangup exten => h.pdf) exten => h.2.6.1.Dial(${DIAL}.Hangup .3.2. If that call fails. are the changes made from the original.exten => out_fax.1.2.3.2.3.Hangup .4.2.1) exten => in_fax. you will probably need to adjust the rxgain= setting in zapata. Also note that -w 8.Goto(in_fax.system(tiff2ps -2eaz ${FAXFILE} | ps2pdf .pdf) exten => h.YMMV ☺ (Source Reference: ThunderBird1) Asterisk@Home Without Tears Page 87 of 164 .3.Hangup exten => analog_fax.3.if fax is disabled.

The Australia weather report reference file can be obtained from the following site: http://www.txt -F 8000 -o /tmp/weather. However it will provide you with the weather report of your region of choice. you may use Webmin. You do not need to manually download the file. or if you prefer. I used Putty to log on to the Asterisk box remotely and used Nano to create a text file called “convert2wav” in the /usr/bin directory containing the following: /usr/bin/text2wave /tmp/weather. Asterisk@Home Without Tears Page 88 of 164 . Some preparations need to be manually conducted through Linux Command Line. instead only the file name is required to be noted and can be incorporated within the Asterisk@Home extensions_custom.wav sound file). The following are examples of available weather report files that you can reference in your script.wav file and play the announcement. The announcement will be a simulated announcement (ala Dr.shtml The following step-by-step instruction will guide you through.gov.bom.gov.bom.conf file later.au/inside/cosb/stcm/idcodes/tables/current/vic_products. refer to the link below: http://www. However. 18. Who’s Dalek).au/ You may choose the reference file (text file) for the area that you are interested in. Forecast Area File reference NSW Sydney Metro IDN10064 All NSW IDN10031 ACT IDN10035 Snowy Mountain IDN10103 Brisbane Metro IDQ10090 All Queensland IDQ10700 Melbourne Metro IDV10450 All Victoria IDV10310 Adelaide Metro IDS10034 All SA IDS10033 Perth Metro IDW12300 All WA IDW12000 Darwin and Rural Area (All NT) IDD10110 Tasmanian Cities IDT13400 All Tasmania IDT13100 For a complete list. convert it to a .1 CONFIGURE WEATHER REPORT – ON DEMAND.wav (This command is used to convert the weather text file to a .18 WEATHER FORECAST The existing weather forecast information that comes with AAH is configured for New York. Asterisk can be configured to allow the automatic downloading of Australian weather forecast information. The script will download the file for you in the background.

au/anon/gen/fwo/IDN10064.9.System(/usr/bin/convert2wav) exten => *61.1.bom.Wait(1) exten => *63.Playback(national-weather-service) exten => *61.System(rm /tmp/weather.net.Answer exten => *63.g.System(/usr/bin/wget -O weather.).7. the permission for the “convert2wav” text file need to be appropriately set to allow it to be executed.5. Add the following example (*Note: The third line in each section (bold) should read as a complete single line.conf through the Config Edit option of AMP Maintenance Tab.Hangup Restart asterisk and test. chmod 755 /usr/bin/convert2wav Now you have completed all the necessary preparations – for me anyway. there may be about 1 minute or more delay between dialling the extension and the weather announcement.Hangup . *61. ###################################### exten => *63.System(rm /tmp/weather.7. Select an unused extension code e.txt) exten => *61.txt ftp://ftp2.4.Playback(/tmp/weather) exten => *61. Therefore. Once this is done.System(/usr/bin/convert2wav) exten => *63.Playback(pls-hold-while-try) exten => *61.gov. Forecast for the whole of NSW .Playback(national-weather-service) exten => *63. . ################################### exten => *61.* -f) exten => *63.whirlpool.Playback(/tmp/weather) exten => *63. *63.6.gov.Wait(1) exten => *61. Forecast for Sydney Metro . You will be presented with the weather report of the areas you have chosen.2.* -f) exten => *61.1.6. ################################## .wav conversion.8.txt ftp://ftp2.Playback(pls-hold-while-try) exten => *63.3.4. 18.txt) exten => *63.3.cfm?t=364420&p=1) This method is very slow and therefore is only suitable for a very fast PC. *64 etc.change the file reference in red to suit.Answer exten => *61.2.5.System(/usr/bin/wget -O weather. ###################################### . To do this you need to run the following command from Command Line. Asterisk@Home Without Tears Page 89 of 164 . Therefore I have included step 3 telling the caller to hold while trying to connect. Depending on the speed of your computer during the .1.9.au/anon/gen/fwo/IDN10031.bom.au/forum-replies. there has to be a better method – so read on. (Source Reference: http://forums.1 Create Extension codes. The next step is to include the following in the extensions_custom.8.

This will cut down the waiting period when a caller chooses to listen to the weather report.txt -F 8000 -o /tmp/weather1.txt /usr/bin/text2wave /tmp/weather2. *64 etc.au/anon/gen/fwo/IDN10031.wav /usr/bin/wget -O /tmp/weather2.wav (Change IDN10064.txt as an example .Playback(national-weather-service) Asterisk@Home Without Tears Page 90 of 164 .g.bom. change the permission for “convert2wav” thus: chmod 755 /usr/bin/convert2wav Use Webmin to schedule a Cron job to run this batch file every 4 hours (or schedule it to suit your purpose).2. I have decided to let Asterisk do the task of getting the weather text files and converting them to the necessary sound files in the background every 4 hours. First we will use putty to make a batch text file called “convert2wav” in the /usr/bin directory containing the following: /usr/bin/wget -O /tmp/weather1. Next include the following in extensions_custom. Once this is done. Select an unused extension code e. Add the following example .txt ftp://ftp2. *63.2 CONFIGURE WEATHER REPORT – BACKGROUND METHOD.txt /usr/bin/text2wave /tmp/weather1.txt > temp. The sound files will always be available when a caller requires them without having to wait for them to be downloaded and converted.gov.txt # sed 's/\]/ /g' /tmp/weather1. you can always add the following line or lines in the appropriate places and changing the characters that you want to discard or change.1. # sed 's/\[/ /g' /tmp/weather1.but we are not going there for the moment. ################################## .gov.conf.1 Create Extension codes.Answer exten => *61.au/anon/gen/fwo/IDN10064. Forecast for Sydney Metro .2.txt and IDN10031. For the moment we will just stick with the batch file example above. This will run the batch job at the scheduled time avoiding having to download the weather file and converting them to sound files when a caller chooses the weather report option. It may get too confusing. 18. 18.txt ftp://ftp2.txt -F 8000 -o /tmp/weather2. *61.bom. After giving it a bit of thought.txt > temp.txt > temp. ################################### exten => *61.txt to suit the areas you require) If you want to get rid of a couple of nasty characters.txt # sed 's/\_/ /g' /tmp/weather1.

Give it a label – see example below (the changes made are in bold).Playback(/tmp/weather1) exten => s.2. “Press 6 for Sydney weather report. ################################## .Playback(/tmp/weather2) exten => s.4.2.Playback(national-weather-service) exten => s.5.3 NOW PUT IT IN YOUR DIGITAL RECEPTIONIST If you want the 2 procedures to be incorporated in your Digital receptionist.Hangup . select the custom app: and enter the appropriate custom procedures above.Playback(pls-hold-while-try) exten => *63.4. You will be presented with the weather report of the areas you have chosen without any delay whatsoever. ###################################### [custom-weathernsw] exten => s. ###################################### .s.5. See example below: Custom App custom-weathermetro.5.g.2. 18. simply duplicate them with some minor changes. ###################################### exten => *63.4.Playback(pls-hold-while-try) exten => *61.1.Answer exten => s.3.3.Hangup Restart asterisk and test.1.5.Hangup When you create your menu option in Digital receptionist.Answer exten => *63.1 Custom App custom-weathernsw.3. Forecast for the whole of NSW .s.Playback(national-weather-service) exten => *63. exten => *61. Forecast for the whole of NSW .Answer exten => s.Playback(/tmp/weather1) exten => *61. e. .Hangup . You will want the digital receptionist to know which whether report you are referring to when you make the choice.1.1 Asterisk@Home Without Tears Page 91 of 164 . ################################### [custom-weathermetro] exten => s.Playback(national-weather-service) exten => s.Playback(/tmp/weather2) exten => *63.Playback(pls-hold-while-try) exten => s. Forecast for Sydney Metro .3.Playback(pls-hold-while-try) exten => s.4. press 7 for the whole of NSW weather report”. ###################################### .

I highly recommend you register with Dyndns to get yourself a dynamic DNS unless you have a fixed public IP address.0.conf In the file. use http://your_Dyndns_name:80 or http://your_public_ip_address:80 19. You simply append :8080 after the address e.0.0. To do this.g.below : # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses (0.0. If you are thinking about doing this. However this can be overcame by changing the port to 8080. you may not be able to use port 80. look for the following entry (marked in red) .78:80" # # To allow connections to IPv6 addresses add "Listen [::]:80" # Listen 0.0:80 change this from 0. Don’t panic if you can no longer access AMP through you web browser. To log on to your Asterisk box remotely using your browser.1 HTTPD..0:8080 # After doing the above.0:80 to read 0.56.0.101:8080 Asterisk@Home Without Tears Page 92 of 164 .19 REMOTE MANAGEMENT Some may want to manage their Asterisk Box remotely.g.1. 192. reboot Asterisk.0. I suggest you use either webmin or putty to access the file.0.34. You should also forward port 80 on your router to point to the local IP address of your Asterisk box.0.0) # e.168. "Listen 12. I use Putty to log on remotely to the console and edit the file with Nano using the following command. If you are not a Linux fan. nano /etc/httpd/conf/httpd. you will be required to change one setting in the httpd.conf file which resides in the /etc/httpd/conf directory.CONF If you are using Optus Cable.

This way I don’t have to keep changing IP addresses. Since I am on Optusnet cable. Basically its set up is similar to the softphone that you set up on your other computers except that you should have a fixed IP address for your Asterisk server or use DynDNS to register a Domain ID for your Asterisk box. Every time my dynamic IP changes. I only have the privilege of a dynamic IP hence I registered for a Domain ID with DynDNS pointing to my Dynamic IP address. you will need to forward port 4569 to your Asterisk Box. AAH 1.freedns. I simply use the same DNS ID eg: myasterisk. create an IAX extension (you can use SIP as well but since you don’t have any control of the external router that you may be connected to when you are away from your own environment. DynDNS will point to the new IP address.x IAX Extension screen Asterisk@Home Without Tears Page 93 of 164 . In your router.1 CREATE A NEW EXTENSION Create a new extension in Asterisk – just like the other extension that you created before. This time instead of creating a SIP extension. IAX will avoid any NAT issue that you may encounter). you may want to consider setting up a remote extension on your Notebook.com 20.20 HOW TO SET UP A REMOTE EXTENSION If you carry your laptop/notebook everywhere you go.

see red arrow. Asterisk@Home Without Tears Page 94 of 164 . you may create a SIP extension instead.x) . if you so wish but you must ensure that you set “nat” field to “yes” instead of “never” as illustrated in the screen below (the screen below is an extract of AAH 2. As mentioned above.

Setting up IDEFISK is very simple.0/255.255.conf nat=yes externip=<your fixed external IP> or externhost=< myasterisk.com> localnet = 192.0 bindaddr = 0.conf in case you want to use SIP.255.1.168. extract it and save it in its own directory.freedns. Address to bind to (all addresses on machine) delayreject = yes disallow=all allow=g729 allow=ilbc allow=gsm allow=g723 allow=alaw allow=ulaw jitterbuffer = yes mailboxdetail = yes #include iax_additional.conf #include iax_custom.255.conf files that require changing if needed. you will need to ensure a couple of things in your . Iax.4 THE CORRECT SOFTPHONE FOR IAX I use a softphone called IDEFISK. My file is as per the example below. 20.asteriskguru.CONF The following is the content of my iax. Port to bind to (IAX is 4569.conf file that requires attention is the sip_nat.0 .1.0.3 SIP_NAT.0/255.php You can also use Virbiage softphone as it will handle IAX.com/tools/idefisk_beta. Once you have done this.2 IAX.freedns.conf file. If you do.conf files are set correctly.conf 20.conf [general] bindport = 4569 .255. ensure that you have forward ports 5004 – 5082 as well.0. All you have to do is download the file.com> (see note) localnet=192. 20. Asterisk@Home Without Tears Page 95 of 164 . Forward this port to your Asterisk box) externip = <your fixed external IP> or externhost = <myasterisk.CONF The only other . sip_nat.168. You can get IDEFISK from here: http://www.0 externrefresh=10 Those are the only 2 .

20.2 Accounts options Next click on the Account Options and set up your account as per the image below. 20. The configuration option window will be displayed.1 First the general options In the general options. Once the softphone is active.exe and just configure it like the example below. checked the Check for update and Automatic popup on incoming call.4. They are pretty straightforward. Asterisk@Home Without Tears Page 96 of 164 . Now you are ready to go on the road with an Asterisk extension under your arm. The rest of the options are there for you to set up your sound preference and customize your look and feel. simply place your curser anywhere in the middle if the image and right click. to start configuring. Click on the idefisk.4.

putty. http://winscp.rpm I have found the above method is straight forward and simple.nl/download.net/sourceforge/webadmin/webmin -1. It is written and maintained primarily by Simon Tatham and can be downloaded from the following link.noarch.net/sourceforge /webadmin /webmin-1. However there are some users who found that following an alternative method is simpler.3 WINSCP WinSCP is an open source freeware SFTP client for Windows using SSH.rpm Or be totally lazy like me and do the whole lot in a one liner. Webmin make it easy to configure application like SMTP mail. Legacy SCP protocol is also supported. http://www.noarch.260-1.dl. It can be downloaded from the following link.260-1.terrasoftsolutions.html 21.sourceforge.rpm Install it with the following command through CLI: rpm -Uvh webmin-1. Its main function is safe copying of files between a local and a remote computer.com/support/solutions/ydl_general/webmin.2 PUTTY PuTTY is a free implementation of Telnet and SSH for Win32 and Unix platforms.1 WEBMIN Webmin in an invaluable web based tool for managing a Linux box. rpm –Uvh http://superb-east. the alternative installation method can be found here: http://www.shtml 21.dl.php Asterisk@Home Without Tears Page 97 of 164 . along with an xterm terminal emulator.sourceforge.noarch. 21.net/eng/index.260-1. editing files etc (see Note). Those who want to use Web Admin to maintain the Asterisk System may download Webmin from here or from CLI. If that is the case.21 TOOLS The following are tools that I use regularly to maintain my Asterisk systems. do the following: wget superb-east.

agent. stun.user [AstTapi] Asterisk@Home Without Tears Page 98 of 164 . There may be others. Download AstTapi from http://sourceforge. This little gem (still under further development at the moment but functional) will make it possible to do click-to-dial from Microsoft™ Outlook and for that matter from other TAPI compliant applications.verbose.0 permit=127.fwd.0.conf On opening the manager_custom.255. We can also use Outlook to dial the phone numbers in the address book as Outlook® has a click- to-dial facility. I was alerted of this facility in Outlook® and Asterisk® and asked to prove the application and publish a simplified instruction in this guide.log.user [phpagi] secret = phpagi deny=0.voxgratia.255.call.255.0 read = system.0.22 STUN SERVERS STUN (Simple Traversal of UDP through NATs (Network Address Translation)) is a protocol for assisting devices behind a NAT firewall or router with their packet routing operates on TCP and UDP port 3478.net stun.verbose.user write = system.conf file.agent.agent.call.command.call.0. you will notice the following.verbose.0 read = system.255.1 DOWNLOAD ASTTAPI Before you get started.com stun.1/255.net/projects/asttapi/ To get started. you will need to download AstTapi.0/0.log.verbose.org 23 DIALING THROUGH MS OUTLOOK® One way of keeping a little black book for all your telephone contacts is through Microsoft™ Outlook® (for the windows users) address book. The easiest is to use AMP (the easiest way!) AMP-> Maintenance -> Config Edit -> manager_custom.command.0.user write = system.com stun1.0.0.log.ams-ix.com stun01.voipbuster.0 permit=127.0/0.log.call. which is a Microsoft TAPI to Asterisk Bridge. Below is a list of public STUN Servers that I am aware off. 23.0.command.0.noc.0.0.xten.conf file. you will need to edit manager_custom. which you will need to do a tiny weeny edit: [phpconfig] secret = php[onfig deny=0.0.0.org stun.agent.1/255.command.sipphone.

0. secret = AstTapi deny=0.168. click Update and restart Asterisk.2 INSTALL ASTTAPI Install AstTapi on your PC – the one that you have Microsoft Outlook installed. Click on the Telephone icon. 23.log.0 to the network address of your network. remove the # from the permit line and change the 192. Once this is done.1.3 CONFIGURE OUTLOOK ADDRESS BOOK Fire up Outlook®.agent.1. Click on Contacts from your folder list. Follow the prompt and once completed you will need to restart your PC for the new driver to take effect. Select a contact that you want to call (provided that a telephone number has been recorded).command.command.0. In my case I left it as it is because my network is under 192. Click on the phone icon.0/255.log.verbose.255.0.user Under the [AstTapi] User context.0 #permit=192.verbose.168.168.0 read = system.user write = system. 23.1.0.agent.0/0.255.call. Asterisk@Home Without Tears Page 99 of 164 . The New Call dialog box will be displayed: Select Dialing Options.call.0 (see red highlight).

In the "connect using line" drop down box. enter the address of your asterisk server: e. Then click on Line properties.g. Now… that was quite painless ☺ Asterisk@Home Without Tears Page 100 of 164 .g. In the Host field. sip/2001 Select dial by context radio button. click Apply and you are done.100 In the Port Field: 5038 User Field: AstTapi Password: AstTapi User Channel: (your extension – the extension you want Asterisk to ring before connecting you the number you are calling) e. select Asterisk. 192.1. You can now start making calls from Outlook using the click-to-dial facility. Enter outbound-allroutes in the context box When done.168. The Dialing Option box will be displayed.

Ros’s Mobile exten => 767.m) .Dial(SIP/6140036xxxx@pennytelsip. you can by simply defining a shortcut number. Make sure the numbers have not been allocated to your local extension. There are 2 ways you can do this . Ben’s Mobile exten => 236.Hangup You will need to substitute the example phone numbers above such as 6140036xxxx with the real phone numbers.conf by adding the lines below containing the relevant exten expressions.1.3. When 236 (which is BEN) is dialled.my way and Asterisk@Home’s way.m” altogether Asterisk@Home Without Tears Page 101 of 164 .playback(pls-wait-connect-call) exten => 232.Dial(SIP/6141242xxxx@pennytelsip. ############################################################# exten => 236. Nor’s Mobile exten => 667.m) .playback(pls-wait-connect-call) exten => 667.m) . the caller will be listening to a MOH tune (. Speed Dial to some predefined numbers (added by Ben 2/12/2005) .1.Hangup exten => 764.1. Asterisk Management Portal -> Maintenance -> Config Edit .m) .Hangup exten => 667.2. Well.2.60.60.2. Adam is ADA which translate to 232 on the telephone keypad.Dial(SIP/6140470xxxx@pennytelsip.1.60) and while the call is being attempted.24 SPEED DIAL Sometime you may just need to call someone quickly without having to look up his/her phone number. Adam’s Mobile exten => 232. To do this.playback(pls-wait-connect-call) exten => 764. 24.2. Rohani’s Mobile exten => 764. you will need to edit extensions_custom.g.60.1 THE DUMB-ME METHOD Since I am very bad at remembering phone numbers – I cant remember my own phone number (or my car registration number). You may however change it to a ringing tone by substituting the “m” with a “r” or remove “. you will hear a voice prompt saying “Please wait while I connect your call” followed by Asterisk calling Ben’s Mobile number which is 61400336510 using the Pennytel SIP trunk. ############################################################# .3.Dial(SIP/6140512xxxx@pennytelsip. Pennytel SIP trunk was called Pennytelsip when it was initially set up.1.60. The call will be tried for 60 seconds (.playback(pls-wait-connect-call) exten => 236. You can do this through AMP. I have defined some shortcut numbers for my family using the first 3 characters of their first names e.3.Hangup exten => 232.3.3.Hangup exten => 767.2.Dial(SIP/6140936xxxx@pennytelsip.m) .playback(pls-wait-connect-call) exten => 767.m) instead of the ringing tone.60.

click on Update and re-read the config. 301). simply dial * followed by the 3-digit speed dial code. In this case.g. In the above example. 24. e. Asterisk@Home Without Tears Page 102 of 164 . every time you dial 301 Asterisk will dial out the number associated with that code. Ensure that you enter the number to be called in the same format that is supported by your Asterisk dialplan.g. Numbers 300 to 399 has been reserved for this purpose. This will tell you the number stored in speed dial position 301. Once you have done that.x has included a built-in speed dialling utility amongst the goodies that comes with it. After doing that. you simply pick up one of your extensions and punch in 3003XX61212345680 (assuming 61212345680 is the number you want to save in your speed dial list) where 3XX is the speed dial code for 61212345680 (substitute 3XX for the position e. *301. To add a number to your speed dial list. That’s all there is to it. If you want to make correction to or change the telephone number that you have entered simply repeat the process. it is 61212345680. Asterisk will confirm the code and the number that you have just registered.2 ASTERISK@HOME’S METHOD There is however. To look up speed dial numbers. a simpler way (if you are too lazy to write extra codes – like me☺) Aaterisk@Home 2.

101) in the [Server name of IP address] field • Check the [UDP] button • Click [OK] and [OK] again. Asterisk@Home Without Tears Page 103 of 164 .1. From the Windows Messenger dialog box."sip:206@192. go to Tools -> Options ->Accounts: • Check the [My contacts include users of a SIP Communications Service] checkbox. • Check the [Configure settings] button • Enter Asterisk IP address (e.168. Set up Windows Messenger 5.1..x as a SIP client on your PC: 1. you must have a microphone and speaker(s) connected to your PC. Start Windows Messenger from your PC. In order for Windows Messenger to work as a voice communication device.101") in the [Sign-in name] field 2.g.X Note: Windows Messenger is NOT MSN Messenger. You may need to download Windows Messenger from Microsoft.168. Click on the [Advanced] button next to the Sign-in name.g.192. • Enter "sip:<your extension>@<Asterisk Address>" (e.25 HOW TO USE WINDOW MESSENGER® 5.

168. 192. You should see under SIP Registry that the Windows Messenger is registered as a user/phone number of 206.0 or later has support for VoIP communications but it seems that it may create problems with chat or other features.0. Asterisk@Home Without Tears Page 104 of 164 .101. Note: Windows Messenger 5. Verify that Windows Messenger has successfully registered with Asterisk by logging in to Asterisk. with a contact URL of your local PC IP Address e.168. Asterisk Management Portal -> Maintenance -> Asterisk Info.11.g.1. For this purpose.Note: This setting means the Windows Messenger has a user/phone number of 206 known to the SIP server (your Asterisk box) of 192. please focus your testing on VoIP only. among other registration information.

au (or IP) host=def.au (or IP) Peer Details secret=xxxyyy secret=xxxyyy type=peer type=peer username=91000 username=90000 User Context Leave blank Leave blank User Details Leave blank Leave blank Register String 80000:xxxyyy@xyz. I hope this will help those in the same position as I am.au) together and if you are like me. you will probably be spending a good part of 3 hours trying to get them to talk to one another. I gave a common password xxxyyy to both boxes.au and xyz.com. 26 HOW TO INTERCONNECT 2 BOXES There may be a time when you want to interconnect 2 Asterisks boxes (def.au Note: Registration isn’t really necessary. XX. the Main Office (def. Avoid using extension starting with 8 as it may clash with conferencing.com.1 METHOD 1 . Trunk Name Parramatta MainOffice host=xyz. I settled for the simplest solution and after some fiddling around I managed to get them to work the way I wanted it but not happy with it.com.WITH THE PEER ASTERISK BOX AS EXTENSIONS For the purpose of registering the peers to each other.au 90000:xxxyyy@def.com. It will still work without it unless you use Dynamic IP.au) about 20 km away with 9 extensions. Instead of being verbose in my explanation. I will just create a few tables outlining what I did. System 1 System 2 IAX Trunk Outgoing Dial Rules: XX.com. to set 2 very basic systems together (you can refer to DUNDi for a more complete solution). I have 2 different locations.com. System 1 System 2 Extensions Phone Protocol IAX IAX Extension Number 90000 91000 Extension Password xxxyyy xxxyyy Fullname Parramatta Main Office Voicemail & Directory Disabled Disabled Asterisk@Home Without Tears Page 105 of 164 . I created 1 extension on each box eg: 90000 on System 1 and 91000 on System 2– using extension numbers that I am not likely to use as local extensions (while some users have had success using common extension. That I did.com.com. but I prefer 2 separate extensions as I have them working). 26.au) with about 11 extensions and another office in a different location (xyz. The main office is the only box that will have accounts with different VSPs and all external communications are through the main office Asterisk box. I solicited some advise from a friend (thanks to Mark Brooker) who told me that my configuration could be made a lot tidier. For simplicity.

this is simpler to set up. Dial Patterns (6001 to 6009 are Parramatta (Apart from Local extensions. Asterisk@Home Without Tears Page 106 of 164 . As different installation resorts to different types of security arrangement. it will not pass the calling party extension number to the remote Asterisk box. If you want to use a prefix to dial the remote extensions and to use the remote routing rules. In many ways. you may be able to do this with SIP as well if you are trying to connect the older Asterisk with the newer incarnations (I have not proved it yet). The receiving party will actually get the callers’ extension number/ID instead of the extension number of the peer Asterisk box. however I believe. you will need to register both the boxes with DynDns to obtain a valid DNS ID. System 1 System 2 Outbound Routing Route Name Parramatta MainOffice Route Password Leave Blank Leave Blank 6XXX XX. this second method will pass the Caller ID to the receiving party. than you will have no need to worry about DynDns and what not. If you have Dynamic IP addresses. you must provide for security. Instead. for system 1 and system 2 respectively instead of just 6XXX and XX. This method does not require registration either and does not require you to create extensions for the peers. 9|6XXX and 9|XX. I will leave that to the individual implementer to deal with the security issues. as this is pretty wide open.g. The above example assumes that both Asterisk boxes have Public Fix IP address. This method treats both the Asterisk box as internal to each other as peer and user. Note: You must provide for security.IN A PEER/USER ARRANGEMENT Another method that I use is described below. Note: While this method will provide some rudimentary security (though pretty weak). it will pass the Trunk ID only and all calls will seem to come from the same trunk and not individual extension – I did say that this is a simple solution. Office extensions) all others go via City Office) Trunk Sequence IAX2/Parramatta IAX2/MainOffice The above Outbound Routing rule assumes that you do not wish to use a dialling prefix. I am using IAX2 for this purpose.2 METHOD 2 . If you are a part of a Corporate LAN. you may place a prefix e. Like all installation. 26. Unlike the first method. as it requires an extension to be created for the peer Asterisk box.

my advise to you is to hire a VOIP consultant.au (or IP) Peer Details Qualify=yes Qualify=yes type=peer type=peer User Context InterOffice-In InterOffice-In User Details context=from-internal context=from-internal host=xyz. Office extensions) all others go via City Office) Trunk Sequence IAX2/InterOffice IAX2/InterOffice Both the above methods. Asterisk@Home Without Tears Page 107 of 164 .au (or IP) type=user type=user System 1 System 2 Outbound Routing Route Name InterOffice InterOffice Route Password Leave Blank Leave Blank 6XXX XX.com. To provide a complete solution is beyond the scope of this document. System 1 System 2 IAX2 Trunk Outgoing Dial Rules: 6XXX XX. Dial Patterns (6001 to 6009 are Parramatta (Apart from Local extensions. I will illustrate this method using tables as follows. while useable for a basic configuration. Trunk Name InterOffice InterOffice host=xyz.au (or IP) host=def.au (or IP) host=def.voip-info. Rather than being verbose.com. The following link will provide further reference for connecting two Asterisk boxes together http://www.com. will not provide you with a complete solution.com.org/wiki/view/Asterisk+-+dual+servers If you require a complete solution tailored to your exact requirement.

whirlpool. as it seems that doing it through AMP may creates unpredictable results. call me old fashion if you like.net. 27. This method should apply equally to Asterisk@Home versions 1. I have shown only the “Using the console” method. the file it will be automatically created.x and 2.5 (Note: Doing your Backup and Restore through AMP may work for some of you. type backup_asteriskathome.tar. I am not saying that it will not work except that when I use AMP for my backup.au/forum-replies.au/forum-replies.net.cfm?t=368291 http://forums. As a matter of fact. The backup process will commence. I have not been able to do this successfully using AMP.php?p=66 27. During this process a file named asteriskathome_backup.27 BACKUP AND RESTORE It is recommended that Backup/Restore be done through the console.gz is created and written to the default directory /var/www/html/maint/backup. type Asterisk@Home Without Tears Page 108 of 164 .2 RESTORING A BACKUP USING THE CONSOLE To restore a backup you first need to change directory to the directory where the backup file was stored. I have also come across in one of the forums.sh then press enter.whirlpool. http://forums. it can’t be right – I am paranoid ☺) Another reference to backup can be found here: http://mundy.x although I have only tried it on version 1. which is /var/www/html/maint/backup. At the command prompt.1 CREATING A BACKUP USING THE CONSOLE Log into your Asterisk box or a console session (I use putty to log into the console session) – you should know how to do this by now.org/blog/index. At the prompt. if it does not look right. otherwise the file will be over-written with the new backup.cfm?t=426384 In this example. If this is the first time you are doing the backup. More often than not AMP simply hangs. it does not look right and therefore. that there are others having the same issue.

If you do. This command will restore AAH from the asteriskathome_backup. you will need to do the opposite by copying and renaming the required backup file back to asteriskathome_backup. transfer your backup to an external drive.tar. transfer your backup somewhere else anyway ☺ Asterisk@Home Without Tears Page 109 of 164 .tar. then you will need to manually copy and rename the backup file with an appropriate name with the following command: cp asteriskathome_backup.gz To restore any of the backups.2 27.gz beforehand (unless there is a command line switch to define the file to be restored) otherwise restore-aah will not recognise which file to restore. I think I should warn you that making daily or weekly backups and saving your backups in your Asterisk box might not be a good idea. Besides from not being able to get to your backup files should anything happens.tar. restore-aah then press enter. Notwithstanding.gz newfilenamehere.gz file.3 MAINTAINING MULTIPLE BACKUPS If you want to maintain multiple backups (eg one for each day or weekly).tar. the 15MB file size could eat up your disk space quite quickly ☺ Some may want to make a daily or weekly backup to ensure that usage record is not lost. Note: There is currently an issue with Backup and restore on AAH 2.

Once you are satisfied. [from-internal-custom] . Although there are separate voice sets that can be used. 28. The voice prompt will be played back. Therefore the instruction below does not apply. The file should then be moved to the /var/lib/asterisk/sound directory.8 with freePBX. rename the file to something related and recogniseable e. The voice prompt will be saved as my-recording.8 (and later) with freePBX already have this facility in freePBX in the form of System Recording. to mix English and other language on a single announcement.gsm (gsm format) in the /tmp directory.1 CUSTOMISED VOICE PROMPTS To satisfy this requirement. Note: Users of AAH 2.Hangup To start recording.Playback(/tmp/my-recording) exten => 5679. For custom recording exten => 5678. Under the [from-internal-custom] context of extensions_customs. The file can be played through your custom applications or prompts using the Playback or Background function of Asterisk. The instruction below refers to AAH prior to version 2.28 CUSTOMISED VOICE (PRIOR TO AAH 2. for playback of custom recording exten => 5679. use one of the phone extension and dial 5678.1.org/wiki/view/Asterisk+sound+files Asterisk@Home Without Tears Page 110 of 164 . however there will be times when customised voice prompts or announcements will be required.gsm. my_office_business_hours.conf. custom voice prompts can be recorded individually by using the recording facility of Asterisk. add the following codes.Record(/tmp/my-recording:gsm) exten => 5678.2. A good information on Asterisk sound files and how to create them can be found here http://voip-info.3. If you are not satisfied. e.2. start recording the voice prompt. sometimes we only require a few prompts and not the entire voice set.g. When completed.8 WITH FREEPBX) The default pre-recorded voice prompts and announcements in Asterisk@Home are suitable for almost every situation.1.g.Hangup . At the beep.Wait(2) exten => 5678. hang up and dial 5679. repeat the above process.

‘fr’ for French. 28. (or fr. language=au .conf configuration file the line should be added under [channels]. you may use the Edit Configuration facility.) in the /var/library/asterisk/sounds directory. letters etc directories. In zapata. otherwise you can use nano at the command prompt of your Asterisk box (or SSH to your Asterisk box) to edit the files that resides in the etc/asterisk directory). and send all your prompts sound files there.conf and sip. I will go the easiest method.2 INSTALLING OTHER LANGUAGES If you wish to use a different language other that the default American English that comes with Asterisk. Also create the language directories in the digits. it or whichever language is installed) (If you have the Maintenance interface in freePBX (or if you are using AMP).conf configuration file under [general]. Asterisk@Home Without Tears Page 111 of 164 . and send all the prompt files there. there are a couple of ways that you can do but as this guide is for beginners. Add the following line in the iax. ‘it’ for Italian etc. Create a subdirectory for the particular language (eg: ‘au’ for Australian English.

101 1 2 3 4 5 6 7 8 9 * 8 # C3010-2E 192.1 SPA3000 TALK / DATA TALK RS CS TR RD TD CD Broadband Modem 192.29 MY ASTERISK® IP PBX NETWORK The following is a representation of my network schematic on my Local Area Network with my Asterisk box as I have done according to my narration above.168.168.168.1. My VOIP Network IBM VOIP Service Provider Internet PSTN 8 Ports router 192.1.168.1.22 (X-Ten) 1 2 3 4 5 6 192.168.1.21 192.20 7 8 9 * 8 # C3010-2E 192.12 PC PC using SoftPhone 192.11 PC Asterisk PC (IPBX) 192.168.1.13 Through PSTN if network down PC 192.1.168.168.168.1.1.168.1.1.168.1.10 1 2 3 4 5 6 7 8 9 * 8 # C3010-2E 192.100 ALL IP Phones and ATA registered to Asterisk VOIP Traffic Asterisk registered to VOIP Service Provider /s Asterisk@Home Without Tears Page 112 of 164 .23 Network Server PSTN Traffic to/from PBX 192.

net/forum/?group_id=123387 http://amp.html http://sourceforge. you are free to download and distribute it.voip-info.asteriskguru.net/faq.zip O’Reilly has licensed the book under the creative commons license and as such.ca/ http://sourceforge.freewebs.shtml 30.net/ http://www.com/tutorials/ General VOIP related: http://www.30 PUBLICATIONS AND REFERENCES 30. TUTORIALS AND WIKIS http://asteriskathome.com/en/US/tech/tk652/tk698/technologies_tech_note09186a0080094ae2.coalescentsystems.org/wiki/view/Asterisk%40home+Handbook+Wiki http://asteriskathome.3 OTHER ASTERISK@HOME FORUMS.2 VOICE OVER IP – PER CALL BANDWIDTH CONSUMPTION The following is a reference from Cisco Systems that’s worth a look. 30.1 THE FUTURE OF TELEPHONY BY O’REILLY PUBLISHING You may download the pdf version of this publication here: http://voipspeak.html Asterisk@Home Without Tears Page 113 of 164 . http://mundy.net/docman/?group_id=121515 The following are two tutorial sites that I recommend everyone who is serious about Asterisk to visit.com/voipformula/VoIP-HOWTO.php?p=81 http://www.net/images/stories/orielly/AsteriskTFOT. http://www.cisco.org/blog/index.sourceforge.sourceforge.

com/usbphone/SJphoneDriverATCOM-AU-100.yealink.31 USB PHONE SUPPORT Most USB Phones are pre-configured for use with Skype and as a result some USB Phone users are experiencing difficulties using the USB phones dial pads to dial out using providers other than Skype especially when using SIP.exe Asterisk@Home Without Tears Page 114 of 164 .packetizer.waytec.com/products/se-p1k.html http://www.htm http://www. Special driver are usually required. http://www.htm http://www.htm http://www.welltech. which may interest USB phone users.com/free-phone.au/download.com. Users may have to try different drivers to find a suitable one. The following are links. where appropriate drivers may be found.com/english/support.pc-telephone.sjlabs.com/products/ http://www.com/product_e_06.htm http://www.sednacomputer.

inc you are advised to use an editor (such as nano) as I have found that AMP tends to loose the embedded formatting character. avoid selecting “first or last name” as the search criteria for Company Directory.4.Hangup It may not be the best way out.AGI(directory.php?thread_id=1433624&forum_id=420324 32.Playback(vm-goodbye) exten => #.3 EDITING EMAIL NOTIFICATION MESSAGE When customising or editing your e-mail notification message in /etc/asterisk/vm_email. In AAH 2. if a caller press # for directory. the Digital receptionist will go into an endless loop.DIR-CONTEXT set in Digital Receptionist exten => #. 32.4 ENDLESS LOOP DURING DIRECTORY SEARCH (V2. I took the easiest way out by changing the script relating to # in extensions.${DIRECTORY:0:1}${DIRECTORY_OPTS}) exten => #. Selecting this option will cause Digital Receptionist to go into an endless loop if either # or *411 is selected during the playback of Digital receptionist (Read on for the fix). http://sourceforge. It is difficult to ascertain with confidence which version has an accurate backup and Restore facility.5.32 BUGS REPORTS 32. 32. when Digital receptionist answers a call.so is removed from /usr/lib/asterisk/modules. it will not start unless app_rxfax.0. Users have to test each version of AAH installed individually.4/2.so and app_txfax. This is reported on the following link.Wait(1) exten => #. To overcome this.${DIR-CONTEXT}.2 CONFLICT BETWEEN ZAP CARD AND FAX MODULE There is a reported conflict between ZAP cards and FAX module that may require certain files to be removed as Asterisk v2.3. This is merely a head up for users. but it prevented me from using the hammer ☺ Asterisk@Home Without Tears Page 115 of 164 .ext-local.2.net/forum/forum.1. You may however select “first name” or “last name” however if # is chosen during the playback of Digital Receptionist. the endless loop will also occur as I have found out below.conf to this: .0) When setting up the general setting in AAH 2.0.1 BACKUP AND RESTORE There is an ongoing issue with Backup and Restore.

As it turned out, there is a number of .gsm sound files missing from the
/var/lib/asterisk/sounds directory. This is documented here:

http://sourceforge.net/tracker/index.php?func=detail&aid=1365968&group_id=123387&atid=696349

You may download the missing sound files from the above link and include them
in the /var/lib/asterisk/sounds directory and problem solved.

If you have made the changes as I did above, please ensure that you insert the
“o” back ☺

This issue has been addressed in version 2.1

32.5 FLASH OPERATOR PANEL (BUG DETECTED IN VERSION 1.3)
1. After doing the manual edits of the password (security), Asterisk@Home
need to be restarted. Otherwise the new password will not take effect.
The old default password of “passw0rd” will still be in effect.

To restart, using CLI, type the following:

amportal stop to stop AAH and
amportal start will restart AAH.

2. Sometimes the flash panel cannot tell when a hang-up has occurred. It
will show your extension as being busy but to no one. This can be fixed by
restarting asterisk and hopefully it will be fixed in further versions of FOP.

3. There is an absolute call transfer timeout but at this stage, information on
it is still elusive. Maybe someone will be able to contribute to the remedy.
(Source Reference: Mark Brooker, asternic.org)

32.6 MAX CHANNELS BUG
There has been reports that due to a bug to deprecated command, it makes
Asterisk@Home's calculation of maximum channels invalid. To fix it, you have to
do the following:

1. Goto Config edit and open extensions.conf
2. Under the [macro-dialout-trunk], do the following:

a. Comment out line s,7 thus
;exten => s,7,CheckGroup(${OUTMAXCHANS_${ARG1}})

b. Insert a new line as shown below:
exten => s,7,GotoIf($[${GROUP_COUNT()} > ${OUTMAXCHANS_${ARG1}}]?108)

3. Then click the Update button and reload Asterisk to activate the change.

32.6.1 Corrected in version 2.8
This has been addressed in AAH version 2.8

Asterisk@Home Without Tears Page 116 of 164

32.7 RING GROUP HUNT SYNTAX BUG (V2.2 AND V2.5)
The ring group hunt syntax bug that appears in AAH version 2.2 seems to stay
with us in AAH version 2.5. This caused Asterisk to only ring all extension or it
will just progress to your no answer option if the hunt option is selected.

Neilmc, one of the Whirlpool Forum participant pointed me to the solution
obtained by Christian Müller at http://tinyurl.com/nutqk that discovered the error
as a result of a typo in extensions.conf.

The offending line is under the [macro-dial] context:

exten => s,22,GotoIf($[$[${HuntMembers} >= 1]?30 ) ; if this is from rg-group, don't strip prefix

This should be replaced with:

exten => s,22,GotoIf($[${HuntMembers} >= 1]?30 ) ; if this is from rg-group, don't strip prefix.

The typo error is the extra $[ that appears in the original line. What a difference a
“$[“ made ☺

32.7.1 Corrected in version 2.8
This error has been addressed in version 2.8

32.8 SECURING ASTERISK@HOME CONSOLE ALT+F9
Asterisk has a hidden feature/security risk. On the keyboard you can just press
down “Alt” & “F9” simultaneously, then you get access to Asterisk console
without having to logon to the actual system and with no Asterisk restrictions.

I have not personally verified this but I am not taking any chances. However to
exploit this, one need to have a direct access to the Asterisk computer ☺

This can be a security risk and to disable it just edit /usr/sbin/safe_asterisk

nano /usr/sbin/safe_asterisk
and change CONSOLE=yes to CONSOLE=no

And while you are at it, change the email address as well so you get emails when
Asterisk crashes.

Now restart asterisk with the command:

amportal stop to stop AAH and
amportal start will restart AAH.

32.9 SOUND DIRECTORY PERMISSION (V2.6)
There is a permission issue with the /var/lib/asterisk/sounds directory which
breaks the voicemail prompts and drops back to busy.

Asterisk@Home Without Tears Page 117 of 164

To overcome this, the permission to the /var/lib/asterisk/sounds directory should
be set to 755 using the chmod command at the command line.

chmod 755 /var/lib/asterisk/sounds

32.10 WAKEUP CALLS (V2.2)
There are problems with the Wakeup Calls. A number of the voice files assumed
to be in /var/lib/asterisk/sounds/extra are missing. In fact the directory doesn’t
exist in the Asterisk@Home setup.

The wakeconfirm application that is used to prompt the user as a confirmation
method that user is actually awake, is also missing.

As a result, WakeUp Calls will not work.

32.10.1 Corrected in version 2.4
This bug has been addressed in Version 2.4; however the wakeconfirm is still
not working.

Asterisk@Home Without Tears Page 118 of 164

chances are. for some reason rejects user agent if it is Asterisk.8 with freePBX is to create an Inbound Route with the DID and CID field left blank. At least this will let incoming calls through while you try to solve the problem..3 PENNYTEL ASTERISK PROBLEM Pennytel.1 ASTERISK FEATURE CODES NOT WORKING If you are using ATAs such as the Sipura SPA3K. Please refer to the following sections in this guide: 4 Incoming Calls Handling 7.2 ASTERISK DROPS CALLS AFTER A FEW SECONDS If Asterisk rings an extension but drops the calls too soon before it was answered. you will find some unexpected problems. otherwise the Asterisk feature codes such as *77. 33. while others are unintentional mistakes. This is caused by the ATA intercept the codes thinking that it is its own feature codes. These will be added progressively as we encounter them. A quick fix for AAH 2. 33. 33. 33. chances are that you may have missed setting up the incoming call handling as suggested in the previous sections of this guide. To work around this.conf Asterisk@Home Without Tears Page 119 of 164 . We will endeavour to list troubleshooting tips as we experience them (or those suggested by other users). you will need to delete all the Vertical Service Feature codes in the ATA.33 TOUBLE SHOOTING With any installation. required if you are with Pennytel The user agent can be any string as long as it is not Asterisk.conf under [general] useragent = My PABX . This setting can be found in the General Setting under Voicemail.4 UNABLE TO RECEIVE INCOMING CALLS If you are unable to receive incoming calls. you are required to introduce the following line in your sip.1. Some are inherent issues due to bugs or undocumented features.4 extensions. Linksys PAP2 etc. you may have set the ‘Number of seconds to ring phones before sending callers to voicemail:’ too short. *99 etc may not work.

2.APPENDIX A A.1 General commands !<command>: Executes a given shell command abort halt: Cancel a running halt add extension: Add new extension into context add ignorepat: Add new ignore pattern add indication: Add the given indication to the country amportal start: Stop AAH and amportal stop: Restart AAH. *98 Enter Message Center *99 Playback IVR Recording *411 Directory (while in IVR – similar to #) 70 Call Parking (or 700 see Call Parking and Transfer) 666 Test Fax 888 Barge in (there are variations) 7777 Simulate incoming call A. no debug channel: Disable debugging on a channel Asterisk@Home Without Tears Page 120 of 164 .2 ASTERISK CLI COMMANDS These are some of the available CLI commands that can be executed from the console when you run: asterisk –r (or –rvvv depending on the level of verbosity you may want). Use after rotating the log files.1 ASTERISK FEATURE CODES *8 Call Pickup *43 Echo Test *60 Time *61 Weather *62 Schedule wakeup call *65 Festival test (your extension is XXX) *69 Last Caller number/ID *70 Activate Call Waiting (deactivated by default) *71 Deactivate Call Waiting *72 Call Forwarding System *73 Disable Call Forwarding *77 IVR Recording *78 Enable Do-Not-Disturb *79 Disable Do-Not-Disturb *90 Call Forward on Busy *91 Disable Call Forward on Busy *97 Message Center (does no ask for extension) *97 + 0 Change email greeting message. or specific help on a command include context: Include context in other context load: Load a dynamic module by name logger reload: Reopen log files. debug channel: Enable debugging on a channel dont include: Remove a specified include from context help: Display help list. To stop AAH – amportal stop To start AAH – amportal start A.

conf. pri debug span: Enables PRI debugging on a span pri intense debug span: Enables REALLY INTENSE PRI debugging pri no debug span: Disables PRI debugging on a span remove extension: Remove a specified extension remove ignorepat: Remove ignore pattern from context remove indication: Remove the given indication from the country save dialplan: Overwrites your current extensions. A backup copy of your old extensions.conf is not saved.3 Database Handling database del: Removes database key/value database deltree: Removes database keytree/values database get: Gets database value database put: Adds/updates database value database show: Shows database contents Asterisk@Home Without Tears Page 121 of 164 . the current values of global variables are not written into the new extensions.conf file with an exported version based on the current state of the dialplan.2.2 AGI Commands show agi: Show AGI commands or specific help dump agihtml: Dumps a list of agi command in html format A. The initial values of global variables defined in the [globals] category retain their previous initial values. Using "save dialplan" will result in losing any comments in your current extensions. set verbose: Set level of verboseness show agents: Show status of agents show applications: Shows registered applications show application: Describe a specific application show channel: Display information on a specific channel show channels: Display information on channels show codecs: Display information on codecs show conferences: Show status of conferences show dialplan: Show dialplan show image formats: Displays image formats show indications: Show a list of all country/indications show locals: Show status of local channels show manager command: Show manager commands show manager connect: Show connected manager users show parkedcalls: Lists parked calls show queues: Show status of queues show switches: Show alternative switches show translation: Display translation matrix show voicemail users: List defined voicemail boxes show voicemail zones: List zone message formats soft hangup: Request a hangup on a given channel A.2.conf.

4 IAX Channel Commands iax2 debug: Enable IAX debugging iax2 no debug: Disable IAX debugging iax2 set jitter: Sets IAX jitter buffer iax2 show cache: Display IAX cached dialplan iax2 show channels: Show active IAX channels iax2 show peers: Show defined IAX peers iax2 show registry: Show IAX registration status iax2 show stats: Display IAX statistics iax2 show users: Show defined IAX users iax2 trunk debug: Request IAX trunk debug iax debug: Enable IAX debugging iax no debug: Disable IAX debugging iax set jitter: Sets IAX jitter buffer iax show cache: Display IAX cached dialplan iax show channels: Show active IAX channels iax show peers: Show defined IAX peers iax show registry: Show IAX registration status iax show stats: Display IAX statistics iax show users: Show defined IAX users init keys: Initialize RSA key passcodes show keys: Displays RSA key information A.5 SIP Channel commands sip debug: Enable SIP debugging sip no debug: Disable SIP debugging sip reload: Reload sip.conf (added after 0.1 on 2004-01-23) sip show channels: Show active SIP channels sip show channel: Show detailed SIP channel info sip show inuse: List all inuse/limit sip show peers: Show defined SIP peers (register clients) sip show registry: Show SIP registration status (when Asterisk registers as a client to a SIP Proxy) sip show users: Show defined SIP users A.2.7.2.6 Server management restart gracefully: Restart Asterisk gracefully restart now: Restart Asterisk immediately restart when convenient: Restart Asterisk at empty call volume reload: Reload configuration stop gracefully: Gracefully shut down Asterisk stop now: Shut down Asterisk immediately stop when convenient: Shut down Asterisk at empty call volume extensions reload?: Reload extensions ONLY unload: Unload a dynamic module by name show modules: List modules and info about them show uptime: Show uptime information show version: Display Asterisk version info Asterisk@Home Without Tears Page 122 of 164 . A.2.

A. jump here when we timeout. t = timeout. s = standard. jump here if the dialled extension is unknown (used for generic processing). jump here when a call in hung up. h = hang-up. one of: | CHANUNAVAIL |CONGESTION | BUSY | NOANSWER | ANSWER | CANCEL Asterisk@Home Without Tears Page 123 of 164 . i = invalid. a special extension to escape voice mail (configurable) A. o = operator. ${ACCOUNTCODE} Account code (if specified) ${CALLERID} Caller ID ${CALLERIDNAME} Caller ID Name only ${CALLERIDNUM} Caller ID Number only ${CALLINGPRES} PRI Caller ID presentation for incoming calls ${CHANNEL} Current channel name ${CONTEXT} Current context ${DATETIME} Current date time in the format: YYYY-MM-DD_HH:MM:SS ${DNID} Dialed Number Identifier ${ENUM} Result of application EnumLookup ${EPOCH} Current unix style epoch ${EXTEN} Current extension ${ENV(VAR)} Environmental variable VAR ${HANGUPCAUSE} Asterisk hangup cause ${INVALID_EXTEN} The invalid called extension (used in the "i" extension) ${LANGUAGE} Current language ${LEN(VAR)} String length of VAR (integer) ${MEETMESECS} Number of seconds a user participated in a MeetMe ${PRIORITY} Current priority ${RDNIS} Redirected Dial Number ID Service ${TIMESTAMP} Current date time in the format: YYYYMMDD-HHMMSS ${TXTCIDNAME} Result of application TXTCIDName ${UNIQUEID} Current call unique identifier ${SIPCALLID} SIP Call-ID: header verbatim (for logging or CDR matching) ${SIPDOMAIN} SIP destination domain of an inbound call (if appropriate) ${SIPUSERAGENT} SIP user agent The following are set by the dial() application: ${DIALEDPEERNAME} Dialed peer name ${DIALEDPEERNUMBER} Dialed peer number ${DIALEDTIME} Total time for the call in seconds (Network time). jump here when an invalid number is dialled. ${ANSWEREDTIME} Time from answer to end of call in seconds. ${DIALSTATUS} Status of the call.3 ASTERISK SPECIAL EXTENSIONS The following are some Asterisk Special Extensions that are useful to know when creating your Dial Plan or Special Custom Context. These variables are automatically defined when a new call starts.4 ASTERISK COMMON VARIABLES The following are some of the special variables in use with the Asterisk scripts as defined in the Asterisk’s document.

A.5 CODEC (CODER DECODER)
When making a call over the net, the software (soft-phone) or hardware needs to
use a codec so as to send/receive information in a certain format and convert it to
what you hear. What this means to you and me is that codecs compress data,
allow you to transmit the compressed data which is then uncompressed at the
receiving end. If you compress something with G729 and you don't have that
installed, then you wont be able to decompress it and vice versa.

Note: g729 does not come preinstalled with Asterisk – you will need to purchase it.

Different codecs have different compression ratios resulting in different bandwidth
requirements. Generally the higher the compression the more CPU power
required to compress, and sometimes decompress.

In most cases this means:
• Higher compression = More CPU power = Lower Bandwidth
• Lower compression = Less CPU power = More Bandwidth

So the more bandwidth you have, the less need for a higher compression ratio
and the less powerful the CPU that will be needed.

Most VoIP providers/hardware/licensed software will support G711 and G729
(However be sure to check this before purchasing hardware, or signing up with a
VoIP provider!), with G711 requiring almost 3 times as much bandwidth, and
providing excellent quality and the G729 providing quality similar to a good mobile
call but using less bandwidth.

Below are the approximate bandwidth requirements for Several Common VoIP
Compression Algorithms using SIP. They vary slightly depending on the protocol
used.

Codec Bit Rate Nominal Ethernet Approx. MBytes
Codec
(Kbps) Bandwidth (Kbps) usage per hour
G.711 64 87.2 39.24
G.729 8 31.2 14.04
G.723.1 6.4 21.9 9.86
GSM 13.2 28.7 approx 12.92 approx
iLBC 15.2 30.83 approx 13.87 approx
G.723.1 5.3 20.8 9.36
G.726 32 55.2 24.84
G.726 24 47.2 21.24
G.728 16 31.5 14.18

Codecs used by AAH reside in the /usr/lib/asterisk/modules directory.

The following links will give you some indications of the bandwidth usage of the
various codecs that you may be using or contemplating on using.
http://www.asteriskguru.com/tools/bandwidth_calculator.php
http://www.cisco.com/en/US/tech/tk652/tk698/technologies_tech_note09186a0080094ae2.shtml
http://www.voip-calculator.com/calculator/lipb/
http://www.connect802.com/voip_bandwidth.php
http://www.newport-networks.com/pages/voip-bandwidth-calculator.html

There are others. All you have to do is Google for them ☺

Asterisk@Home Without Tears Page 124 of 164

APPENDIX B
B.1 – MORE TRUNKS
The following is a collection of TRUNK settings recommended for other VSPs that
are not covered above. Details of trunks configuration are correct at the time they
were compiled, however changes may have been made. Users are advised to
consult their respective VSPs for confirmation.

B.1.1 BBPglobal

Peer Details User Details
Trunk Name: bbpglobal User Context: <user number>

allow=g723&gsm context=from-trunk
authuser=<user number> fromuser=<user number>
disallow=all insecure=very
fromdomain=sip2.bbpglobal.com secret=<password>
fromuser=<user number> type=user
host= sip2.bbpglobal.com username=<user number>
insecure=very
qualify=yes
secret=<password>
type=peer
username=<user number>

Register String:
<user number>:<password>sip2.bbpglobal.com/<user number>

B.1.2 Engin BYO

Peer Details User Details
Trunk Name: engin User Context: 02321XXXX
allow=ulaw&alaw context=from-pstn
auth=md5 fromdomain=voice.mibroadband.com.au
canreinvite=yes host=byo.engin.com.au
disallow=all secret=<password>
dtmfmode=rfc2833 type=user
fromdomain=voice.mibroadband.com.au username=02321XXXX
fromuser=02321XXXX
host=byo.engin.com.au
insecure=very
musiconhold=framed
nat=yes
port=5060
qualify=no
realm=mobileinnovations.com.au
reinvite=yes
secret=<password>
type=friend
username=02321XXXX

Register String:
02321XXXX:<password>@byo.engin.com.au/02321XXXX

Asterisk@Home Without Tears Page 125 of 164

B.1.3 Faktortel (IAX)

Peer Details User Details
Trunk Name: faktortel User Context: xxxxxx
allow=g729&gsm&ulaw&alaw&ilbc context=from-trunk
disallow=all host=iax.faktortel.com.au
host=iax.faktortel.com.au qualify=3000
qualify=3000 type=friend
secret=<password> username=xxxxxx
type=friend
username=xxxxxx

Register String:
xxxxxx:<password>@iax.faktortel.com.au

Faktortel supports the following codecs: ulaw, alaw, ilbc, gsm, g729

B.1.4 FWD aka Pulver

Peer Details User Details
Trunk Name: fwdsip User Context: 65xxxx
allow=ulaw&alaw canreinvite=no
canredirect=no context=from-trunk
disallow=all fromuser=65xxxx
host=fwd.pulver.com insecure=very
insecure=very qualify=no
secret=<password> secret=<password>
type=peer type=user
username=65xxxx username=65xxxx

Register String:
65xxxx:<password>@fwd.pulver.com/65xxxx

B.1.5 iinet

The following are the various iinet sip proxies for the different states. You
may use the sip proxy designation or the dot format IP address when
configuring your iinet setting in Asterisk@Home.

State SIP Server IP
act sip.act.iinet.net.au 203.55.231.193
nsw sip.nsw.iinet.net.au 203.55.231.199
nt sip.nt.iinet.net.au 203.55.229.193
qld sip.qld.iinet.net.au 203.55.228.193
sa sip.sa.iinet.net.au 203.55.229.193
tas sip.tas.iinet.net.au 203.55.229.193
vic sip.vic.iinet.net.au 203.55.229.193
wa sip.wa.iinet.net.au 203.59.49.5

Since VSP may change their sip IP address, it is advisable to use the sip
proxy desigbation rather than the dot format IP address.

Asterisk@Home Without Tears Page 126 of 164

italk. Peer Details User Details Trunk Name: iinetout User Context: iinet-inbound allow=alaw&ulaw allow=alaw&ulaw&ilbc canreinvite=no context=from-trunk disallow=all host=203.248.228.iinet.193 secret=<password> insecure=very type=friend nat=no pedantic=no secret=<password> type=peer username=073XXXXXXX Register String: 073XXXXXXX@iinetphone.122.7 Koala Peer Details User Details Trunk Name: KoalaSip User Context: <user a/c number> allow=g729&gsm&alaw&ulaw context=from-pstn disallow=all fromdomain=203.nz outgoing CID.au insecure=very fromuser=073XXXXXXX qualify=no host=203. disallow=all dtmfmode=rfc2833 You may prefix outgoing fromuser=64997xxxxx calls with 0197 to disable host=akl.net.122.173 host=203.6 iTalk (New Zealand) Peer Details User Details Trunk Name: italk User Context: allow=ulaw&g729 Note: Incoming setting is canreinvite=no not required with newer context=from-trunk versions of AAH.193 fromdomain=iinetphone.248.1.iinet.173 secret=<password> nat=yes type=user port=5060 username=<username-Sip> qualify=no secret=<password> type=friend Asterisk@Home Without Tears Page 127 of 164 .au:Password:073XXXXXXX@iinetout (Source Ref: Graham Foote) B.co.net.co.122.nz/64997xxxxx (Source Ref: Steve Biddle) B.55.173 fromuser=<Username-sip> host=203. insecure=very secret=<your password> Inbound route 64997xxxxx type=friend required to be forwarded username=64997xxxxx to a destination ext/menu Register String: 64997xxxxx:<your password>@akl.italk.228.55.1.248.

ifone.internode.au B.on.net insecure=very secret=<password> type=peer Asterisk@Home Without Tears Page 128 of 164 .myfone.au host=iax.au:<password>:091xxxxx@sip.10 Nodephone Peer Details User Details Trunk Name: Nodephone User Context: <usernumber> allow=g729 context=from-trunk canreinvite=no host= sip.1.on.internode.com.on.8 MyNetFone Peer Details User Details Trunk Name: MyFonesip User Context: 091XXXXX allow=g729&alaw&ulaw canreinvite=no authname=091xxxxx context=from-trunk canreinvite=no fromuser=091xxxxx disallow=all insecure=very dtmfmode=rfc2833 qualify=no fromuser=091xxxxx secret=<password> host=sip.net disallow=all secret=<password> dtmfmode=rfc2833 type=user fromdomain=sip.com.au secret=<password> qualify=yes type=user secret=<password> username=661xxxx type=peer username=661xxxx Register String: 661xxxx:<password>@iax.com.ifone.au/091xxxxx B.com.myfone.com.9 Nehos (IAX) Peer Details User Details Trunk Name: Nehos User Context: 661XXXX allow=g729 context=from-trunk disallow=all host=iax.ifone.com.au (Source Ref: Curtis of Koala) B. Register String: <User SIP ID>:<password>@koalavoip.1.internode.au type=friend insecure=very username=091xxxxx nat=yes pedantic=no qualify=yes secret=<password> type=friend username=091xxxxx Register String: 091xxxxx@sip.com.myfone.net username=<usernumber> fromuser=<usernumber> host=sip.1.

fromuser=<your user ID of existing provider> host=sipbroker. Register String: <usernumber>:<password>@sip.com.au/1777xxxxxx B.sipphone. if you are using Dynamic IP localnet=192.168.13 SipPhone Peer Details User Details Trunk Name: sipphone User Context: 1747xxxxxxx fromdomain=proxy01.on.sipme. you must ensure that your sip_nat.1.sipme.0/255.1.255.1.sipphone.com.1.0 B.com context=from-trunk insecure=very fromuser=1747xxxxxxx secret=<password> insecure=very type=peer qualify=no username=1747xxxxxxx secret=<password> type=user username=1747xxxxxxx Asterisk@Home Without Tears Page 129 of 164 .12 SipMe Peer Details User Details Trunk Name: sipme User Context: 1777xxxxxx authname=1777xxxxxx context=from-trunk dtmfmode=rfc2833 fromuser=1777xxxxxx fromuser=1777xxxxxx secret=<password> host=sip.com canreinvite=no host=proxy01. if you have fix IP or externhost=<your DNS hostname> .11 SipBroker Peer Details Trunk Name: sipbroker-out allow=g729&ulaw&alaw You will not require user canreinvite=no details since you will not disallow=all be receiving incoming dtmfmode=rfc2833 fromdomain=<your existing sip provider> calls from this trunk.conf is modified to the following. nat=yes externip=<Fix Ip address> .au type=user insecure=very secret=<password> type=peer username=1777xxxxxx Register String: 1777xxxxxx:<password>@sip.com You do not need to insecure=very register either.255.internode. nat=yes port=5060 secret=<password for existing provider> type=peer If you are using SipBroker.net B.

com/1747xxxxxxx B.80.voipbuster.voipbuster.14 TelephoneGlobal Peer Details User Details Trunk Name: Teleglobal User Context: 2222xxxxxxxxx allow=g729 context=from-pstn canreinvite=no fromuser=2222xxxxxxxxx disallow=all secret=<password> host=210.voipbuster.142 type=user insecure=very secret=<password> type=peer username=2222xxxxxxxxx Register String: 2222xxxxxxxxxxx:<password>@210.1. an fromuser=<your username> Inbound route is required to forwarded host=sip1.com If you have an inbound number.1.sipphone.182.15 VOIP Buster Peer Details User Details Trunk Name: VoipBuster User Conext: <leave blank> allow=alaw&ulaw&gsm context=from-pstn Note: Incoming setting is not required disallow=all with newer versions of AAH. Register String: 1747xxxxxxx:<password>@proxy01. dtmfmode=inband fromdomain=sip1.142/2222xxxxxxxxxxx B.com your incoming call to a destination insecure=very extension or IVR menu: nat=yes (necessary in some cases) qualify=yes Inbound Route: secret=<your password> DID: <User inbound Number> srvlookup=yes No Fax type=friend username=<your username> Register String: <username>:<password>@sip1.80.182.com/<username> (Source Ref: Florent Chandelier) Asterisk@Home Without Tears Page 130 of 164 .

3 Setting up FaktorTel for Asterisk@Home The following is the link on the discussions for setting up Faktortel on AAH http://voipinfo.2. http://members. It is quite comprehensive and certainly worth a look.com.htm B.conf http://www. give them a cursory glance.faktortel.php?t=135 Faktortel supports the following codecs: • ulaw • alaw • ilbc • gsm • g729 Asterisk@Home Without Tears Page 131 of 164 .au/downloads/extensions.com.ozemail. B. at least.myfone.au/~bsharif/aah/trunk_settings. I recommend that you should.2.au/viewtopic.conf B.com.2. B.au/downloads/sip.1 Trunk and Route Settings The following link contains Trunks and Route settings put together by Colin Swan.2 MyFone settings http://www.com.2 RELATED LINKS – (FOR VSP TRUNK SETTINGS) The following links contain very useful information when setting up your Asterisk@Home.myfone.

voip-info. posted the following tip in the Whirlpool forum. Asterisk is very funny about sound files.com/pipermail/asterisk-users/2002-December/006635.nathanpralle. Some further reading.php?page=Asterisk+sound+files http://www.org/tiki-index.wav -r 8000 -c 1 -s -w linwave.wav Now the demo has a 100 character limit so you may need to do 2 or 3 files and join them together with a program like Accoustica MP3 mixer.php?page=Asterisk+sound+files <End quote> Asterisk@Home Without Tears Page 132 of 164 .org/tiki-index.digium. Check this out http://www.au/whirlpool.1 VOICE FOR ASTERISK MESSAGES Brian.voip-info. I tried using all sorts of programs to get the file to the right specs but it failed to work every time.be/Asterisk-PBX/IVR.html http://www.acoustica.voip-info.cbservers. Brian has asked me to include his discovery in this guide.org/wiki/view/Asterisk+sound+files+additional http://www. a Whirlpool Enthusiast. First you need the original recording either from a real professional or a "text to voice" utility. I went with the Realspeak demo http://www.APPENDIX C Details for Asterisk Sound Files can be obtained from the following links: http://www.nuance.php?page=Convert+WAV+audio+files+for+use+in+Asterisk http://users.org/tiki-index.com/realspeak/demo/default.html C.com/software/ast_masterlist.asp The "British Daniel" voice was deep and professional.sourceforge. http://www.voip-info. It was after this part that I had a lot of problems.net/ then at the command line prompt use this syntax: sox winwave. I eventually used "sox" an open source command line editing tool and it worked first go (using advice from VoIP-info & digium forums) http://sox.pandora.wav you may then upload your message to asterisk.com. http://lists. I thought I might detail my exploits here for those that might be considering the same thing. The following is an extract of Brian’s exploits – verbatim ☺ <Quote> I have just been setting up the Digital Receptionist and I wanted to use a professional voice for messages.com/mp3%2Daudio%2Dmixer/ Save it as a wav file.htm http://www.

tar.gz [enter] • For backup type: tar cvfz backupsounds.gz [enter] • Type: tar -zxvf ausoundset. just in case.au/free.3 MORE AUSTRALIAN VOICE FOR ASTERISK As part of OpenVoice contribution to the Asterisk community.com.tar.gz Quick Steps for asterisk@home • Log into your asterisk@home server • Type: wget http://files.voipshop.com.au/product_info. The files (male voice) can be downloaded here: http://www.gz -C /var/lib/asterisk/sounds/ [enter] • Done.gz -C /var/lib/asterisk/sounds/ [enter] • Done. Note : You can only download these files from voipshop. Two files are available.au/ausounds.tar.com. The other is as an additional Asterisk language (if you are going to use the SetLanguage option). Your asterisk sound files are replaced.php Asterisk@Home Without Tears Page 133 of 164 .openvoice. C. one is as a replacement for the current asterisk files.tar.au for commercial license details.php?products_id=72 to download The following is extract of the instructions by VOIPSHOP on their web site. they are offering a free set of Australian prompts for the Asterisk™ Open Source PBX. Log on to http://www. ** Make sure you back up. Additional Asterisk Language Set: ausoundset.com. Please Contact VOIPSHOP mailto:support@voipshop.2 AUSTRALIAN VOICE AND LANGUAGE SET FOR ASTERISK VOIPSHOP has made available the files free to non commercial users.voipshop.voipshop.au/ausoundset.com.gz Quick steps for asterisk@home • Type: wget http://files. Your asterisk sound files now contain an au soundset.gz /var/lib/asterisk/sounds/ [enter] • Type: tar -zxvf ausounds. Replace Current Asterisk Files: ausounds.tar.tar. Please do not re-distribute.tar. C. These are free for non-commercial use only.

it or whichever language is installed) Asterisk@Home Without Tears Page 134 of 164 . language=au . don’t forget to add the following line in the iax.conf and sip.conf configuration file under [general]. Of course.conf configuration file the line should be added under [channels]. In zapata. (or fr.

Trying 10.138. Username : root Password : ---------- . have decided that we are not suppose to use this port. But. you will need to unbind port 5060. welcome message blah blah blah .. Click on Start > Run then type: telnet 10.sipgate. So they blocked it in these types of routers.1 ALCATEL SPEEDTOUCH 510/530 ADSL ROUTER If you are using Telstra Alcatel SpeedTouch 510/530 ADSL Router. Source Reference: http://www. I am assuming that you are running a Windows PC to do this. .0. in their wisdom for reasons best known to themselves. otherwise you will not be able to use VOIP since Alcatel..APPENDIX D (ATAS AND ROUTERS) D.uk/faq/index...co. your phone should work..0. there are more than just one way to skin a cat ☺ thus. as we know.2 BILLION 7402 VL Some extra information that will get a Billion 7402 VL FXS to work with asterisk and have NAT port 5060 points to the Asterisk server. Asterisk@Home Without Tears Page 135 of 164 . Connected to speedtouch Escape character is '^]'.. the solution is to telnet to the ADSL modem and remove this restriction..138 [or replace with the correct ip address] you will notice the following..0.php?aktion=artikel&type=faq&rubrik=024&id=398&lang=de D. You then should unbind the SIP protocol and reboot the modem thus: =>nat unbind application=SIP port=5060 =>config save =>system reboot To check whether the SIP protocol is bound in your modem use this command to show the list of bindings (only showing SIP here): =>nat bindlist Application Proto Port SIP udp 5060 If the line doesn't appear.0.

Dial 111 and when prompted enter 192*168*1*50 followed by # (assuming that you want to allocate 192.50 as the IP address of the ATA). The Linksys PAP2 and the Sipura SPA2000 are essentially identical units encased in different boxes and branded differently. NOTE: . I will describe the minimum changes that are required to get these ATAs to work in conjunction with Asterisk. complete the following: From a windows command prompt… telnet 192. the router automatically forwards the port (5060) to its own IP address and an error will occur if you try to forward that port to the Asterisk box.XXX. This is because it is intended for the FXS ports to connect directly to an external SIP provider. Power up the unit 3.P. (Source Reference: Sean Mahon) D. Not sure why.168.50. 7. Note: The setup described here is for use with Asterisk@home and not for connecting the unit directly to the VOIP service provider.1. address) voip set interfacename iplan (this changes it from the WAN to the LAN interface Next. To overcome this issue and make the FXS ports connect to the Asterisk box. if you enable the FXS ports on the Billion 7402 VL router to be sip enabled.Also codec G729 had to be disabled on the FXS ports for calls to work. Sipura 2000 and Sipura SPA3000 (the Sipura SPA3000 was covered in the chapter relating to Interfacing Asterisk to PSTN).168. You need to do the following: 1. 192.XXX (router I. the unit comes with DHCP enabled. As supplied. Dial **** and listen to the instruction that you will hear from the IVR 5. If it is not your existing network subnet mask you may want to change it. It is best to allocate a fix IP address to the unit and therefore the first thing to do is to disable the DHCP and allocate a fix IP address e. Plug in a telephone in the RJ11 port 1 behind the unit (any one will do) 4. Dial 120 and you will hear the current sub-net mask.g.168. By default. 2. The examples presented here apply to both the Linksys PAP2 and Sipura SPA2000.1. Connect the unit to your network via the RJ45 port behind the unit. Dial 101 and when prompted enter 0 followed by # (this will disable DHCP) 6. If it is the same Asterisk@Home Without Tears Page 136 of 164 . power reset the router.3 LINKSYS PAP2 AND SIPURA SPA2000 The most common Analog Telephone Adapters (ATA) amongst Australian VOIP users are the Linksys PAP2. Now you can add the NAT to point to the asterisk server and the FXS ports will connect to the Asterisk box.

201. 3. Change the Password to the password you have allocated to the asterisk extension. Change the Auth ID to the extension number you have allocated e. 201. change the User ID to the Asterisk Extension number that you have allocated for this line e. c. the same as the User ID. change the SIP Port to 5060 b. Under Proxy and Registration. Under Internet Connection Type. There are other changes that you can do depending on your own requirement. Select the System Tab a. change the existing dial plan to (*x.) Change Enable IP Dialling to yes. These are the minimum changes you need to do to get the ATA working in conjunction with Asterisk. 5.168. d. change the existing dial plan to (*x. change the Proxy to reflect the address of your Asterisk box. delete all the fields. Under Subscriber Information. If you need to change the sub-net mask. d.1. 4. Under Dial Plan. Under Vertical Service Activation Codes. do the following: 8. Select Admin Login and then select (switch to advanced view) 2. 202. as your current network’s subnet mask. Select Regional Tab a. Under SIP Setting. the same as the User ID. Change Use Auth ID to Yes. c. change the Proxy to reflect the address of your Asterisk box. 202.g. Change Use Auth ID to Yes. There are various discussions on this topic in the Whirlpool.50 in your browser address bar and hit enter. Select Line 1 Tab a.g. 1. Select Line 2 Tab a. Voxilla and other forums that you can refer to.g. change the User ID to the Asterisk Extension number that you have allocated for this line e.) Change Enable IP Dialling to yes. Change the Auth ID to the extension number you have allocated e. Under Subscriber Information.|x. change the SIP Port to 5061 b. change the Display Name to whatever you like. Under Dial Plan.|x. Change the Password to the password you have allocated to the asterisk extension. Under Proxy and Registration. Dial 121 and at the prompt enter 255*255*255*0 (assuming that is your existing sub-net mask) Next. Under SIP Setting. connect to the Unit using your browser by entering http://192. do don’t need to do anything else). change the Gateway address to the address of your router. Asterisk@Home Without Tears Page 137 of 164 .g. change the Display Name to whatever you like.

APPENDIX E (USERS’ SUGGESTIONS) E. Outbound Dial Prefix: (empty) Outgoing Settings Trunk Name: astratel Asterisk@Home Without Tears Page 138 of 164 .1 Astratel on Asterisk@Home Colin Swan submitted the following Astratel configuration on AAH.1.1 SUGGESTIONS FOR DIAL PLAN AND CONFIGURATION E. General Settings Outbound Caller ID: <8888xxxx> Maximum Channels: 1 Outgoing Dial Rules Dial Rules: (which tie in with his Outbound Routing method) 02+4XXXXXXX 02+6XXXXXXX 02+80XXXXXX 02+81XXXXXX 02+82XXXXXX 02+83XXXXXX 02+84XXXXXX 02+85XXXXXX 02+86XXXXXX 02+87XXXXXX 02+89XXXXXX 02+880XXXXX 02+881XXXXX 02+882XXXXX 02+883XXXXX 02+884XXXXX 02+885XXXXX 02+886XXXXX 02+887XXXXX 02+889XXXXX 02+8880XXXX 02+8881XXXX 02+8882XXXX 02+8883XXXX 02+8884XXXX 02+8885XXXX 02+8886XXXX 02+8887XXXX 02+8889XXXX 02+9XXXXXXX 0+NXXXXXXXX 0011+1NXXNXXXXXX 0011+44ZXXXXXXXXX 0011+49NXXXXXX.

. to my “family” menu exten => _X.Authenticate(****).1.1) .1. provide the correct password before continuing exten => _X.astrasip.6..1) .au/8888xxxx E.Goto(aa_2.2.s. change ‘****’ to your chosen DISA password exten => s.DigitTimeout(5) exten => s. number will be “reminded” as to what my local exten => _X.s.Answer .1.com.Authenticate(****) .com.3. won’t work to ‘s’ extension for me.2 Further .7.Wait(1) .4...ResponseTimeout(10) exten => s.1 [custom-disa] exten => s..Answer exten => s.5.astrasip. time is. won’t work to ‘s’ extension for me . change ‘****’ to your chosen digits exten => _X.s..8. Peer Details: authuser=8888xxxx context=from-trunk fromdomain=sip01.conf add… .. and then for good measure.4.2. exten => _X. the following is so that any callers to my FWD exten => _X.3..DigitTimeout(5) . only if you want a “DISA” facility – point one of your IVR options to: custom- disa.ResponseTimeout(10) exten => _X.astrasip..au fromuser=8888xxxx host=sip01. they’ll have to exten => _X.com. only for FWD [from-fwd-custom] .au insecure=very secret=xxxx type=peer username=8888xxxx Incoming Settings User Context: 8888xxxx User Details: context=from-trunk insecure=very secret=xxxx type=user Registration Register String: 8888xxxx:xxxx@sip01.SayUnixTime(.IMp). only for sixTel [from-sixtel-custom] exten => _X.conf modifications by Colin extensions_custom.5.Goto(aa_2.Wait(2) .1.DISA(no-password|from-internal) Asterisk@Home Without Tears Page 139 of 164 ..

conf [general] externip= *.168. Port to bind to (SIP is 5060) bindaddr = 0.000 ports seems like overkill sip. DynDNS is OK localnet=192.conf [general] port = 5060 .0/255.0.255.conf add… nat=yes externip= *. iax.Address to bind to all addresses on machine disallow=all allow=ulaw .255.255.168. allow desired codecs in preferred order allow=alaw allow=g729 allow=ilbc allow=gsm context = from-trunk . change to suit bindport = 4569 .conf indications.conf #include sip_additional.0.*.*.conf change… country=au . was 20000.0/255. Send unknown SIP callers to this context callerid = Unknown #include sip_nat.* . Port to bind to (IAX is 4569) bindaddr = 0.0. ip address or hostname.0 . default is "us" rtp.1.* .0. Address to bind to all addresses on machine delayreject=yes disallow=all allow=ulaw .0 .0 . change to suit Asterisk@Home Without Tears Page 140 of 164 . 10.*.*.255.0 .conf sip_nat.1.conf change… rtpend=10100 . allow desired codecs in preferred order allow=alaw allow=g729 allow=ilbc allow=gsm jitterbuffer=yes mailboxdetail=yes #include iax_additional. ip address or hostname – even DynDNS is OK localnet=192.

an Asterisk user from Canada sent me the following feedback that I think is appropriate to include in this guide. E.voip-info.2 MEETME – TELECONFERENCING WITHOUT ZAPTEL CARD Ovidiu Motz. however anyone who have tried this method is welcome to provide feedbacks.org/wiki-Asterisk+timer+ztdummy All I had to do to get it going is outlined in this section: 1. 2.udev and follow the steps b. READ /usr/src/zaptel/README. modprobe ztdummy Best regards. make linux26 3. check modules on: /etc/sysconfig/zaptel. Asterisk@Home Without Tears Page 141 of 164 . cd /usr/src/zaptel a.Teleconference). Ovidiu Motz <unquote> Note: I have not tried this solution as I do have a zaptel device. modprobe zaptel 6. please have a look at the following link: http://www. if you're still looking for a solution to have MeetMe without a Zaptel card. <quote> Regarding Chapter 15 (MeetMe . make install 4. If you have no digium hardware comment out all modeules except ztdummy. Reboot to make udev changes take effect 5.

Check that your hard drives are running in DMA mode (or use SCSI drives). Lots of people have had grief. You don't want a PABX to be thrashing about with a swap file. (It's using about 230MB at the moment).2 compliant) Even though minimum system specs aren't high don't go for a bottom of the range el-crapo brand motherboard. This machine is now working in a busy environment (medical centre) nicely.whirlpool. This is being discussed in this thread: http://forums. but 1GB of RAM doesn't really cost much any more. Sometimes they default to PIO. I asked them to be very fussy about audio quality and let me know if they have any echo. not a bad call yet. Use plenty of RAM. Disable any onboard devices you don't need inc.au/forum-replies. eg the ASUS P5P-800 I used could use APIC to assign IRQ or you could manually assign an IRQ to a particular PCI slot. I used 1GB of decent quality RAM which is definitely far more than the system needs. Asterisk@Home Without Tears Page 142 of 164 . pops. but to minimise chances of problems disable Hyper threading if it is supported on your CPU. Choose a board that has plenty of PCI slots (5 or so). clicks. It may not be a problem. a participant I the Whirlpool Forum provided the following feedback on the use of multiple TDM400P Digium cards. I'm sure that on the old Digium site they had a caution not to use more than one TDM or TE card (That's changed. which might cause problems if there is a sudden burst of disk activity.3 MULTIPLE TDM400P INSTALLATION Neilmc.cfm?t=483550&p=1 <quote> There are plenty of forum posts (on WP and elsewhere) + various how-to and guides that say don't use more than one if you want a reliable system with no audio problems. E. sometimes under full Zap call load. serial. parallel & USB ports. CPU is under 10% pretty much all the time. So far everyone is saying that it's perfectly fine. It has 5 x FXO & 5 x FXS on 3 cards. Make sure you don't grab any old motherboard that is lying about (especially if it isn't PCI 2. Use 32 bit OS rather than 64 bit. There is a list of some incompatible motherboards on the Digium site. they now brag about 1 box running 5 quad span TE cards). but no doubt there will be others that have problems.net. distortion etc. Be very sure that each Digium card is not sharing an IRQ with anything else. There is good reason behind the old advice not to do it though. Make sure that it has plenty of control over IRQ in CMOS.

d/rc. • Make sure that the driver loads with the module option opermode=AUSTRALIA. you should see this 4 times.local in A@H 2. kernel: -. Each FXO port should have loaded with AUSTRALIA mode. Use recent zaptel drivers (unless you become aware of an issue with them). <\quote> Asterisk@Home Without Tears Page 143 of 164 .conf with settings for your cards based on tests with your lines (takes about 5 minutes per FXO port). but you might get what you need by turning it off.html If you have all of the driver stuff loading properly and still have audio problems. Have a read through http://www. • Run fxotune -i 4 (usually from /usr/src/zaptel) It will create a file /etc/fxotune.6 and it loaded okay. If it is FCC mode then the card is set for North American lines. • Have /usr/src/zaptel/fxotune -s run at startup to have the card set.asteriskguru. • Check /var/log/messages after bootup. ( have one module at the office where the first value is 10 rather than zero.Set echo registers successfully If you have 4 FXO ports. Apparently the values in the conf file are often zero if you have the modules in the correct opermode. I just put /usr/src/zaptel/fxotune -s at the bottom of /etc/rc.Setting echo registers: kernel: -. You might be able to tweak your kernel. If fxotune is loading settings okay you should see a line saying something like after all of the other init stuff. • Each FXS port should have an entry for boosting ringer.com/tutorials/pci_irq_apic_tdm_ticks_te410p_te405p_noise. Sometimes APIC can cause you grief. • You will have to stop Asterisk before running fxotune. I'll try fxotune again and see if it changes at all). You need it to run after the drivers load but before asterisk starts.

3. This is due to the fact that the SPA-3000 passes calls from the PSTN to the LINE1 by converting it to VoIP internally and then backs to analogue. • "Echo Canc Adaptive Enable". 4.7) and you have everything back to factory defaults or at least undo all the previous tweaking. This may help getting rid of that pesky echo on your Sipura SPA-3000 PSTN line: 1. most of the time the SPA- 3000 isn't causing the echo. Switch *off* all echo can in all your devices. • "LINE1 -> Network Jitter Level: = low". • PSTN -> "Port Impedance" = 220+820||120nF as a starting point. This reduces the delay across your SPA-3000. This added latency can make echo that was previously unnoticed suddenly become annoying. • Regional -> FXS Port Impedance = "220+820||115nF" as a starting point. In reality. 2. • "Echo Supp Enable" and • Line 1 -> "Echo Canc Enable". 6.1V" and • "Operational Loop Current Min = 16mA". E. In the PSTN tab set – • "Tip/Ring Voltage Adjust: = 3. Turn down the jitter buffers! • "PSTN -> Network Jitter Level: = low". There are 6 places in the sipura to switch off echo can. These can cause impedance problems which lead to echo.1. Echo in the SPA-3000 is a common problem. • "LINE1 -> Jitter Buffer Adjustment: = up and down". • "Echo Supp Enable". This process does not produce any echo. another participant in the Whirlpool Forum.4 ELIMINATING ECHO PROBLEMS IN SPA-3000 Tony. A pure digital system has no echo (the TX and RX path are 100% separated). • "Echo Canc Adaptive Enable". This includes all the extension cables even with nothing connected to them. The idea is that we want to hear how bad the echo is with different configs. • PSTN Line -> "Echo Canc Enable". Unplug everything from your phone line except the SPA-3000. Asterisk@Home Without Tears Page 144 of 164 . It's the interaction of the Digital and Analogue that cause problems. Set the Impedance on your lines. Make sure you are running the latest firmware (3. Doesn't seem to affect echo. but I believe that these are the correct numbers for Australia. 5. however is can add about 30ms of latency to the call. • "PSTN -> Jitter Buffer Adjustment: = disable". provided the following recommendation. it's just making it more noticeable.

down. It has a recorded voice telling you your local phone number. Note: if you enable "Echo Supp Enable" then you will negate these parameters. Go to PSTN -> "SPA To PSTN Gain" and turn it down. talk soft. If the remote user can still hear echo. Look at what you have got. Believe it or not. • "PSTN -> Preferred Codec = g711a". • Try changing the FXO port impedance to "600" or "global". If you can hear an echo then the problem could be that your probably sending to much power down the line. • "LINE1 -> Use Pref Codec Only = no". down until the person can still hear you but reduced echo. Turn it down. Obviously adjust this if you’re accessing your PSTN line via VoIP from a remote network.leave it off. Go for the basics first. Turn down the PSTN To SPA Gain until you can comfortable hear the person. it could be that your phone is so loud that it's feeding back into the microphone. talk back and work out how much echo you are getting. 8. Power cycle the SPA-3000 (pull the power plug). Don't call a mobile! If the remote party is hearing echo. a cruddy old Telstra phone is what I use for testing. You need to crank back on the power. It seems that the Sipura echo suppression is actually just an automatic gain control. The g711a is fast to encode and decode. Especially after you have changed the physical phone wiring. 9. This is probably reflecting back somewhere as an echo. Make some test calls. I believe the range of this variable is about -127 -> 127 (from my testing). the SPA sorts does a double negative and turns it way up. It's really annoying . Using this codec again reduces your latency and may make the echo less obvious or easier to catch with the echo canceller. this sometimes fixes the problem. If you’re close to the exchange and have good wires then this is probably the case. Set the preferred codec for the PSTN to be g711a and lock it in. Talk loud. 10. Make a test call to someone with a known good phone out via the SPA's PSTN line or get someone to call in to the PSTN line. try using a different phone plugged into the SPA. If you are using a poor quality VoIP service as well as the PSTN then you could change the • "LINE1 -> Network Jitter Level: = medium". Asterisk@Home Without Tears Page 145 of 164 . • Try changing the Regional -> FXS Port Impedance to "600". • "PSTN -> Use Pref Codec Only = yes". The telco test number 1800801920 is a good one to start with. down. Best if its just a boring old Telstra phone hard wired to a socket on the wall. 11. While it's talking. Set the LINE1 to allow g711a as well as whatever else your prefer. 7. Be aware that at some point if you turn it down to much. no more. If this solves the problem you may have a bad phone or an impedance miss match between your phone and the SPA.

If the echo is tolerable at this level. Test call. To do this you need to change one setting in the zapata. the latency is so low that you don't notice it. If this doesn't help. Some users may want the PSTN calls to be answered by Asterisk immediately especially if there is a common phone connected in parallel and to avoid someone answering the call using the parallel phone. 12. The adaptive echo canceller is a lot more aggressive but also can cancel out some of the incoming conversation. You should have the echo level down to a level that can be stomped on by the echo canceller. leave the adaptive echo canceller off.conf file. at a later date. Talk loud. 13. Check to see if the echo has improved. E. the real problem is at the *other* end of the connection. the delay is increased and sometimes the echo can become noticeable. change it back. It makes the incoming party sound a bit scratchy. In the end it basically boils down to this – If you are hearing the echo. The only way you can counter this is to reduce the latency (jitter buffer) and/or reduce the gains so the echo volume is reduced below the level that it is noticed. If echo re-appears. At this point. Sipura's definition of good may not suit your situation. In a normal phone conversation. If you are using a sip device to talk through your PSTN line. go back into the "PSTN" tab and switch on the "Echo Can Enable = yes". By default the setting is set to: immediate=no To force Asterisk to answer immediately. remember to try power cycling the SPA before you tweak with anything. calls will be answered after about 3 rings thus allowing time for Asterisk to detect the CID. the SPA-3000 echo canceller should be able to kill off the rest.5 IMMEDIATE ANSWER OF PSTN CALLS By default. The impedance will only affect what the *remote* party hears. When you insert the SPA. Is your conversation clear at both ends? Should be a lot better. you should probably do all the echo cancellation at that device and leave it switched off in the SPA. After you have the echo down to a reasonable level. Leave it off unless you really need it. it won't help echo you are hearing. change the line to read: Asterisk@Home Without Tears Page 146 of 164 . It may also be at the other end of the call. talk soft. In particular if you’re calling in a loud environment then the voice going down the line from your end can trick the echo canceller to start canning some of the real conversation. The "Echo Supp Enable" switches on automatic gain controls. The constant variation of the volume annoys me so I recommend leaving it "off". This means the Sipura will be constantly turning up and down the volume of the call for you and the remote party to try and keep the sound levels at a "good" level. Your brain automatically tunes out to its own voice when you’re talking (as long as the delay between talking and hearing isn't to long).

Asterisk@Home Without Tears Page 147 of 164 . mkdir /var/aah_load (must use this directory) b. This may or may not work satisfactorily as Asterisk needs a couple of rings to detect CID.sh f.5.dyndns. netconfig.gz e./rebuildastsrc.6 and after a few installs and reinstalls is able to provide the following solution. . reboot f. rebuild_zaptel e. cd /usr/src/ b. reboot Note: At this point.5. Install a@h v2. E. cp asteriskathome-1. cd /var/aah_load d./install.sh c. install-pdf. Install Summary: 1. Now Asterisk from source: a. you should be able to dial out from ZAP/1 using ZAP/g0. Reboot d. 4. if you have a Digium TDM11B. After the install. Follow the release notes: a.org who have been struggling with RAID1 and AAH 2.6 A feedback from kwon@ac1.6 using the command "linux askmethod" with raid1 & minimal package install. Note: Some of the directories permissions in /var/lib/asterisk/sounds must be changed to 755 as well.tar. immediate=yes If you are not using Fax.gz /var/aah_load c. tar xvfz asteriskathome-1. reboot.6 RAID 1 AND ASTERISK@HOME 2. Note: don't forget to disable SELinux (nano /etc/selinux/config) 2. it is also a good idea to disable fax extension in your General setting. .tar. Reboot 3. genzaptelconf -v (-v is optional g. etc.

ztcfg # # It must be in the module loading order # Span 1: WCTDM/0 "Wildcard TDM400P REV I Board 1" # # Update for regional .1 As experienced by marner – a Whirlpool Forum participant.ls .7.EL-i686/include/linux/spinlock.9-34.7 REBUILD ZAPTEL DRIVER (USERS’ SUGGESTIONS) E. http://gleesos.9-34.2 As suggested by Rob Thomas (the FreePBX guru) Rob’s suggestion is to edit the file /usr/src/kernels/2. E.6. Log in as root and issue the following command: cd /usr/src/kernels/2.wordpress.loopstart au .7.conf # Autogenerated by /usr/local/sbin/genzaptelconf -.com/2006/02/08/voip-with-asterisk/ Stephen has attached samples of Zapata configuration files – with correct settings for Australia – loop start.com/aah27/spinlock. On his Dell box.EL-smp-i 686/include/linux wget http://nerdvittles.h The rest of the procedure is as per earlier chapter Rebuilding Zaptel Driver E.zone # fxols=1 fxsls=2 fxsls=3 fxsls=4 # Global data Asterisk@Home Without Tears Page 148 of 164 . zaptel. marner had to do the following to rebuild the driver and for it to work.h and change 'rw_lock_t' on line 407 to 'rwlock_t' Once that is done. do the following: rebuild-zaptel That seems to be a lot easier.do not hand edit # Zaptel Configuration File # # This file is parsed by the Zaptel Configurator.8 ZAPTEL CARD CONFIGURATION FOR AUSTRALIA Submitted by Stephen Gleeson – Technical Manager for Community Information Strategies Australia Inc (CISA).6. E.

Whether or not to do distinctive ring detection on FXO lines .conf ..[230] signalling=fxo_ls record_out=Adhoc record_in=Adhoc mailbox=230@device echotraining=800 echocancelwhenbridged=no echocancel=yes context=from-internal callprogress=no callerid=device <230> busydetect=no busycount=7 channel=>1 zapata.0 group=0 callgroup=1 pickupgroup=1 immediate=no Asterisk@Home Without Tears Page 149 of 164 ..0 txgain=0. loadzone = au defaultzone = au zapata_addiotional.. . Atlas seems to use long (250ms) winks ..usedistinctiveringdetection=yes usecallerid=yes hidecallerid=no callwaiting=yes usecallingpres=yes callwaitingcallerid=yes threewaycalling=yes transfer=yes cancallforward=yes callreturn=yes echocancel=yes echocancelwhenbridged=no echotraining=800 rxgain=0.conf . . . Configuration file [trunkgroups] [channels] language=en context=from-pstn signalling=fxs_ls rxwink=300 .. . Zapata telephony interface .

Include AMP configs #include zapata_additional.conf .faxdetect=no .faxdetect=outgoing .conf Asterisk@Home Without Tears Page 150 of 164 .Include genzaptelconf configs #include zapata-auto. .faxdetect=both faxdetect=incoming .

A2BILLING A2Billing is a calling card platform to manage calling card users’ accounts.voip-info.g. RATECARD -> Create new RateCard • Create a new Rate.NOTES Note for home users Most of the config files manual tweaks and extra configurations in this guide are meant for AMP users.org/wiki/view/Asterisk+billing To get you started. 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.php?thread_id=1398290&forum_id=420324 http://www. I have not tried this suggestion.com/asterisk/athome/a2billing/ An extract has been reproduced below (I have not implemented A2Billing and as such.ip. the following link may be of some assistance: http://samyantoun. TARIFFPLAN: Name of the RateCard created before • Create a Customer CUSTOMERS -> Create customer WEBUI PASSWORD 1234 CREDIT 10 Asterisk@Home Without Tears Page 151 of 164 . PROVIDERIP: Your AAH Trunk Name • Create a RateCard.2 Generat Setup Log into A2Billing http://AsteriskBoxIP/a2billing> (Username: root.1 RATEINITIAL 0.101/a2billing A2Billing is not being covered in this guide.168.net/forum/forum. It is here for information only): Setup A2Billing in Asterisk@home 2. connect to asterisk. 192.address/a2billing e.50webs. PROVIDERTECH: Your AAH Trunk Protocol (SIP or IAX) 2. RATECARD -> Add Rate RATECARD Name of the card created before DIALPREFIX 1 DESTINATION USA BUYING RATE 0. RATECARD -> Create TariffGroup 3. freePBX users are advised against any manual config file tweaks as these are being handled in freePBX by design.0. Password: myroot) • Modify the default Trunk (TRUNK -> List Trunk -> Edit) 1.2 • Create a Tariff Group. To log on to A2Billing through Web Interface. Unless you have a compelling reason to do so.

Click “Click here to reload Asterisk Server” 5. A2Billing will prompt to enter the card number Method 2: Using Caller ID 1.a2billing.php exten => s. Click Edit on the customer you want to be authenticated using Caller ID 4.5.DeadAGI. CUSTOMERS -> List SIP-FRIEND Asterisk@Home Without Tears Page 152 of 164 .Answer exten => s.Hangup • Log into A2Billing http://AsteriskBoxIP/a2billing 1. change cid_enable=NO to YES 6. Click SIP or IAX on the customer you want 3.conf #include additional_a2billing_iax.conf.2.conf • Add to extensions_custom. CUSTOMERS -> List Customer 3. Modify a2billing.conf • Add to iax. TARIFFGROUP Name of the TariffGroup created before Customer login: • http://AsteriskBoxIP/a2customer • Username: Card Number.allow phones to access trunks include => outbound-allroutes exten => s.3.conf #include additional_a2billing_sip.conf [callingcard] . A2Billing will NOT prompt for a PIN Method 2: Customer uses SIP or IAX agent (Software or hardware) • Add to sip. CUSTOMERS -> List Customer 2.s. If the customer will access the service using that Caller ID.Wait. Click “GENERATE ADDITIONAL_A2BILLING_SIP.4.1 • Authentication: Method 1: When a customer dials the assigned number. Password: WEBUI PASSWORD Method 1: Customer dials a number to access the service • extensions_custom. Enter the Caller ID at the end of the page (CALLERID) 5.2 exten => s.conf Un-comment the lines of the CallingCard application • Modify the Incoming Route of the assigned number to Custom App: custom-callingcard.1.CONF” 4.Wait. Log into A2Billing http://AsteriskBoxIP/a2billing 2.2 exten => s.

TDM400 or X100P etc.2.g. In the PSTN Line Tab.1.conf. Using Zaptel Card Method .############################################## exten => 0.Playback(start-dial-after-dialtone) exten => 0.g. I have also pre-recorded a voice prompt to instruct the caller what to do after the second dial tone. .Hangup The example above is based on systems that have Zaptel card (e. Using SPA3K Method Using SPA3K will be a little tricky. I have the following: • VOIP-PSTN Gateway Enabled: Yes • VOIP Caller Auth Method: None • VOIP Caller Default DP: None Asterisk@Home Without Tears Page 153 of 164 .) installed. 1. Note:* If you're using a PRI line.3. To get outside line through ZAP . I got around it by creating an entry in extensions_custom. No need to press the send button after the second number dialled . however there maybe other method. after dialling 0 will get a second dial tone. Change NAT to meet your requirement 9.|<0:#><:@gw0>) 3. Click Edit on the customer you want to modify 7.conf for this to work. In my case I use 0 as the prefix to get an outside line.Ben 22-12-2005 . Then dial the number required. 0 or 9.Dial(ZAP/1/{EXTEN}) exten => 0. Change ALLOW to meet your requirement DIAL 0 FOR OUTSIDE LINE There will be times when a user would like to get an outside line something similar to a PABX by simply dialling a number e. . I have included the following entry in the dialplan: <0:#><:@gw0>) 2. 6. In the SPA Line 1 Tab. Change SECRET to the same value as WEBUI PASSWORD 8. The following is what my dialplan looks like in SPA3K (*xx|xx.############################################## . you need to enable 'overlapdial' in /etc/asterisk/zapata. I am describing how I got around it (assuming that you have set up the SPA3K as described in this document).

Reserved for Meet-me and conference 80000-89999 . Reserved for Meet-me and conference 8000-8999 . top left. Telstra being the name of the SPA3K trunk. • If you click Yes at this point the contend of the table will be erased. exten => 0.2. those calls you made white testing will need to be deleted before going live where you will need clean record. Select the 'cdr' table in the tick box • At the bottom of the list of table you will find a dropdown field “With Selected”.8) / From Tools Menu (AAH 2.Ben 25-12-2005 .8+) • select phpmyadmin • In the Database dropdown field. Reserved for FAX testing 70-79 . which is the PSTN line and present me with a second dial tone. One example is. .1.############################################## exten => 0. .8 or higher 80-89 . Reserved for Meet-me and conference 800-899 . • These records are being kept in the SQL database and to delete them. Barge Asterisk@Home Without Tears Page 154 of 164 .Playback(start-dial-after-dialtone) exten => 0. DELETE CALL RECORDS FROM CDR There will be time when you need to delete the CDR records from your call details record. No need to press the send button after the second number dialled .conf .############################################## . Reserved for calls on hold 7777 . EXTENSION NUMBERS TO AVOID USING Unless you are prepared to edit and change some codes. To get outside line through SPA3K .3. Reserved extension for incoming calls simulation The following numbers has been removed in version 2.Hangup Every time when I dial ‘0’. do the following: • From Maintenance Menu (AAH Prior to 2. Park Notify 300-399 . after dialling 0 will get a second dial tone. select asteriskcdrdb.Dial(SIP/Telstra/{EXTEN}) . the SPA3K will send it to Gateway 0. Reserved for speed dial 666 . select EMPTY • You will be asks to 'confirm truncate table cdr'. Reserved for calls on hold 700-799 . Reserved for Meet-me and conference 888 . Then dial the number required. its best to avoid the following extension numbers: 200 . In made the following entry in my Asterisk entensions_custom.

104.Dial(Zap/1/000. please hang-up” .G. hang up after the call exten => 000. The following method will provide you with the facility. You may also need to add the following.conf file in /etc/asterisk.3.Background(calling-emergency) .Wait(1) .################################################### .2. however you need to do some editing to the extensions. If you have dial this in error. GENZAPTELCONF Initially genzaptelconf -s –d but recently the –s –d switch returns and error.################################################### exten => 000. In my case I have pre-recorded a voice prompt called ‘calling-emergency’ which says that “You are trying to call emergency assistance.conf file: musiconhold=default Asterisk@Home Without Tears Page 155 of 164 . 000) Emergencies.4.Goto(3) . To change or add to your music on hold collections. existing user if using the PSTN line first.8 and higher. simply call the emergency number.1.j) . the ‘Music On Hold’ module manages this. otherwise .Hangup() . jump to n+101 exten => 000. by definition should be given right of way. The sensible way is for Asterisk to disconnect the line and allow you to make the emergency call instead.. . hang up the line if being used exten => 000. GIVING PRIORITY TO EMERGENCY NUMBERS (E. voice warning exten => 000. under [channels] in your zapata. simply copy your MP3 to the /var/lib/asterisk/moh-native and /var/lib/asterisk/mohmp3 directories or you can replace the existing MP3s with your own (if you are not comfortable to change the [class]). This applies to the right of using the telephone for emergency purposes above other uses.Softhangup(Zap/1-1) . Give priority to emergency number by disconnecting . give caller a chance to hang up exten => 000. Note: In A@H 2.x supports native MP3.105. If ZAP 1 is busy. make call after disconnecting the other user MOH (MUSIC ON HOLD) AAH Version 2. Imagine what will happen if you want to use the PSTN line to call emergency 000 (in Australia) and someone else was hogging the line. however genzaptelconf on its own without the switch seems to function correctly.

When converting my MP3 music. If using A@H 2. I use FreeRip and convert the music as per the following: Bit Rate: 128 Mono Constant Bit Rate (CBR) Make sure that there is no ID3 Tagging. I wasn’t able to accept incoming calls although SIP was registered.loud => mp3:/var/lib/asterisk/mohmp3 . [classes] . Prior to that. I found that this conversion gives me the most satisfactory result. Older musiconhold. Unlike AAH Versions 1. . 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 Asterisk@Home Without Tears Page 156 of 164 .CONF To those who use this configuration (not all do). SIP_NAT.conf I have included ‘random=yes’ for MOH to be played randomly rather than sequentially. [default] mode=files directory=/var/lib/asterisk/mohmp3 random=yes #include musiconhold_additional. you will have to get used to the newer approach.0 . solved the issue or do the alternative as I have outlined below.random => quietmp3:/var/lib/asterisk/mohmp3. Music on hold class definitions . Changing to externip=<my fixed external IP> if you have a fixed IP or externhost=<DNS name> if you don’t have a fixed IP and use Dynamic DNS service.conf method as illustrated below. I have an issue with externip = <DNS name>. Music on hold class definitions . If you are used to the older musiconhold.8 or higher. based Asterisk systems .x. the musiconhold. and will not work with 1.conf structure (which is no longer relevant): .conf file in the current versions of AAH has taken a slightly different approach.default => quietmp3:/var/lib/asterisk/mohmp3 default => mp3:/var/lib/asterisk/mohmp3 . This is using the new 1. it's better to convert it to a standard format.2 config file format.-z #include musiconhold_additional. pretty much any mp3 will work.conf You will now have to get used to the newer approach (it no longer uses the [classes] tag): .

1 pcnovation.local SipBroker will resolve pcnovation. you may not hear the ring tone when you are calling a party or you may have audio problem.local and problem solved… for now until something else pops up ☺ SIPURA SPA3000 – NOT HANGING UP AFTER PSTN CALLS For months I have to wrestle with the problem of SPA3K not hanging up after a PSTN call. PSTN Line Tab PSTN Disconnect Detection Detect CPC: yes Detect Polarity Reversal: yes Detect PSTN Long Silence: yes Detect VoIP Long Silence: yes PSTN Long Silence Duration: 180 VoIP Long Silence Duration: 180 PSTN Silence Threshold: medium Min CPC Duration: 0. 127.375/.0. Although the caller and AAH have hung up.2 Detect Disconnect Tone: no Disconnect Tone: Leave blank I deleted my original Disconnect Tone setting of: 425@-30.425@-30.homelinux. Taking my DNS name out solved the issue. Greg Hind (a participant in the Whirlpool Forum) provided a solution with the following settings: .homelinux.org asterisk1.homelinux. it will hang up.0.org with another valid domain name different to my DynDNS domain name such as yahoo. This is caused by my /etc/hosts file where I have an entry (in red) 127. but I cannot send e-mail notification of my voicemail. if they don't make any noise.org as 127. Asterisk@Home Without Tears Page 157 of 164 .1 yahoo. have this property set).0.0. In actual fact pcnovation. To fix this problem (a kludge) I substitute pcnovation.375/1+2) Only one catch with this: if you put somebody on hold for longer than the above settings.com asterisk1.homelinux.0. However I need that entry for my VoiceMail e-mail notification since most email server will not accept email from unknown source – grief time.com thus. Another telltale sign is.1 which is what it is suppose to be as it is being defined as such by the offending line.0.0.1(.0.org should be resolved to the external IP address.1 localhost 127. SPA3K will hold the line off hook until I manually power cycle SPA3K.

you will need the following pattern.g. you will normally dial a number such as 02 91234567. 61291234567 for Sydney or 61391234567 for Melbourne. however if that friend is in Victoria. Outgoing Route Dial Pattern This is the pattern you normally will dial when you want to make a phone call. Thus. if you are living in Brisbane. the VOIP provider will need to dial the universal e164 format e. Each of these two works in conjunction with each other – they compliment each other when an outgoing call is being made. I will try to explain this in the simplest possible term (try being the operative word). Asterisk will need to add the missing Australian code 61. Since your VOIP provider does not discriminate where you are calling from or where you are calling to. followed by the telephone number of your friend which is 91234567). Outbound Route Dial Patterns and Trunk Outgoing Dial Rules are 2 areas of confusion. 2 or 3 being the code for Sydney or Melbourne respectively. Trunk Outgoing Dial Rules This is what the trunk is required to send to the VSP to make a successful call to the number you dialled. if you dialled 0291234567. the number that will be sent to the Trunk will be 291234567. Asterisk@Home Without Tears Page 158 of 164 . In your Trunk Outgoing Dial Rule. (61 being the code for Australia. it requires a universal type number to call so your call can be directed to the correct recipient. assuming that the VOIP service provider requires the full e164 format. In most cases. Since you are dialing 03 91234567. Using the above example. How will this then be translated to 61291234567? This is where the Trunk Outgoing Dial Rule comes in. 61+NXXXXXXXX That pattern tells Asterisk to add 61 in front of the 291234567 before dialling the number via the trunk. As an example. TRUNKS AND OUTBOUND ROUTES – A SOURCE OF CONFUSION To the uninitiated. you will need to dial 03 91234567. asterisk only need to send 391234567 (without the 0 prefix). and you are calling a friend who lives in Sydney. Therefore in your Outbound Route Dial Pattern (lets call this Outgoing Route Domestic) you will need the following pattern: 0|NXXXXXXXX That pattern tells Asterisk to send only 9 digits out of 10 dialled by not sending the first digit 0.

take a leaf out of Mark Brooker’s book and follow the following script that can be found here: http://www.com. Most updates will happen there./install_amp amportal restart Note: The freePBX development team is trying to stabilise the way development is done .1beta1 served at least 2 purposes./install_amp --force-version=2.voipeye.1 but the underlying functionalities will be similar. For variations of patterns.0.xml setup.1 amportal restart From now on. you can download future updates whenever needed using the following commands: cd /usr/src/freepbx svn update . Asterisk@Home Without Tears Page 159 of 164 .0 Some of us have gotten used and became quite attached to the maintenance modules in AMP but unfortunately they were taken out of FreePBX.1 TO 2.sourceforge.0.1beta1 was developed slightly differently from version 2. rather than in Core. this is what you have to do.1 due to the change from module.0. UPDATING ASTERISK TO VERSION 1. ADDING THE MISSING MAINTENANCE MODULES TO FREEPBX 2. rather than downloading the ISO and reinstall Asterisk from scratch. see What is a Dial Pattern in the chapter earlier on in this document.zip (compliment of Mark Brooker). your data should remain intact).0.ini to module.1beta1 do the following (fingers cross.net/svnroot/amportal/freepbx/trunk freepbx cd freepbx .au/asterisk/astupdate. you will be abreast with the new development as well as simplified future updates.zip UPGRADING FREEPBX FROM VERSION 2. cd /usr/src rm -rf /usr/src/freepbx svn co https://svn.5 To those who would like to keep abreast with the most recent version of Asterisk@Home.1. You will also notice a slight paradigm shift from 2. still wanting the maintenance modules. Download the missing modules here: www.2. Its just like looking at the scenery with your shades on and with your shades off ☺ To upgrade to FreePBX version 2.au/invoke/maint- modules.mbit.1+ FreePBX 2. If you are like me.which is why they have moved to a freePBX-Modules|online module repository.com. Upgrading to FreePBX 2.

0.168.101:9000 to connect to Webmin instead. ☺) rtpend=20000 Asterisk@Home Without Tears Page 160 of 164 . It's much better to change your webmin.Edit your asterisk files through the browser System Status .pl Then go into your modules admin in the browser and install the new modules. this will break PA1688 based phones. E.0.0. rtpstart=10000 < . 192.8 box (you could use WinSCP to do this). The alternative is to edit the /etc/asterisk/rtp. Locate the entry where it says: Port=10000 And change this to.To edit files in your database System Info . At the linux command prompt enter the following command: chmod 775 /var/www/html/admin/modules/sysstatus/status.. Once this is done go to tools and you should have the following modules. I am not sure if these modules will be re-incorporated into freePBX or not but in the meantime.101:10000 ☺ (Note.Show info on your Asterisk box Configedit .168.pl’ is executable..conf and change the port value to something else. Next. Copy all the folders in the zip into the /var/www/html/admin/modules folder of your AAH 2. .g. Asterisk Info . ensure that ‘status.Showing all your extensions and trunks PHPMyAdmin .change this to 10002(totally unnecessary. WEBMIN You may connect to Webmin remotely through your browser using the following address http://<YourAsterisk_IPAddress>:10000. Port=9000 You can use http://192.101:10000 If you would like to avoid clashing the port with your RTP port which is 10000 – 20000.conf file) [general] . RTP start and RTP end configure start and end addresses .conf file like the example below and you can keep http://192.168. such as 9000. you may edit the file /etc/webmin/miniserv.To show your uptime and whether asterisk is up or down. they are here if required.

Download link below.diff Applying the patches (production code) As root. You only require these patches if you require Asterisk to process Caller ID information on a BT line in the UK with an X100P card.2. See the original bug report for details.0- beta2.) cd /usr/src export CVSROOT=:pserver:anoncvs@cvs. If you want to try this out./zapata make clean make install cd .diff • zaptel_ukcid. • asterisk_ukcid_beta.lusyn. as illustrated below.com/asterisk/zaptel_ukcid. it is solely your responsibilities ☺ These patches are based on the originals written by Tony Hoyle. X100P PATCH FOR UK CALLER ID (courtesy of http://www.diff patch <zaptel_ukcid. They are provided under the GNU General Public License (GPL) as is and with no warranty.digium..com:/usr/cvsroot cvs login The password is anoncvs cvs checkout -r v1-0 zaptel asterisk cvs checkout zapata cd zaptel wget http://www.com) I am not sure if this applies equally to the Australian users.diff The asterisk_ukcid. do the following: Download source from CVS (Note.com/asterisk/asterisk_ukcid..lusyn. This has since been replaced by SVN. The instruction needs updating as soon as I obtain it. Download links are : • asterisk_ukcid.diff make clean Asterisk@Home Without Tears Page 161 of 164 .diff patch -p0 <asterisk_ukcid.lusyn. I have reproduced this here merely for information only.diff make clean make install make config cd ./asterisk wget http://www. Obtaining the patches The easiest way is to use wget when appyling the patches.diff patch has been changed to work with Asterisk 1.

digium.lusyn./zapata make clean make install cd .diff make clean make install make config cd ./asterisk wget http://www.diff patch <zaptel_ukcid.diff make clean make install Edit /etc/asterisk/zapata.lusyn.com/asterisk/asterisk_ukcid_beta.com/asterisk/zaptel_ukcid. make install Edit /etc/asterisk/zapata.conf and use the following three lines for CallerID : usecallerid=yes cidsignalling=v23 cidstart=usehist Applying the patches (beta code) As root. do the following: Download source from CVS cd /usr/src export CVSROOT=:pserver:anoncvs@cvs..conf and use the following three lines for CallerID : usecallerid=yes cidsignalling=v23 cidstart=usehist Asterisk@Home Without Tears Page 162 of 164 .diff patch -p0 <asterisk_ukcid_beta.com:/usr/cvsroot cvs login The password is anoncvs cvs checkout -r v1-2-0-beta2 zaptel asterisk cvs checkout zapata cd zaptel wget http://www..

com Mark Brooker Another of my source for help when things go wrong Matt (daggo) Advise. and basically a place to go when things go wrong.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.com http://voxilla.org my place of salvation ☺. Tips and tricks lusyn. Tips and tricks on Webmin Steven D Help with detecting some error and proofing the document Thunderbird1/Chippy Giving me clues to some obscure processes. VoipShop Source for Australian voice and others Voxilla.com X100P Patch for UK Caller ID http://www.lusyn.Voice for Asterisk Colin Swan Major assistance. advice. Asterisk@Home Without Tears Page 163 of 164 . Tips and tricks Jack Zimmermann Helping me with e164 Jeffrey Borg Advise.com Ward Mundy My hero http://mundy. It is Chippy who solved the Fax problem that has been bugging us all. Tips and tricks on codecs and dial plan etc Stefan Keller-Tuberg Helping me out with Cron Jobs and Scripts SteveM Advise. Tips and tricks Miriam O’Brien SPA3000 Dial plan Neilmc Advise.com Brian Advise tips and tricks. Greg Hind Advise.asteriskguru. Anil Asterisk@Home Handbook Asterisk Guru http://www. Tips and tricks Nathan Poyner Assistance with Scripts and also proofing the documents Openvoice Source for Australian Voice Rob Thomas AMP and freePBX Developer – without which there will be no AAH Sammy/sz Taken time to point out some of my mistakes Sean Mahon Solution for Billion 7402 BL Shaun (Ewing) Advise.

Dial Command Option in chapter 3. Included setting for iTalk for users in our 8th state – New Zealand. Added Dial 0 for outside line using SPA3K 11.0 12. Eliminating echo problems in Sipura SPA-3000 3.1.6 solution 5. Asterisk@Home Without Tears Page 164 of 164 . Some updates on version 2. Add Installation of multiple TDM400P card by neilmc in Appendix E (Users Suggestion) 2.1 4. Zaptel Card configuration for Australia 6.1 7.3. 10. Added instruction to add the missing Maintenance modules in freePBX 2. ACT does not count as a state – it is actually a resort. Include SIP extension example in chapter 20. RAID 1 and Asterisk@Home 2.CHANGES MADE SINCE LAST UPDATE 1.8 and added Rebuilding Zaptel Driver 8. Faxing update from Thunderbird1 9. Installing sendmail.