Telephone System

From Hackerspace ACKspace
Jump to: navigation, search


Project: Telephone System
Featured: Yes
State Active
Members xopr
GitHub No GitHub project defined. Add your project here.
Description Telephone Communication System
Picture
Cisco 7940.jpg

synopsis

Create and/or implement a telephone communication system for fun and automation. It can provide conference and congress rooms, quickly notify if the space is closed and provide a quick and cheap way of communication.


xopr 5 April 2017: I'm working on a new system to replace the current virtual machine


VoIP system with its involved servers

new system

The current system is lacking functionality and needs revisioning. Currently, the trunks that register with the extensions, don't work. When they do, participants registered to the (public) VoIP system are able to directly dial an internal space extension.

The current VoIP setup consists essentially of three servers ('nodes')

  • NLnode (primary public system, sip.ackspace.nl)
  • DEnode (fallback public system, sip1.ackspace.nl)
  • SpaceNode (internal system handling IVR and internal extensions)

The public servers are tied with SRV records as a semi-high availability setup with the primary service having high priority and weight (10 20), while the backup server has it the other way around. All (correctly implemented) services connect to the servers in the given order.

Note that currently, it is not yet possible for an extension on the primary server to call another extension on the fallback server. xopr has seen it happen that a third-party Fritz!Box falls back to the secondary server and never reconnects to the primary server without editing the credentials and reapplying the registration.

This is the SRV output:

$ dig -t srv _sip._tcp.ackspace.nl

; <<>> DiG 9.10.3-P4-Ubuntu <<>> -t srv _sip._tcp.ackspace.nl
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 783
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;_sip._tcp.ackspace.nl.		IN	SRV

;; ANSWER SECTION:
_sip._tcp.ackspace.nl.	384	IN	SRV	10 20 5060 sip.ackspace.nl.
_sip._tcp.ackspace.nl.	384	IN	SRV	20 10 5060 sip1.ackspace.nl.

;; Query time: 8 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Wed May 03 20:15:15 CEST 2017
;; MSG SIZE  rcvd: 110

All nodes connect to the BudgetPhone PSTN trunk for incoming calls, both public nodes connect to CheapConnect for the conference (and backup) number, to VoipBuster for outgoing calls and to Speakup for Limesco cell phone services. The SpaceNode connects to VoipBuster for an alternative PSTN trunk and landline services and to InterVoip for cell phone services.

When a call comes in, both public nodes try to route the call within 3 seconds: they try to call the SpaceNode user/trunk. When this fails, they try to call each other in case one of the nodes wasn't connected to BudgetPhone. If this fails, a tape will be played after 10 seconds stating that "currently, we're not reachable", whereafter the user will be placed in the (public) conference room.

If both public nodes weren't connected to BudgetPhone, the SpaceNode will answer within 10 seconds with the IVR.


current status

  • SpacePhone ENUM number
  • Dutch language for IVR
  • spacestate information logic
  • Every room has its own phone
  • possible to dial ackspace.nl sip addresses (info, conf, [username])

todo

  • Create new (vanilla) VM on new server
  • update/extend IVR menu
    • mention the space state before actually answering (183:progress)
    • start with a brief menu, but give more info on demand
  • add support for Cisco 7900 phones (Cisco phone deployment)
    • need to put an interface on a different VLAN
    • update all switches to offer the same VLAN
    • add TFTP and add the firmware + configs
    • update the DHCP (option 66 or 150)
    • update dialstring to both signal SCCP and SIP
  • update public SIP addressing (dedicated public IP or a VPS redirect)

wishlist

  • multilingual IVR
  • enable fax/modem detect
  • enable 2600 toying option
  • key people (1333)
  • Add a HAM autopatch system to the telephony system so sip phones and amateur radio are interconnected
  • simple intercom service
  • number lookup script
  • various participant registrations (see #extensions)
  • some scripting to ease life and add some nifty features
  • trunking over VPN
  • install PoE blade or smaller PoE switch (might want to choose for regular power supplies)

extensions

This is the list of registered extensions. If you want to register your own extension, let Xopr know. For available extensions, refer to the #dialplan

(refresh table)

ExtensionReference
100
176
150
170
177
Reserved extension numbers
101SlACKspace
102HACKspace
103StACKspace
109DECT
172Coolepascal
191Stuiterveer
196Xopr
199Vicarious
1,333Key people

dialplan

The current dialplan expectation is defined as followed:

used numbers

dialplan destination
(\+|00)([1-9]\d+) international
0[1-9]\d+ long distance
100 ring all onsite (ACKspace) extensions
10[1-9] onsite (ACKspace) extensions
112 European harmonized (emergency)1
116\d{3} European harmonized (social interest)1
1200 ACKspace portal (external IVR)
1201 alternate IVR (events)
1233 mailbox1
1244 prepaid calling credits2
130[1-9] listen-in event conference rooms 1-9
1331 conference rooms
1333 Key people (cell forward)1
1334, echo echo test
1335 delayed echo test
1357 local server identification
1377 remote server identification
139[1-9] party-line event conference rooms 1-9
140\d\d+ government services1
150 ring all offsite extensions
15[1-9] offsite extensions
16\d\d carrier select1
170\d+ reserved for future (expanding) purposes
17[1-9] participants extensions
18\d\d subscriber information service
19\d participants extensions
[2-8]\d{6} local numbers (Heerlen, 045)
9\d\d SpacePhone (interhackerspace enum extensions)
1) currently not in use
2) not available due to IP restrictions

To do: (valet) park, call intercept, call return, redial, paging


Interactive Voice Response

The concept for the new IVR menu will have something like this:

ack_main and ack_info (are the same, but with different spoken texts)

  • 1[059]\d: direct dial extensions
  • 2 switch to English language
  • 3 switch to Dutch language
  • 5 direct dial ring group
  • 6 dial key persons, enable voicemail detect and use time schedule
  • 7 go to conference rooms
  • 8 go to menu ack_extra
  • 9 go to menu ack_info
  • 0 go to menu ack_directory

ack_extra

  • 1 more info on space state (time of toggle)
  • 2 speak out telephone number and/or IP address
  • 3 listening rooms
  • 4 extended time service
  • 5 contact location abroad (when online)
  • 6 echo test
  • 8 call test setup
  • 9 repeat this menu
  • 0 go back
  • * go to main menu

ack_directory

  • 100 for slACKspace (lounge)
  • 101 for hACKspace (workshop)
  • 109 for DECT (wireless)
  •  ??? for chairman
  •  ??? for secretary
  •  ??? for treasurer
  • 1(all other public extensions)
  • 5 call anyone
  • 8 lookup by typing first three characters using keypad
  • 9 repeat this menu
  • 0 go back
  • * go to main menu


history

Chaos Communication Camp 2011

The CCC Binary Voice Radio telephony server was a mixed success. Actually, it was a disaster:

  • The visual ring indicator circuit didn't trigger the optocouplers so that was the first thing to fail.
  • a lot of power failures which caused a lot of downtime and eventually database corruption
  • the DECT system was getting too complex for the simple phones we've modded for field reporting (Technical clarification came from one of the Eventphone key people who explained that the antenna register on cheap phones was too small to identify them all). Besides that, it looked like the cabling had short-circuited because the 9v battery didn't have any oomph left to generate amplified audio.
  • wifi had a hard time maintaining the links and coverage wasn't 100% so the wifi field reporter wasn't a good alternative
  • last but not least: the public IP addressing threw a spanner in the works and the server went limbo.

The server's database went corrupt, and after a restore, it didn't match the regular config files. I got it semi-working after it was far too late to make it useful to the studio. Also, after I got it to work, it wouldn't register correctly to the Eventphone trunk and we only got to call the editorial room (2781|BVR1) via DECT twice or so. Despite all that stress, it was promising, so better luck next time.


Open door day 2011

For the open door day, I set up a stand-alone test system with two Cisco 7940s, a FxS/FxO and dual FxS ATA, which included some softclients.

The phones were successful in a rough field test on the open door day, connected to a FreeSWITCH exchange and two ATAs which provided connections to two additional analog handsets. The field test proved reliable enough and a great platform for some hilarious phone pranks.

The Cisco phones had a menu where you could view a 2 bit grayscale snapshot of the two space cams, and you were able to switch some outlets. People were allowed to navigate the configs and exploit functionality and LuckY sniffed and replayed audio over a wifi link.

Other events


connecting various devices to ACKspace VoIP

connecting the Fritz!Box

  • Note that the Fritz!Box is pretty quirky regarding SIP: it can't handle a 407-unauthorized correctly when in router mode (which is needed to differentiate between public and internal calls). xopr had more success setting the device as a flat switch and putting it behind a generic router (tested with a ZyXel).
  • It also doesn't like usernames; you have to start with a number and change it afterwards.
  • It does seem to have more ring power than the tested ZyXel, though.

connecting the Linksys PAP2T

The following settiings are needed:

  • TBD

connecting the N510 IP PRO

Under Settings » Telephony » Connection, the following settings are needed:

  • Connection name or number: <anything>
  • Provider: Other provider
  • Authentication name: <username>
  • Authentication password: <password>
  • Username: <username>
  • Display name: <anything>
  • Lookup Enabled (if available, version ≥ 240): yes
  • Domain: ackspace.nl
  • Registration server: <leave empty>
  • Proxy server address: <leave empty>
  • Proxy server port: <leave empty to trigger SRV lookup>
  • Registration server: <leave empty>
  • Registration server port: <leave empty to trigger SRV lookup>
  • Registration refresh time: 110
  • STUN enabled: Yes
  • STUN server address: stun.ekiga.net
  • STUN server port: 3478
  • STUN refresh time: 240
  • Outbound proxy mode: Automatic
  • Outbound proxy port: <leave empty to trigger SRV lookup>
  • Select network protocol: Automatic
Note that these settings take a while for the Gigaset to connecto to the right server.
Also, make sure that under Settings » Telephony » Advanced VoIP settings, SIP port: (or its random range) does not conflict with other SIP devices behind the same NAT.

connecting the Sipura SPA3000

Under Admin Login » Advanced » Line 1, the following settings are needed:

  • SIP Port: <make sure this port does not conflict with other SIP devices behind the same NAT>
  • Proxy: ackspace.nl
  • Register Expires: 110
  • Use DNS SRV: yes1
  • DNS SRV Auto Prefix: yes1
  • Display Name: <anything>
  • User ID: <username>
  • Password: <password>
  • Dial Plan: (1[01579]xS0|1[23]xxS0|5000S0|2xxS0|00x.|0[1234567]xxxxxxxxS0|088xxxxxxxS0|0800xxxx.|090[069]xxxx.)

1) or use: Use Outbound Proxy: yes and Outbound Proxy: sip.ackspace.nl

connecting the Thomson ST2030

Under SETUP » VoIP Service » Basic Setup, the following settings are needed:

  • Profile Name: <anything>
  • SIP Unregister: unchecked
  • URI Type: SIP
  • SIP Transport: UDP
  • Connect Reuse: checked
  • Service Domain: ackspace.nl
  • Registrar Server Address: ackspace.nl
  • Port: 5060
  • Proxy Server Address: ackspace.nl
  • Port: 5060
  • SIP Local Port: <make sure this port does not conflict with other SIP devices behind the same NAT>
  • TLS Local Port: <make sure this port does not conflict with other SIP devices behind the same NAT>
  • Registration Timer: 110
  • Registration Frequency: 110

Under ADVANCED » Networking » Outbound Proxy, check the following setting:

  • Outbound Proxy Flag: disabled

Under ADVANCED » Voice Settings » Codec Setup, set all codec settings to:

  • Fixed

For the dial plan go to ADVANCED » Voice Settings » Advanced, VoIP Dial Plan: |1[01579]x|1[23]xx|5000|2xx|00x.T|0[1234567]xxxxxxxx|088xxxxxxx|0800xxxx.T|090[069]xxxx.T|