Difference between revisions of "Project:VOIP"

From London Hackspace Wiki
Jump to navigation Jump to search
m (Transferring 'ownership' of the phone system and making notes for the Interhackspace PBX project)
(20 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
A few members had been interested in playing with VOIP/SIP things, mostly involving connecting the [[Phone|space phone line]] to the internet and doing voice menus, sip accounts for members, group chat, joining the [http://hackerspaces.org/wiki/Call-in Hackerspaces Call in], getting linked up to other hackspaces, etc.  
 
A few members had been interested in playing with VOIP/SIP things, mostly involving connecting the [[Phone|space phone line]] to the internet and doing voice menus, sip accounts for members, group chat, joining the [http://hackerspaces.org/wiki/Call-in Hackerspaces Call in], getting linked up to other hackspaces, etc.  
  
----
 
 
==Functional features:==
 
==Functional features:==
 
* Internal dialing between floors  (really easy rather than going back and forth back and forth to talk with someone / do something)
 
* Internal dialing between floors  (really easy rather than going back and forth back and forth to talk with someone / do something)
* External calls get prompts for information and membership services and [http://toao.net/595-lenny Lenny]  (please note that telephone extensions can be called from the main prompt)
+
* External calls get prompts for general and travel information.
* Doorbell-style ringtone on phone rings when back-gate visitors call  ('doorbell ringer' zombie-phone is located above Electronics lab)
+
* <s>Doorbell-style ringtone on phone rings when back-gate visitors call  ('doorbell ringer' zombie-phone is located above Electronics lab)</s>
* Conference room function (mainly extension 4225)
+
* <s>Conference room function (mainly extension 4225)</s>
* Weather-Resistant Outdoor Delivery Gate Phone - [http://www.gai-tronics.org.uk/pdf/Products/Titan_Rail/B149.pdf GAI-Tronics Titan for Rail PDF Specifications]
+
* Weather-Resistant Outdoor Phones - [https://hubbellcdn.com/installationmanuals/SKU-GTC-Manual-502-20-0115-001.pdf GAI-Tronics Titan for Rail and Commander User and Installation Guide]
** now with [[Robonaut |Robonaut]] integration - IRC users informed when a delivery call is made and also when not answered.
+
* <s>''Back Door phone now with [[Robonaut|Robonaut]] integration - IRC users informed when a delivery call is made and also when not answered.''</s>
 
* Toll-Free Outgoing dialing (0800 style numbers) / Banned dialing for others
 
* Toll-Free Outgoing dialing (0800 style numbers) / Banned dialing for others
* General telephone information provided (address, nearest tube/train stops, membership information pointing to the website)
+
* DUE TO DUMB CALLERS DIALING FOR LENNY WHEN THEY ABSOLULUTELY SHOULDN'T HAVE AND STILL COMPLAINING ABOUT IT, WE HAD TO REMOVE THE [https://www.independent.co.uk/life-style/gadgets-and-tech/news/lenny-telemarketer-bot-robot-prank-a6813081.html LENNY FUNCTIONALITY.] RIP LENNY.
* Semi-secret comedy extensions (we're getting there... [https://www.reddit.com/r/itslenny Lenny is an easy favourite])
+
* Easy networking to other Hackspaces
* Easy networking to other Hackspaces - possibly explore [http://www.spacephone.org Spacephone networking] and others
+
* Dialing of Emergency numbers (101/111/112/999) (Please be aware that in the event of a power cut, hardware issue etc the phones will not work. Please use a mobile, or the payphone situated on High Road)
* <strike>Dialing of Emergency 999 / 112 functionality <span style="color: red;"> Decided to not be a liability with this (for now) </span> *** (outgoing call can be recorded and email alert sent to trustees and/or mailing list for safety) </strike>
 
  
----
+
==PBX System details:==
  
==Current extensions/ locations (specific locations to be appropriately and tastefully determined:==
+
* System Platform: Hosted on [[Bell]], a managed Virtual Machine running on [[Equipment/Landin|Landin]]
* 6601 - Ground Floor
+
* Inbound and Outbound Connectivity to the PSTN is provided by [https://www.aaisp.net.uk/ Andrews & Arnold]
* 6602 - Basement
+
* Internal phones are Cisco 79XX SIP handsets.
* 6603 - Radio Shack
+
* Outside phones are GAI-Tronics ruggedised telephones, both attached to a single Cisco ATA186 being powered over PoE using an Avaya 1603 700415607 PoE power splitter/injector.
* 6604 - Biohacking Laboratory
+
* OS: Debian Linux with tftpd-hpa service enabled for phones that need to boot and load config files over tftp, LHS logo screen graphics, etc.
* <strike>6605 - LHS Rack</strike> (With [https://wiki.london.hackspace.org.uk/view/User:Marrold Marrold] for developing XML services)
+
* PHONE SW: Asterisk  13.14.1 - no longer needing DAHDI as we've stopped using the TDM400 Digium FXO ports.
* 6607 - LHS Table
+
* EXTERNAL VOICE GENERATION: Voice prompt files are currently manually generated using AWS Polly text to speech API.
 +
* CONFIG NOTE: Custom configs/scripts to be shared confidentially as they contain passwords.
 +
 
 +
==Asterisk Configuration==
 +
 
 +
The asterisk configuration files can be found in <code>/etc/asterisk</code>. To make reading / managing the files easier they've been split up, and are "included" from the base config files.
 +
 
 +
===PJSIP===
 +
 
 +
The SIP stack's core functionality, as well as endpoint definitions for endpoints such as phones and VoIP providers are managed by the chan_pjsip module. The syntax is somewhat different to Asterisks former chan_sip module, so ensure you're using the correct documentation when making changes.
 +
 
 +
{| class="wikitable"
 +
! Filename
 +
! Description
 +
|-
 +
| pjsip.conf
 +
| The default pjsip config template that ships with Asterisk. You shouldn't need to edit this file too much.
 +
|-
 +
| pjsip_transports.conf
 +
| Defines the various "transports", ie the IPs, ports and protocols Asterisk listens on.
 +
|-
 +
| pjsip_peers.conf
 +
| Defines "peers", E.G VoIP providers and other Hackspace's phone systems.
 +
|-
 +
| pjsip_extensions.conf
 +
| Defines "extensions", I.E Phones registering to the PBX
 +
|}
 +
 
 +
===Extensions===
 +
 
 +
Call routing and features are configured in the extensions files.
 +
 
 +
{| class="wikitable"
 +
! Filename
 +
! Description
 +
|-
 +
| extensions.conf
 +
| The default extensions.conf template that ships with Asterisk. You shouldn't need to edit this file too much.
 +
|-
 +
| extensions_globals.conf
 +
| Defines various global variables such as ring groups, to make editing them easier.
 +
|-
 +
| extensions_internal.conf
 +
| Internal calls, i.e those originating from the various phones and ATAs in the Hackspace end up here.
 +
|-
 +
| extensions_external.conf
 +
| External calls, i.e those originating from the PSTN end up here.
 +
|-
 +
| extensions_barrier.conf
 +
| A temporary, experimental context, to facilitate opening the barrier from the phones.
 +
|-
 +
| extensions_utils.conf
 +
| Various utilities and functions are defined here.
 +
|}
 +
 
 +
===Dial Plan Considerations===
 +
VoIP phones have a configurable "Dial Plan" that decides when a call should be sent to the server. A good dial plan improves the user experience, as it means they don't have to press "dial" or wait for a timeout to kick in. The dial plan should also handle users prefixing calls with a 9, as this has become a (bad) habit for some.
  
* 4225 - LHS conference bridge
+
The table below lays out the numbering plan used in the Hackspace. Emergency numbers should ''always'' go straight out, and the dialplan should be ordered so the user has to wait the minimum amount of time before the call is placed, eg an 11 digit number starting with a 0 should go straight out.
* 777 - Back gate phone
 
* Virtual extensions for wifi sip clients are OK, but we'll need to manually add them. Want to play with it? Contact [[User:Marrold|Marrold]]
 
  
----
+
{| class="wikitable"
 +
! Number
 +
! Description
 +
! Notes
 +
|-
 +
| 999
 +
| Emergency Services
 +
|
 +
|-
 +
| 911
 +
| US Emergency Services
 +
| Should be re-written as 999
 +
|-
 +
| 112
 +
| Emergency Services (EU)
 +
|
 +
|-
 +
| 101
 +
| Non Emergency Police
 +
|
 +
|-
 +
| 105
 +
| Local Electricity Network Operator
 +
|
 +
|-
 +
| 111
 +
| Non Emergency Medical
 +
|
 +
|-
 +
| 888
 +
| Routed the same as 999, for testing.
 +
|
 +
|-
 +
| 100
 +
| Automated Operator
 +
|
 +
|-
 +
| 152
 +
| Echo Test
 +
|
 +
|-
 +
| 155
 +
| Hello World
 +
|
 +
|-
 +
| 1XX
 +
| Other Network Numbers
 +
|
 +
|-
 +
| 116XXX
 +
| European Helpline Numbers
 +
|
 +
|-
 +
| 6XXX
 +
| Internal Extensions
 +
|
 +
|-
 +
| 7XXX
 +
| Internal Short Codes for Ring Groups etc
 +
|
 +
|-
 +
| 8XXX
 +
| Reserved for DECT users
 +
|
 +
|-
 +
| 0ZXXXXXXXXX
 +
| UK Numbers
 +
| Blocked
 +
|-
 +
| 0ZX.
 +
| Shorter UK Numbers
 +
| Blocked
 +
|-
 +
| 00Z.
 +
| International Calls
 +
| Blocked
 +
|}
  
==PABX System details:==
+
====Example Dialplan====
* HW: Hosted on [[Bell]] a Dell Optiplex 780 with a Digium TDM400 with two FXO connections managing incoming calls and one FXS port for potential future analogue usage
+
 
* Phones are Cisco 7970G SIP handsets running G722 and the gate phone is a surplus analogue [http://gai-tronics.org/product/titan-for-rail/ GAI-TRONICS Titan for Rail] outdoor linesman phone attached to a Cisco ATA186. Cisco 7941 used as [http://chomsky.london.hackspace.org.uk/~kraptv/back-gate-visitor-calling-ding-dong.mp3 door bell ringer].
+
The following is an example Dialplan for a Linksys / Sipura / Newer Cisco device. Make sure if copying and pasting its a single line, with no whitespace.
* OS: Linux with tftpd and httpd service enabled for phones that need to boot and load config files over tftp, LHS logo screen graphics, etc.
+
 
* PHONE SW: Asterisk  11.7 plus DAHDI 2.0.X driver for Digium card.
+
'''!!! Currently Untested !!!'''
* EXTERNAL VOICE GENERATION: Voice prompt aiff/ulaw files generated from bash script on an OS X 10.9+ Mac using the UK English "Kate" voice. Current phrase-file shell script copied with voice prompts every time it is updated. Script automatically copied alongside sound files to /usr/share/asterisk/sounds/en_US_f_Allison/lhs/
+
 
* CONFIG NOTE: Custom configs/scripts to be shared confidentially as they contain passwords.
+
    (999S0|<9:>911S0|<9:>888S0|<9:>11[1234579]S0|<9:>116xxxS0|<9:>10xS0|<9:>15[0234568]S0|<9:>1x7[1-9]S0|<9:>6xxxS0|<9:>7xxxS0|<9:>8xxxS0|<9:>0[1-9]xxxxxxxxxS0|<9:>0[1-9]x.|<9:>00[1-9]x.|<9:>x.)
  
  /etc/asterisk        - '''Asterisk dialplan rules and configs'''
 
  /etc/dahdi            - '''Our hardware telephony connection configs'''
 
  /var/spool/asterisk  - '''Voicemails / CDR log storage'''
 
  /tftpboot            - '''Phone firmware, ringtones, XML configs'''
 
  /usr/share/asterisk/sounds/en_US_f_Allison/lhs  '''LHS prompts/buildscript (hackspace-phrases.sh)'''
 
----
 
  
 
==Infrastructure needs/Future uses:==
 
==Infrastructure needs/Future uses:==
* Virtual extensions/voicemail-to-email automation for members - this is a manual process for now.
 
 
* Mini-XML applications for the phones (weather, IRC info, relevant member info)
 
* Mini-XML applications for the phones (weather, IRC info, relevant member info)
 
* Enable emergency all-page public address functionality
 
* Enable emergency all-page public address functionality
 
* [https://groups.google.com/forum/#!forum/interhackspace-pbx-project Connect with other Hackspaces]
 
* [https://groups.google.com/forum/#!forum/interhackspace-pbx-project Connect with other Hackspaces]
  
[[User:Kraptv|Kraptv]] commented about some possible concerns about disturbing the peace:
+
Please use it, play with it, and hack on it to make it better!
 
 
''If people are annoyed at the phones ringing - they can press the "Do Not Disturb" button and it won't ring. In this design - I am mindful to keep a productive peace - I helped implement the phone system at a large cartoon company and was mindful to the variety of edge cases and balancing of sensitive users vs. collaborative users.''
 
 
 
''If it is completely crap and everyone hates it, we can scrap it easily and say 'man, corded phones are so 90's! Good riddance!' - but there are still many valid uses and an example of fun infrastructure enhancement. Noone is obligated to answer the phone. Noone has to touch it.  It's a co-operative, not some sort of business that has a telephone response service level agreement. ;-)''
 
 
 
And finally - use it, play with it, and hack on it to make it better!
 
 
 
Dial '''020 7033 9080''' to call the LHS phone system, please contact [[User:Marrold|Marrold]] or email the [http://groups.google.com/group/london-hack-space-infrastructure london-hack-space-infrastructure] mailing list.
 
  
----
+
Dial '''020 3422 0547''' to call the LHS phone system, please contact [[User:Marrold|Marrold]] or email the [http://groups.google.com/group/london-hack-space-infrastructure london-hack-space-infrastructure] mailing list.
  
 
==References:==
 
==References:==

Revision as of 00:00, 28 January 2019

Our most frequently used extension - the back gate visitor phone
Cisco 7970 - the most common IP phone in the space

A few members had been interested in playing with VOIP/SIP things, mostly involving connecting the space phone line to the internet and doing voice menus, sip accounts for members, group chat, joining the Hackerspaces Call in, getting linked up to other hackspaces, etc.

Functional features:

  • Internal dialing between floors (really easy rather than going back and forth back and forth to talk with someone / do something)
  • External calls get prompts for general and travel information.
  • Doorbell-style ringtone on phone rings when back-gate visitors call ('doorbell ringer' zombie-phone is located above Electronics lab)
  • Conference room function (mainly extension 4225)
  • Weather-Resistant Outdoor Phones - GAI-Tronics Titan for Rail and Commander User and Installation Guide
  • Back Door phone now with Robonaut integration - IRC users informed when a delivery call is made and also when not answered.
  • Toll-Free Outgoing dialing (0800 style numbers) / Banned dialing for others
  • DUE TO DUMB CALLERS DIALING FOR LENNY WHEN THEY ABSOLULUTELY SHOULDN'T HAVE AND STILL COMPLAINING ABOUT IT, WE HAD TO REMOVE THE LENNY FUNCTIONALITY. RIP LENNY.
  • Easy networking to other Hackspaces
  • Dialing of Emergency numbers (101/111/112/999) (Please be aware that in the event of a power cut, hardware issue etc the phones will not work. Please use a mobile, or the payphone situated on High Road)

PBX System details:

  • System Platform: Hosted on Bell, a managed Virtual Machine running on Landin
  • Inbound and Outbound Connectivity to the PSTN is provided by Andrews & Arnold
  • Internal phones are Cisco 79XX SIP handsets.
  • Outside phones are GAI-Tronics ruggedised telephones, both attached to a single Cisco ATA186 being powered over PoE using an Avaya 1603 700415607 PoE power splitter/injector.
  • OS: Debian Linux with tftpd-hpa service enabled for phones that need to boot and load config files over tftp, LHS logo screen graphics, etc.
  • PHONE SW: Asterisk 13.14.1 - no longer needing DAHDI as we've stopped using the TDM400 Digium FXO ports.
  • EXTERNAL VOICE GENERATION: Voice prompt files are currently manually generated using AWS Polly text to speech API.
  • CONFIG NOTE: Custom configs/scripts to be shared confidentially as they contain passwords.

Asterisk Configuration

The asterisk configuration files can be found in /etc/asterisk. To make reading / managing the files easier they've been split up, and are "included" from the base config files.

PJSIP

The SIP stack's core functionality, as well as endpoint definitions for endpoints such as phones and VoIP providers are managed by the chan_pjsip module. The syntax is somewhat different to Asterisks former chan_sip module, so ensure you're using the correct documentation when making changes.

Filename Description
pjsip.conf The default pjsip config template that ships with Asterisk. You shouldn't need to edit this file too much.
pjsip_transports.conf Defines the various "transports", ie the IPs, ports and protocols Asterisk listens on.
pjsip_peers.conf Defines "peers", E.G VoIP providers and other Hackspace's phone systems.
pjsip_extensions.conf Defines "extensions", I.E Phones registering to the PBX

Extensions

Call routing and features are configured in the extensions files.

Filename Description
extensions.conf The default extensions.conf template that ships with Asterisk. You shouldn't need to edit this file too much.
extensions_globals.conf Defines various global variables such as ring groups, to make editing them easier.
extensions_internal.conf Internal calls, i.e those originating from the various phones and ATAs in the Hackspace end up here.
extensions_external.conf External calls, i.e those originating from the PSTN end up here.
extensions_barrier.conf A temporary, experimental context, to facilitate opening the barrier from the phones.
extensions_utils.conf Various utilities and functions are defined here.

Dial Plan Considerations

VoIP phones have a configurable "Dial Plan" that decides when a call should be sent to the server. A good dial plan improves the user experience, as it means they don't have to press "dial" or wait for a timeout to kick in. The dial plan should also handle users prefixing calls with a 9, as this has become a (bad) habit for some.

The table below lays out the numbering plan used in the Hackspace. Emergency numbers should always go straight out, and the dialplan should be ordered so the user has to wait the minimum amount of time before the call is placed, eg an 11 digit number starting with a 0 should go straight out.

Number Description Notes
999 Emergency Services
911 US Emergency Services Should be re-written as 999
112 Emergency Services (EU)
101 Non Emergency Police
105 Local Electricity Network Operator
111 Non Emergency Medical
888 Routed the same as 999, for testing.
100 Automated Operator
152 Echo Test
155 Hello World
1XX Other Network Numbers
116XXX European Helpline Numbers
6XXX Internal Extensions
7XXX Internal Short Codes for Ring Groups etc
8XXX Reserved for DECT users
0ZXXXXXXXXX UK Numbers Blocked
0ZX. Shorter UK Numbers Blocked
00Z. International Calls Blocked

Example Dialplan

The following is an example Dialplan for a Linksys / Sipura / Newer Cisco device. Make sure if copying and pasting its a single line, with no whitespace.

!!! Currently Untested !!!

   (999S0|<9:>911S0|<9:>888S0|<9:>11[1234579]S0|<9:>116xxxS0|<9:>10xS0|<9:>15[0234568]S0|<9:>1x7[1-9]S0|<9:>6xxxS0|<9:>7xxxS0|<9:>8xxxS0|<9:>0[1-9]xxxxxxxxxS0|<9:>0[1-9]x.|<9:>00[1-9]x.|<9:>x.)


Infrastructure needs/Future uses:

  • Mini-XML applications for the phones (weather, IRC info, relevant member info)
  • Enable emergency all-page public address functionality
  • Connect with other Hackspaces

Please use it, play with it, and hack on it to make it better!

Dial 020 3422 0547 to call the LHS phone system, please contact Marrold or email the london-hack-space-infrastructure mailing list.

References: