Telephone Systems and Voice over IP Bob Eager
Telephone Systems and Voice over IP Bob Eager 6 th December 2018 Telephone Systems and Voice over IP 1
Introduction � This talk covers the development, over about 20 years, of a home telephone system � It has ended up with some office-like facilities � There also some more unusual aspects which might be amusing! � It will no doubt be extended further Telephone Systems and Voice over IP 2
Overview � Scenario and infrastructure � History The POTS era � Home Highway � Moving to ISDN and a PBX � Vo. IP phase 1 � Vo. IP phase 2 � The current system � Security � Costs and savings � Conclusion � Questions � Telephone Systems and Voice over IP 3
Scenario and Infrastructure � the installation is in a nominally 5 bedroom house (2 floors) � 4 bedrooms, one large ‘office’ � 3 ‘reception rooms’ (one of which is a ‘workshop’!) � kitchen, bathroom etc. � family of two adults and two children � the house is of an unusual layout and it is hard to hear people calling “It’s for you!” when the phone has been answered in another part of the house � much of this would apply to any office system too – the system is very flexible Telephone Systems and Voice over IP 4
� the house was completely rewired prior to developing the telephone system; this was to prove vital in the long run � at least one analogue phone socket in each room (3 in living room, for possible Sky box etc. ) � all lines taken back to a wiring centre using a large Krone box: � allows easy reconfiguration of extensions etc. 30 cm � at least one network socket (gigabit) in each room (3 in living room, 2 in workshop) � all cables taken back to a rack for network switches Telephone Systems and Voice over IP 5
The POTS era � POTS stands for ‘Plain Old Telephone System’ – a conventional landline � initially, there was a single landline with one phone socket on each of the two floors � one additional socket was fitted in an interim ‘office’ (the spare room) � this worked OK, but had some disadvantages: � only one actual line � answering the phone at night – phone in ‘office’ and not in bedrooms � use of dial-up Internet precluded use of phone for incoming and outgoing calls when the Internet was ‘in use’ � and of course the data rate was slow…typically about 40 kb/sec Telephone Systems and Voice over IP 6
Home Highway � this product was offered by BT for some years, and was used for a while � a modified 2 channel (‘basic rate’) ISDN allowing: � two simultaneous voice calls or � one voice call and one 64 kb/s data call or � one 128 kb/s data call (charged as 2 calls) � withdrawn by BT in 2005 -2007 � expensive, charged as dialup � provided 3 phone numbers � 2 analogue (including original) � 1 data analogue Telephone Systems and Voice over IP 7
Moving to ISDN and a PBX � it was decided that a proper internal PBX would be nice, but these were generally expensive � a cheaper alternative was an ISDN line, with a small ISDN PBX � the one used was a Cyber. Gear Gold (from e. Bay!) � basically because it was adequate, and cheap 20 cm Telephone Systems and Voice over IP 8
� this provided: � 6 internal analogue lines � Ethernet connection via PPP and ‘dialup’, although this was soon replaced by ADSL on a separate POTS line � the PBX was connected to the wiring centre (Krone box) so that various extensions could be ‘paralleled up’ as required (e. g. all sockets in living room) � this system worked well for some years but the ISDN was relatively expensive, and analogue ports on the PBX had a habit of dying (replacements from e. Bay!) � it was thus decided to move to a hybrid analogue/Vo. IP solution Telephone Systems and Voice over IP 9
A little about Voice over IP � Vo. IP uses a network (usually the Internet) to carry digitised conversations � software (an IP ‘softphone’) or hardware (an ‘IP phone’) is needed at the client end � for calls to/from conventional numbers, an interface is needed to the ‘normal’ telephone network; this is provided by an Internet Telephony Service Provider (ITSP) � outgoing calls are sent to the provider, who charges for the call � incoming calls come via the provider, and are handled by the software or phone � the ITSP provides a ‘phone number’ and calls to that number are routed to the client, who can choose to receive them anywhere on the Internet (e. g. on a laptop in the South of France!) � this choice (‘registration’) can be changed at any time (frequently) Telephone Systems and Voice over IP 10
Vo. IP phase 1 � it was decided to set up a dedicated PC as a Vo. IP PBX � the hardware used was a rack mounted, 1 U Mini-ITX system, 800 MHz Via C 3 CPU, 512 MB memory, hard disk Telephone Systems and Voice over IP 11
� the software was the open source Asterisk system, well proven and well documented � the way this works is that Asterisk ‘registers’ to receive calls from the ITSP, possibly on several different numbers � it then routes calls to individual phones, which effectively ‘register’ to Asterisk � the way that they do this depends on how they are connected Telephone Systems and Voice over IP 12
� how did this communicate with the analogue ‘world’? � a PCI card to interface with the normal POTS line (which was needed anyway for ADSL) [for reasons, see later] � supplied by Digium (the originators of Asterisk) � a port to communicate with the external telephone network is called an FXO port (it communicates with the Central Office) � Analogue Telephone Adaptors (ATAs) to interface with the internal telephones � supplied by Sipura/Linksys/Cisco � a port to communicate with a telephone is called an FXS port (it communicates with a Station) Telephone Systems and Voice over IP 13
� a typical Digium PCI card (expandable) � Cisco 8 port ATA: Telephone Systems and Voice over IP 14
Vo. IP phase 2 � to reduce power consumption and noise, the PC was replaced by an HP Microserver: � ample compute power and probably overkill, but at just over £ 100…. ! � one of these has handled over 10 phone calls at the same time with no difficulty � …there are even cheaper alternatives… Telephone Systems and Voice over IP 15
� the Digium card would not fit the Microserver, and was also rather unreliable (software wise) � it was decided to replace this with another ATA; a Linksys/Cisco SPA 3102 was used � this had one FXO (phone line) and one FXS (phone) port, plus Ethernet � and had the advantage of decoupling the phone connection from the actual server, simplifying changes of server (the server did start smouldering once) SPA 3102 Telephone Systems and Voice over IP 16
Vo. IP phase 3 � the previous system used three ATAs: 1. Cisco SPA 8000 - 8 FXS ports for internal lines 2. Cisco SPA 2000 - 2 FXS ports for internal lines (originally purchased for evaluation) 3. Cisco SPA 3102 - 1 FXO/1 FXS port for external line/spare, respectively � the first two of these were removed � to reduce noise and power consumption, and to allow the use of more ‘intelligent’ phones � instead, all internal phones were replaced by hardware IP phones (since the house was wired for Ethernet, this was not an issue) � the last mentioned ATA was retained (and the single FXS port was later used for an external bell) Telephone Systems and Voice over IP 17
� the phones chosen were once again Cisco products � easy to configure via a web interface or an XML file on a server � the SPA 301 for three locations, and the more sophisticated SPA 303 for the rest (a total of 10 phones) � the SPA 303 has a 2 port switch incorporated, so can be used alongside a PC; it can also use a wireless adaptor; it also has programmable softkeys SPA 301 SPA 303 Telephone Systems and Voice over IP 18
� a block of ten consecutive Canterbury numbers has been ‘reserved’ from the ITSP, of which eight are in use: � general house number � personal numbers for each family member � memo service (see later) � remote door unlocking (see later) � destination for 3 G shed alarms (see later) � internal calls ring with a single ‘ring’ cadence � the house number rings with a normal cadence � the personal numbers ring with a cadence corresponding to the Morse code for the individual’s initial (sad but true) � the shed alarms ring an ‘S-O-S’ cadence � the other two never actually cause a phone to ring � there is one more cadence used for another purpose (see later) Telephone Systems and Voice over IP 19
The current system � the system runs on an HP Microserver, running the Free. BSD operating system (most people use Linux…) � it runs the Asterisk PBX software (currently Asterisk 13) � hardware: � one SPA 3102 FXS/FXO adaptor � three SPA 301 IP phones � seven SPA 303 IP phones � one external POTS line (used for FTTC broadband) � one BT Bell 80 D (right) for garden (via SPA 3102) � the existing gigabit network � and some other bits of home built hardware! Telephone Systems and Voice over IP 20
� Asterisk is a very flexible system, very extensible with many useful features ‘out of the box’ � many of these are in use, and extra ones have been added through scripting; they include: � textual caller ID (on the SPA 303 phones, which have a screen) � voicemail (with separate voicemail ‘boxes’); waiting voicemail is indicated by a signal light on relevant phones � shortcode dialling (avoids programming a directory on each phone and makes central maintenance of phone books easier) � call recording � selective ringing depending on number called, and time of day � sons’ numbers ring their room only first, then rest of house if unanswered Telephone Systems and Voice over IP 21
� caller blacklisting caller is just told “you are blacklisted”! � caller greylisting (evil!) � caller hears several ‘rings’, then is sent to voicemail; no phones actually ring � every time… � this is for callers you’d rather not speak to…but don’t want to offend outright… � call parking � call can be parked, caller left on hold with hold music, but then picked up from another extension by dialling a specified number � call pickup � pick up ringing extension from another one � internal paging (ring all phones with individual’s own cadence, useful if their whereabouts is unknown) � speaking clock (overrides the external 123 which is expensive) � Telephone Systems and Voice over IP 22
Least cost routing � the system does its best to minimise the cost of calls � most calls are now routed via Vo. IP � certain calls still routed via BT (but this is being phased out) � certain numbers are blocked completely � e. g. 070 xx, 09 xx, etc… � multiple simultaneous calls are possible (naturally) Telephone Systems and Voice over IP 23
Additional features � the memo service � one external number does not ‘ring’, but simply takes a message and emails it to a mailing list – useful for memos when away from home, or even at home � the voice file is emailed as an attachment � the doorbell � the bell push on the front door is connected to an Arduino microcontroller, which sends a message (via USB) to a listener process on the PBX � the listener schedules an immediate call to all extensions with a special ‘urgent’ cadence � selected extensions can be ‘hushed’ for a specified time (e. g. if someone is sleeping) by entering a code on any phone � call recording � at any time, recording can be initiated by dialling #3 Telephone Systems and Voice over IP 24
� the door lock � the main front door lock is solenoid controlled � it can be unlocked via a USB operated relay, controlled by the PBX � an internal extension (666) is reserved for unlocking the door � the door can also be unlocked via an external call (using two factor authentication) � useful if keys are lost and no-one is home… � but a normal key still works! � call filtering � anyone withholding caller ID is presented with a menu of options � most just ‘toy’ with the caller, while recording the call for future emailing! � one option allows the caller through � the menu is preceded by the ‘Intercept’ Special Information Tone (tri-tone) indicating the equipment is disconnected, to fool auto diallers Telephone Systems and Voice over IP 25
� alarm calls � any extension can ‘book’ an alarm call for any time in the next 24 hours, by dialling 125 and giving the time required � at that time, the extension will ring for a fixed time or until answered � if not answered, the call will be repeated twice more at one minute intervals � alarm calls can also be set on any other extension (if one knows the privileged access code!) � external bell (in garden) � connected to spare FXS port on SPA 3102 � called in parallel with other extensions for doorbell and incoming calls � has to be enabled specifically, deactivates at a specified time (currently 8 p. m. ) Telephone Systems and Voice over IP 26
Costs and savings � the move to using exclusively Vo. IP is almost complete, and then the line will be moved from BT to another provider (the ITSP) � the SPA 3102 is hard to get these days, and wouldn’t be used in a fresh installation � current BT rental is £ 219. 84 p. a. for a basic service (limited free calls at weekends), paid in advance � extra £ 119. 88 p. a. for unlimited national calls (FSVO ‘unlimited’) � typical ITSP line rental is less than £ 150 p. a. , no calls included, but: � BT call charges typically 15 p/min (landline) and 18 p/minute (mobile) plus a 23 p call setup fee � ITSP call charges much lower (e. g. 2 p/min to all UK destinations, no setup fee) � international calls show much greater savings Telephone Systems and Voice over IP 27
Security WARNING � if the system is exposed to the outside world, it will be the target of hacking attempts � these try to get free outgoing access which can cost you a lot of money � the system needs to be properly secured Telephone Systems and Voice over IP 28
Fun bits � there are scripts available that wait for caller silence, then say innocuous things � these have been known to keep ‘junk callers’ occupied for some time � there are longer sound files that can also tie callers up, and these can be amusing: � the menu system for withheld caller ID gives several options: � “if you are a telemarketer, press 1” � “if we have won a holiday, press 2” � “if you are conducting a survey, press 3” � etc. Telephone Systems and Voice over IP 29
Conclusion � it’s really quite over the top for a house, but it’s all useful stuff � it’s great fun and requires very little maintenance � it may or may not save money � a powerful system isn’t necessary � people do run it on a Raspberry Pi � pretty well anything will support a few extensions � it’s easy to try it all out without compromising your existing telephone system; all you need is a number from an ITSP, and some hardware � in fact, no hardware to start with – just a ‘softphone’ application such as Zoiper Telephone Systems and Voice over IP 30
Questions? Telephone Systems and Voice over IP 31
- Slides: 31