forked from mitogen-hq/mitogen
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request mitogen-hq#57 from spearlineltd/germany-ec2-3
Germany ec2 3
- Loading branch information
Showing
24 changed files
with
472 additions
and
226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Callreceiver group variables | ||
--- | ||
|
||
rtp_start: 10000 | ||
rtp_end: 20000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[globals] | ||
|
||
[from-pstn] | ||
exten => _X.,1,NoOp( Incoming call ) | ||
same => n,Goto(from-pstn,poc,1) | ||
|
||
exten => poc,1,NoOp(Executing POC Prompt) | ||
same => n,Progress() | ||
same => n,Answer() | ||
same => n,Wait(1) | ||
same => n,SendDTMF(1) | ||
same => n,Wait(1) | ||
same => n,SendDTMF(2) | ||
same => n,Wait(1) | ||
same => n,SendDTMF(3) | ||
same => n,Wait(1) | ||
same => n,SendDTMF(9) | ||
same => n,Wait(1) | ||
same => n,SendDTMF(#) | ||
same => n,Wait(1) | ||
same => n,Wait(5) | ||
same => n,Playback(ref_poc) | ||
same => n,Wait(5) | ||
same => n,Hangup(16) | ||
|
||
exten => echo,1,Answer() | ||
same => n,Echo() | ||
same => n,hangup(16) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[ireland-test-call-server] | ||
allow=ulaw,alaw | ||
host=172.16.0.114 | ||
port=5060 | ||
nat=force_rport,comedia | ||
type=peer | ||
dtmfmode=rfc2833 | ||
context=from-pstn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
# Callserver handlers | ||
|
||
- name: Reload callreceiver server | ||
shell: ~/.local/bin/c reload | ||
become: yes | ||
become_user: backend | ||
|
||
- name: Restart callreceiver server | ||
systemd: | ||
name: callreceiver | ||
daemon_reload: yes | ||
state: restarted | ||
become: yes | ||
become_user: root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
# Callreceiver server tasks | ||
|
||
- tags: | ||
- callreceiver | ||
become: yes | ||
become_user: backend | ||
block: | ||
- name: Deploy callreceiver asterisk config | ||
copy: | ||
src: '{{ item }}' | ||
dest: ~/asterisk_conf | ||
with_fileglob: | ||
- '*' | ||
notify: Reload callreceiver server | ||
|
||
- name: Deploy callreceiver asterisk templates | ||
template: | ||
src: '{{ item }}' | ||
dest: ~/asterisk_conf | ||
with_items: | ||
- rtp.conf | ||
- sip_general.conf | ||
no_log: false | ||
notify: Reload callreceiver server | ||
|
||
- name: Setup environmental variable file for callreceiver server | ||
template: | ||
src: callreceiver-env.conf | ||
dest: /etc/ | ||
mode: 0600 | ||
owner: backend | ||
group: backend | ||
no_log: false | ||
become_user: root | ||
register: env_file | ||
tags: | ||
- add_environment | ||
- callreceiver-service | ||
|
||
- name: Install callreceiver service | ||
template: | ||
src: callreceiver.service | ||
dest: /etc/systemd/system | ||
mode: 0644 | ||
become_user: root | ||
register: callreceiver_service | ||
notify: Restart callreceiver server | ||
tags: | ||
- callreceiver-service | ||
|
||
- name: Run callreceiver server | ||
systemd: | ||
name: callreceiver | ||
daemon-reload: yes | ||
state: started | ||
enabled: yes | ||
become_user: root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DEVEL={{ "True" if devel else "False" }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[Unit] | ||
Description=Callreceiver container | ||
Wants=network-online.target NetworkManager.service | ||
After=network-online.target sshd.service NetworkManager.service multi-user.target | ||
|
||
[Service] | ||
Restart=always | ||
User=backend | ||
Group=backend | ||
Environment=XDG_RUNTIME_DIR=/run/backend | ||
ExecStartPre=-/usr/bin/podman rm -f callserver | ||
ExecStartPre=-/usr/local/bin/upgrade_podman.sh | ||
ExecStart=/usr/bin/podman run \ | ||
--name=callserver \ | ||
--hostname={{ ansible_hostname }}-container \ | ||
--conmon-pidfile=/run/backend/callreceiver.pid \ | ||
--net=host \ | ||
--env-file=/etc/callreceiver-env.conf \ | ||
-v /home/backend/asterisk_conf:/external_conf:z,ro \ | ||
-v /home/backend/callserver_sounds/sounds:/var/lib/asterisk/sounds:z,ro \ | ||
containers.spearline.com/callserver | ||
ExecStartPost=+/usr/local/bin/asterisk_high_priority.sh | ||
ExecStop=/usr/local/bin/nicely_kill_asterisk.sh | ||
ExecStopPost=-/usr/bin/podman rm -f callserver | ||
TimeoutStopSec=1500 | ||
PIDFile=/run/backend/callreceiver.pid | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[general] | ||
rtpstart = {{ rtp_start }} | ||
rtpend = {{ rtp_end }} | ||
icesupport = no | ||
|
||
[ice_host_candidates] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[general] | ||
context=from-pstn | ||
externip={{ external_ip }} | ||
localnet=172.30.0.0/16 | ||
localnet=10.0.0.0/8 | ||
localnet=192.168.142.0/24 | ||
externrefresh=10 | ||
directmedia=no | ||
nat=force_rport,comedia | ||
disallow=all | ||
allow=ulaw,alaw | ||
useragent=Spearline Labs | ||
alwaysauthreject = yes | ||
use_q850_reason = yes | ||
sdpsession=Spearline Labs | ||
allowoverlap=no | ||
allowguest=yes | ||
dtmfmode=auto | ||
transport=udp,tcp,tls,wss,ws | ||
udpbindaddr=0.0.0.0:5060 | ||
tcpenable=yes | ||
tcpbindaddr=0.0.0.0:5060 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.