14 |
--------------------------------------------------------------------------------
/client/conf/freeswitch-conf-endaga/freeswitch/yaml/extensions.yaml:
--------------------------------------------------------------------------------
1 | default:
2 | ${destination_number} =~ (9664):
3 | set: foo=bar
4 | playback: ${hold_music}
5 |
--------------------------------------------------------------------------------
/client/conf/freeswitch-conf-endaga/freeswitch/yaml/mod_yaml.yaml:
--------------------------------------------------------------------------------
1 | settings:
2 | #look for foo.conf.yaml when foo.conf is looked for in the xml
3 | bind_config: true
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/client/conf/logrotate/endaga:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016-present, Facebook, Inc.
2 | # All rights reserved.
3 | #
4 | # This source code is licensed under the BSD-style license found in the
5 | # LICENSE file in the root directory of this source tree. An additional grant
6 | # of patent rights can be found in the PATENTS file in the same directory.
7 |
8 | /var/log/endaga {
9 | daily
10 | rotate 14
11 | missingok
12 | compress
13 | postrotate
14 | /usr/bin/killall rsyslog_processor
15 | /usr/sbin/service rsyslog restart
16 | endscript
17 | }
18 |
--------------------------------------------------------------------------------
/client/conf/registration/endagad.conf:
--------------------------------------------------------------------------------
1 | ; Copyright (c) 2016-present, Facebook, Inc.
2 | ; All rights reserved.
3 | ;
4 | ; This source code is licensed under the BSD-style license found in the
5 | ; LICENSE file in the root directory of this source tree. An additional grant
6 | ; of patent rights can be found in the PATENTS file in the same directory.
7 |
8 | [program:endagad]
9 |
10 | command=/usr/local/bin/endagad
11 |
12 | stdout_logfile=/var/log/endagad.log
13 | stderr_logfile=/var/log/endagad.log
14 |
15 | autostart=true
16 | startsecs=1
17 | user=root
18 |
--------------------------------------------------------------------------------
/client/conf/registration/openvpn.conf:
--------------------------------------------------------------------------------
1 | ; Copyright (c) 2016-present, Facebook, Inc.
2 | ; All rights reserved.
3 | ;
4 | ; This source code is licensed under the BSD-style license found in the
5 | ; LICENSE file in the root directory of this source tree. An additional grant
6 | ; of patent rights can be found in the PATENTS file in the same directory.
7 |
8 | [program:openvpn]
9 |
10 | directory=/etc/openvpn
11 |
12 | command=/usr/sbin/openvpn endaga-vpn-client.conf.noauto
13 |
14 | autostart=true
15 | startsecs=45
16 | user=root
17 |
--------------------------------------------------------------------------------
/client/conf/registration/runwritable.conf:
--------------------------------------------------------------------------------
1 | ; Copyright (c) 2016-present, Facebook, Inc.
2 | ; All rights reserved.
3 | ;
4 | ; This source code is licensed under the BSD-style license found in the
5 | ; LICENSE file in the root directory of this source tree. An additional grant
6 | ; of patent rights can be found in the PATENTS file in the same directory.
7 |
8 | [program:runwritable]
9 | command=chmod 777 /run
10 |
11 | startsecs=0
12 | autostart=true
13 | user=root
14 |
--------------------------------------------------------------------------------
/client/conf/rsyslog/00_endaga.conf:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016-present, Facebook, Inc.
2 | # All rights reserved.
3 | #
4 | # This source code is licensed under the BSD-style license found in the
5 | # LICENSE file in the root directory of this source tree. An additional grant
6 | # of patent rights can be found in the PATENTS file in the same directory.
7 |
8 | # Enable high-precision RFC3339 timestamp
9 | $ActionFileDefaultTemplate RSYSLOG_FileFormat
10 |
--------------------------------------------------------------------------------
/client/conf/rsyslog/endaga-python.rb:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016-present, Facebook, Inc.
2 | # All rights reserved.
3 | #
4 | # This source code is licensed under the BSD-style license found in the
5 | # LICENSE file in the root directory of this source tree. An additional grant
6 | # of patent rights can be found in the PATENTS file in the same directory.
7 |
8 | rule=: %file:string-to:\x3a %: %msg:rest%
9 |
--------------------------------------------------------------------------------
/client/conf/rsyslog/freeswitch.rb:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016-present, Facebook, Inc.
2 | # All rights reserved.
3 | #
4 | # This source code is licensed under the BSD-style license found in the
5 | # LICENSE file in the root directory of this source tree. An additional grant
6 | # of patent rights can be found in the PATENTS file in the same directory.
7 | #
8 | rule=: %date:word% %time:word% [%priority:alpha%] %file:word% %msg:rest%
9 |
--------------------------------------------------------------------------------
/client/conf/rsyslog/lighttpd.rb:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016-present, Facebook, Inc.
2 | # All rights reserved.
3 | #
4 | # This source code is licensed under the BSD-style license found in the
5 | # LICENSE file in the root directory of this source tree. An additional grant
6 | # of patent rights can be found in the PATENTS file in the same directory.
7 |
8 | rule=: (%file:char-to:)%) %msg:rest%
9 |
--------------------------------------------------------------------------------
/client/core/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Client modules.
3 |
4 | Copyright (c) 2016-present, Facebook, Inc.
5 | All rights reserved.
6 |
7 | This source code is licensed under the BSD-style license found in the
8 | LICENSE file in the root directory of this source tree. An additional grant
9 | of patent rights can be found in the PATENTS file in the same directory.
10 | """
11 |
12 | VERSION = '0.6.1'
13 |
--------------------------------------------------------------------------------
/client/core/apps/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
--------------------------------------------------------------------------------
/client/core/bts/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016-present, Facebook, Inc.
2 | # All rights reserved.
3 | #
4 | # This source code is licensed under the BSD-style license found in the
5 | # LICENSE file in the root directory of this source tree. An additional grant
6 | # of patent rights can be found in the PATENTS file in the same directory.
7 |
8 | from core.config_database import ConfigDB
9 | from . import base
10 |
11 | #
12 | # Override stubs with system specific implementation
13 | #
14 | conf = ConfigDB()
15 |
16 | if conf['bts.type'] == 'osmocom':
17 | from . import _osmocom
18 | bts = _osmocom.OsmocomBTS()
19 | elif conf['bts.type'] == 'openbts':
20 | from . import _openbts
21 | bts = _openbts.OpenBTSBTS()
22 | elif conf['bts.type'] == 'fake':
23 | from . import _fakebts
24 | bts = _fakebts.FakeBTS()
25 | else:
26 | raise ImportError("BTS Type not defined")
27 |
--------------------------------------------------------------------------------
/client/core/exceptions.py:
--------------------------------------------------------------------------------
1 | """
2 | Exceptions used by endaga core.
3 |
4 | Copyright (c) 2016-present, Facebook, Inc.
5 | All rights reserved.
6 |
7 | This source code is licensed under the BSD-style license found in the
8 | LICENSE file in the root directory of this source tree. An additional grant
9 | of patent rights can be found in the PATENTS file in the same directory.
10 | """
11 |
12 | class BSSError(Exception):
13 | pass
14 |
15 | class SubscriberNotFound(Exception):
16 | pass
17 |
18 |
--------------------------------------------------------------------------------
/client/core/fake_phone/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016-present, Facebook, Inc.
2 | # All rights reserved.
3 | #
4 | # This source code is licensed under the BSD-style license found in the
5 | # LICENSE file in the root directory of this source tree. An additional grant
6 | # of patent rights can be found in the PATENTS file in the same directory.
7 |
8 | from core.config_database import ConfigDB
9 | from . import base
10 |
11 | #
12 | # Override stubs with system specific implementation
13 | #
14 | conf = ConfigDB()
15 |
16 | if conf['bts.type'] == 'osmocom':
17 | from . import _osmocom
18 | FakePhone = _osmocom.OsmocomFakePhone
19 | elif conf['bts.type'] in ['openbts', 'fake']:
20 | from . import _openbts
21 | FakePhone = _openbts.OpenBTSFakePhone
22 | else:
23 | raise ImportError("Invalid BTS Type")
24 |
--------------------------------------------------------------------------------
/client/core/federer_handlers/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
--------------------------------------------------------------------------------
/client/core/gprs/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
--------------------------------------------------------------------------------
/client/core/sms/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016-present, Facebook, Inc.
2 | # All rights reserved.
3 | #
4 | # This source code is licensed under the BSD-style license found in the
5 | # LICENSE file in the root directory of this source tree. An additional grant
6 | # of patent rights can be found in the PATENTS file in the same directory.
7 |
8 | from core.config_database import ConfigDB
9 | from . import base
10 |
11 | #
12 | # Override stubs with system specific implementation
13 | #
14 | conf = ConfigDB()
15 |
16 | if conf['bts.type'] == 'osmocom':
17 | from .freeswitch import _osmocom
18 | sms = _osmocom.OsmocomSMS()
19 | else:
20 | from .freeswitch import _openbts
21 | sms = _openbts.OpenBTSSMS()
22 |
--------------------------------------------------------------------------------
/client/core/sms/freeswitch/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
--------------------------------------------------------------------------------
/client/core/subscriber/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016-present, Facebook, Inc.
2 | # All rights reserved.
3 | #
4 | # This source code is licensed under the BSD-style license found in the
5 | # LICENSE file in the root directory of this source tree. An additional grant
6 | # of patent rights can be found in the PATENTS file in the same directory.
7 |
8 |
9 |
10 |
11 |
12 |
13 | from core.config_database import ConfigDB
14 |
15 | #
16 | # Override stubs with system specific implementation
17 | #
18 | conf = ConfigDB()
19 |
20 | if conf['bts.type'] == 'fake':
21 | from . import _fakehlr
22 | subscriber = _fakehlr.FakeSubscriberDB()
23 | elif conf['bts.type'] == 'osmocom':
24 | from . import _osmocom
25 | subscriber = _osmocom.OsmocomSubscriber()
26 | else:
27 | from . import _openbts
28 | subscriber = _openbts.OpenBTSSubscriber()
29 |
--------------------------------------------------------------------------------
/client/core/tests/fixtures/sofia-status-output.txt:
--------------------------------------------------------------------------------
1 | Name Type Data State
2 | =================================================================================================
3 | openbts profile sip:mod_sofia@127.0.0.1:5060 RUNNING (0)
4 | 10.64.0.38 alias openbts ALIASED
5 | external profile sip:mod_sofia@10.64.0.38:5080 RUNNING (0)
6 | external::freeswitch-2 gateway sip:endaga_user@172.31.34.170:5080 NOREG
7 | =================================================================================================
8 | 2 profiles 1 alias
9 |
10 |
--------------------------------------------------------------------------------
/client/deploy/deployenv/README:
--------------------------------------------------------------------------------
1 | Hey! Listen!
2 |
3 | This is for testing the actual deploy script on a vagrant instance. This is
4 | probably not something you'll do often. However! You need to change the hosts
5 | directive in ../deploy.yml from 'deploy' to 'default' for this Vagrant file to
6 | work. There's probably a smarter work around but *shrug* for now.
7 |
--------------------------------------------------------------------------------
/client/deploy/files/endaga-preferences:
--------------------------------------------------------------------------------
1 | Package: *
2 | Pin: release o=Endaga,a=dev,n=dev,l=Endaga,c=main
3 | Pin-Priority: 700
4 |
5 | Package: *
6 | Pin: release o=Etage,a=dev,n=dev,l=Etage,c=main
7 | Pin-Priority: 800
8 |
9 | Package: *
10 | Pin: origin ""
11 | Pin-Priority: 950
12 |
--------------------------------------------------------------------------------
/client/deploy/files/endaga-python-core/preinst:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # Copyright (c) 2016-present, Facebook, Inc.
3 | # All rights reserved.
4 | #
5 | # This source code is licensed under the BSD-style license found in the
6 | # LICENSE file in the root directory of this source tree. An additional grant
7 | # of patent rights can be found in the PATENTS file in the same directory.
8 |
9 | # Get rid of old server directives in lighttpd. This replaces inline and
10 | # creates a backup copy of the file; if there is an existing backup file it is
11 | # overwritten. We do this so we can control these settings in our own config
12 | # file.
13 |
14 | if [ -f /etc/lighttpd/lighttpd.conf ]; then
15 | sed -i.bak 's/^\(server.\(breakagelog\|reject-expect\|port\)\)/#\1/' /etc/lighttpd/lighttpd.conf
16 | fi
17 |
--------------------------------------------------------------------------------
/client/deploy/files/osmocom-preferences:
--------------------------------------------------------------------------------
1 | Package: *
2 | Pin: release l=network:osmocom:nightly
3 | Pin-Priority: 910
4 |
--------------------------------------------------------------------------------
/client/deploy/files/snowflake/postinst:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # Copyright (c) 2016-present, Facebook, Inc.
3 | # All rights reserved.
4 | #
5 | # This source code is licensed under the BSD-style license found in the
6 | # LICENSE file in the root directory of this source tree. An additional grant
7 | # of patent rights can be found in the PATENTS file in the same directory.
8 |
9 | snowflake -m
10 | hostname `snowflake`
11 |
--------------------------------------------------------------------------------
/client/deploy/hosts:
--------------------------------------------------------------------------------
1 | [localvagrant]
2 | 127.0.0.1 ansible_ssh_user=vagrant ansible_ssh_port=2222 ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key
3 |
4 | [tower]
5 | 192.168.1.25 ansible_ssh_user=endaga ansible_ssh_port=22
6 |
7 | [dev]
8 | openbts ansible_ssh_host=192.168.40.100 ansible_ssh_port=22
9 | osmocom ansible_ssh_host=192.168.40.120 ansible_ssh_port=22
10 |
--------------------------------------------------------------------------------
/client/deploy/manufacturing/syslinux.cfg:
--------------------------------------------------------------------------------
1 | default menu.c32
2 | prompt 0
3 | menu title UNetbootin
4 | timeout 2
5 |
6 | label unetbootindefault
7 | menu label Default
8 | kernel /ubnkern
9 | append initrd=/install.amd/initrd.gz vga=788 auto=true priority=critical preseed/file=/cdrom/preseed/ccm.seed --- quiet
10 |
--------------------------------------------------------------------------------
/client/deploy/openbts.deploy.yml:
--------------------------------------------------------------------------------
1 | ---
2 | #
3 | # Copyright (c) 2016-present, Facebook, Inc.
4 | # All rights reserved.
5 | #
6 | # This source code is licensed under the BSD-style license found in the
7 | # LICENSE file in the root directory of this source tree. An additional grant
8 | # of patent rights can be found in the PATENTS file in the same directory.
9 |
10 | - name: Set up development pre-reqs on a local machine
11 | hosts: tower
12 | sudo: yes
13 | tasks:
14 | - include: base.yml
15 |
16 | - include: openbts.yml
17 |
18 | - name: Install endaga
19 | apt: pkg=endaga state=present default_release=dev
20 |
21 | - name: Update target API
22 | command: /usr/local/bin/endaga_db_set registry https://api.etagecom.io/api/v1
23 |
--------------------------------------------------------------------------------
/client/deploy/openbts.yml:
--------------------------------------------------------------------------------
1 | ---
2 | #
3 | # Copyright (c) 2016-present, Facebook, Inc.
4 | # All rights reserved.
5 | #
6 | # This source code is licensed under the BSD-style license found in the
7 | # LICENSE file in the root directory of this source tree. An additional grant
8 | # of patent rights can be found in the PATENTS file in the same directory.
9 |
10 | - name: Add all the (third party) packages needed for operation
11 | apt: pkg={{ item }} state=present update_cache=yes
12 | with_items:
13 | - gdebi-core
14 |
--------------------------------------------------------------------------------
/client/endaga-lang/VERSION:
--------------------------------------------------------------------------------
1 | 0.2.3
2 |
--------------------------------------------------------------------------------
/client/packaging/endaga-preinst:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # Copyright (c) 2016-present, Facebook, Inc.
3 | # All rights reserved.
4 | #
5 | # This source code is licensed under the BSD-style license found in the
6 | # LICENSE file in the root directory of this source tree. An additional grant
7 | # of patent rights can be found in the PATENTS file in the same directory.
8 |
9 | echo "This software depends on code that is licensed under AGPL";
10 |
11 | read -r -p "Are you sure you want to install? [Y/n] " response
12 | case "$response" in
13 | [yY][eE][sS]|[yY]|"")
14 | exit
15 | ;;
16 | *)
17 | exit 1
18 | ;;
19 | esac
20 |
--------------------------------------------------------------------------------
/client/packaging/openbts/etc/logrotate.d/openbts:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016-present, Facebook, Inc.
2 | # All rights reserved.
3 | #
4 | # This source code is licensed under the BSD-style license found in the
5 | # LICENSE file in the root directory of this source tree. An additional grant
6 | # of patent rights can be found in the PATENTS file in the same directory.
7 |
8 | /var/log/OpenBTS.log {
9 | daily
10 | rotate 14
11 | missingok
12 | compress
13 | }
14 |
--------------------------------------------------------------------------------
/client/packaging/openbts/etc/rsyslog.d/95_endaga_openbts.conf:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016-present, Facebook, Inc.
2 | # All rights reserved.
3 | #
4 | # This source code is licensed under the BSD-style license found in the
5 | # LICENSE file in the root directory of this source tree. An additional grant
6 | # of patent rights can be found in the PATENTS file in the same directory.
7 | #################
8 | #### PARSING ####
9 | #################
10 |
11 | if $programname == 'smqueue' or $programname == 'sipauthserve' or $programname == 'openbts' or $programname == 'transceiver' then {
12 | action(type="mmnormalize"
13 | UseRawMsg="off"
14 | ruleBase="/etc/rsyslog.d/openbts.rb")
15 | }
16 |
--------------------------------------------------------------------------------
/client/packaging/openbts/etc/rsyslog.d/openbts.rb:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016-present, Facebook, Inc.
2 | # All rights reserved.
3 | #
4 | # This source code is licensed under the BSD-style license found in the
5 | # LICENSE file in the root directory of this source tree. An additional grant
6 | # of patent rights can be found in the PATENTS file in the same directory.
7 | rule=: %priority:word% %id1:number%:%id2:number% %time:word% %file:string-to:\x3a %: %msg:rest%
8 |
--------------------------------------------------------------------------------
/client/packaging/osmocom-fairwaves/etc/ggsn.conf:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016-present, Facebook, Inc.
2 | # All rights reserved.
3 | #
4 | # This source code is licensed under the BSD-style license found in the
5 | # LICENSE file in the root directory of this source tree. An additional grant
6 | # of patent rights can be found in the PATENTS file in the same directory.
7 | # TAG: listen
8 | # Specifies the local IP address to listen to
9 | listen 127.0.0.3
10 |
11 | # TAG: net
12 | # IP network address of external packet data network
13 | # Used to set up network interface.
14 | net 172.19.0.0/12
15 |
16 | # TAG: dynip
17 | # Dynamic IP address pool.
18 | # Used for allocation of dynamic IP address when address is not given
19 | # by HLR.
20 | # If this option is not given then the net option is used as a substitute.
21 | dynip 172.19.0.0/12
22 |
23 | # TAG: pcodns1/pcodns2
24 | # Protocol configuration option domain name system server 1 & 2.
25 | pcodns1 8.8.8.8
26 | pcodns2 8.8.4.4
27 |
--------------------------------------------------------------------------------
/client/packaging/osmocom-fairwaves/etc/osmocom/osmo-pcu.cfg:
--------------------------------------------------------------------------------
1 | ! Copyright (c) 2016-present, Facebook, Inc.
2 | ! All rights reserved.
3 | !
4 | ! This source code is licensed under the BSD-style license found in the
5 | ! LICENSE file in the root directory of this source tree. An additional grant
6 | ! of patent rights can be found in the PATENTS file in the same directory.
7 | line vty
8 | no login
9 | !
10 | pcu
11 | flow-control-interval 10
12 | cs 4
13 | cs max 4
14 | cs threshold 10 33
15 | cs downgrade-threshold 200
16 | cs link-quality-ranges cs1 6 cs2 5 8 cs3 7 13 cs4 12
17 | queue codel
18 | alloc-algorithm dynamic
19 | alpha 0
20 | gamma 0
21 | !dl-tbf-idle-time 4000
22 |
--------------------------------------------------------------------------------
/client/packaging/osmocom-fairwaves/etc/osmocom/osmo-sgsn.cfg:
--------------------------------------------------------------------------------
1 | !
2 | ! Copyright (c) 2016-present, Facebook, Inc.
3 | ! All rights reserved.
4 | !
5 | ! This source code is licensed under the BSD-style license found in the
6 | ! LICENSE file in the root directory of this source tree. An additional grant
7 | ! of patent rights can be found in the PATENTS file in the same directory.
8 | ! Osmocom SGSN configuration
9 | !
10 | !
11 | line vty
12 | no login
13 | !
14 | sgsn
15 | gtp local-ip 127.0.0.2
16 | ggsn 0 remote-ip 127.0.0.3
17 | ggsn 0 gtp-version 1
18 | auth-policy accept-all
19 | apn internet ggsn 0
20 | !
21 | ns
22 | timer tns-block 3
23 | timer tns-block-retries 3
24 | timer tns-reset 3
25 | timer tns-reset-retries 3
26 | timer tns-test 30
27 | timer tns-alive 3
28 | timer tns-alive-retries 10
29 | encapsulation udp local-ip 127.0.0.2
30 | encapsulation udp local-port 23000
31 | encapsulation framerelay-gre enabled 0
32 | !
33 | bssgp
34 | !
35 |
--------------------------------------------------------------------------------
/client/packaging/osmocom/etc/ggsn.conf:
--------------------------------------------------------------------------------
1 | # TAG: listen
2 | # Specifies the local IP address to listen to
3 | listen 127.0.0.3
4 |
5 | # TAG: net
6 | # IP network address of external packet data network
7 | # Used to set up network interface.
8 | net 172.19.0.0/12
9 |
10 | # TAG: dynip
11 | # Dynamic IP address pool.
12 | # Used for allocation of dynamic IP address when address is not given
13 | # by HLR.
14 | # If this option is not given then the net option is used as a substitute.
15 | dynip 172.19.0.0/12
16 |
17 | # TAG: pcodns1/pcodns2
18 | # Protocol configuration option domain name system server 1 & 2.
19 | pcodns1 8.8.8.8
20 | pcodns2 8.8.4.4
21 |
--------------------------------------------------------------------------------
/client/packaging/osmocom/etc/osmocom/osmo-sgsn.cfg:
--------------------------------------------------------------------------------
1 | ! Copyright (c) 2016-present, Facebook, Inc.
2 | ! All rights reserved.
3 | !
4 | ! This source code is licensed under the BSD-style license found in the
5 | ! LICENSE file in the root directory of this source tree. An additional grant
6 | ! of patent rights can be found in the PATENTS file in the same directory.
7 | !
8 | ! Osmocom SGSN configuration
9 | !
10 | !
11 | line vty
12 | no login
13 | !
14 | sgsn
15 | gtp local-ip 127.0.0.2
16 | ggsn 0 remote-ip 127.0.0.3
17 | ggsn 0 gtp-version 1
18 | !
19 | ns
20 | timer tns-block 3
21 | timer tns-block-retries 3
22 | timer tns-reset 3
23 | timer tns-reset-retries 3
24 | timer tns-test 30
25 | timer tns-alive 3
26 | timer tns-alive-retries 10
27 | encapsulation udp local-ip 127.0.0.2
28 | encapsulation udp local-port 23000
29 | encapsulation framerelay-gre enabled 0
30 | !
31 | bssgp
32 | !
33 |
--------------------------------------------------------------------------------
/client/packaging/osmocom/etc/supervisor/conf.d/osmo-trx.conf:
--------------------------------------------------------------------------------
1 | ; Copyright (c) 2016-present, Facebook, Inc.
2 | ; All rights reserved.
3 | ;
4 | ; This source code is licensed under the BSD-style license found in the
5 | ; LICENSE file in the root directory of this source tree. An additional grant
6 | ; of patent rights can be found in the PATENTS file in the same directory.
7 | [program:osmo-trx]
8 |
9 | directory=/etc/osmocom
10 |
11 | command=osmo-trx
12 |
13 | stdout_logfile=/var/log/osmo-trx.log
14 | stderr_logfile=/var/log/osmo-trx.log
15 |
16 | autostart=true
17 | startsecs=45
18 | user=root
19 |
--------------------------------------------------------------------------------
/client/packaging/py3.h:
--------------------------------------------------------------------------------
1 | #if PY_VERSION_HEX >= 0x03000000
2 | #define SWIG_init PyInit__freeswitch
3 | PyObject* SWIG_init(void);
4 | #else
5 | #define SWIG_init init_freeswitch
6 | #define PyUnicode_AsUTF8 PyString_AsString
7 | void SWIG_init(void);
8 | #endif
9 |
--------------------------------------------------------------------------------
/client/requirements.txt:
--------------------------------------------------------------------------------
1 | argparse>=1.4.0
2 | astroid==1.3.6
3 | Babel==1.3
4 | coverage==3.7.1
5 | docopt==0.6.2
6 | eno==0.0.17
7 | delegator.py==0.0.8
8 | flup==1.0.3.dev-20110405
9 | humanize==0.5.1
10 | itsdangerous==0.22
11 | logilab-common==0.63.2
12 | meld3==1.0.2
13 | mock==1.0.1
14 | netifaces==0.8
15 | nose==1.3.4
16 | openbts==0.1.7
17 | Paste==1.7.5.1
18 | phonenumbers==6.2.0
19 | psutil==3.1.1
20 | psycopg2==2.6
21 | pylint==1.4.3
22 | PyYAML==3.10
23 | pyzmq==14.5.0
24 | requests==2.6.2
25 | six==1.9.0
26 | sms-utilities==0.0.4
27 | snowflake==0.0.3
28 | web.py>=0.40
29 | wsgiref==0.1.2
30 | Twisted==15.1.0
31 | python-dateutil==2.4.2
32 | pytz==2015.7
33 | supervisor>=0.4.0
34 |
--------------------------------------------------------------------------------
/client/scripts/endaga-gprsd:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright (c) 2016-present, Facebook, Inc.
4 | # All rights reserved.
5 | #
6 | # This source code is licensed under the BSD-style license found in the
7 | # LICENSE file in the root directory of this source tree. An additional grant
8 | # of patent rights can be found in the PATENTS file in the same directory.
9 |
10 | import sys
11 |
12 | from ccm.common import logger
13 | from core.gprs import daemon
14 |
15 |
16 | logger.notice('starting endaga-gprsd')
17 | try:
18 | daemon.main()
19 | except Exception as e:
20 | logger.error('gprsd died with: %s' % e)
21 | sys.exit(1)
22 | logger.notice('stopping endaga-gprsd')
23 |
--------------------------------------------------------------------------------
/client/scripts/endaga_db_set:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright (c) 2016-present, Facebook, Inc.
4 | # All rights reserved.
5 | #
6 | # This source code is licensed under the BSD-style license found in the
7 | # LICENSE file in the root directory of this source tree. An additional grant
8 | # of patent rights can be found in the PATENTS file in the same directory.
9 |
10 | import sys
11 | from core import config_database as cdb
12 | db = cdb.ConfigDB()
13 | db[sys.argv[1]] = sys.argv[2]
14 |
--------------------------------------------------------------------------------
/client/scripts/endagad:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python3
2 |
3 | # Copyright (c) 2016-present, Facebook, Inc.
4 | # All rights reserved.
5 | #
6 | # This source code is licensed under the BSD-style license found in the
7 | # LICENSE file in the root directory of this source tree. An additional grant
8 | # of patent rights can be found in the PATENTS file in the same directory.
9 |
10 | import sys
11 | import traceback
12 |
13 | from ccm.common import logger
14 | from core.endagad import EndagaD
15 |
16 | logger.notice('starting endagad')
17 |
18 | try:
19 | EndagaD().run()
20 | except Exception as e:
21 | logger.critical('caught unhandled exception: %s, %s' %
22 | (e, traceback.format_exc()))
23 | sys.exit(1)
24 |
25 | logger.notice('stopping endagad')
26 |
--------------------------------------------------------------------------------
/client/scripts/federer_server:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | """The client's primary server.
4 |
5 | Handles commands sent by the cloud, incoming SMS, delivery receipts, subscriber
6 | provisioning and parsing CDRs.
7 |
8 | Receives CDRs from Freeswitch mod_xml_cdr and updates subscriber registry
9 | accordingly.
10 |
11 | Copyright (c) 2016-present, Facebook, Inc.
12 | All rights reserved.
13 |
14 | This source code is licensed under the BSD-style license found in the
15 | LICENSE file in the root directory of this source tree. An additional grant
16 | of patent rights can be found in the PATENTS file in the same directory.
17 | """
18 |
19 | import core.federer
20 |
21 | core.federer.app.run()
22 |
--------------------------------------------------------------------------------
/client/scripts/freeswitch/VBTS_Transfer_Credit.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016-present, Facebook, Inc.
2 | # All rights reserved.
3 | #
4 | # This source code is licensed under the BSD-style license found in the
5 | # LICENSE file in the root directory of this source tree. An additional grant
6 | # of patent rights can be found in the PATENTS file in the same directory.
7 |
8 | from freeswitch import consoleLog
9 |
10 | from core.apps import sms_credit_transfer
11 |
12 |
13 | def chat(message, args):
14 | consoleLog('info', "Credit transfer: %s\n" % args)
15 | from_, request = args.split("|", 1)
16 | sms_credit_transfer.handle_incoming(from_, request)
17 |
18 |
19 | def fsapi(session, stream, env, args):
20 | # chat doesn't use msg anyway
21 | chat(None, args)
22 |
--------------------------------------------------------------------------------
/client/scripts/oneoffs/remove_bts_sip_profiles:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | rm -f /etc/freeswitch/sip_profiles/openbts.xml || true
4 | rm -f /etc/freeswitch/sip_profiles/osmocom.xml || true
5 |
--------------------------------------------------------------------------------
/client/scripts/oneoffs/rollback_to_0.5.13:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # Copyright (c) 2016-present, Facebook, Inc.
4 | # All rights reserved.
5 | #
6 | # This source code is licensed under the BSD-style license found in the
7 | # LICENSE file in the root directory of this source tree. An additional grant
8 | # of patent rights can be found in the PATENTS file in the same directory.
9 |
10 |
11 | if [ "$(dpkg -s endaga | grep Version)" != "Version: 0.6.0" ]; then
12 | exit 1
13 | fi
14 |
15 | apt-get remove -y endaga freeswitch-conf-endaga python-endaga-core
16 |
17 | apt-get install -y freeswitch-conf-endaga=0.2.3 \
18 | python-endaga-core=0.3.3 \
19 | endaga=0.5.13
20 |
--------------------------------------------------------------------------------
/client/scripts/oneoffs/set_min_sub_balance_to_zero:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | """
3 | Copyright (c) 2016-present, Facebook, Inc.
4 | All rights reserved.
5 |
6 | This source code is licensed under the BSD-style license found in the
7 | LICENSE file in the root directory of this source tree. An additional grant
8 | of patent rights can be found in the PATENTS file in the same directory.
9 |
10 | Enforces a minimum sub balance of zero.
11 |
12 | This runs as a postinst for the endaga metapackage.
13 | """
14 |
15 | import syslog
16 |
17 | from ccm.common import logger
18 | from core.subscriber import subscriber
19 | from core import billing
20 |
21 |
22 | imsis = [sub['name'] for sub in subscriber.get_subscribers()]
23 | for imsi in imsis:
24 | if subscriber.get_account_balance(imsi) < 0:
25 | logger.warning('clamping %s account balance to zero' % imsi)
26 | subscriber.set_credit(imsi, 0)
27 |
--------------------------------------------------------------------------------
/client/scripts/set_configdb_defaults:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # Copyright (c) 2016-present, Facebook, Inc.
4 | # All rights reserved.
5 | #
6 | # This source code is licensed under the BSD-style license found in the
7 | # LICENSE file in the root directory of this source tree. An additional grant
8 | # of patent rights can be found in the PATENTS file in the same directory.
9 |
10 | import argparse
11 |
12 | from core import config_database
13 |
14 | if __name__ == "__main__":
15 | parser = argparse.ArgumentParser(description="CLI for ConfigDB.")
16 | parser.add_argument('--force', '-f', action='store_true',
17 | help="Overwrite existing data.")
18 | args = parser.parse_args()
19 |
20 | config_database.set_defaults(force_replace=args.force)
21 |
--------------------------------------------------------------------------------
/client/working_directory_paths.rb:
--------------------------------------------------------------------------------
1 | # Sync folders.
2 | # Our VM will map the following directory to /home/vagrant if they are found.
3 | # Update this to reflect your working directory structure.
4 | module SyncPaths
5 | $repos = {
6 | "osmocom-python" => "../osmocom-python",
7 | "openbts" => "../openbts",
8 | "smqueue" => "../smqueue",
9 | "subscriberRegistry" => "../subscriberRegistry",
10 | "liba53" => "../liba53",
11 | "freeswitch" => "../freeswitch",
12 | "sms_utilities" => "../sms_utilities",
13 | "snowflake" => "../snowflake",
14 | "openbts-python" => "../openbts-python",
15 | "common" => "../common",
16 | "smspdu" => "../smspdu",
17 | "client" => "./",
18 | }
19 | end
20 |
--------------------------------------------------------------------------------
/cloud/.python2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/cloud/.python2
--------------------------------------------------------------------------------
/cloud/ansible.cfg:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) 2016-present, Facebook, Inc.
3 | # All rights reserved.
4 | #
5 | # This source code is licensed under the BSD-style license found in the
6 | # LICENSE file in the root directory of this source tree. An additional grant
7 | # of patent rights can be found in the PATENTS file in the same directory.
8 |
9 | [defaults]
10 | roles_path: ../common/ansible/roles
11 |
12 | [ssh_connection]
13 | control_path = %(directory)s/%%h-%%r
14 | ssh_args=-o ControlMaster=auto -o ControlPersist=60s
15 |
--------------------------------------------------------------------------------
/cloud/ansible/certifier.dev.yml:
--------------------------------------------------------------------------------
1 | ---
2 | # Copyright (c) 2016-present, Facebook, Inc.
3 | # All rights reserved.
4 | #
5 | # This source code is licensed under the BSD-style license found in the
6 | # LICENSE file in the root directory of this source tree. An additional grant
7 | # of patent rights can be found in the PATENTS file in the same directory.
8 |
9 | - hosts: cert
10 | become: yes
11 | roles:
12 | - { role: certifier_base, homedir: "/home/vagrant" }
13 |
--------------------------------------------------------------------------------
/cloud/ansible/certifier.yml:
--------------------------------------------------------------------------------
1 | ---
2 | # Copyright (c) 2016-present, Facebook, Inc.
3 | # All rights reserved.
4 | #
5 | # This source code is licensed under the BSD-style license found in the
6 | # LICENSE file in the root directory of this source tree. An additional grant
7 | # of patent rights can be found in the PATENTS file in the same directory.
8 |
9 | - hosts: certifier
10 | remote_user: ubuntu
11 | become: yes
12 | vars:
13 | homedir: /home/ubuntu
14 | pki_dir: certifier/pki
15 | vars_prompt:
16 | - name: signing_key_passphrase
17 | prompt: "Enter signing key passphrase"
18 | private: true
19 | roles:
20 | - { role: certifier_base, homedir: "/home/ubuntu" }
21 |
--------------------------------------------------------------------------------
/cloud/ansible/dev_conf.ini:
--------------------------------------------------------------------------------
1 | [rabbitmq]
2 | password=endagadev
3 |
4 | [kannel]
5 | admin_password=endaga_fake_admin
6 | outbound_password=endaga_fake_outbound
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch.list:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016-present, Facebook, Inc.
2 | # All rights reserved.
3 | #
4 | # This source code is licensed under the BSD-style license found in the
5 | # LICENSE file in the root directory of this source tree. An additional grant
6 | # of patent rights can be found in the PATENTS file in the same directory.
7 |
8 | deb http://files.freeswitch.org/repo/deb/debian/ wheezy main
9 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/amd.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/abstraction.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/alsa.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/blacklist.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/cdr_mongodb.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/cepstral.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/db.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/dialplan_directory.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/dingaling.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/directory.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/distributor.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/event_multicast.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/event_socket.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/fax.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/fifo.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/hash.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/http_cache.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/ivr.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/java.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/memcache.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/mongo.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
12 |
13 |
14 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/opus.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/oreka.conf.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/perl.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/pocketsphinx.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/post_load_modules.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/presence_map.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/python.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/redis.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/rss.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/rtmp.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/shout.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/skinny.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/sofia.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/spidermonkey.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/syslog.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/tts_commandline.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/v8.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/xml_rpc.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/xml_scgi.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/autoload_configs/zeroconf.conf.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/chatplan/default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/dialplan/bts/01_test.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/dialplan/bts/10_inendaga.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/dialplan/public/00_setup.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/dialplan/public/05_test.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
24 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/dialplan/public/10_inbound.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/directory/default/gadogado.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/directory/default/shaddi-softphone.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/extensions.conf:
--------------------------------------------------------------------------------
1 | [default]
2 |
3 | ; Things you're used to....
4 | exten => music,n,Dial(SIP/1234@conference.freeswitch.org|120)
5 |
6 | exten => _1XXXXX,n,set(cool=${EXTEN})
7 | exten => _1XXXXX,n,set(myvar=true)
8 | exten => _1XXXXX,n,Goto(default|music)
9 | exten => 2137991400/1000,n,Goto(default|music)
10 |
11 |
12 | ; Some new magic you can do....
13 | exten => ~^(18(0{2}|8{2}|7{2}|6{2})\d{7})$,n,enum($1)
14 | exten => ~^(18(0{2}|8{2}|7{2}|6{2})\d{7})$,n,bridge(${enum_auto_route})
15 |
16 | ; instead of exten, put anything about the call you would rather match on.
17 | ; either the names of a field in caller_profile or a string of variables to expand.
18 | caller_id_number => 2137991400,n,Goto(default|music)
19 | ${sip_from_user} => bill,n,Goto(default|music)
20 |
21 |
22 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/lang/de/de.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
23 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/lang/es/es_ES.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/lang/es/es_MX.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/lang/fr/demo/demo.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
30 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/lang/fr/fr.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
24 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/lang/he/he.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
23 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/lang/pt/pt_BR.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/lang/pt/pt_PT.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/lang/ru/ru.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
24 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/lang/sv/sv.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/web-vm.tpl:
--------------------------------------------------------------------------------
1 | FreeSWITCH Voicemail
2 |
3 |
4 |
5 |
6 | Voicemail Messages
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/yaml/extensions.yaml:
--------------------------------------------------------------------------------
1 | default:
2 | ${destination_number} =~ (9664):
3 | set: foo=bar
4 | playback: ${hold_music}
5 |
--------------------------------------------------------------------------------
/cloud/ansible/files/freeswitch/etc/freeswitch/yaml/mod_yaml.yaml:
--------------------------------------------------------------------------------
1 | settings:
2 | #look for foo.conf.yaml when foo.conf is looked for in the xml
3 | bind_config: true
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/cloud/ansible/files/rabbitmq.list:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016-present, Facebook, Inc.
2 | # All rights reserved.
3 | #
4 | # This source code is licensed under the BSD-style license found in the
5 | # LICENSE file in the root directory of this source tree. An additional grant
6 | # of patent rights can be found in the PATENTS file in the same directory.
7 |
8 | deb http://www.rabbitmq.com/debian/ testing main
9 |
--------------------------------------------------------------------------------
/cloud/ansible/files/repo/etc/nginx/sites-enabled/repository.conf:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016-present, Facebook, Inc.
2 | # All rights reserved.
3 | #
4 | # This source code is licensed under the BSD-style license found in the
5 | # LICENSE file in the root directory of this source tree. An additional grant
6 | # of patent rights can be found in the PATENTS file in the same directory.
7 |
8 | server {
9 | listen 80;
10 |
11 | server_name repo.etagecom.io;
12 |
13 | location / {
14 | root /var/cache/freight;
15 | autoindex on;
16 | }
17 |
18 | location ~ /(.*)/conf {
19 | deny all;
20 | }
21 |
22 | location ~ /(.*)/db {
23 | deny all;
24 | }
25 |
26 | access_log /var/log/nginx/packages-access.log;
27 | error_log /var/log/nginx/packages-error.log;
28 | }
29 |
--------------------------------------------------------------------------------
/cloud/ansible/files/supervisor/conf.d/certifier.conf.j2:
--------------------------------------------------------------------------------
1 | ; Copyright (c) 2016-present, Facebook, Inc.
2 | ; All rights reserved.
3 | ;
4 | ; This source code is licensed under the BSD-style license found in the
5 | ; LICENSE file in the root directory of this source tree. An additional grant
6 | ; of patent rights can be found in the PATENTS file in the same directory.
7 |
8 | [program:certifier]
9 |
10 | directory={{ homedir }}/certifier
11 |
12 | command=python certifier.py 80
13 | user=root
14 | autostart=true
15 | stderr_logfile={{ homedir }}/certifier/certifier.err
16 | stdout_logfile={{ homedir }}/certifier/certifier.log
17 |
--------------------------------------------------------------------------------
/cloud/ansible/files/supervisor/conf.d/flower.conf:
--------------------------------------------------------------------------------
1 | ; Copyright (c) 2016-present, Facebook, Inc.
2 | ; All rights reserved.
3 | ;
4 | ; This source code is licensed under the BSD-style license found in the
5 | ; LICENSE file in the root directory of this source tree. An additional grant
6 | ; of patent rights can be found in the PATENTS file in the same directory.
7 |
8 | [program:celery]
9 |
10 | directory=/home/ubuntu
11 |
12 | command=celery flower --broker="amqp://endaga:endagadev@localhost//" --broker-api="amqp://endaga:endagadev@localhost/api/"
13 | user=ubuntu
14 | autostart=true
15 |
--------------------------------------------------------------------------------
/cloud/ansible/files/supervisor/conf.d/openvpn.conf:
--------------------------------------------------------------------------------
1 | ; Copyright (c) 2016-present, Facebook, Inc.
2 | ; All rights reserved.
3 | ;
4 | ; This source code is licensed under the BSD-style license found in the
5 | ; LICENSE file in the root directory of this source tree. An additional grant
6 | ; of patent rights can be found in the PATENTS file in the same directory.
7 |
8 | [program:openvpn]
9 |
10 | directory=/etc/openvpn
11 |
12 | command=openvpn server.conf
13 |
14 | autostart=true
15 | startsecs=5
16 | user=root
17 |
--------------------------------------------------------------------------------
/cloud/ansible/freeswitch_server/README.md:
--------------------------------------------------------------------------------
1 | run:
2 | ansible-playbook -i hosts freeswitch_server.yml --private-key=~/.ssh/endaga-test.pem -vvvv
3 |
4 | testrun:
5 | ansible-playbook -i hosts freeswitch_server.yml --private-key=~/.ssh/endaga-test.pem -C -vvvv
6 |
7 | deploy local:
8 | vagrant up
9 |
10 | SSH:
11 | ssh -i /home/kheimerl/.vagrant.d/insecure_private_key -S none -o StrictHostKeyChecking=no -o Port=2223 vagrant@127.0.0.1
12 |
--------------------------------------------------------------------------------
/cloud/ansible/freeswitch_server/THIS_FOLDER_IS_DEPRECATED:
--------------------------------------------------------------------------------
1 | We need to move this stuff to the new Vagrantfile one level up. Also, the dev environment is probably broken under the new devserver setup.
2 |
3 | Tracking this in t9217912.
4 |
--------------------------------------------------------------------------------
/cloud/ansible/freeswitch_server/freeswitch_server.deploy.yml:
--------------------------------------------------------------------------------
1 | ---
2 | # Copyright (c) 2016-present, Facebook, Inc.
3 | # All rights reserved.
4 | #
5 | # This source code is licensed under the BSD-style license found in the
6 | # LICENSE file in the root directory of this source tree. An additional grant
7 | # of patent rights can be found in the PATENTS file in the same directory.
8 |
9 | - hosts: freeswitch_server
10 | remote_user: ubuntu
11 | sudo: yes
12 | tasks:
13 | - include: freeswitch_server.yml
--------------------------------------------------------------------------------
/cloud/ansible/freeswitch_server/hosts:
--------------------------------------------------------------------------------
1 | [localvagrant]
2 | 127.0.0.1 ansible_connection=local ansible_ssh_user=vagrant ansible_ssh_port=2222 ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key
3 |
--------------------------------------------------------------------------------
/cloud/ansible/hosts.template:
--------------------------------------------------------------------------------
1 | [webservers]
2 | deploy.example.com ansible_ssh_user=ubuntu
3 |
4 | [rabbitmq]
5 | rabbitmq.example.com ansible_ssh_user=ubuntu
6 |
7 | [repo]
8 | repo.example.com ansible_ssh_user=ubuntu
9 |
10 | [certifier]
11 | cert.example.com ansible_ssh_user=ubuntu
12 |
13 | [bts_vpn_endpoints]
14 | vpn.example.com ansible_ssh_user=ubuntu
15 |
16 | [sip]
17 | sip.example.com ansible_ssh_user=ubuntu
18 |
19 | [smpp]
20 | smpp.example.com ansible_ssh_user=ubuntu
21 |
--------------------------------------------------------------------------------
/cloud/ansible/key-check.yml:
--------------------------------------------------------------------------------
1 | ---
2 | # Copyright (c) 2016-present, Facebook, Inc.
3 | # All rights reserved.
4 | #
5 | # This source code is licensed under the BSD-style license found in the
6 | # LICENSE file in the root directory of this source tree. An additional grant
7 | # of patent rights can be found in the PATENTS file in the same directory.
8 |
9 | - name: Get private key modulus
10 | command: openssl rsa -noout -modulus -in "{{ key }}"
11 | register: key_mod
12 | - name: Verify that certificate corresponds to key
13 | command: openssl x509 -noout -modulus -in "{{ cert }}"
14 | register: crt_mod
15 | failed_when: key_mod.stdout != crt_mod.stdout
16 | - name: Verify that certificate can be verified against Etage bundle
17 | command: openssl verify -CAfile "{{ cafile }}" "{{ cert }}"
18 |
--------------------------------------------------------------------------------
/cloud/ansible/roles/certifier_base/meta/main.yml:
--------------------------------------------------------------------------------
1 | ---
2 | # Copyright (c) 2016-present, Facebook, Inc.
3 | # All rights reserved.
4 | #
5 | # This source code is licensed under the BSD-style license found in the
6 | # LICENSE file in the root directory of this source tree. An additional grant
7 | # of patent rights can be found in the PATENTS file in the same directory.
8 |
9 | dependencies:
10 | - setup_fpm
11 | - { role: python_packages, pkgs: [envoy, web.py] }
12 | - { role: system_packages, pkgs: [git, supervisor] }
13 |
--------------------------------------------------------------------------------
/cloud/ansible/vpn.dev.yml:
--------------------------------------------------------------------------------
1 | ---
2 | # Copyright (c) 2016-present, Facebook, Inc.
3 | # All rights reserved.
4 | #
5 | # This source code is licensed under the BSD-style license found in the
6 | # LICENSE file in the root directory of this source tree. An additional grant
7 | # of patent rights can be found in the PATENTS file in the same directory.
8 |
9 | - hosts: vpn
10 | become: yes
11 | roles:
12 | - { role: setup_openvpn, state: 'restarted', conf: 'files/openvpn/etc' }
13 | post_tasks:
14 | - name: Enable IPv4 forwarding
15 | sysctl: key=net.ipv4.ip_forward val=1
16 |
--------------------------------------------------------------------------------
/cloud/ccm:
--------------------------------------------------------------------------------
1 | ../common/ccm
--------------------------------------------------------------------------------
/cloud/certifier/VERSION:
--------------------------------------------------------------------------------
1 | 0.1.0
2 |
--------------------------------------------------------------------------------
/cloud/certifier/requirements.txt:
--------------------------------------------------------------------------------
1 | argparse==1.2.1
2 | envoy==0.0.2
3 | web.py==0.37
4 | wsgiref==0.1.2
5 |
--------------------------------------------------------------------------------
/cloud/certifier/x509-types/COMMON:
--------------------------------------------------------------------------------
1 | # X509 extensions added to every signed cert
2 |
3 | # This file is included for every cert signed, and by default does nothing.
4 | # It could be used to add values every cert should have, such as a CDP as
5 | # demonstrated in the following example:
6 |
7 | #crlDistributionPoints = URI:http://example.net/pki/my_ca.crl
8 |
--------------------------------------------------------------------------------
/cloud/certifier/x509-types/ca:
--------------------------------------------------------------------------------
1 | # X509 extensions for a ca
2 |
3 | # Note that basicConstraints will be overridden by Easy-RSA when defining a
4 | # CA_PATH_LEN for CA path length limits. You could also do this here
5 | # manually as in the following example in place of the existing line:
6 | #
7 | # basicConstraints = CA:TRUE, pathlen:1
8 |
9 | basicConstraints = CA:TRUE
10 | subjectKeyIdentifier = hash
11 | authorityKeyIdentifier = keyid:always,issuer:always
12 | keyUsage = cRLSign, keyCertSign
13 |
14 |
--------------------------------------------------------------------------------
/cloud/certifier/x509-types/client:
--------------------------------------------------------------------------------
1 | # X509 extensions for a client
2 |
3 | basicConstraints = CA:FALSE
4 | subjectKeyIdentifier = hash
5 | authorityKeyIdentifier = keyid,issuer:always
6 | extendedKeyUsage = clientAuth
7 | keyUsage = digitalSignature
8 |
9 |
--------------------------------------------------------------------------------
/cloud/certifier/x509-types/server:
--------------------------------------------------------------------------------
1 | # X509 extensions for a server
2 |
3 | basicConstraints = CA:FALSE
4 | subjectKeyIdentifier = hash
5 | authorityKeyIdentifier = keyid,issuer:always
6 | extendedKeyUsage = serverAuth
7 | keyUsage = digitalSignature,keyEncipherment
8 |
9 |
--------------------------------------------------------------------------------
/cloud/configs/celerystick.conf:
--------------------------------------------------------------------------------
1 | ; Copyright (c) 2016-present, Facebook, Inc.
2 | ; All rights reserved.
3 | ;
4 | ; This source code is licensed under the BSD-style license found in the
5 | ; LICENSE file in the root directory of this source tree. An additional grant
6 | ; of patent rights can be found in the PATENTS file in the same directory.
7 |
8 | [program:celerystick]
9 |
10 | directory=/var/www
11 |
12 | command=envdir /var/opt/endagaweb-envdir python manage.py celerystick
13 |
14 | user=ubuntu
15 | numprocs=1
16 | stdout_logfile=/var/log/celerystick.log
17 | stderr_logfile=/var/log/celerystick.log
18 | autostart=true
19 | autorestart=true
20 | startsecs=3
21 |
--------------------------------------------------------------------------------
/cloud/configs/deployment/appspec.yml:
--------------------------------------------------------------------------------
1 | ---
2 | #
3 | # Copyright (c) 2016-present, Facebook, Inc.
4 | # All rights reserved.
5 | #
6 | # This source code is licensed under the BSD-style license found in the
7 | # LICENSE file in the root directory of this source tree. An additional grant
8 | # of patent rights can be found in the PATENTS file in the same directory.
9 |
10 | version: 0.0
11 | os: linux
12 | files:
13 | - source: endagaweb_all.deb
14 | destination: /var/opt
15 | hooks:
16 | BeforeInstall:
17 | - location: scripts/install_dependencies
18 | timeout: 300
19 | runas: root
20 | AfterInstall:
21 | - location: scripts/prepare_server
22 | timeout: 300
23 | runas: root
24 | - location: scripts/start_application
25 | timeout: 300
26 | runas: root
27 |
--------------------------------------------------------------------------------
/cloud/configs/deployment/scripts/install_dependencies:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Copyright (c) 2016-present, Facebook, Inc.
4 | # All rights reserved.
5 | #
6 | # This source code is licensed under the BSD-style license found in the
7 | # LICENSE file in the root directory of this source tree. An additional grant
8 | # of patent rights can be found in the PATENTS file in the same directory.
9 |
10 | error_exit() {
11 | local message=$1
12 |
13 | echo "[FATAL] $message" 1>&2
14 | exit 1
15 | }
16 |
17 | sudo apt-get update -y
18 |
19 | if [ $? != 0 ]; then
20 | error_exit "Couldn't update package repo."
21 | fi
22 |
23 | sudo apt-get install -y byobu nginx uwsgi python-pip python-dev libpq-dev git supervisor daemontools binutils libproj-dev gdal-bin
24 |
25 | if [ $? != 0 ]; then
26 | error_exit "Couldn't install dependencies."
27 | fi
28 |
--------------------------------------------------------------------------------
/cloud/configs/endagaweb.ini:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016-present, Facebook, Inc.
2 | # All rights reserved.
3 | #
4 | # This source code is licensed under the BSD-style license found in the
5 | # LICENSE file in the root directory of this source tree. An additional grant
6 | # of patent rights can be found in the PATENTS file in the same directory.
7 |
8 | [uwsgi]
9 | socket=/tmp/endaga.com.sock
10 | chdir=/var/www
11 | module=endagaweb.wsgi:application
12 | master=True
13 | pidfile=/tmp/endagaweb-master.pid
14 | vacuum=True
15 | chmod-socket=666
16 | max-requests=5000
17 | daemonize=/var/log/uwsgi/endagaweb.log
18 | stats=127.0.0.1:9191
19 | processes=1
20 | threads=2
21 | harakiri=20
22 | touch-reload=/tmp/endagaweb-reload
23 | envdir=/var/opt/endagaweb-envdir
24 |
--------------------------------------------------------------------------------
/cloud/configs/uwsgi.conf:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016-present, Facebook, Inc.
2 | # All rights reserved.
3 | #
4 | # This source code is licensed under the BSD-style license found in the
5 | # LICENSE file in the root directory of this source tree. An additional grant
6 | # of patent rights can be found in the PATENTS file in the same directory.
7 |
8 | # Emperor uWSGI script
9 |
10 | description "uWSGI Emperor"
11 | start on runlevel [2345]
12 | stop on runlevel [06]
13 |
14 | setuid www-data
15 | setgid www-data
16 |
17 | exec uwsgi --master --die-on-term --emperor /etc/uwsgi/apps-enabled
18 |
--------------------------------------------------------------------------------
/cloud/doc/deployment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/cloud/doc/deployment.png
--------------------------------------------------------------------------------
/cloud/endagaweb/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 | from __future__ import absolute_import
10 | from __future__ import division
11 | from __future__ import print_function
12 | from __future__ import unicode_literals
13 |
14 | from .celery import app as celery_app # noqa: F401 (unused import)
15 |
--------------------------------------------------------------------------------
/cloud/endagaweb/billing/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
--------------------------------------------------------------------------------
/cloud/endagaweb/fixtures/pricing.xls:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/cloud/endagaweb/fixtures/pricing.xls
--------------------------------------------------------------------------------
/cloud/endagaweb/forms/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
--------------------------------------------------------------------------------
/cloud/endagaweb/ic_providers/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
--------------------------------------------------------------------------------
/cloud/endagaweb/management/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
--------------------------------------------------------------------------------
/cloud/endagaweb/management/commands/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
--------------------------------------------------------------------------------
/cloud/endagaweb/migrations/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
--------------------------------------------------------------------------------
/cloud/endagaweb/oneoffs/migrate_int_balance_to_crdt/0003_delete_old_balance.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | Copyright (c) 2016-present, Facebook, Inc.
5 | All rights reserved.
6 |
7 | This source code is licensed under the BSD-style license found in the
8 | LICENSE file in the root directory of this source tree. An additional grant
9 | of patent rights can be found in the PATENTS file in the same directory.
10 | """
11 |
12 | from __future__ import unicode_literals
13 |
14 | from django.db import models, migrations
15 |
16 | class Migration(migrations.Migration):
17 |
18 | dependencies = [
19 | ('endagaweb', '0002_migrate_balance'),
20 | ]
21 |
22 | operations = [
23 | migrations.RemoveField(
24 | model_name='subscriber',
25 | name='old_balance',
26 | ),
27 |
28 | ]
29 |
--------------------------------------------------------------------------------
/cloud/endagaweb/oneoffs/migrate_int_balance_to_crdt/README:
--------------------------------------------------------------------------------
1 | These migrations were used to convert a database using integer balances (old
2 | style) to CRDT-based representations. If you are using an integer based system,
3 | you'll want to use these to update your system.
4 |
--------------------------------------------------------------------------------
/cloud/endagaweb/settings/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
--------------------------------------------------------------------------------
/cloud/endagaweb/settings/test_spatialite.py:
--------------------------------------------------------------------------------
1 | """
2 | Use Django prod settings from endagaweb with as few changes as necessary
3 | to make tests run under Buck/Sandcastle.
4 |
5 | Copyright (c) 2016-present, Facebook, Inc.
6 | All rights reserved.
7 |
8 | This source code is licensed under the BSD-style license found in the
9 | LICENSE file in the root directory of this source tree. An additional grant
10 | of patent rights can be found in the PATENTS file in the same directory.
11 | """
12 |
13 | import os
14 |
15 | from endagaweb.settings.staff import * # noqa: F401, F403
16 |
17 | # Use spatialite for unit tests
18 | GEOS_LIBRARY_PATH = os.environ['GEOS_LIBRARY_PATH']
19 | SPATIALITE_LIBRARY_PATH = os.environ['SPATIALITE_LIBRARY_PATH']
20 |
21 | DATABASES = {
22 | 'default': {
23 | 'ENGINE': 'django.contrib.gis.db.backends.spatialite',
24 | 'NAME': '/tmp/endaga.db',
25 | },
26 | }
27 |
28 | ROOT_URLCONF = 'endagaweb.urls'
29 |
--------------------------------------------------------------------------------
/cloud/endagaweb/static/img/hardware.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/cloud/endagaweb/static/img/hardware.jpg
--------------------------------------------------------------------------------
/cloud/endagaweb/static/img/homebkg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/cloud/endagaweb/static/img/homebkg.jpg
--------------------------------------------------------------------------------
/cloud/endagaweb/static/img/papua.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/cloud/endagaweb/static/img/papua.jpg
--------------------------------------------------------------------------------
/cloud/endagaweb/static/img/placeholder-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/cloud/endagaweb/static/img/placeholder-logo.png
--------------------------------------------------------------------------------
/cloud/endagaweb/static/img/sims.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/cloud/endagaweb/static/img/sims.jpg
--------------------------------------------------------------------------------
/cloud/endagaweb/static/img/user.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/cloud/endagaweb/static/img/user.jpg
--------------------------------------------------------------------------------
/cloud/endagaweb/static/js/dashboard/activity.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | function setloading() {
11 | var $btn = $('#submit').button().button('loading');
12 | }
13 |
14 | $(function() {
15 | var options = {
16 | icons: {
17 | time: 'fa fa-clock-o',
18 | date: 'fa fa-calendar',
19 | up: 'fa fa-arrow-up',
20 | down: 'fa fa-arrow-down',
21 | previous: 'fa fa-arrow-left',
22 | next: 'fa fa-arrow-right',
23 | today: 'fa fa-circle-o',
24 | },
25 | showTodayButton: true,
26 | format: 'YYYY-MM-DD [at] hh:mmA',
27 | };
28 | $('#start_date').datetimepicker(options);
29 | $('#end_date').datetimepicker(options);
30 | });
31 |
--------------------------------------------------------------------------------
/cloud/endagaweb/stats_app/__init__.py:
--------------------------------------------------------------------------------
1 | """The stats app.
2 |
3 | Copyright (c) 2016-present, Facebook, Inc.
4 | All rights reserved.
5 |
6 | This source code is licensed under the BSD-style license found in the
7 | LICENSE file in the root directory of this source tree. An additional grant
8 | of patent rights can be found in the PATENTS file in the same directory.
9 | """
10 |
11 | import endagaweb.stats_app.views
12 |
--------------------------------------------------------------------------------
/cloud/endagaweb/templates/dashboard/network_detail/header.html:
--------------------------------------------------------------------------------
1 | {% comment %}
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | {% endcomment %}
9 |
19 |
--------------------------------------------------------------------------------
/cloud/endagaweb/templates/dashboard/subscriber_detail/header.html:
--------------------------------------------------------------------------------
1 | {% comment %}
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | {% endcomment %}
9 |
21 |
--------------------------------------------------------------------------------
/cloud/endagaweb/templates/dashboard/timezone-notice.html:
--------------------------------------------------------------------------------
1 | {% load apptags %}
2 | {% comment %}
3 | Copyright (c) 2016-present, Facebook, Inc.
4 | All rights reserved.
5 |
6 | This source code is licensed under the BSD-style license found in the
7 | LICENSE file in the root directory of this source tree. An additional grant
8 | of patent rights can be found in the PATENTS file in the same directory.
9 | {% endcomment %}
10 |
11 |
12 |
13 | Note: all dates are in the {{ user_profile.timezone|timezone_offset }} timezone
14 | (modify).
15 |
16 |
17 |
--------------------------------------------------------------------------------
/cloud/endagaweb/templates/dashboard/tower_detail/header.html:
--------------------------------------------------------------------------------
1 | {% comment %}
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | {% endcomment %}
9 |
24 |
--------------------------------------------------------------------------------
/cloud/endagaweb/templates/internal/bts_down_email.html:
--------------------------------------------------------------------------------
1 | {% comment %}
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | {% endcomment %}
9 | One of your BTS units has gone offline:
10 |
11 | {% if bts_nickname %}
12 | BTS "{{ bts_nickname }}" ({{ bts_uuid}}): OFFLINE
13 | {% else %}
14 | BTS {{ bts_uuid}}: OFFLINE
15 | {% endif %}
16 |
17 | Please see https://www.etagecom.io/dashboard for more information.
18 |
--------------------------------------------------------------------------------
/cloud/endagaweb/templates/internal/bts_down_sms.html:
--------------------------------------------------------------------------------
1 | {% comment %}
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | {% endcomment %}
9 | {% if bts_nickname %}
10 | Your BTS "{{ bts_nickname }}" ({{ bts_uuid_short}}...) is offline. Check www.etagecom.io for details.
11 | {% else %}
12 | Your BTS {{ bts_uuid_short}}... is offline. Check www.etagecom.io for details.
13 | {% endif %}
14 |
--------------------------------------------------------------------------------
/cloud/endagaweb/templates/internal/bts_up_email.html:
--------------------------------------------------------------------------------
1 | {% comment %}
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | {% endcomment %}
9 | One of your BTS units is back online!
10 |
11 | {% if bts_nickname %}
12 | BTS "{{ bts_nickname }}" ({{ bts_uuid}}): ONLINE
13 | {% else %}
14 | BTS {{ bts_uuid}}: ONLINE
15 | {% endif %}
16 |
17 | Please see https://www.etagecom.io/dashboard for more information.
18 |
--------------------------------------------------------------------------------
/cloud/endagaweb/templates/internal/bts_up_sms.html:
--------------------------------------------------------------------------------
1 | {% comment %}
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | {% endcomment %}
9 | {% if bts_nickname %}
10 | Your BTS "{{ bts_nickname }}" ({{ bts_uuid_short}}...) is back online. Check www.etagecom.io for details.
11 | {% else %}
12 | Your BTS {{ bts_uuid_short}}... is back online. Check www.etagecom.io for details.
13 | {% endif %}
14 |
--------------------------------------------------------------------------------
/cloud/endagaweb/templates/internal/opensslconf.html:
--------------------------------------------------------------------------------
1 | {% comment %}
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | {% endcomment %}
9 | [ req ]
10 | default_bits = 2048
11 | default_keyfile = endaga-client.key
12 | distinguished_name = req_distinguished_name
13 | prompt = no
14 |
15 | [ req_distinguished_name ]
16 | C = US
17 | ST = California
18 | L = Oakland
19 | O = Endaga, Inc.
20 | OU = {{ account_id }}
21 | CN = {{ bts_cn }}
22 | emailAddress = {{ account_email }}
23 |
--------------------------------------------------------------------------------
/cloud/endagaweb/templatetags/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
--------------------------------------------------------------------------------
/cloud/endagaweb/tests/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
--------------------------------------------------------------------------------
/cloud/endagaweb/util/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
10 | """
11 | Utility functions.
12 | """
13 |
14 |
--------------------------------------------------------------------------------
/cloud/endagaweb/util/api.py:
--------------------------------------------------------------------------------
1 | """
2 | Api utility functions.
3 |
4 | Copyright (c) 2016-present, Facebook, Inc.
5 | All rights reserved.
6 |
7 | This source code is licensed under the BSD-style license found in the
8 | LICENSE file in the root directory of this source tree. An additional grant
9 | of patent rights can be found in the PATENTS file in the same directory.
10 | """
11 |
12 | from endagaweb import models
13 |
14 | def get_network_from_user(user):
15 | """The API can be called from the dashboard using a Django
16 | user session or from a BTS. Dashboard requests come from a user
17 | with a UserProfile while BTS requests come from a Network's auth_user.
18 | We return the correct network based on the user being used.
19 | """
20 | try:
21 | return models.Network.objects.get(auth_user=user)
22 | except models.Network.DoesNotExist:
23 | up = models.UserProfile.objects.get(user=user)
24 | return up.network
25 |
26 |
27 |
--------------------------------------------------------------------------------
/cloud/endagaweb/util/dbutils.py:
--------------------------------------------------------------------------------
1 | """utlity methods running on the underlying database.
2 |
3 | Copyright (c) 2016-present, Facebook, Inc.
4 | All rights reserved.
5 |
6 | This source code is licensed under the BSD-style license found in the
7 | LICENSE file in the root directory of this source tree. An additional grant
8 | of patent rights can be found in the PATENTS file in the same directory.
9 | """
10 |
11 |
12 | def get_db_time(connection):
13 | cursor = connection.cursor()
14 | cursor.execute("SELECT statement_timestamp();")
15 | return cursor.fetchone()[0]
16 |
--------------------------------------------------------------------------------
/cloud/endagaweb/util/parse_usage_event.py:
--------------------------------------------------------------------------------
1 | """Parsing UsageEvent reasons.
2 |
3 | Copyright (c) 2016-present, Facebook, Inc.
4 | All rights reserved.
5 |
6 | This source code is licensed under the BSD-style license found in the
7 | LICENSE file in the root directory of this source tree. An additional grant
8 | of patent rights can be found in the PATENTS file in the same directory.
9 | """
10 |
11 |
12 | def parse_gprs_reason(reason):
13 | """Finds the uploaded and downloaded bytes from a GPRS UE reason attribute.
14 |
15 | Args:
16 | reason: a UsageEvent.reason from a 'gprs' kind of UE, e.g. "gprs_usage: 184
17 | bytes uploaded, 0 bytes downloaded"
18 |
19 | Returns:
20 | (uploaded_bytes, downloaded_bytes) as integers
21 | """
22 | try:
23 | up = int(reason.split()[1])
24 | down = int(reason.split()[4])
25 | except IndexError:
26 | # Reason is an empty string.
27 | up, down = 0, 0
28 | return up, down
29 |
--------------------------------------------------------------------------------
/cloud/endagaweb/views/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
10 | import static
11 | import api
12 | import api_v2
13 | import dashboard
14 | import network
15 | import user
16 | import staff
17 | import stats
18 | import towers
19 | import debug
20 | import internalapi
21 | import file_upload
22 |
--------------------------------------------------------------------------------
/cloud/endagaweb/views/debug.py:
--------------------------------------------------------------------------------
1 | """A simple debug "echoing" view.
2 |
3 | Copyright (c) 2016-present, Facebook, Inc.
4 | All rights reserved.
5 |
6 | This source code is licensed under the BSD-style license found in the
7 | LICENSE file in the root directory of this source tree. An additional grant
8 | of patent rights can be found in the PATENTS file in the same directory.
9 | """
10 |
11 | from django.http import HttpResponse
12 |
13 |
14 | def debug_view(request):
15 | """A view that echoes back what it receives."""
16 | if request.method == 'POST':
17 | for k in request.POST:
18 | print "%s: %s" % (k, request.POST[k])
19 |
20 | elif request.method == 'GET':
21 | for k in request.GET:
22 | print "%s: %s" % (k, request.GET[k])
23 |
24 | return HttpResponse()
25 |
--------------------------------------------------------------------------------
/cloud/envdir/ALLOWED_HOSTS:
--------------------------------------------------------------------------------
1 | 127.0.0.1, localhost
2 |
--------------------------------------------------------------------------------
/cloud/envdir/BROKER_URL:
--------------------------------------------------------------------------------
1 | amqp://endaga:endagadev@192.168.40.30//
2 |
--------------------------------------------------------------------------------
/cloud/envdir/CCM_LOGGER_NAME:
--------------------------------------------------------------------------------
1 | endagaweb.logger
2 |
--------------------------------------------------------------------------------
/cloud/envdir/CCM_SYSLOG_SOCKET:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/cloud/envdir/CCM_SYSLOG_SOCKET
--------------------------------------------------------------------------------
/cloud/envdir/CELERY_DEFAULT_QUEUE:
--------------------------------------------------------------------------------
1 | development
2 |
--------------------------------------------------------------------------------
/cloud/envdir/DATABASE_URL:
--------------------------------------------------------------------------------
1 | postgres://endaga_dev:endaga_dev@192.168.40.20/endagaweb_dev
2 |
--------------------------------------------------------------------------------
/cloud/envdir/DEBUG:
--------------------------------------------------------------------------------
1 | True
2 |
--------------------------------------------------------------------------------
/cloud/envdir/DJANGO_SETTINGS_MODULE:
--------------------------------------------------------------------------------
1 | endagaweb.settings.dev
2 |
--------------------------------------------------------------------------------
/cloud/envdir/FACEBOOK_APP_ID:
--------------------------------------------------------------------------------
1 | app_id
2 |
--------------------------------------------------------------------------------
/cloud/envdir/FACEBOOK_APP_SECRET:
--------------------------------------------------------------------------------
1 | app_secret
2 |
--------------------------------------------------------------------------------
/cloud/envdir/KANNEL_OUTBOUND_SMS_URL:
--------------------------------------------------------------------------------
1 | http://localhost:13005/cgi-bin/sendsms
--------------------------------------------------------------------------------
/cloud/envdir/KANNEL_PASSWD:
--------------------------------------------------------------------------------
1 | kannelpasswd
--------------------------------------------------------------------------------
/cloud/envdir/KANNEL_USERNAME:
--------------------------------------------------------------------------------
1 | globekannelusername
--------------------------------------------------------------------------------
/cloud/envdir/KEYMASTER:
--------------------------------------------------------------------------------
1 | 192.168.40.40
2 |
--------------------------------------------------------------------------------
/cloud/envdir/NEXMO_ACCT_SID:
--------------------------------------------------------------------------------
1 | foo
2 |
--------------------------------------------------------------------------------
/cloud/envdir/NEXMO_AUTH_TOKEN:
--------------------------------------------------------------------------------
1 | foo
2 |
--------------------------------------------------------------------------------
/cloud/envdir/NEXMO_NOTIFICATION_NUMBER:
--------------------------------------------------------------------------------
1 | 12015834406
2 |
--------------------------------------------------------------------------------
/cloud/envdir/SECRET_KEY:
--------------------------------------------------------------------------------
1 | supersecretdevelopmentkey
2 |
--------------------------------------------------------------------------------
/cloud/envdir/SFTP_HOST:
--------------------------------------------------------------------------------
1 | sftp_host
2 |
--------------------------------------------------------------------------------
/cloud/envdir/SFTP_PASSWORD:
--------------------------------------------------------------------------------
1 | sftp_password
2 |
--------------------------------------------------------------------------------
/cloud/envdir/SFTP_USERNAME:
--------------------------------------------------------------------------------
1 | sftp_username
2 |
--------------------------------------------------------------------------------
/cloud/envdir/SPATIALITE_LIBRARY_PATH:
--------------------------------------------------------------------------------
1 | /usr/lib/python2.7/dist-packages/pyspatialite/_spatialite.so
2 |
--------------------------------------------------------------------------------
/cloud/manage.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | """
3 | Copyright (c) 2016-present, Facebook, Inc.
4 | All rights reserved.
5 |
6 | This source code is licensed under the BSD-style license found in the
7 | LICENSE file in the root directory of this source tree. An additional grant
8 | of patent rights can be found in the PATENTS file in the same directory.
9 | """
10 |
11 | import os
12 | import sys
13 | import glob
14 |
15 | if __name__ == "__main__":
16 | env_dir = 'envdir'
17 | env_vars = glob.glob(os.path.join(env_dir, '*'))
18 | for env_var in env_vars:
19 | with open(env_var, 'r') as env_var_file:
20 | os.environ.setdefault(env_var.split(os.sep)[-1],
21 | env_var_file.read().strip())
22 |
23 | from django.core.management import execute_from_command_line
24 |
25 | execute_from_command_line(sys.argv)
26 |
--------------------------------------------------------------------------------
/cloud/pylintrc:
--------------------------------------------------------------------------------
1 | # The default pylint settings for the endagaweb django app.
2 | # Note that the bracketed headings are required.
3 | #
4 | # See these sites for a large example pylintrc that disables certain warnings:
5 | # docutils.sourceforge.net/sandbox/py-rest-doc/utils/pylintrc
6 | # github.com/nijel/weblate/blob/master/pylint.rc
7 |
8 |
9 | [MASTER]
10 | # Use the django plugin.
11 | load-plugins=pylint_django
12 |
13 |
14 | [REPORTS]
15 | # Disable the reporting and just show messages.
16 | reports=no
17 |
18 |
19 | [FORMAT]
20 | # No more than 79 chars as per PEP8. The style guide says 80 but 79 works
21 | # better on github.
22 | max-line-length = 79
23 |
24 | # Four space indents.
25 | indent-string = ' '
26 |
27 |
28 | [MESSAGES CONTROL]
29 | # Reference messages by id (in parens) or code:
30 | # http://pylint-messages.wikidot.com/all-codes
31 | disable = too-many-locals, too-few-public-methods, star-args
32 |
--------------------------------------------------------------------------------
/cloud/requirements-dev.txt:
--------------------------------------------------------------------------------
1 | pylint==1.4.1
2 | pylint-django==0.6
3 | pylint-plugin-utils==0.2.3
4 |
--------------------------------------------------------------------------------
/cloud/sason/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
--------------------------------------------------------------------------------
/cloud/sason/admin.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 | from django.contrib import admin
10 |
--------------------------------------------------------------------------------
/cloud/sason/apps.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
10 | from __future__ import unicode_literals
11 |
12 | from django.apps import AppConfig
13 |
14 |
15 | class SasonConfig(AppConfig):
16 | name = 'sason'
17 |
--------------------------------------------------------------------------------
/cloud/sason/migrations/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
--------------------------------------------------------------------------------
/cloud/sason/models.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 | from __future__ import unicode_literals
10 |
11 | from django.db import models
12 |
13 | #use endagaweb models
14 |
--------------------------------------------------------------------------------
/cloud/sason/urls.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 | from django.conf.urls import url
10 |
11 | import sason.views
12 |
13 | urlpatterns = [
14 | url(r'^ping/',
15 | sason.views.Ping.as_view()),
16 | url(r'^request/',
17 | sason.views.Request.as_view()),
18 | url(r'^acquire/',
19 | sason.views.Acquire.as_view()),
20 | ]
21 |
--------------------------------------------------------------------------------
/cloud/urls.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 | from django.conf.urls import include, url
10 |
11 | urlpatterns = [
12 | url(r'', include('endagaweb.urls')),
13 | url(r'^sason/', include('sason.urls'))
14 | ]
15 |
--------------------------------------------------------------------------------
/cloud/working_directory_paths.rb:
--------------------------------------------------------------------------------
1 | # Sync folders.
2 | # Our VM will map the following directory to /home/vagrant if they are found.
3 | # Update this to reflect your working directory structure.
4 | module SyncPaths
5 | $repos = {
6 | "common" => "../common",
7 | "cloud" => "./",
8 | }
9 | end
10 |
--------------------------------------------------------------------------------
/common/.gitignore:
--------------------------------------------------------------------------------
1 | *.pyc
2 | ccm_common.egg-info/
3 | build/
4 | dist/
5 |
--------------------------------------------------------------------------------
/common/.python3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/common/.python3
--------------------------------------------------------------------------------
/common/README.md:
--------------------------------------------------------------------------------
1 | Common Python utilities for Endaga:
2 |
3 | * Currency utilities to convert between standard currency representations and internal database integer representation
4 |
5 | ### requirements
6 | * Python 2.7
7 |
8 | ### testing
9 | run unit tests with `nose` after installing the required modules:
10 |
11 | ```shell
12 | $ pip install -r requirements.txt
13 | $ nosetests
14 | ```
15 |
--------------------------------------------------------------------------------
/common/ansible/roles/python_packages/meta/main.yml:
--------------------------------------------------------------------------------
1 | ---
2 | #
3 | # Copyright (c) 2016-present, Facebook, Inc.
4 | # All rights reserved.
5 | #
6 | # This source code is licensed under the BSD-style license found in the
7 | # LICENSE file in the root directory of this source tree. An additional grant
8 | # of patent rights can be found in the PATENTS file in the same directory.
9 |
10 | allow_duplicates: yes
11 | dependencies:
12 | - { role: system_packages, pkgs: [ python-pip ] }
13 |
--------------------------------------------------------------------------------
/common/ansible/roles/python_packages/tasks/main.yml:
--------------------------------------------------------------------------------
1 | ---
2 | #
3 | # Copyright (c) 2016-present, Facebook, Inc.
4 | # All rights reserved.
5 | #
6 | # This source code is licensed under the BSD-style license found in the
7 | # LICENSE file in the root directory of this source tree. An additional grant
8 | # of patent rights can be found in the PATENTS file in the same directory.
9 |
10 | - name: Install Python packages via pip
11 | pip: name="{{ item }}"
12 | with_items: "{{ pkgs }}"
13 |
--------------------------------------------------------------------------------
/common/ansible/roles/setup_fpm/meta/main.yml:
--------------------------------------------------------------------------------
1 | ---
2 | #
3 | # Copyright (c) 2016-present, Facebook, Inc.
4 | # All rights reserved.
5 | #
6 | # This source code is licensed under the BSD-style license found in the
7 | # LICENSE file in the root directory of this source tree. An additional grant
8 | # of patent rights can be found in the PATENTS file in the same directory.
9 |
10 | allow_duplicates: yes
11 | dependencies:
12 | - { role: system_packages, pkgs: [ make, ruby, ruby-dev ] }
13 |
--------------------------------------------------------------------------------
/common/ansible/roles/setup_fpm/tasks/main.yml:
--------------------------------------------------------------------------------
1 | ---
2 | #
3 | # Copyright (c) 2016-present, Facebook, Inc.
4 | # All rights reserved.
5 | #
6 | # This source code is licensed under the BSD-style license found in the
7 | # LICENSE file in the root directory of this source tree. An additional grant
8 | # of patent rights can be found in the PATENTS file in the same directory.
9 |
10 | # the native Ansible 'gem' module doesn't seem to work, and 'gem install'
11 | # takes a while, so check if fpm is already installed
12 | - name: Check whether FPM already installed
13 | command: fpm --version
14 | ignore_errors: true
15 | register: fpm_check
16 | - name: Install FPM
17 | command: gem install fpm
18 | when: fpm_check | failed
19 |
--------------------------------------------------------------------------------
/common/ansible/roles/setup_openvpn/meta/main.yml:
--------------------------------------------------------------------------------
1 | ---
2 | #
3 | # Copyright (c) 2016-present, Facebook, Inc.
4 | # All rights reserved.
5 | #
6 | # This source code is licensed under the BSD-style license found in the
7 | # LICENSE file in the root directory of this source tree. An additional grant
8 | # of patent rights can be found in the PATENTS file in the same directory.
9 |
10 | allow_duplicates: yes
11 | dependencies:
12 | - { role: system_packages, pkgs: [ openvpn ] }
13 |
--------------------------------------------------------------------------------
/common/ansible/roles/setup_openvpn/tasks/main.yml:
--------------------------------------------------------------------------------
1 | ---
2 | #
3 | # Copyright (c) 2016-present, Facebook, Inc.
4 | # All rights reserved.
5 | #
6 | # This source code is licensed under the BSD-style license found in the
7 | # LICENSE file in the root directory of this source tree. An additional grant
8 | # of patent rights can be found in the PATENTS file in the same directory.
9 |
10 | # OpenVPN is usually installed as a dependency, but we need to disable
11 | # autostart
12 | - name: Copy over our configuration
13 | when: conf is defined
14 | copy: src="{{ conf }}" dest=/
15 | - name: Set OpenVPN service state
16 | service: name=openvpn state="{{ state }}" enabled="{{ 'false' if 'state' == 'stopped' else 'true' }}"
17 |
--------------------------------------------------------------------------------
/common/ansible/roles/system_packages/meta/main.yml:
--------------------------------------------------------------------------------
1 | ---
2 | #
3 | # Copyright (c) 2016-present, Facebook, Inc.
4 | # All rights reserved.
5 | #
6 | # This source code is licensed under the BSD-style license found in the
7 | # LICENSE file in the root directory of this source tree. An additional grant
8 | # of patent rights can be found in the PATENTS file in the same directory.
9 |
10 | allow_duplicates: no
11 | dependencies:
12 | - { role: update_package_metadata }
13 |
--------------------------------------------------------------------------------
/common/ansible/roles/system_packages/tasks/main.yml:
--------------------------------------------------------------------------------
1 | ---
2 | #
3 | # Copyright (c) 2016-present, Facebook, Inc.
4 | # All rights reserved.
5 | #
6 | # This source code is licensed under the BSD-style license found in the
7 | # LICENSE file in the root directory of this source tree. An additional grant
8 | # of patent rights can be found in the PATENTS file in the same directory.
9 |
10 | - name: Install system packages using apt
11 | when: ansible_os_family == "Debian"
12 | apt: name="{{ item }}" state=present
13 | with_items: "{{ pkgs }}"
14 |
15 | - name: Install system packages using yum
16 | when: ansible_os_family == "RedHat"
17 | yum: name="{{ item }}" state=present
18 | with_items: "{{ pkgs }}"
19 |
--------------------------------------------------------------------------------
/common/ansible/roles/update_package_metadata/tasks/main.yml:
--------------------------------------------------------------------------------
1 | ---
2 | #
3 | # Copyright (c) 2016-present, Facebook, Inc.
4 | # All rights reserved.
5 | #
6 | # This source code is licensed under the BSD-style license found in the
7 | # LICENSE file in the root directory of this source tree. An additional grant
8 | # of patent rights can be found in the PATENTS file in the same directory.
9 |
10 | - name: Update apt metadata
11 | when: ansible_os_family == "Debian"
12 | apt: update_cache=yes
13 |
--------------------------------------------------------------------------------
/common/ccm/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
--------------------------------------------------------------------------------
/common/ccm/common/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
10 | from __future__ import absolute_import
11 | from __future__ import division
12 | from __future__ import print_function
13 | from __future__ import unicode_literals
14 |
15 | VERSION = '0.6.0'
16 |
--------------------------------------------------------------------------------
/common/ccm/common/crdt/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
10 | from .base import GCounter, PNCounter, StateCRDT # noqa: F401
11 |
--------------------------------------------------------------------------------
/common/ccm/common/crdt/tests/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 | from __future__ import absolute_import
10 | from __future__ import division
11 | from __future__ import print_function
12 | from __future__ import unicode_literals
13 |
--------------------------------------------------------------------------------
/common/ccm/common/currency/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
10 | from .currency import Currency, CURRENCIES, DEFAULT_CURRENCY # noqa: F401
11 | from .money import Money, humanize_credits, parse_credits # noqa: F401
12 |
--------------------------------------------------------------------------------
/common/ccm/common/currency/tests/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 | from __future__ import absolute_import
10 | from __future__ import division
11 | from __future__ import print_function
12 | from __future__ import unicode_literals
13 |
--------------------------------------------------------------------------------
/common/ccm/common/delta/__init__.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python2
2 | """
3 | Copyright (c) 2016-present, Facebook, Inc.
4 | All rights reserved.
5 |
6 | This source code is licensed under the BSD-style license found in the
7 | LICENSE file in the root directory of this source tree. An additional grant
8 | of patent rights can be found in the PATENTS file in the same directory.
9 | """
10 | from __future__ import absolute_import
11 | from __future__ import division
12 | from __future__ import print_function
13 | from __future__ import unicode_literals
14 |
15 | from .protocol import DeltaProtocolCtx
16 | from .protocol import DeltaProtocol
17 | from .optimizer import DeltaCapable
18 | from .optimizer import DeltaProtocolOptimizer
19 | from .optimizer import DeltaProtocolOptimizerFactory
20 |
--------------------------------------------------------------------------------
/common/ccm/common/delta/tests/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 | from __future__ import absolute_import
10 | from __future__ import division
11 | from __future__ import print_function
12 | from __future__ import unicode_literals
13 |
--------------------------------------------------------------------------------
/common/ccm/common/logger/tests/__init__.py:
--------------------------------------------------------------------------------
1 | """ Direct logging output to stdout during testing.
2 |
3 | Copyright (c) 2016-present, Facebook, Inc.
4 | All rights reserved.
5 |
6 | This source code is licensed under the BSD-style license found in the
7 | LICENSE file in the root directory of this source tree. An additional grant
8 | of patent rights can be found in the PATENTS file in the same directory.
9 | """
10 |
11 | from __future__ import absolute_import
12 | from __future__ import division
13 | from __future__ import print_function
14 | from __future__ import unicode_literals
15 |
16 | from logging import StreamHandler, DEBUG
17 | # use stdout for output since nosetests will swallow it
18 | from sys import stdout
19 |
20 | from ccm.common.logger import DefaultLogger, notice
21 |
22 | DefaultLogger.update_handler(StreamHandler(stdout), DEBUG)
23 | notice("directing logger output to stdout during testing")
24 |
--------------------------------------------------------------------------------
/common/ccm/common/utils/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2016-present, Facebook, Inc.
2 | # All rights reserved.
3 | #
4 | # This source code is licensed under the BSD-style license found in the
5 | # LICENSE file in the root directory of this source tree. An additional grant
6 | # of patent rights can be found in the PATENTS file in the same directory.
7 | from __future__ import absolute_import
8 | from __future__ import division
9 | from __future__ import print_function
10 | from __future__ import unicode_literals
11 |
--------------------------------------------------------------------------------
/common/requirements.txt:
--------------------------------------------------------------------------------
1 | six
2 | wheel==0.24.0
3 |
--------------------------------------------------------------------------------
/openbts-python/.gitignore:
--------------------------------------------------------------------------------
1 | *.pyc
2 | *.egg-info
3 | dist/
4 | .coverage
5 | build/
6 |
--------------------------------------------------------------------------------
/openbts-python/MANIFEST.in:
--------------------------------------------------------------------------------
1 | include readme.md
2 | include requirements.txt
3 |
--------------------------------------------------------------------------------
/openbts-python/openbts/__init__.py:
--------------------------------------------------------------------------------
1 | """openbts
2 | python client to the OpenBTS NodeManager
3 |
4 | NodeManager provides an API to other components in the OpenBTS application
5 | suite, such as the SMQueue service, SIPAuthServe, OpenBTS and NodeManager
6 | itself.
7 |
8 | Copyright (c) 2016-present, Facebook, Inc.
9 | All rights reserved.
10 |
11 | This source code is licensed under the BSD-style license found in the
12 | LICENSE file in the root directory of this source tree. An additional grant
13 | of patent rights can be found in the PATENTS file in the same directory.
14 | """
15 |
16 | from .components import OpenBTS, SIPAuthServe, SMQueue
17 |
--------------------------------------------------------------------------------
/openbts-python/openbts/exceptions.py:
--------------------------------------------------------------------------------
1 | """openbts.exceptions
2 | core exceptions raised by the client
3 |
4 | Copyright (c) 2016-present, Facebook, Inc.
5 | All rights reserved.
6 |
7 | This source code is licensed under the BSD-style license found in the
8 | LICENSE file in the root directory of this source tree. An additional grant
9 | of patent rights can be found in the PATENTS file in the same directory.
10 | """
11 |
12 | class OpenBTSError(Exception):
13 | """Generic package error."""
14 | pass
15 |
16 | class InvalidRequestError(OpenBTSError):
17 | """Raised upon invalid requests to Node Manager."""
18 | pass
19 |
20 | class InvalidResponseError(OpenBTSError):
21 | """Invalid zmq response."""
22 | pass
23 |
24 | class MalformedResponseError(OpenBTSError):
25 | """Invalid response body from OpenBTS"""
26 | pass
27 |
28 | class TimeoutError(OpenBTSError):
29 | """Zmq socket timeout."""
30 | pass
31 |
--------------------------------------------------------------------------------
/openbts-python/openbts/tests/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
10 | from __future__ import absolute_import
11 | from __future__ import division
12 | from __future__ import print_function
13 | from __future__ import unicode_literals
14 | import os
15 |
16 |
17 | def get_fixture_path(name):
18 | ''' Get the path to the specified test fixture '''
19 | return os.path.join(os.path.dirname(__file__), 'fixtures', name)
20 |
--------------------------------------------------------------------------------
/openbts-python/openbts/tests/fixtures/load.txt:
--------------------------------------------------------------------------------
1 | == GSM ==
2 | SDCCH load/available: 2/4
3 | TCH/F load/available: 1/3
4 | PCH load: active, total: 3, 7
5 | AGCH load: active, pending: 5, 9
6 | == GPRS ==
7 | current PDCHs: 4
8 | utilization: 41%
9 |
--------------------------------------------------------------------------------
/openbts-python/openbts/tests/fixtures/load_low_gprs.txt:
--------------------------------------------------------------------------------
1 | == GSM ==
2 | SDCCH load/available: 2/4
3 | TCH/F load/available: 1/3
4 | PCH load: active, total: 3, 7
5 | AGCH load: active, pending: 5, 9
6 | == GPRS ==
7 | current PDCHs: 4
8 | utilization: 5.0933e-07%
9 |
--------------------------------------------------------------------------------
/openbts-python/openbts/tests/fixtures/noise.txt:
--------------------------------------------------------------------------------
1 | noise RSSI is -72 dB wrt full scale
2 | MS RSSI target is -55 dB wrt full scale
3 | INFO: the current noise level is acceptable.
4 |
5 |
--------------------------------------------------------------------------------
/openbts-python/openbts/tests/mocks.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
10 | class MockEnvoy(object):
11 | """Mocking the envoy package."""
12 |
13 | def __init__(self, return_text):
14 | self.return_text = return_text
15 |
16 | class Response(object):
17 | """Mock envoy response."""
18 |
19 | def __init__(self, return_text):
20 | self.std_out = return_text
21 | self.status_code = 0
22 |
23 | def run(self, *args, **kwargs):
24 | return self.Response(self.return_text)
25 |
--------------------------------------------------------------------------------
/openbts-python/pylintrc:
--------------------------------------------------------------------------------
1 | # The default pylint settings for this repo.
2 | # Note that the bracketed headings are required.
3 | #
4 | # See these sites for a large example pylintrc that disables certain warnings:
5 | # docutils.sourceforge.net/sandbox/py-rest-doc/utils/pylintrc
6 | # github.com/nijel/weblate/blob/master/pylint.rc
7 |
8 |
9 | [FORMAT]
10 | # No more than 79 chars as per PEP8. The style guide says 80 but 79 works
11 | # better on github.
12 | max-line-length = 79
13 | # The string used as indentation unit.
14 | indent-string=' '
15 | # Spaces of indent required inside a hanging or continued line
16 | indent-after-paren=2
17 |
18 |
19 | [MESSAGES CONTROL]
20 | # Reference messages by id (in parens) or code:
21 | # http://pylint-messages.wikidot.com/all-codes
22 | disable = too-many-locals, too-few-public-methods, star-args
23 |
24 |
25 | [REPORTS]
26 | # Disable the reporting and just show messages.
27 | reports=no
28 |
--------------------------------------------------------------------------------
/openbts-python/requirements.txt:
--------------------------------------------------------------------------------
1 | argparse==1.2.1
2 | coverage==3.7.1
3 | enum34==1.0.4
4 | envoy==0.0.3
5 | mock==1.0.1
6 | nose==1.3.4
7 | pyzmq==14.5.0
8 | wsgiref==0.1.2
9 |
--------------------------------------------------------------------------------
/osmocom-python/osmocom/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
--------------------------------------------------------------------------------
/osmocom-python/osmocom/gsup/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
--------------------------------------------------------------------------------
/osmocom-python/osmocom/gsup/crypto/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/osmocom-python/osmocom/gsup/crypto/__init__.py
--------------------------------------------------------------------------------
/osmocom-python/osmocom/gsup/crypto/utils.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
10 |
11 | class CryptoError(Exception):
12 | """
13 | Represents any error triggered during a crypto operation.
14 | """
15 | pass
16 |
--------------------------------------------------------------------------------
/osmocom-python/osmocom/gsup/protocols/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/osmocom-python/osmocom/gsup/protocols/__init__.py
--------------------------------------------------------------------------------
/osmocom-python/osmocom/gsup/store/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/osmocom-python/osmocom/gsup/store/__init__.py
--------------------------------------------------------------------------------
/osmocom-python/osmocom/gsup/store/protos/Makefile:
--------------------------------------------------------------------------------
1 | CURRENT_DIR :=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
2 | DST_DIR := ./
3 | SRC_DIR := $(CURRENT_DIR)
4 | grpcio-tools:
5 | pip3 install "grpcio-tools>=1.0.0"
6 | pip3 install "protobuf>=3.0.0"
7 |
8 | protos: grpcio-tools *.proto
9 | @echo "Generating python code for .proto files"
10 | python3 $(SRC_DIR)/gen_protos.py $(SRC_DIR) $(SRC_DIR) $(DST_DIR)
11 |
--------------------------------------------------------------------------------
/osmocom-python/osmocom/gsup/store/protos/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/osmocom-python/osmocom/gsup/store/protos/__init__.py
--------------------------------------------------------------------------------
/osmocom-python/osmocom/vty/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
--------------------------------------------------------------------------------
/osmocom-python/osmocom/vty/exceptions.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
10 | from sys import exc_info
11 |
12 | class VTYException(Exception):
13 | pass
14 |
15 | class VTYChainedException(VTYException):
16 | """
17 | Wrap errors raised by the VTY socket connection so they can be caught
18 | without needing to know all the types of exceptions that it can raise
19 | """
20 | def __init__(self, inner):
21 |
22 | super(VTYException, self).__init__(
23 | "chained exception - %s(%s): %s" %
24 | (inner.__class__.__name__, inner, exc_info()[2]))
25 |
--------------------------------------------------------------------------------
/osmocom-python/requirements-dev.txt:
--------------------------------------------------------------------------------
1 | mock>=2.0.0
2 | nose>=1.3.7
3 | pbr>=4.0.2
4 | six>=1.11.0
5 |
--------------------------------------------------------------------------------
/osmocom-python/requirements.txt:
--------------------------------------------------------------------------------
1 | protobuf>=3.5.2
2 |
--------------------------------------------------------------------------------
/osmocom-python/tests/gsup/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/osmocom-python/tests/gsup/__init__.py
--------------------------------------------------------------------------------
/osmocom-python/tests/gsup/crypto/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/osmocom-python/tests/gsup/crypto/__init__.py
--------------------------------------------------------------------------------
/osmocom-python/tests/gsup/protocols/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/osmocom-python/tests/gsup/protocols/__init__.py
--------------------------------------------------------------------------------
/osmocom-python/tests/gsup/store/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/osmocom-python/tests/gsup/store/__init__.py
--------------------------------------------------------------------------------
/osmocom-python/tests/vty/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
10 |
11 |
12 |
13 |
14 | import os
15 |
16 |
17 | def get_fixture_path(name):
18 | ''' Get the path to the specified test fixture '''
19 | return os.path.join(os.path.dirname(__file__), 'fixtures', name)
20 |
--------------------------------------------------------------------------------
/osmocom-python/tests/vty/fixtures/README.licensing:
--------------------------------------------------------------------------------
1 | The files in this directory are used for testing. They contain the output from
2 | Osmocom software. These test fixtures are part of CCM and are licensed under
3 | the BSD-style license found in the LICENSE file in the root directory of this
4 | source tree. An additional grant of patent rights can be found in the PATENTS
5 | file in the same directory.
6 |
--------------------------------------------------------------------------------
/osmocom-python/tests/vty/fixtures/bts_get.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/osmocom-python/tests/vty/fixtures/bts_get.txt
--------------------------------------------------------------------------------
/osmocom-python/tests/vty/fixtures/bts_set.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/osmocom-python/tests/vty/fixtures/bts_set.txt
--------------------------------------------------------------------------------
/osmocom-python/tests/vty/fixtures/network_get.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/osmocom-python/tests/vty/fixtures/network_get.txt
--------------------------------------------------------------------------------
/osmocom-python/tests/vty/fixtures/network_set.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/osmocom-python/tests/vty/fixtures/network_set.txt
--------------------------------------------------------------------------------
/osmocom-python/tests/vty/fixtures/network_set_invalid.txt:
--------------------------------------------------------------------------------
1 | Welcome to the OpenBSC control interface
2 |
3 | Copyright (C) 2008-2012 Harald Welte, Holger Freyther
4 | Contributions by Daniel Willmann, Jan Lübbe, Stefan Schmidt
5 | Dieter Spaar, Andreas Eversberg, Sylvain Munaut
6 |
7 | License AGPLv3+: GNU AGPL version 3 or later
8 | This is free software: you are free to change and redistribute it.
9 | There is NO WARRANTY, to the extent permitted by law.
10 | ������"��OpenBSC>
11 | OpenBSC> enable
12 | OpenBSC# configure terminal
13 | OpenBSC(config)# network
14 | OpenBSC(config-net)# short name Invalid Space
15 | % Unknown command.
16 | OpenBSC(config-net)#
17 | OpenBSC(config-net)# write
18 | Configuration saved to openbsc.conf
19 | OpenBSC(config-net)# exit
20 | OpenBSC(config)# exit
21 | OpenBSC# disable
22 | OpenBSC>
23 |
--------------------------------------------------------------------------------
/osmocom-python/tests/vty/fixtures/running_config.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/osmocom-python/tests/vty/fixtures/running_config.txt
--------------------------------------------------------------------------------
/osmocom-python/tests/vty/fixtures/subscriber_create.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/osmocom-python/tests/vty/fixtures/subscriber_create.txt
--------------------------------------------------------------------------------
/osmocom-python/tests/vty/fixtures/subscriber_delete.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/osmocom-python/tests/vty/fixtures/subscriber_delete.txt
--------------------------------------------------------------------------------
/osmocom-python/tests/vty/fixtures/subscriber_delete_error.txt:
--------------------------------------------------------------------------------
1 | Welcome to the OpenBSC control interface
2 |
3 | Copyright (C) 2008-2012 Harald Welte, Holger Freyther
4 | Contributions by Daniel Willmann, Jan Lübbe, Stefan Schmidt
5 | Dieter Spaar, Andreas Eversberg, Sylvain Munaut
6 |
7 | License AGPLv3+: GNU AGPL version 3 or later
8 | This is free software: you are free to change and redistribute it.
9 | There is NO WARRANTY, to the extent permitted by law.
10 | OpenBSC>
11 | OpenBSC> enable
12 | OpenBSC# subscriber imsi 901550000000001 delete
13 | % No subscriber found for imsi 901550000000001
14 | OpenBSC# disable
15 | OpenBSC>
16 |
--------------------------------------------------------------------------------
/osmocom-python/tests/vty/fixtures/subscriber_get.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/osmocom-python/tests/vty/fixtures/subscriber_get.txt
--------------------------------------------------------------------------------
/osmocom-python/tests/vty/fixtures/subscriber_get_error.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/osmocom-python/tests/vty/fixtures/subscriber_get_error.txt
--------------------------------------------------------------------------------
/osmocom-python/tests/vty/fixtures/subscriber_get_test_imsi.txt:
--------------------------------------------------------------------------------
1 | Welcome to the OpenBSC control interface
2 |
3 | Copyright (C) 2008-2012 Harald Welte, Holger Freyther
4 | Contributions by Daniel Willmann, Jan Lübbe, Stefan Schmidt
5 | Dieter Spaar, Andreas Eversberg, Sylvain Munaut
6 |
7 | License AGPLv3+: GNU AGPL version 3 or later
8 | This is free software: you are free to change and redistribute it.
9 | There is NO WARRANTY, to the extent permitted by law.
10 | ÿûÿûÿþ"ÿýOpenBSC>
11 | OpenBSC> show subscriber imsi 001501252002526
12 | ID: 2, Authorized: 1
13 | Name: 'Omar'
14 | Extension: 5722543
15 | LAC: 0/0x0
16 | IMSI: 1501252002526
17 | Expiration Time: Wed, 31 Dec 1969 16:00:00 -0800
18 | Paging: not paging Requests: 0
19 | Use count: 1
20 | OpenBSC>
21 |
--------------------------------------------------------------------------------
/osmocom-python/tests/vty/fixtures/subscriber_set.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/osmocom-python/tests/vty/fixtures/subscriber_set.txt
--------------------------------------------------------------------------------
/osmocom-python/tests/vty/fixtures/subscriber_set_error.txt:
--------------------------------------------------------------------------------
1 | Welcome to the OpenBSC control interface
2 |
3 | Copyright (C) 2008-2012 Harald Welte, Holger Freyther
4 | Contributions by Daniel Willmann, Jan Lübbe, Stefan Schmidt
5 | Dieter Spaar, Andreas Eversberg, Sylvain Munaut
6 |
7 | License AGPLv3+: GNU AGPL version 3 or later
8 | This is free software: you are free to change and redistribute it.
9 | There is NO WARRANTY, to the extent permitted by law.
10 | OpenBSC>
11 | OpenBSC> enable
12 | OpenBSC# subscriber imsi 901550000000111 authorized 1
13 | % No subscriber found for imsi 901550000000111
14 | OpenBSC# disable
15 | OpenBSC>
16 |
--------------------------------------------------------------------------------
/osmocom-python/tests/vty/fixtures/trx_get.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebookarchive/CommunityCellularManager/e633771e4089dbff10de3f27c94101201a578e8b/osmocom-python/tests/vty/fixtures/trx_get.txt
--------------------------------------------------------------------------------
/osmocom-python/tests/vty/fixtures/trx_set.txt:
--------------------------------------------------------------------------------
1 | Welcome to the OpenBSC control interface
2 |
3 | Copyright (C) 2008-2012 Harald Welte, Holger Freyther
4 | Contributions by Daniel Willmann, Jan Lübbe, Stefan Schmidt
5 | Dieter Spaar, Andreas Eversberg, Sylvain Munaut
6 |
7 | License AGPLv3+: GNU AGPL version 3 or later
8 | This is free software: you are free to change and redistribute it.
9 | There is NO WARRANTY, to the extent permitted by law.
10 | OpenBSC>
11 | OpenBSC> enable
12 | OpenBSC# configure terminal
13 | OpenBSC(config)# network
14 | OpenBSC(config-net)# bts 0
15 | OpenBSC(config-net-bts)# trx 0
16 | OpenBSC(config-net-bts-trx)# arfcn 1
17 | OpenBSC(config-net-bts-trx)# write
18 | Can't backup old configuration file /home/vagrant/osmocom/openbsc.conf.sav.
19 | OpenBSC(config-net-bts-trx)# exit
20 | OpenBSC(config-net-bts)# exit
21 | OpenBSC(config-net)# exit
22 | OpenBSC(config)# exit
23 | OpenBSC# disable
24 | OpenBSC>
25 |
--------------------------------------------------------------------------------
/sms_utilities/.gitignore:
--------------------------------------------------------------------------------
1 | *.pyc
2 | *.egg-info
3 | dist/
4 | .coverage
5 | build/
6 |
--------------------------------------------------------------------------------
/sms_utilities/MANIFEST.in:
--------------------------------------------------------------------------------
1 | include readme.md
2 | include requirements.txt
3 |
--------------------------------------------------------------------------------
/sms_utilities/requirements.txt:
--------------------------------------------------------------------------------
1 | smspdu==1.1
2 |
--------------------------------------------------------------------------------
/sms_utilities/sms_utilities/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Copyright (c) 2016-present, Facebook, Inc.
3 | All rights reserved.
4 |
5 | This source code is licensed under the BSD-style license found in the
6 | LICENSE file in the root directory of this source tree. An additional grant
7 | of patent rights can be found in the PATENTS file in the same directory.
8 | """
9 |
10 | """Core modules."""
11 |
12 | from . import rpdu, SMS_Deliver, SMS_Helper, SMS_Parse, SMS_Submit
13 |
--------------------------------------------------------------------------------
/smspdu/README.txt:
--------------------------------------------------------------------------------
1 | For documentation please "pydoc smspdu". The same documentation is available
2 | at http://pypi.python.org/pypi/smspdu
3 |
4 | To run its tests use "python -m html".
5 |
6 | To install under Python 2:
7 |
8 | % python setup.py install
9 |
10 | To install under Python 3:
11 |
12 | % python3 setup.py build install
13 |
--------------------------------------------------------------------------------