├── station ├── .gitignore ├── configuration.py ├── .project ├── doorberry ├── .pydevproject ├── README.md ├── keypad.py ├── raspberry.py └── station.py ├── watchdog └── etc │ ├── default │ └── watchdog │ └── watchdog.conf ├── interfaces ├── asterisk ├── cfg │ ├── cli.conf │ ├── features.conf │ ├── sip.conf │ ├── extensions.conf │ ├── modules.conf │ ├── asterisk.conf │ ├── cli_aliases.conf │ └── indications.conf └── bin │ └── rele.sh ├── doorberry.install ├── doorberry.prepare ├── README.md ├── doorberry.install-dep └── service └── doorberry /station/.gitignore: -------------------------------------------------------------------------------- 1 | /keypad.pyc 2 | -------------------------------------------------------------------------------- /watchdog/etc/default/watchdog: -------------------------------------------------------------------------------- 1 | # Start watchdog at boot time? 0 or 1 2 | run_watchdog=1 3 | # Load module before starting watchdog 4 | watchdog_module="bcm2708_wdog" 5 | # Specify additional watchdog options here (see manpage). 6 | 7 | #watchdog_options="-v" 8 | -------------------------------------------------------------------------------- /interfaces: -------------------------------------------------------------------------------- 1 | auto lo 2 | 3 | iface lo inet loopback 4 | 5 | iface eth0 inet static 6 | address 192.168.1.10 7 | netmask 255.255.255.0 8 | gateway 192.168.1.1 9 | 10 | allow-hotplug wlan0 11 | iface wlan0 inet manual 12 | wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf 13 | iface default inet dhcp 14 | -------------------------------------------------------------------------------- /asterisk/cfg/cli.conf: -------------------------------------------------------------------------------- 1 | ; 2 | ; Asterisk CLI configuration 3 | ; 4 | 5 | [startup_commands] 6 | ; 7 | ; Any commands listed in this section will get automatically executed 8 | ; when Asterisk starts as a daemon or foreground process (-c). 9 | ; 10 | ;sip set debug on = yes 11 | ;core set verbose 3 = yes 12 | ;core set debug 1 = yes 13 | -------------------------------------------------------------------------------- /station/configuration.py: -------------------------------------------------------------------------------- 1 | import ConfigParser 2 | 3 | class Configuration(ConfigParser.ConfigParser): 4 | 5 | def __init__(self): 6 | self.add_section('extensions') 7 | self.set('extensions', 'button1', '100') 8 | self.set('extensions', 'button2', '101') 9 | with open('example.cfg', 'wb') as configfile: 10 | self.write(configfile) 11 | 12 | 13 | Configuration() -------------------------------------------------------------------------------- /station/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | DoorBell 4 | 5 | 6 | 7 | 8 | 9 | org.python.pydev.PyDevBuilder 10 | 11 | 12 | 13 | 14 | 15 | org.python.pydev.pythonNature 16 | 17 | 18 | -------------------------------------------------------------------------------- /station/doorberry: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import os 4 | import sys 5 | import lockfile 6 | import daemon 7 | from station import DoorBerry 8 | 9 | ctx = daemon.DaemonContext() 10 | 11 | #pid = str(os.getpid()) 12 | #print "PID ", pid 13 | #pidfile = "/var/run/doorberry.pid" 14 | #file(pidfile, 'w').write(pid) 15 | #print "after write" 16 | 17 | with ctx: 18 | pid = str(os.getpid()) 19 | file('/var/run/doorberry.pid', 'w').write(pid) 20 | db = DoorBerry() 21 | db.run() 22 | print "db.run" 23 | print "pre ctx.run" 24 | ctx.run() 25 | print "ctx.run" 26 | -------------------------------------------------------------------------------- /asterisk/bin/rele.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | write() { 5 | OUT=$1 6 | PORT=gpio$OUT 7 | if [ ! -d /sys/class/gpio/$PORT ]; then 8 | echo $OUT > /sys/class/gpio/export 9 | echo out > /sys/class/gpio/$PORT/direction 10 | fi 11 | echo $2 > /sys/class/gpio/$PORT/value 12 | } 13 | 14 | echo "rele.sh $*" > /tmp/rele.log 15 | 16 | if [ $# -eq 0 ]; then 17 | echo "$0 gpioX" 18 | exit 0 19 | fi 20 | 21 | case $1 in 22 | "1") 23 | write "23" "1" 24 | sleep 1 25 | write "23" "0" 26 | ;; 27 | 28 | "2") 29 | write "24" "1" 30 | sleep 1 31 | write "24" "0" 32 | ;; 33 | 34 | esac 35 | 36 | -------------------------------------------------------------------------------- /doorberry.install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "* Clone Door-berry repository" 4 | cd $HOME 5 | git clone https://github.com/mpodroid/door-berry.git 6 | 7 | echo "* Configure asterisk" 8 | sudo /etc/init.d/asterisk stop 9 | sudo rm /etc/asterisk/* 10 | sudo cp door-berry/asterisk/cfg/* /etc/asterisk/ 11 | sudo chown asterisk.asterisk /etc/asterisk/*.conf 12 | sudo chmod 640 /etc/asterisk/*.conf 13 | sudo /etc/init.d/asterisk start 14 | 15 | echo "* Install door-berry service" 16 | sudo cp door-berry/service/doorberry /etc/init.d/ 17 | sudo update-rc.d doorberry start 10 2 3 4 5 18 | sudo update-rc.d doorberry stop 10 0 1 6 19 | -------------------------------------------------------------------------------- /station/.pydevproject: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | /DoorBell 5 | 6 | python 2.7 7 | python2.7 8 | 9 | /usr/local/lib/python2.7/dist-packages/pjsua-2.0.1.egg-info 10 | 11 | 12 | -------------------------------------------------------------------------------- /doorberry.prepare: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "* Update OS" 4 | sudo apt-get update 5 | sudo apt-get upgrade 6 | 7 | echo "" 8 | 9 | 10 | echo "* Update firmware" 11 | sudo apt-get install git-core 12 | sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update 13 | sudo chmod +x /usr/bin/rpi-update 14 | sudo rpi-update 15 | echo "dwc_otg.speed=1 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait" > /tmp/cmdline.txt 16 | sudo sh -c "cp /tmp/cmdline.txt /boot/" 17 | grep -v "snd-bcm2835" /etc/modules > /tmp/modules 18 | sudo mv /tmp/modules /etc/ 19 | sudo reboot 20 | 21 | 22 | -------------------------------------------------------------------------------- /station/README.md: -------------------------------------------------------------------------------- 1 | USB ISSUES 2 | ========== 3 | 4 | 5 | There are currently performances issue with USB bus. Changing speed solve it 6 | 7 | Add "dwc_otg.speed=1" in file /boot/cmdline.txt and restart 8 | 9 | 10 | ETHERNET ISSUES 11 | =============== 12 | 13 | Occasionally ethernet stops to work and does not recover until an HW reboot. I attached the serial console and checked that raspberry was actually on and running but dmesg was full of error messages related to ethernet. 14 | 15 | I followed tips at https://github.com/raspberrypi/linux/issues/151 and ethernet immediately recovered, without reboot. 16 | 17 | After that, I also update firmware using rpi-update. Let's see if this solves permanently. 18 | 19 | -------------------------------------------------------------------------------- /station/keypad.py: -------------------------------------------------------------------------------- 1 | import RPi.GPIO as GPIO 2 | import time 3 | import os 4 | 5 | class RaspiBoard(): 6 | 7 | IN1=17 8 | # IN2=22 9 | # IN3=4 10 | 11 | def __init__(self): 12 | ''' 13 | Constructor ''' 14 | GPIO.cleanup() 15 | GPIO.setmode(GPIO.BCM) 16 | GPIO.setup(self.IN1, GPIO.IN) 17 | # GPIO.setup(self.IN2, GPIO.IN) 18 | # GPIO.setup(self.IN3, GPIO.IN) 19 | 20 | def destroy(self): 21 | GPIO.cleanup() 22 | 23 | def keyPressed(self): 24 | if(GPIO.input(self.IN1) == True): return 1 25 | # if(GPIO.input(self.IN2) == True): return 2 26 | # if(GPIO.input(self.IN3) == True): return 3 27 | return 0 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | DOOR-BERRY 2 | ========== 3 | 4 | This project is about implementing an IP Video Door Bell and Intercom System based on Raspberry PI. 5 | 6 | Main components are: 7 | * Raspberry PI with Raspbian OS 8 | * PjSIP client on Raspberry 9 | * Smartphones/tablet as internal station: VoIP client yet to be choosen 10 | * Asterisk PBX: not strictly required but necessary to be able to scale system easily to multiple external and internal stations 11 | 12 | BUILDING 13 | ======== 14 | 15 | There 3 scripts to guide you and automate the preparation and build process: 16 | * doorberry.prepare: run it to update default image OS and firmware 17 | * doorberry.install-dep: run it to download and build dependencies required 18 | * doorberry.install: run it to actually install doorberry 19 | 20 | -------------------------------------------------------------------------------- /station/raspberry.py: -------------------------------------------------------------------------------- 1 | import RPi.GPIO as GPIO 2 | import time 3 | import os 4 | 5 | class RaspiBoard(): 6 | 7 | OUT1=24 8 | OUT2=23 9 | OUT3=18 10 | 11 | IN1=22 12 | IN2=17 13 | IN3=4 14 | 15 | def __init__(self): 16 | ''' 17 | Constructor ''' 18 | GPIO.cleanup() 19 | GPIO.setmode(GPIO.BCM) 20 | GPIO.setup(self.OUT1, GPIO.OUT) 21 | GPIO.setup(self.OUT2, GPIO.OUT) 22 | GPIO.setup(self.OUT3, GPIO.OUT) 23 | 24 | GPIO.setup(self.IN1, GPIO.IN) 25 | GPIO.setup(self.IN2, GPIO.IN) 26 | GPIO.setup(self.IN3, GPIO.IN) 27 | 28 | def destroy(self): 29 | GPIO.cleanup() 30 | 31 | def on(self,out): 32 | GPIO.output(out, True) 33 | 34 | def off(self,out): 35 | GPIO.output(out, False) 36 | 37 | def wait(self,sec): 38 | time.sleep(sec) 39 | 40 | def flash(self,out, sec): 41 | self.on(out) 42 | self.wait(sec) 43 | self.off(out) 44 | 45 | -------------------------------------------------------------------------------- /asterisk/cfg/features.conf: -------------------------------------------------------------------------------- 1 | [general] 2 | ; Set per parking lot. 3 | [featuremap] 4 | ;blindxfer => #1 ; Blind transfer (default is #) -- Make sure to set the T and/or t option in the Dial() or Queue() app call! 5 | ;disconnect => *0 ; Disconnect (default is *) -- Make sure to set the H and/or h option in the Dial() or Queue() app call! 6 | ;automon => *1 ; One Touch Record a.k.a. Touch Monitor -- Make sure to set the W and/or w option in the Dial() or Queue() app call! 7 | ;atxfer => *2 ; Attended transfer -- Make sure to set the T and/or t option in the Dial() or Queue() app call! 8 | ;parkcall => #72 ; Park call (one step parking) -- Make sure to set the K and/or k option in the Dial() app call! 9 | ;automixmon => *3 ; One Touch Record a.k.a. Touch MixMonitor -- Make sure to set the X and/or x option in the Dial() or Queue() app call! 10 | 11 | [applicationmap] 12 | open-rele1=1,self,System(sudo /etc/asterisk/rele.sh 1) 13 | open-rele2=2,self,System(sudo /etc/asterisk/rele.sh 2) 14 | -------------------------------------------------------------------------------- /watchdog/etc/watchdog.conf: -------------------------------------------------------------------------------- 1 | ping = 192.168.1.254 2 | #ping = 172.26.1.255 3 | #interface = eth0 4 | #file = /var/log/messages 5 | #change = 1407 6 | 7 | # Uncomment to enable test. Setting one of these values to '0' disables it. 8 | # These values will hopefully never reboot your machine during normal use 9 | # (if your machine is really hung, the loadavg will go much higher than 25) 10 | max-load-1 = 24 11 | max-load-5 = 18 12 | max-load-15 = 12 13 | 14 | # Note that this is the number of pages! 15 | # To get the real size, check how large the pagesize is on your machine. 16 | #min-memory = 1 17 | 18 | #repair-binary = /usr/sbin/repair 19 | #repair-timeout = 20 | #test-binary = 21 | #test-timeout = 22 | 23 | watchdog-device = /dev/watchdog 24 | watchdog-timeout = 300 25 | 26 | # Defaults compiled into the binary 27 | #temperature-device = 28 | #max-temperature = 120 29 | 30 | # Defaults compiled into the binary 31 | #admin = root 32 | interval = 10 33 | logtick = 2 34 | #log-dir = /var/log/watchdog 35 | 36 | # This greatly decreases the chance that watchdog won't be scheduled before 37 | # your machine is really loaded 38 | #realtime = yes 39 | #priority = 1 40 | 41 | # Check if syslogd is still running by enabling the following line 42 | #pidfile = /var/run/syslogd.pid 43 | 44 | -------------------------------------------------------------------------------- /doorberry.install-dep: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "* Install dependencies" 4 | sudo apt-get install alsaplayer-alsa python2.7-dev python-daemon python-lockfile libv4l-dev libx264-dev libssl-dev libasound2-dev asterisk 5 | 6 | 7 | echo "* Download & Compile dependencies" 8 | cd 9 | mkdir tmp 10 | 11 | # required for video support 12 | #cd $HOME/tmp 13 | #wget http://www.libsdl.org/tmp/SDL-2.0.tar.gz 14 | #tar xvfz SDL-2.0.tar.gz 15 | #cd SDL-2.0.0-* 16 | #./configure 17 | #make 18 | #sudo make install 19 | # 20 | #cd $HOME/tmp 21 | #wget http://ffmpeg.org/releases/ffmpeg-0.10.7.tar.bz2 22 | #tar xvfj ffmpeg-0.10.7.tar.bz2 23 | #cd ffmpeg-0.10.7 24 | #./configure --enable-shared --disable-static --enable-memalign-hack --enable-gpl --enable-libx264 25 | #make 26 | #sudo make install 27 | 28 | cd $HOME/tmp 29 | wget http://www.pjsip.org/release/2.1/pjproject-2.1.tar.bz2 30 | tar xvfj pjproject-2.1.tar.bz2 31 | cd pjproject-2.1.0/ 32 | ./configure --disable-video --disable-l16-codec --disable-gsm-codec --disable-g722-codec --disable-g7221-codec --disable-ilbc-codec 33 | cat << PJ > pjlib/include/pj/config_site.h 34 | # define PJMEDIA_AUDIO_DEV_HAS_ALSA 1 35 | # define PJMEDIA_AUDIO_DEV_HAS_PORTAUDIO 0 36 | PJ 37 | 38 | make dep 39 | make 40 | sudo make install 41 | cd pjsip-apps/src/python 42 | make 43 | sudo make install 44 | 45 | -------------------------------------------------------------------------------- /asterisk/cfg/sip.conf: -------------------------------------------------------------------------------- 1 | [general] 2 | context=door-station ; Default context for incoming calls 3 | allowoverlap=no ; Disable overlap dialing support. (Default is yes) 4 | udpbindaddr=0.0.0.0 ; IP address to bind UDP listen socket to (0.0.0.0 binds to all) 5 | tcpenable=no ; Enable server for incoming TCP connections (default is no) 6 | tcpbindaddr=0.0.0.0 ; IP address for TCP server to bind to (0.0.0.0 binds to all interfaces) 7 | transport=udp ; Set the default transports. The order determines the primary default transport. 8 | disallow=all ; First disallow all codecs 9 | allow=ulaw ; Allow codecs in order of preference 10 | allow=alaw 11 | allow=gsm ; see https://wiki.asterisk.org/wiki/display/AST/RTP+Packetization 12 | progressinband=no ; If we should generate in-band ringing always 13 | ;dtmfmode = rfc2833 ; Set default dtmfmode for sending DTMF. Default: rfc2833 14 | rtptimeout=10 15 | 16 | [pj1] 17 | type=friend 18 | secret=1111 19 | host=dynamic 20 | 21 | [pj2] 22 | type=friend 23 | secret=1111 24 | host=dynamic 25 | 26 | [raspi] 27 | type=friend 28 | secret=1111 29 | host=dynamic 30 | 31 | [iphone] 32 | type=friend 33 | secret=1111 34 | host=dynamic 35 | 36 | [magic] 37 | type=friend 38 | secret=1111 39 | host=dynamic 40 | 41 | [desk] 42 | type=friend 43 | secret=1111 44 | host=dynamic 45 | -------------------------------------------------------------------------------- /asterisk/cfg/extensions.conf: -------------------------------------------------------------------------------- 1 | [general] 2 | static=yes 3 | writeprotect=no 4 | clearglobalvars=no 5 | 6 | [globals] 7 | CONSOLE=Console/dsp ; Console interface for demo 8 | TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0) 9 | 10 | [door-station] 11 | exten => 100,1,Verbose(entry point door-station) 12 | same => n,Set(DYNAMIC_FEATURES=open-rele1#open-rele2) 13 | same => n,Progress() 14 | ; same => n,Playtones(ring) 15 | ; same => n,Wait(10) 16 | same => n,Dial(SIP/iphone&SIP/magic&SIP/desk,60,r) 17 | same => n,Verbose(HANGUP=${DIALSTATUS}) 18 | same => n,Playtones(busy) 19 | same => n,Wait(3) 20 | same => n,Hangup() 21 | 22 | exten => 200,1,Verbose(call station) 23 | same => n,Dial(SIP/raspi,60,3) 24 | 25 | exten => 201,1,Verbose(call desk) 26 | same => n,Dial(SIP/desk,60,3) 27 | 28 | exten => 300,1,Verbose(entry point door-station) 29 | same => n,Set(DYNAMIC_FEATURES=open-rele1#open-rele2) 30 | same => n,Progress() 31 | ; same => n,Playtones(ring) 32 | ; same => n,Wait(10) 33 | same => n,Dial(SIP/iphone,60,r) 34 | same => n,Verbose(HANGUP=${DIALSTATUS}) 35 | same => n,Playtones(busy) 36 | same => n,Wait(3) 37 | same => n,Hangup() 38 | 39 | exten => 1,1,Verbose(Open rele 1) 40 | same => n,Macro(rele) 41 | 42 | exten => 2,1,Verbose(Open rele 2) 43 | same => n,Macro(rele) 44 | 45 | exten => 600,1,Verbose(echo service) 46 | same => n,Answer() 47 | same => n,Playback(vm-intro) 48 | same => n,Echo() 49 | 50 | [macro-rele] 51 | exten => s,1,Verbose(MACRO Open rele ${MACRO_EXTEN}) 52 | same => n,Answer() 53 | same => n,Wait(0.5) 54 | same => n,Playback(beep) 55 | same => n,System(sudo /etc/asterisk/rele.sh ${MACRO_EXTEN}) 56 | ; same => n,Playback(beep) 57 | same => n,Hangup() 58 | -------------------------------------------------------------------------------- /asterisk/cfg/modules.conf: -------------------------------------------------------------------------------- 1 | ; 2 | ; Asterisk configuration file 3 | ; 4 | ; Module Loader configuration file 5 | ; 6 | 7 | [modules] 8 | autoload=yes 9 | ; 10 | ; Any modules that need to be loaded before the Asterisk core has been 11 | ; initialized (just after the logger has been initialized) can be loaded 12 | ; using 'preload'. This will frequently be needed if you wish to map all 13 | ; module configuration files into Realtime storage, since the Realtime 14 | ; driver will need to be loaded before the modules using those configuration 15 | ; files are initialized. 16 | ; 17 | ; An example of loading ODBC support would be: 18 | ;preload => res_odbc.so 19 | ;preload => res_config_odbc.so 20 | ; 21 | ; If you want, load the GTK console right away. 22 | ; Don't load the KDE console since 23 | ; it's not as sophisticated right now. 24 | ; 25 | noload => pbx_gtkconsole.so 26 | ;load => pbx_gtkconsole.so 27 | noload => pbx_kdeconsole.so 28 | ; 29 | ; Intercom application is obsoleted by 30 | ; chan_oss. Don't load it. 31 | ; 32 | noload => app_intercom.so 33 | ; 34 | ; The 'modem' channel driver and its subdrivers are 35 | ; obsolete, don't load them. 36 | ; 37 | noload => chan_modem.so 38 | noload => chan_modem_aopen.so 39 | noload => chan_modem_bestdata.so 40 | noload => chan_modem_i4l.so 41 | ; 42 | ; Comment this out (after installing CAPI middleware and hardware 43 | ; drivers) if you have CAPI-able hardware and wish to use it in 44 | ; Asterisk. 45 | ; 46 | noload => chan_capi.so 47 | ; 48 | load => res_musiconhold.so 49 | ; 50 | ; Load either OSS or ALSA, not both 51 | ; By default, load OSS only (automatically) and do not load ALSA 52 | ; 53 | noload => chan_alsa.so 54 | ;noload => chan_oss.so 55 | ; 56 | ; Disable CDR logging to SQLite by default since it writes unconditionally to 57 | ; cdr.db without a way to rotate it. 58 | ; 59 | noload => cdr_sqlite.so 60 | ; 61 | ; These conflict with app_directory.so and each other. 62 | noload => app_directory_odbc.so 63 | ; 64 | ; Enable these if you want to configure Asterisk in a database 65 | ; 66 | noload => res_config_odbc.so 67 | noload => res_config_pgsql.so 68 | ; 69 | ; Module names listed in "global" section will have symbols globally 70 | ; exported to modules loaded after them. 71 | ; 72 | [global] 73 | -------------------------------------------------------------------------------- /asterisk/cfg/asterisk.conf: -------------------------------------------------------------------------------- 1 | [directories](!) 2 | astetcdir => /etc/asterisk 3 | astmoddir => /usr/lib/asterisk/modules 4 | astvarlibdir => /var/lib/asterisk 5 | astdbdir => /var/lib/asterisk 6 | astkeydir => /var/lib/asterisk 7 | astdatadir => /usr/share/asterisk 8 | astagidir => /usr/share/asterisk/agi-bin 9 | astspooldir => /var/spool/asterisk 10 | astrundir => /var/run/asterisk 11 | astlogdir => /var/log/asterisk 12 | 13 | [options] 14 | verbose = 9 15 | debug = 9 16 | ;alwaysfork = yes ; Same as -F at startup. 17 | ;nofork = yes ; Same as -f at startup. 18 | ;quiet = yes ; Same as -q at startup. 19 | timestamp = yes ; Same as -T at startup. 20 | ;execincludes = yes ; Support #exec in config files. 21 | ;console = yes ; Run as console (same as -c at startup). 22 | ;highpriority = yes ; Run realtime priority (same as -p at 23 | ; startup). 24 | ;initcrypto = yes ; Initialize crypto keys (same as -i at 25 | ; startup). 26 | ;nocolor = yes ; Disable console colors. 27 | ;dontwarn = yes ; Disable some warnings. 28 | dumpcore = yes ; Dump core on crash (same as -g at startup). 29 | ;languageprefix = yes ; Use the new sound prefix path syntax. 30 | ;internal_timing = yes 31 | ;systemname = my_system_name ; Prefix uniqueid with a system name for 32 | ; Global uniqueness issues. 33 | ;autosystemname = yes ; Automatically set systemname to hostname, 34 | ; uses 'localhost' on failure, or systemname if 35 | ; set. 36 | ;maxcalls = 10 ; Maximum amount of calls allowed. 37 | ;maxload = 0.9 ; Asterisk stops accepting new calls if the 38 | ; load average exceed this limit. 39 | ;maxfiles = 1000 ; Maximum amount of openfiles. 40 | ;minmemfree = 1 ; In MBs, Asterisk stops accepting new calls if 41 | ; the amount of free memory falls below this 42 | ; watermark. 43 | ;cache_record_files = yes ; Cache recorded sound files to another 44 | ; directory during recording. 45 | ;record_cache_dir = /tmp ; Specify cache directory (used in conjunction 46 | ; with cache_record_files). 47 | ;transmit_silence = yes ; Transmit silence while a channel is in a 48 | ; waiting state, a recording only state, or 49 | ; when DTMF is being generated. Note that the 50 | ; silence internally is generated in raw signed 51 | ; linear format. This means that it must be 52 | ; transcoded into the native format of the 53 | ; channel before it can be sent to the device. 54 | ; It is for this reason that this is optional, 55 | ; as it may result in requiring a temporary 56 | ; codec translation path for a channel that may 57 | ; not otherwise require one. 58 | ;transcode_via_sln = yes ; Build transcode paths via SLINEAR, instead of 59 | ; directly. 60 | runuser = asterisk ; The user to run as. 61 | rungroup = asterisk ; The group to run as. 62 | ;lightbackground = yes ; If your terminal is set for a light-colored 63 | ; background. 64 | ;forceblackbackground = yes ; Force the background of the terminal to be 65 | ; black, in order for terminal colors to show 66 | ; up properly. 67 | ;defaultlanguage = en ; Default language 68 | documentation_language = en_US ; Set the language you want documentation 69 | ; displayed in. Value is in the same format as 70 | ; locale names. 71 | ;hideconnect = yes ; Hide messages displayed when a remote console 72 | ; connects and disconnects. 73 | ;lockconfdir = no ; Protect the directory containing the 74 | ; configuration files (/etc/asterisk) with a 75 | ; lock. 76 | 77 | ; Changing the following lines may compromise your security. 78 | ;[files] 79 | ;astctlpermissions = 0660 80 | ;astctlowner = root 81 | ;astctlgroup = apache 82 | ;astctl = asterisk.ctl 83 | 84 | [compat] 85 | pbx_realtime=1.6 86 | res_agi=1.6 87 | app_set=1.6 88 | -------------------------------------------------------------------------------- /service/doorberry: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | ### BEGIN INIT INFO 3 | # Provides: skeleton 4 | # Required-Start: $remote_fs $syslog 5 | # Required-Stop: $remote_fs $syslog 6 | # Default-Start: 2 3 4 5 7 | # Default-Stop: 0 1 6 8 | # Short-Description: Example initscript 9 | # Description: This file should be used to construct scripts to be 10 | # placed in /etc/init.d. 11 | ### END INIT INFO 12 | 13 | # Author: Foo Bar 14 | # 15 | # Please remove the "Author" lines above and replace them 16 | # with your own name if you copy and modify this script. 17 | 18 | # Do NOT "set -e" 19 | # PATH should only include /usr/* if it runs after the mountnfs.sh script 20 | PATH=/sbin:/usr/sbin:/bin:/usr/bin 21 | DESC="DoorBerry VoIP intercom" 22 | NAME=doorberry 23 | DAEMON=/home/pi/door-berry/station/$NAME 24 | DAEMON_ARGS="" # "--options args" 25 | PIDFILE=/var/run/$NAME.pid 26 | SCRIPTNAME=/etc/init.d/doorberry 27 | 28 | # Exit if the package is not installed 29 | [ -x "$DAEMON" ] || exit 0 30 | 31 | # Read configuration variable file if it is present 32 | [ -r /etc/default/$NAME ] && . /etc/default/$NAME 33 | 34 | # Load the VERBOSE setting and other rcS variables 35 | . /lib/init/vars.sh 36 | 37 | # Define LSB log_* functions. 38 | # Depend on lsb-base (>= 3.2-14) to ensure that this file is present 39 | # and status_of_proc is working. 40 | . /lib/lsb/init-functions 41 | 42 | VERBOSE=yes 43 | # 44 | # Function that starts the daemon/service 45 | # 46 | do_start() 47 | { 48 | # Return 49 | # 0 if daemon has been started 50 | # 1 if daemon was already running 51 | # 2 if daemon could not be started 52 | start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ 53 | || return 1 54 | start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ 55 | $DAEMON_ARGS \ 56 | || return 2 57 | # Add code here, if necessary, that waits for the process to be ready 58 | # to handle requests from services started subsequently which depend 59 | # on this one. As a last resort, sleep for some time. 60 | } 61 | 62 | # 63 | # Function that stops the daemon/service 64 | # 65 | do_stop() 66 | { 67 | # Return 68 | # 0 if daemon has been stopped 69 | # 1 if daemon was already stopped 70 | # 2 if daemon could not be stopped 71 | # other if a failure occurred 72 | start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME 73 | RETVAL="$?" 74 | [ "$RETVAL" = 2 ] && return 2 75 | # Wait for children to finish too if this is a daemon that forks 76 | # and if the daemon is only ever run from this initscript. 77 | # If the above conditions are not satisfied then add some other code 78 | # that waits for the process to drop all resources that could be 79 | # needed by services started subsequently. A last resort is to 80 | # sleep for some time. 81 | start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON 82 | [ "$?" = 2 ] && return 2 83 | # Many daemons don't delete their pidfiles when they exit. 84 | rm -f $PIDFILE 85 | return "$RETVAL" 86 | } 87 | 88 | # 89 | # Function that sends a SIGHUP to the daemon/service 90 | # 91 | do_reload() { 92 | # 93 | # If the daemon can reload its configuration without 94 | # restarting (for example, when it is sent a SIGHUP), 95 | # then implement that here. 96 | # 97 | start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME 98 | return 0 99 | } 100 | 101 | echo "PID $PIDFILE" 102 | 103 | case "$1" in 104 | start) 105 | [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" 106 | do_start 107 | case "$?" in 108 | 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 109 | 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; 110 | esac 111 | ;; 112 | stop) 113 | [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" 114 | do_stop 115 | case "$?" in 116 | 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 117 | 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; 118 | esac 119 | ;; 120 | status) 121 | status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? 122 | ;; 123 | #reload|force-reload) 124 | # 125 | # If do_reload() is not implemented then leave this commented out 126 | # and leave 'force-reload' as an alias for 'restart'. 127 | # 128 | #log_daemon_msg "Reloading $DESC" "$NAME" 129 | #do_reload 130 | #log_end_msg $? 131 | #;; 132 | restart|force-reload) 133 | # 134 | # If the "reload" option is implemented then remove the 135 | # 'force-reload' alias 136 | # 137 | log_daemon_msg "Restarting $DESC" "$NAME" 138 | do_stop 139 | case "$?" in 140 | 0|1) 141 | do_start 142 | case "$?" in 143 | 0) log_end_msg 0 ;; 144 | 1) log_end_msg 1 ;; # Old process is still running 145 | *) log_end_msg 1 ;; # Failed to start 146 | esac 147 | ;; 148 | *) 149 | # Failed to stop 150 | log_end_msg 1 151 | ;; 152 | esac 153 | ;; 154 | *) 155 | #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 156 | echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 157 | exit 3 158 | ;; 159 | esac 160 | 161 | : 162 | -------------------------------------------------------------------------------- /station/station.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import pjsua as pj 4 | import threading 5 | import datetime 6 | from keypad import RaspiBoard 7 | import time 8 | 9 | LOG_LEVEL_PJSIP = 3 10 | SIP_SERVER="192.168.1.10" 11 | SIP_USER="raspi" 12 | SIP_PASS="1111" 13 | SIP_REALM="asterisk" 14 | SIP_LOCAL_PORT=5072 15 | 16 | def log(msg): 17 | print "[",datetime.datetime.now(), "] ", msg 18 | 19 | def pj_log(level, msg, length): 20 | msg = msg.replace("\n","\n\t") 21 | print "[PJ] " + msg, 22 | 23 | class DBCallCallback(pj.CallCallback): 24 | 25 | def __init__(self, call=None): 26 | pj.CallCallback.__init__(self, call) 27 | 28 | def on_media_state(self): 29 | print "***** ON MEDIA STATE " , self.call.info() 30 | if self.call.info().media_state == pj.MediaState.ACTIVE: 31 | # Connect the call to sound device 32 | call_slot = self.call.info().conf_slot 33 | pj.Lib.instance().conf_connect(call_slot, 0) 34 | pj.Lib.instance().conf_connect(0, call_slot) 35 | print "Media is now active" 36 | else: 37 | print "Media is inactive" 38 | 39 | def on_state(self): 40 | print "**** ON STATE ", self.call 41 | print self.call.dump_status() 42 | #pj.CallCallback.on_state(self) 43 | 44 | class DBAccountCallback(pj.AccountCallback): 45 | sem = None 46 | 47 | def __init__(self, account = None): 48 | pj.AccountCallback.__init__(self, account) 49 | 50 | def wait(self): 51 | self.sem = threading.Semaphore(0,verbose=True) 52 | self.sem.acquire() 53 | 54 | def on_reg_state(self): 55 | if self.sem: 56 | if self.account.info().reg_status >= 200: 57 | self.sem.release() 58 | def on_incoming_call(self, call): 59 | cb = DBCallCallback(call) 60 | call.set_callback(cb) 61 | call.answer(200,'') 62 | 63 | class DoorStation: 64 | lib = None 65 | acc = None 66 | acc_cb = None 67 | _call = None 68 | 69 | def __init__(self): 70 | lib = pj.Lib() 71 | 72 | try: 73 | ua= pj.UAConfig() 74 | ua.user_agent = "DoorBerry UA" 75 | #ua.max_calls = 1 76 | 77 | mc = pj.MediaConfig() 78 | # mc.no_vad = False 79 | # mc.ec_tail_len = 800 80 | mc.clock_rate = 8000 81 | 82 | lib.init(ua_cfg = ua, log_cfg = pj.LogConfig(level=LOG_LEVEL_PJSIP, callback=pj_log), media_cfg=mc) 83 | lib.create_transport(pj.TransportType.UDP, pj.TransportConfig(SIP_LOCAL_PORT)) 84 | lib.start() 85 | 86 | # temporary workaround on RPi 87 | #pj.Lib.instance().set_snd_dev(1, 0) 88 | acc_cfg = pj.AccountConfig() 89 | acc_cfg.id = "sip:" + SIP_USER + "@" + SIP_SERVER 90 | acc_cfg.reg_uri = "sip:" + SIP_SERVER 91 | acc_cfg.auth_cred = [ pj.AuthCred(SIP_REALM, SIP_USER, SIP_PASS) ] 92 | acc_cfg.allow_contact_rewrite = False 93 | self.acc = lib.create_account(acc_cfg) 94 | log("Account created") 95 | 96 | except pj.Error, e: 97 | log("Exception: " + str(e)) 98 | 99 | def print_media_cfg(self,mc): 100 | print "no vad",mc.no_vad 101 | print "audio frame type ", mc.audio_frame_ptime 102 | print "channel count ",mc.channel_count 103 | print "clock rate ",mc.clock_rate 104 | print "ec options ",mc.ec_options 105 | print "ec tail len ",mc.ec_tail_len 106 | print "ilbc mode ",mc.ilbc_mode 107 | print "jb max ",mc.jb_max 108 | print "jb min ",mc.jb_min 109 | print "max media ports ",mc.max_media_ports 110 | print "no vad ",mc.no_vad 111 | print "ptime ",mc.ptime 112 | print "quality ",mc.quality 113 | print "snd clock rate ",mc.snd_clock_rate 114 | 115 | def start(self): 116 | self.acc_cb = DBAccountCallback(self.acc) 117 | self.acc.set_callback(self.acc_cb) 118 | #self.acc_cb.wait() 119 | 120 | def call(self): 121 | if (self._call != None and self._call.is_valid()): 122 | print "call in progress -> SKIP" 123 | return 124 | 125 | self._call = self.acc.make_call("sip:100@"+SIP_SERVER, DBCallCallback()) 126 | 127 | def stop(self): 128 | try: 129 | self.acc.delete() 130 | self.acc = None 131 | #self.lib = None 132 | except pj.Error, e: 133 | log("Exception: " + str(e)) 134 | 135 | class DoorBerry: 136 | 137 | station = None 138 | keyboard = None 139 | 140 | def __init__(self): 141 | self.station = DoorStation() 142 | self.keyboard = RaspiBoard() 143 | 144 | def run(self): 145 | try: 146 | #station = DoorStation() 147 | self.station.start() 148 | #keyboard = RaspiBoard() 149 | 150 | log("entering main loop") 151 | while True: 152 | key = self.keyboard.keyPressed() 153 | if(key == 0): 154 | time.sleep(0.2) 155 | continue 156 | 157 | log("Selected extension =" + str(key)) 158 | 159 | if(key == 1): 160 | try: 161 | log("calling extension 1") 162 | self.station.call() 163 | except pj.Error, ee: 164 | print ee 165 | time.sleep(2) 166 | 167 | except Exception, e: 168 | print e 169 | -------------------------------------------------------------------------------- /asterisk/cfg/cli_aliases.conf: -------------------------------------------------------------------------------- 1 | ; 2 | ; CLI Aliases configuration 3 | ; 4 | ; This module also registers a "cli show aliases" CLI command to list 5 | ; configured CLI aliases. 6 | 7 | [general] 8 | ; Here you define what alias templates you want to use. You can also define 9 | ; multiple templates to use as well. If you do, and there is a conflict, then 10 | ; the first alias defined will win. 11 | ; 12 | template = friendly ; By default, include friendly aliases 13 | ;template = asterisk12 ; Asterisk 1.2 style syntax 14 | ;template = asterisk14 ; Asterisk 1.4 style syntax 15 | ;template = individual_custom ; see [individual_custom] example below which 16 | ; includes a list of aliases from an external 17 | ; file 18 | 19 | 20 | ; Because the Asterisk CLI syntax follows a "module verb argument" syntax, 21 | ; sometimes we run into an issue between being consistant with this format 22 | ; in the core system, and maintaining system friendliness. In order to get 23 | ; around this we're providing some useful aliases by default. 24 | ; 25 | [friendly] 26 | hangup request=channel request hangup 27 | originate=channel originate 28 | help=core show help 29 | pri intense debug span=pri set debug 2 span 30 | reload=module reload 31 | 32 | ; CLI Alias Templates 33 | ; ------------------- 34 | ; 35 | ; You can define several alias templates. 36 | ; It works with context templates like all other configuration files 37 | ; 38 | ;[asterisk](!) 39 | ; To create an alias you simply set the variable name as the alias and variable 40 | ; value as the real CLI command you want executed 41 | ; 42 | ;die die die=stop now 43 | 44 | ;[asterisk16](asterisk) 45 | ; Alias for making voicemail reload actually do module reload app_voicemail.so 46 | ;voicemail reload=module reload app_voicemail.so 47 | ; This will make the CLI command "mr" behave as though it is "module reload". 48 | ;mr=module reload 49 | ; 50 | ; 51 | ; In addition, you could also include a flat file of aliases which is loaded by 52 | ; the [individual_custom] template in the [general] section. 53 | ; 54 | ;[individual_custom] 55 | ;#include "/etc/asterisk/aliases" 56 | 57 | ; Implemented CLI Alias Templates 58 | ; ------------------------------- 59 | ; 60 | ; Below here we have provided you with some templates, easily allowing you to 61 | ; utilize previous Asterisk CLI commands with any version of Asterisk. In this 62 | ; way you will be able to use Asterisk 1.2 and 1.4 style CLI syntax with any 63 | ; version Asterisk going forward into the future. 64 | ; 65 | ; We have also separated out the vanilla syntax into a context template which 66 | ; allows you to keep your custom changes separate of the standard templates 67 | ; we have provided you. In this way you can clearly see your custom changes, 68 | ; and also allowing you to combine various templates as you see fit. 69 | ; 70 | ; The naming scheme we have used is recommended, but certainly is not enforced 71 | ; by Asterisk. If you wish to use the provided templates, simply define the 72 | ; context name which does not utilize the '_tpl' at the end. For example, 73 | ; if you would like to use the Asterisk 1.2 style syntax, define in the 74 | ; [general] section 75 | 76 | [asterisk12_tpl](!) 77 | show channeltypes=core show channeltypes 78 | show channeltype=core show channeltype 79 | show manager command=manager show command 80 | show manager commands=manager show commands 81 | show manager connected=manager show connected 82 | show manager eventq=manager show eventq 83 | rtp no debug=rtp set debug off 84 | rtp rtcp debug ip=rtcp debug ip 85 | rtp rtcp debug=rtcp debug 86 | rtp rtcp no debug=rtcp debug off 87 | rtp rtcp stats=rtcp stats 88 | rtp rtcp no stats=rtcp stats off 89 | stun no debug=stun debug off 90 | udptl no debug=udptl debug off 91 | show image formats=core show image formats 92 | show file formats=core show file formats 93 | show applications=core show applications 94 | show functions=core show functions 95 | show switches=core show switches 96 | show hints=core show hints 97 | show globals=core show globals 98 | show function=core show function 99 | show application=core show application 100 | set global=core set global 101 | show dialplan=dialplan show 102 | show codecs=core show codecs 103 | show audio codecs=core show audio codecs 104 | show video codecs=core show video codecs 105 | show image codecs=core show image codecs 106 | show codec=core show codec 107 | moh classes show=moh show classes 108 | moh files show=moh show files 109 | agi no debug=agi debug off 110 | show agi=agi show 111 | dump agihtml=agi dumphtml 112 | show features=feature show 113 | show indications=indication show 114 | answer=console answer 115 | hangup=console hangup 116 | flash=console flash 117 | dial=console dial 118 | mute=console mute 119 | unmute=console unmute 120 | transfer=console transfer 121 | send text=console send text 122 | autoanswer=console autoanswer 123 | oss boost=console boost 124 | console=console active 125 | save dialplan=dialplan save 126 | add extension=dialplan add extension 127 | remove extension=dialplan remove extension 128 | add ignorepat=dialplan add ignorepat 129 | remove ignorepat=dialplan remove ignorepat 130 | include context=dialplan add include 131 | dont include=dialplan remove include 132 | extensions reload=dialplan reload 133 | show translation=core show translation 134 | convert=file convert 135 | show queue=queue show 136 | add queue member=queue add member 137 | remove queue member=queue remove member 138 | ael no debug=ael nodebug 139 | sip debug=sip set debug 140 | sip no debug=sip set debug off 141 | show voicemail users=voicemail show users 142 | show voicemail zones=voicemail show zones 143 | iax2 trunk debug=iax2 set debug trunk 144 | iax2 jb debug=iax2 set debug jb 145 | iax2 no debug=iax2 set debug off 146 | iax2 no trunk debug=iax2 set debug trunk off 147 | iax2 no jb debug=iax2 set debug jb off 148 | show agents=agent show 149 | show agents online=agent show online 150 | show memory allocations=memory show allocations 151 | show memory summary=memory show summary 152 | show version=core show version 153 | show version files=core show file version 154 | show profile=core show profile 155 | clear profile=core clear profile 156 | soft hangup=channel request hangup 157 | 158 | [asterisk12](asterisk12_tpl) 159 | ; add any additional custom commands you want below here, for example: 160 | ;die quickly=stop now 161 | 162 | [asterisk14_tpl](!) 163 | cdr status=cdr show status 164 | rtp debug=rtp set debug on 165 | rtcp debug=rtcp set debug on 166 | rtcp stats=rtcp set stats on 167 | stun debug=stun set debug on 168 | udptl debug=udptl set debug on 169 | core show globals=dialplan show globals 170 | core set global=dialplan set global 171 | core set chanvar=dialplan set chanvar 172 | agi dumphtml=agi dump html 173 | ael debug=ael set debug 174 | funcdevstate list=devstate list 175 | sip history=sip set history on 176 | skinny debug=skinny set debug on 177 | mgcp set debug=mgcp set debug on 178 | abort shutdown=core abort shutdown 179 | stop now=core stop now 180 | stop gracefully=core stop gracefully 181 | stop when convenient=core stop when convenient 182 | restart now=core restart now 183 | restart gracefully=core restart gracefully 184 | restart when convenient=core restart when convenient 185 | soft hangup=channel request hangup 186 | 187 | [asterisk14](asterisk14_tpl) 188 | ; add any additional custom commands you want below here. 189 | -------------------------------------------------------------------------------- /asterisk/cfg/indications.conf: -------------------------------------------------------------------------------- 1 | ; 2 | ; indications.conf 3 | ; 4 | ; Configuration file for location specific tone indications 5 | ; 6 | 7 | ; 8 | ; NOTE: 9 | ; When adding countries to this file, please keep them in alphabetical 10 | ; order according to the 2-character country codes! 11 | ; 12 | ; The [general] category is for certain global variables. 13 | ; All other categories are interpreted as location specific indications 14 | ; 15 | 16 | [general] 17 | country=it ; default location 18 | 19 | 20 | ; [example] 21 | ; description = string 22 | ; The full name of your country, in English. 23 | ; ringcadence = num[,num]* 24 | ; List of durations the physical bell rings. 25 | ; dial = tonelist 26 | ; Set of tones to be played when one picks up the hook. 27 | ; busy = tonelist 28 | ; Set of tones played when the receiving end is busy. 29 | ; congestion = tonelist 30 | ; Set of tones played when there is some congestion (on the network?) 31 | ; callwaiting = tonelist 32 | ; Set of tones played when there is a call waiting in the background. 33 | ; dialrecall = tonelist 34 | ; Not well defined; many phone systems play a recall dial tone after hook 35 | ; flash. 36 | ; record = tonelist 37 | ; Set of tones played when call recording is in progress. 38 | ; info = tonelist 39 | ; Set of tones played with special information messages (e.g., "number is 40 | ; out of service") 41 | ; 'name' = tonelist 42 | ; Every other variable will be available as a shortcut for the "PlayList" command 43 | ; but will not be used automatically by Asterisk. 44 | ; 45 | ; 46 | ; The tonelist itself is defined by a comma-separated sequence of elements. 47 | ; Each element consist of a frequency (f) with an optional duration (in ms) 48 | ; attached to it (f/duration). The frequency component may be a mixture of two 49 | ; frequencies (f1+f2) or a frequency modulated by another frequency (f1*f2). 50 | ; The implicit modulation depth is fixed at 90%, though. 51 | ; If the list element starts with a !, that element is NOT repeated, 52 | ; therefore, only if all elements start with !, the tonelist is time-limited, 53 | ; all others will repeat indefinitely. 54 | ; 55 | ; concisely: 56 | ; element = [!]freq[+|*freq2][/duration] 57 | ; tonelist = element[,element]* 58 | ; 59 | 60 | [at] 61 | description = Austria 62 | ringcadence = 1000,5000 63 | ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 64 | dial = 420 65 | busy = 420/400,0/400 66 | ring = 420/1000,0/5000 67 | congestion = 420/200,0/200 68 | callwaiting = 420/40,0/1960 69 | dialrecall = 420 70 | ; RECORDTONE - not specified 71 | record = 1400/80,0/14920 72 | info = 950/330,1450/330,1850/330,0/1000 73 | stutter = 380+420 74 | 75 | [au] 76 | description = Australia 77 | ; Reference http://www.acif.org.au/__data/page/3303/S002_2001.pdf 78 | ; Normal Ring 79 | ringcadence = 400,200,400,2000 80 | ; Distinctive Ring 1 - Forwarded Calls 81 | ; 400,400it,200,200,400,1400 82 | ; Distinctive Ring 2 - Selective Ring 2 + Operator + Recall 83 | ; 400,400,200,2000 84 | ; Distinctive Ring 3 - Multiple Subscriber Number 1 85 | ; 200,200,400,2200 86 | ; Distinctive Ring 4 - Selective Ring 1 + Centrex 87 | ; 400,2600 88 | ; Distinctive Ring 5 - Selective Ring 3 89 | ; 400,400,200,400,200,1400 90 | ; Distinctive Ring 6 - Multiple Subscriber Number 2 91 | ; 200,400,200,200,400,1600 92 | ; Distinctive Ring 7 - Multiple Subscriber Number 3 + Data Privacy 93 | ; 200,400,200,400,200,1600 94 | ; Tones 95 | dial = 413+438 96 | busy = 425/375,0/375 97 | ring = 413+438/400,0/200,413+438/400,0/2000 98 | ; XXX Congestion: Should reduce by 10 db every other cadence XXX 99 | congestion = 425/375,0/375,420/375,0/375 100 | callwaiting = 425/200,0/200,425/200,0/4400 101 | dialrecall = 413+438 102 | ; Record tone used for Call Intrusion/Recording or Conference 103 | record = !425/1000,!0/15000,425/360,0/15000 104 | info = 425/2500,0/500 105 | ; Other Australian Tones 106 | ; The STD "pips" indicate the call is not an untimed local call 107 | std = !525/100,!0/100,!525/100,!0/100,!525/100,!0/100,!525/100,!0/100,!525/100 108 | ; Facility confirmation tone (eg. Call Forward Activated) 109 | facility = 425 110 | ; Message Waiting "stutter" dialtone 111 | stutter = 413+438/100,0/40 112 | ; Ringtone for calls to Telstra mobiles 113 | ringmobile = 400+450/400,0/200,400+450/400,0/2000 114 | 115 | [bg] 116 | ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 117 | description = Bulgaria 118 | ringcadence = 1000,4000 119 | ; 120 | dial = 425 121 | busy = 425/500,0/500 122 | ring = 425/1000,0/4000 123 | congestion = 425/250,0/250 124 | callwaiting = 425/150,0/150,425/150,0/4000 125 | dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 126 | record = 1400/425,0/15000 127 | info = 950/330,1400/330,1800/330,0/1000 128 | stutter = 425/1500,0/100 129 | 130 | [br] 131 | description = Brazil 132 | ringcadence = 1000,4000 133 | dial = 425 134 | busy = 425/250,0/250 135 | ring = 425/1000,0/4000 136 | congestion = 425/250,0/250,425/750,0/250 137 | callwaiting = 425/50,0/1000 138 | ; Dialrecall not used in Brazil standard (using UK standard) 139 | dialrecall = 350+440 140 | ; Record tone is not used in Brazil, use busy tone 141 | record = 425/250,0/250 142 | ; Info not used in Brazil standard (using UK standard) 143 | info = 950/330,1400/330,1800/330 144 | stutter = 350+440 145 | 146 | [be] 147 | description = Belgium 148 | ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 149 | ringcadence = 1000,3000 150 | dial = 425 151 | busy = 425/500,0/500 152 | ring = 425/1000,0/3000 153 | congestion = 425/167,0/167 154 | callwaiting = 1400/175,0/175,1400/175,0/3500 155 | ; DIALRECALL - not specified 156 | dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 157 | ; RECORDTONE - not specified 158 | record = 1400/500,0/15000 159 | info = 900/330,1400/330,1800/330,0/1000 160 | stutter = 425/1000,0/250 161 | 162 | [ch] 163 | description = Switzerland 164 | ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 165 | ringcadence = 1000,4000 166 | dial = 425 167 | busy = 425/500,0/500 168 | ring = 425/1000,0/4000 169 | congestion = 425/200,0/200 170 | callwaiting = 425/200,0/200,425/200,0/4000 171 | ; DIALRECALL - not specified 172 | dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 173 | ; RECORDTONE - not specified 174 | record = 1400/80,0/15000 175 | info = 950/330,1400/330,1800/330,0/1000 176 | stutter = 425+340/1100,0/1100 177 | 178 | [cl] 179 | description = Chile 180 | ; According to specs from Telefonica CTC Chile 181 | ringcadence = 1000,3000 182 | dial = 400 183 | busy = 400/500,0/500 184 | ring = 400/1000,0/3000 185 | congestion = 400/200,0/200 186 | callwaiting = 400/250,0/8750 187 | dialrecall = !400/100,!0/100,!400/100,!0/100,!400/100,!0/100,400 188 | record = 1400/500,0/15000 189 | info = 950/333,1400/333,1800/333,0/1000 190 | stutter = !400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,400 191 | 192 | [cn] 193 | description = China 194 | ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 195 | ringcadence = 1000,4000 196 | dial = 450 197 | busy = 450/350,0/350 198 | ring = 450/1000,0/4000 199 | congestion = 450/700,0/700 200 | callwaiting = 450/400,0/4000 201 | dialrecall = 450 202 | record = 950/400,0/10000 203 | info = 450/100,0/100,450/100,0/100,450/100,0/100,450/400,0/400 204 | ; STUTTER - not specified 205 | stutter = 450+425 206 | 207 | [cz] 208 | description = Czech Republic 209 | ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 210 | ringcadence = 1000,4000 211 | dial = 425/330,0/330,425/660,0/660 212 | busy = 425/330,0/330 213 | ring = 425/1000,0/4000 214 | congestion = 425/165,0/165 215 | callwaiting = 425/330,0/9000 216 | ; DIALRECALL - not specified 217 | dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425/330,0/330,425/660,0/660 218 | ; RECORDTONE - not specified 219 | record = 1400/500,0/14000 220 | info = 950/330,0/30,1400/330,0/30,1800/330,0/1000 221 | ; STUTTER - not specified 222 | stutter = 425/450,0/50 223 | 224 | [de] 225 | description = Germany 226 | ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 227 | ringcadence = 1000,4000 228 | dial = 425 229 | busy = 425/480,0/480 230 | ring = 425/1000,0/4000 231 | congestion = 425/240,0/240 232 | callwaiting = !425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,!0/5000,!425/200,!0/200,!425/200,0 233 | ; DIALRECALL - not specified 234 | dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 235 | ; RECORDTONE - not specified 236 | record = 1400/80,0/15000 237 | info = 950/330,1400/330,1800/330,0/1000 238 | stutter = 425+400 239 | 240 | [dk] 241 | description = Denmark 242 | ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 243 | ringcadence = 1000,4000 244 | dial = 425 245 | busy = 425/500,0/500 246 | ring = 425/1000,0/4000 247 | congestion = 425/200,0/200 248 | callwaiting = !425/200,!0/600,!425/200,!0/3000,!425/200,!0/200,!425/200,0 249 | ; DIALRECALL - not specified 250 | dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 251 | ; RECORDTONE - not specified 252 | record = 1400/80,0/15000 253 | info = 950/330,1400/330,1800/330,0/1000 254 | ; STUTTER - not specified 255 | stutter = 425/450,0/50 256 | 257 | [ee] 258 | description = Estonia 259 | ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 260 | ringcadence = 1000,4000 261 | dial = 425 262 | busy = 425/300,0/300 263 | ring = 425/1000,0/4000 264 | congestion = 425/200,0/200 265 | ; CALLWAIT not in accordance to ITU 266 | callwaiting = 950/650,0/325,950/325,0/30,1400/1300,0/2600 267 | ; DIALRECALL - not specified 268 | dialrecall = 425/650,0/25 269 | ; RECORDTONE - not specified 270 | record = 1400/500,0/15000 271 | ; INFO not in accordance to ITU 272 | info = 950/650,0/325,950/325,0/30,1400/1300,0/2600 273 | ; STUTTER not specified 274 | stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 275 | 276 | [es] 277 | description = Spain 278 | ringcadence = 1500,3000 279 | dial = 425 280 | busy = 425/200,0/200 281 | ring = 425/1500,0/3000 282 | congestion = 425/200,0/200,425/200,0/200,425/200,0/600 283 | callwaiting = 425/175,0/175,425/175,0/3500 284 | dialrecall = !425/200,!0/200,!425/200,!0/200,!425/200,!0/200,425 285 | record = 1400/500,0/15000 286 | info = 950/330,0/1000 287 | dialout = 500 288 | 289 | 290 | [fi] 291 | description = Finland 292 | ringcadence = 1000,4000 293 | dial = 425 294 | busy = 425/300,0/300 295 | ring = 425/1000,0/4000 296 | congestion = 425/200,0/200 297 | callwaiting = 425/150,0/150,425/150,0/8000 298 | dialrecall = 425/650,0/25 299 | record = 1400/500,0/15000 300 | info = 950/650,0/325,950/325,0/30,1400/1300,0/2600 301 | stutter = 425/650,0/25 302 | 303 | [fr] 304 | description = France 305 | ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 306 | ringcadence = 1500,3500 307 | ; Dialtone can also be 440+330 308 | dial = 440 309 | busy = 440/500,0/500 310 | ring = 440/1500,0/3500 311 | ; CONGESTION - not specified 312 | congestion = 440/250,0/250 313 | callwait = 440/300,0/10000 314 | ; DIALRECALL - not specified 315 | dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 316 | ; RECORDTONE - not specified 317 | record = 1400/500,0/15000 318 | info = !950/330,!1400/330,!1800/330 319 | stutter = !440/100,!0/100,!440/100,!0/100,!440/100,!0/100,!440/100,!0/100,!440/100,!0/100,!440/100,!0/100,440 320 | 321 | [gr] 322 | description = Greece 323 | ringcadence = 1000,4000 324 | dial = 425/200,0/300,425/700,0/800 325 | busy = 425/300,0/300 326 | ring = 425/1000,0/4000 327 | congestion = 425/200,0/200 328 | callwaiting = 425/150,0/150,425/150,0/8000 329 | dialrecall = 425/650,0/25 330 | record = 1400/400,0/15000 331 | info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0 332 | stutter = 425/650,0/25 333 | 334 | [hu] 335 | description = Hungary 336 | ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 337 | ringcadence = 1250,3750 338 | dial = 425 339 | busy = 425/300,0/300 340 | ring = 425/1250,0/3750 341 | congestion = 425/300,0/300 342 | callwaiting = 425/40,0/1960 343 | dialrecall = 425+450 344 | ; RECORDTONE - not specified 345 | record = 1400/400,0/15000 346 | info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0 347 | stutter = 350+375+400 348 | 349 | [il] 350 | description = Israel 351 | ringcadence = 1000,3000 352 | dial = 414 353 | busy = 414/500,0/500 354 | ring = 414/1000,0/3000 355 | congestion = 414/250,0/250 356 | callwaiting = 414/100,0/100,414/100,0/100,414/600,0/3000 357 | dialrecall = !414/100,!0/100,!414/100,!0/100,!414/100,!0/100,414 358 | record = 1400/500,0/15000 359 | info = 1000/330,1400/330,1800/330,0/1000 360 | stutter = !414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,!414/160,!0/160,414 361 | 362 | 363 | [in] 364 | description = India 365 | ringcadence = 400,200,400,2000 366 | dial = 400*25 367 | busy = 400/750,0/750 368 | ring = 400*25/400,0/200,400*25/400,0/2000 369 | congestion = 400/250,0/250 370 | callwaiting = 400/200,0/100,400/200,0/7500 371 | dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 372 | record = 1400/500,0/15000 373 | info = !950/330,!1400/330,!1800/330,0/1000 374 | stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 375 | 376 | [it] 377 | description = Italy 378 | ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 379 | ringcadence = 1000,4000 380 | dial = 425/200,0/200,425/600,0/1000 381 | busy = 425/500,0/500 382 | ring = 425/1000,0/4000 383 | congestion = 425/200,0/200 384 | callwaiting = 425/400,0/100,425/250,0/100,425/150,0/14000 385 | dialrecall = 470/400,425/400 386 | record = 1400/400,0/15000 387 | info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0 388 | stutter = 470/400,425/400 389 | 390 | [lt] 391 | description = Lithuania 392 | ringcadence = 1000,4000 393 | dial = 425 394 | busy = 425/350,0/350 395 | ring = 425/1000,0/4000 396 | congestion = 425/200,0/200 397 | callwaiting = 425/150,0/150,425/150,0/4000 398 | ; DIALRECALL - not specified 399 | dialrecall = 425/500,0/50 400 | ; RECORDTONE - not specified 401 | record = 1400/500,0/15000 402 | info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0 403 | ; STUTTER - not specified 404 | stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 405 | 406 | [jp] 407 | description = Japan 408 | ringcadence = 1000,2000 409 | dial = 400 410 | busy = 400/500,0/500 411 | ring = 400+15/1000,0/2000 412 | congestion = 400/500,0/500 413 | callwaiting = 400+16/500,0/8000 414 | dialrecall = !400/200,!0/200,!400/200,!0/200,!400/200,!0/200,400 415 | record = 1400/500,0/15000 416 | info = !950/330,!1400/330,!1800/330,0 417 | stutter = !400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,400 418 | 419 | [mx] 420 | description = Mexico 421 | ringcadence = 2000,4000 422 | dial = 425 423 | busy = 425/250,0/250 424 | ring = 425/1000,0/4000 425 | congestion = 425/250,0/250 426 | callwaiting = 425/200,0/600,425/200,0/10000 427 | dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 428 | record = 1400/500,0/15000 429 | info = 950/330,0/30,1400/330,0/30,1800/330,0/1000 430 | stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 431 | 432 | [my] 433 | description = Malaysia 434 | ringcadence = 2000,4000 435 | dial = 425 436 | busy = 425/500,0/500 437 | ring = 425/400,0/200 438 | congestion = 425/500,0/500 439 | 440 | [nl] 441 | description = Netherlands 442 | ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 443 | ringcadence = 1000,4000 444 | ; Most of these 425's can also be 450's 445 | dial = 425 446 | busy = 425/500,0/500 447 | ring = 425/1000,0/4000 448 | congestion = 425/250,0/250 449 | callwaiting = 425/500,0/9500 450 | ; DIALRECALL - not specified 451 | dialrecall = 425/500,0/50 452 | ; RECORDTONE - not specified 453 | record = 1400/500,0/15000 454 | info = 950/330,1400/330,1800/330,0/1000 455 | stutter = 425/500,0/50 456 | 457 | [no] 458 | description = Norway 459 | ringcadence = 1000,4000 460 | dial = 425 461 | busy = 425/500,0/500 462 | ring = 425/1000,0/4000 463 | congestion = 425/200,0/200 464 | callwaiting = 425/200,0/600,425/200,0/10000 465 | dialrecall = 470/400,425/400 466 | record = 1400/400,0/15000 467 | info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,0 468 | stutter = 470/400,425/400 469 | 470 | [nz] 471 | description = New Zealand 472 | ; Reference = http://www.telepermit.co.nz/TNA102.pdf 473 | ringcadence = 400,200,400,2000 474 | dial = 400 475 | busy = 400/500,0/500 476 | ring = 400+450/400,0/200,400+450/400,0/2000 477 | congestion = 400/250,0/250 478 | callwaiting = !400/200,!0/3000,!400/200,!0/3000,!400/200,!0/3000,!400/200 479 | dialrecall = !400/100,!0/100,!400/100,!0/100,!400/100,!0/100,400 480 | record = 1400/425,0/15000 481 | info = 400/750,0/100,400/750,0/100,400/750,0/100,400/750,0/400 482 | stutter = !400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,!400/100,!0/100,400 483 | unobtainable = 400/75,0/100,400/75,0/100,400/75,0/100,400/75,0/400 484 | 485 | [ph] 486 | 487 | ; reference http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 488 | 489 | description = Philippines 490 | ringcadence = 1000,4000 491 | dial = 425 492 | busy = 480+620/500,0/500 493 | ring = 425+480/1000,0/4000 494 | congestion = 480+620/250,0/250 495 | callwaiting = 440/300,0/10000 496 | ; DIALRECALL - not specified 497 | dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 498 | ; RECORDTONE - not specified 499 | record = 1400/500,0/15000 500 | ; INFO - not specified 501 | info = !950/330,!1400/330,!1800/330,0 502 | ; STUTTER - not specified 503 | stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 504 | 505 | 506 | [pl] 507 | description = Poland 508 | ringcadence = 1000,4000 509 | dial = 425 510 | busy = 425/500,0/500 511 | ring = 425/1000,0/4000 512 | congestion = 425/500,0/500 513 | callwaiting = 425/150,0/150,425/150,0/4000 514 | ; DIALRECALL - not specified 515 | dialrecall = 425/500,0/50 516 | ; RECORDTONE - not specified 517 | record = 1400/500,0/15000 518 | ; 950/1400/1800 3x0.33 on 1.0 off repeated 3 times 519 | info = !950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000,!950/330,!1400/330,!1800/330,!0/1000 520 | ; STUTTER - not specified 521 | stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 522 | 523 | [pt] 524 | description = Portugal 525 | ringcadence = 1000,5000 526 | dial = 425 527 | busy = 425/500,0/500 528 | ring = 425/1000,0/5000 529 | congestion = 425/200,0/200 530 | callwaiting = 440/300,0/10000 531 | dialrecall = 425/1000,0/200 532 | record = 1400/500,0/15000 533 | info = 950/330,1400/330,1800/330,0/1000 534 | stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 535 | 536 | [ru] 537 | ; References: 538 | ; http://www.minsvyaz.ru/site.shtml?id=1806 539 | ; http://www.aboutphone.info/lib/gost/45-223-2001.html 540 | description = Russian Federation / ex Soviet Union 541 | ringcadence = 1000,4000 542 | dial = 425 543 | busy = 425/350,0/350 544 | ring = 425/1000,0/4000 545 | congestion = 425/175,0/175 546 | callwaiting = 425/200,0/5000 547 | record = 1400/400,0/15000 548 | info = 950/330,1400/330,1800/330,0/1000 549 | dialrecall = 425/400,0/40 550 | stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 551 | 552 | [se] 553 | description = Sweden 554 | ringcadence = 1000,5000 555 | dial = 425 556 | busy = 425/250,0/250 557 | ring = 425/1000,0/5000 558 | congestion = 425/250,0/750 559 | callwaiting = 425/200,0/500,425/200,0/9100 560 | dialrecall = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 561 | record = 1400/500,0/15000 562 | info = !950/332,!0/24,!1400/332,!0/24,!1800/332,!0/2024,!950/332,!0/24,!1400/332,!0/24,!1800/332,!0/2024,!950/332,!0/24,!1400/332,!0/24,!1800/332,!0/2024,!950/332,!0/24,!1400/332,!0/24,!1800/332,!0/2024,!950/332,!0/24,!1400/332,!0/24,!1800/332,0 563 | stutter = !425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,!425/100,!0/100,425 564 | ; stutter = 425/320,0/20 ; Real swedish standard, not used for now 565 | 566 | [sg] 567 | description = Singapore 568 | ; Singapore 569 | ; Reference: http://www.ida.gov.sg/idaweb/doc/download/I397/ida_ts_pstn1_i4r2.pdf 570 | ; Frequency specs are: 425 Hz +/- 20Hz; 24 Hz +/- 2Hz; modulation depth 100%; SIT +/- 50Hz 571 | ringcadence = 400,200,400,2000 572 | dial = 425 573 | ring = 425*24/400,0/200,425*24/400,0/2000 ; modulation should be 100%, not 90% 574 | busy = 425/750,0/750 575 | congestion = 425/250,0/250 576 | callwaiting = 425*24/300,0/200,425*24/300,0/3200 577 | stutter = !425/200,!0/200,!425/600,!0/200,!425/200,!0/200,!425/600,!0/200,!425/200,!0/200,!425/600,!0/200,!425/200,!0/200,!425/600,!0/200,425 578 | info = 950/330,1400/330,1800/330,0/1000 ; not currently in use acc. to reference 579 | dialrecall = 425*24/500,0/500,425/500,0/2500 ; unspecified in IDA reference, use repeating Holding Tone A,B 580 | record = 1400/500,0/15000 ; unspecified in IDA reference, use 0.5s tone every 15s 581 | ; additionally defined in reference 582 | nutone = 425/2500,0/500 583 | intrusion = 425/250,0/2000 584 | warning = 425/624,0/4376 ; end of period tone, warning 585 | acceptance = 425/125,0/125 586 | holdinga = !425*24/500,!0/500 ; followed by holdingb 587 | holdingb = !425/500,!0/2500 588 | 589 | [th] 590 | description = Thailand 591 | ringcadence = 1000,4000 592 | ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 593 | dial = 400*50 594 | busy = 400/500,0/500 595 | ring = 420/1000,0/5000 596 | congestion = 400/300,0/300 597 | callwaiting = 1000/400,10000/400,1000/400 598 | ; DIALRECALL - not specified - use special dial tone instead. 599 | dialrecall = 400*50/400,0/100,400*50/400,0/100 600 | ; RECORDTONE - not specified 601 | record = 1400/500,0/15000 602 | ; INFO - specified as an announcement - use special information tones instead 603 | info = 950/330,1400/330,1800/330 604 | ; STUTTER - not specified 605 | stutter = !400/200,!0/200,!400/600,!0/200,!400/200,!0/200,!400/600,!0/200,!400/200,!0/200,!400/600,!0/200,!400/200,!0/200,!400/600,!0/200,400 606 | 607 | [uk] 608 | description = United Kingdom 609 | ringcadence = 400,200,400,2000 610 | ; These are the official tones taken from BT SIN350. The actual tones 611 | ; used by BT include some volume differences so sound slightly different 612 | ; from Asterisk-generated ones. 613 | dial = 350+440 614 | ; Special dial is the intermittent dial tone heard when, for example, 615 | ; you have a divert active on the line 616 | specialdial = 350+440/750,440/750 617 | ; Busy is also called "Engaged" 618 | busy = 400/375,0/375 619 | ; "Congestion" is the Beep-bip engaged tone 620 | congestion = 400/400,0/350,400/225,0/525 621 | ; "Special Congestion" is not used by BT very often if at all 622 | specialcongestion = 400/200,1004/300 623 | unobtainable = 400 624 | ring = 400+450/400,0/200,400+450/400,0/2000 625 | callwaiting = 400/100,0/4000 626 | ; BT seem to use "Special Call Waiting" rather than just "Call Waiting" tones 627 | specialcallwaiting = 400/250,0/250,400/250,0/250,400/250,0/5000 628 | ; "Pips" used by BT on payphones. (Sounds wrong, but this is what BT claim it 629 | ; is and I've not used a payphone for years) 630 | creditexpired = 400/125,0/125 631 | ; These two are used to confirm/reject service requests on exchanges that 632 | ; don't do voice announcements. 633 | confirm = 1400 634 | switching = 400/200,0/400,400/2000,0/400 635 | ; This is the three rising tones Doo-dah-dee "Special Information Tone", 636 | ; usually followed by the BT woman saying an appropriate message. 637 | info = 950/330,0/15,1400/330,0/15,1800/330,0/1000 638 | ; Not listed in SIN350 639 | record = 1400/500,0/60000 640 | stutter = 350+440/750,440/750 641 | 642 | [us] 643 | description = United States / North America 644 | ringcadence = 2000,4000 645 | dial = 350+440 646 | busy = 480+620/500,0/500 647 | ring = 440+480/2000,0/4000 648 | congestion = 480+620/250,0/250 649 | callwaiting = 440/300,0/10000 650 | dialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 651 | record = 1400/500,0/15000 652 | info = !950/330,!1400/330,!1800/330,0 653 | stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 654 | 655 | [us-old] 656 | description = United States Circa 1950/ North America 657 | ringcadence = 2000,4000 658 | dial = 600*120 659 | busy = 500*100/500,0/500 660 | ring = 420*40/2000,0/4000 661 | congestion = 500*100/250,0/250 662 | callwaiting = 440/300,0/10000 663 | dialrecall = !600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,600*120 664 | record = 1400/500,0/15000 665 | info = !950/330,!1400/330,!1800/330,0 666 | stutter = !600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,!600*120/100,!0/100,600*120 667 | 668 | [tw] 669 | description = Taiwan 670 | ; http://nemesis.lonestar.org/reference/telecom/signaling/dialtone.html 671 | ; http://nemesis.lonestar.org/reference/telecom/signaling/busy.html 672 | ; http://www.iproducts.com.tw/ee/kylink/06ky-1000a.htm 673 | ; http://www.pbx-manufacturer.com/ky120dx.htm 674 | ; http://www.nettwerked.net/tones.txt 675 | ; http://www.cisco.com/univercd/cc/td/doc/product/tel_pswt/vco_prod/taiw_sup/taiw2.htm 676 | ; 677 | ; busy tone 480+620Hz 0.5 sec. on ,0.5 sec. off 678 | ; reorder tone 480+620Hz 0.25 sec. on,0.25 sec. off 679 | ; ringing tone 440+480Hz 1 sec. on ,2 sec. off 680 | ; 681 | ringcadence = 1000,4000 682 | dial = 350+440 683 | busy = 480+620/500,0/500 684 | ring = 440+480/1000,0/2000 685 | congestion = 480+620/250,0/250 686 | callwaiting = 350+440/250,0/250,350+440/250,0/3250 687 | dialrecall = 300/1500,0/500 688 | record = 1400/500,0/15000 689 | info = !950/330,!1400/330,!1800/330,0 690 | stutter = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440 691 | 692 | [ve] 693 | ; Tone definition source for ve found on 694 | ; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf 695 | description = Venezuela / South America 696 | ringcadence = 1000,4000 697 | dial = 425 698 | busy = 425/500,0/500 699 | ring = 425/1000,0/4000 700 | congestion = 425/250,0/250 701 | callwaiting = 400+450/300,0/6000 702 | dialrecall = 425 703 | record = 1400/500,0/15000 704 | info = !950/330,!1440/330,!1800/330,0/1000 705 | 706 | 707 | [za] 708 | description = South Africa 709 | ; http://www.cisco.com/univercd/cc/td/doc/product/tel_pswt/vco_prod/safr_sup/saf02.htm 710 | ; (definitions for other countries can also be found there) 711 | ; Note, though, that South Africa uses two switch types in their network -- 712 | ; Alcatel switches -- mainly in the Western Cape, and Siemens elsewhere. 713 | ; The former use 383+417 in dial, ringback etc. The latter use 400*33 714 | ; I've provided both, uncomment the ones you prefer 715 | ringcadence = 400,200,400,2000 716 | ; dial/ring/callwaiting for the Siemens switches: 717 | dial = 400*33 718 | ring = 400*33/400,0/200,400*33/400,0/2000 719 | callwaiting = 400*33/250,0/250,400*33/250,0/250,400*33/250,0/250,400*33/250,0/250 720 | ; dial/ring/callwaiting for the Alcatel switches: 721 | ; dial = 383+417 722 | ; ring = 383+417/400,0/200,383+417/400,0/2000 723 | ; callwaiting = 383+417/250,0/250,383+417/250,0/250,383+417/250,0/250,383+417/250,0/250 724 | congestion = 400/250,0/250 725 | busy = 400/500,0/500 726 | dialrecall = 350+440 727 | ; XXX Not sure about the RECORDTONE 728 | record = 1400/500,0/10000 729 | info = 950/330,1400/330,1800/330,0/330 730 | stutter = !400*33/100,!0/100,!400*33/100,!0/100,!400*33/100,!0/100,!400*33/100,!0/100,!400*33/100,!0/100,!400*33/100,!0/100,400*33 731 | --------------------------------------------------------------------------------