SMS server setup: Perbedaan revisi
(Created page with "== Overview == This document describes the steps required to configure a Rasberry Pi computer as an SMS server, connected via the internet to the iSIKHNAS database server. A ...") |
|||
Baris 1: | Baris 1: | ||
− | = | + | =SMS Server Setup= |
− | + | The SMS server is managed by SMSTools3, and is installed on the Messaging server in the AWS Virtual Private Cloud. A second installation is present on the training (Sidecar) server. | |
− | == | + | ==Configuration file== |
− | + | The contents of smsd.conf on the live server are as follows (IP addresss removed) | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | == | + | # New Server smsd.conf |
− | + | ||
− | + | devices = SOV*4009-4024 | |
− | + | ||
− | + | logfile = /var/log/smstools/smsd.log | |
− | + | loglevel = 5 | |
− | + | smart_logging = yes | |
− | + | ||
− | + | stats = /var/spool/sms/stats | |
− | + | outgoing = /var/spool/sms/outgoing | |
− | + | checked = /var/spool/sms/checked | |
− | + | incoming = /var/spool/sms/incoming | |
− | + | infofile = /var/run/smstools/smsd.working | |
− | + | pidfile = /var/run/smstools/smsd.pid | |
− | + | failed = /var/spool/sms/failed | |
− | # | + | sent = /var/spool/sms/sent |
− | + | ||
− | + | errorsleeptime = 3 | |
− | + | # eventhandler for incoming messages | |
− | + | eventhandler = /home/smsd/sms_in.sh | |
− | + | # regular run to send new messages with msgid of 0 | |
− | + | regular_run = /home/smsd/sms_rr.sh | |
− | + | regular_run_interval = 300 | |
− | + | user = smsd | |
− | + | group = dialout | |
− | + | ||
− | + | [queues] | |
− | + | MAIN = /var/spool/sms/queues/MAIN | |
− | + | OTHER = /var/spool/sms/queues/OTHER | |
− | + | HALO = /var/spool/sms/queues/HALO | |
− | + | SOV4009 = /var/spool/sms/queues/SOV4009 | |
− | + | SOV4010 = /var/spool/sms/queues/SOV4010 | |
− | + | SOV4011 = /var/spool/sms/queues/SOV4011 | |
− | = | + | SOV4012 = /var/spool/sms/queues/SOV4012 |
− | === | + | SOV4013 = /var/spool/sms/queues/SOV4013 |
− | + | SOV4014 = /var/spool/sms/queues/SOV4014 | |
− | + | SOV4015 = /var/spool/sms/queues/SOV4015 | |
− | + | SOV4016 = /var/spool/sms/queues/SOV4016 | |
− | + | SOV4017 = /var/spool/sms/queues/SOV4017 | |
− | + | SOV4018 = /var/spool/sms/queues/SOV4018 | |
− | + | SOV4019 = /var/spool/sms/queues/SOV4019 | |
− | == | + | SOV4020 = /var/spool/sms/queues/SOV4020 |
− | + | SOV4021 = /var/spool/sms/queues/SOV4021 | |
− | + | SOV4022 = /var/spool/sms/queues/SOV4022 | |
− | + | SOV4023 = /var/spool/sms/queues/SOV4023 | |
− | + | SOV4024 = /var/spool/sms/queues/SOV4024 | |
− | + | ||
− | == | + | [providers] |
− | + | # telkomsel | |
− | + | MAIN = 62811, 62812, 62813, 62821, 62822, 62823, 62852, 62853 | |
− | + | # non-telkomsel | |
− | + | OTHER = 628 | |
− | + | # other (primarily interntational - could be expensive so use postpaid) | |
− | + | HALO = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 | |
− | = | + | # short numbers - admin. |
− | + | SOV4017 = s | |
− | + | ||
− | + | [default] | |
− | + | regular_run_interval = 300 | |
− | + | queues = modemname, MAIN, OTHER | |
− | == | + | socket_connection_retries = -1 |
− | + | socket_connection_errorsleeptime = 20 | |
− | + | socket_connection_alarm_after = 10 | |
− | + | ||
− | + | [SOV4009] | |
− | + | device = @103.24.105.19:4009 | |
− | + | incoming = yes | |
− | + | regular_run = /var/spool/sms/regular_run/SOV4009.sh | |
− | + | regular_run_post_run = /var/spool/sms/regular_run/SOV4009.sh | |
− | + | regular_run_cmdfile = /var/spool/sms/regular_run/SOV4009.cmdfile | |
− | == | + | regular_run_statfile = /var/spool/sms/regular_run/SOV4009.statfile |
− | + | ||
− | + | [SOV4010] | |
− | + | device = @103.24.105.19:4010 | |
− | + | incoming = yes | |
− | + | regular_run = /var/spool/sms/regular_run/SOV4010.sh | |
− | + | regular_run_post_run = /var/spool/sms/regular_run/SOV4010.sh | |
− | + | regular_run_cmdfile = /var/spool/sms/regular_run/SOV4010.cmdfile | |
− | + | regular_run_statfile = /var/spool/sms/regular_run/SOV4010.statfile | |
− | + | ||
− | + | [SOV4011] | |
− | + | device = @103.24.105.19:4011 | |
− | + | incoming = yes | |
− | + | regular_run = /var/spool/sms/regular_run/SOV4011.sh | |
− | + | regular_run_post_run = /var/spool/sms/regular_run/SOV4011.sh | |
− | + | regular_run_cmdfile = /var/spool/sms/regular_run/SOV4011.cmdfile | |
− | + | regular_run_statfile = /var/spool/sms/regular_run/SOV4011.statfile | |
− | + | ||
− | + | [SOV4012] | |
− | + | device = @103.24.105.19:4012 | |
− | + | incoming = yes | |
− | + | regular_run = /var/spool/sms/regular_run/SOV4012.sh | |
− | + | regular_run_post_run = /var/spool/sms/regular_run/SOV4012.sh | |
− | + | regular_run_cmdfile = /var/spool/sms/regular_run/SOV4012.cmdfile | |
− | + | regular_run_statfile = /var/spool/sms/regular_run/SOV4012.statfile | |
− | + | ||
− | + | [SOV4013] | |
− | = | + | device = @103.24.105.19:4013 |
− | + | incoming = yes | |
− | + | regular_run = /var/spool/sms/regular_run/SOV4013.sh | |
− | + | regular_run_post_run = /var/spool/sms/regular_run/SOV4013.sh | |
− | + | regular_run_cmdfile = /var/spool/sms/regular_run/SOV4013.cmdfile | |
− | + | regular_run_statfile = /var/spool/sms/regular_run/SOV4013.statfile | |
− | + | ||
− | + | [SOV4014] | |
− | + | device = @103.24.105.19:4014 | |
− | === | + | incoming = yes |
− | + | regular_run = /var/spool/sms/regular_run/SOV4014.sh | |
− | + | regular_run_post_run = /var/spool/sms/regular_run/SOV4014.sh | |
− | + | regular_run_cmdfile = /var/spool/sms/regular_run/SOV4014.cmdfile | |
− | + | regular_run_statfile = /var/spool/sms/regular_run/SOV4014.statfile | |
− | + | ||
− | + | [SOV4015] | |
− | + | device = @103.24.105.19:4015 | |
− | + | incoming = yes | |
− | + | regular_run = /var/spool/sms/regular_run/SOV4015.sh | |
− | + | regular_run_post_run = /var/spool/sms/regular_run/SOV4015.sh | |
− | + | regular_run_cmdfile = /var/spool/sms/regular_run/SOV4015.cmdfile | |
− | + | regular_run_statfile = /var/spool/sms/regular_run/SOV4015.statfile | |
− | + | ||
− | + | [SOV4016] | |
− | + | device = @103.24.105.19:4016 | |
− | + | incoming = yes | |
− | + | regular_run = /var/spool/sms/regular_run/SOV4016.sh | |
− | + | regular_run_post_run = /var/spool/sms/regular_run/SOV4016.sh | |
− | + | regular_run_cmdfile = /var/spool/sms/regular_run/SOV4016.cmdfile | |
− | + | regular_run_statfile = /var/spool/sms/regular_run/SOV4016.statfile | |
− | + | ||
− | + | # main incoming modem | |
− | + | [SOV4017] | |
− | + | device = @103.24.105.19:4017 | |
− | + | incoming = high | |
− | + | queues = SOV4017, HALO | |
− | + | regular_run = /var/spool/sms/regular_run/SOV4017.sh | |
− | + | regular_run_post_run = /var/spool/sms/regular_run/SOV4017.sh | |
− | + | regular_run_cmdfile = /var/spool/sms/regular_run/SOV4017.cmdfile | |
− | + | regular_run_statfile = /var/spool/sms/regular_run/SOV4017.statfile | |
− | + | ||
− | + | [SOV4018] | |
− | + | device = @103.24.105.19:4018 | |
− | + | incoming = yes | |
− | [ | + | regular_run = /var/spool/sms/regular_run/SOV4018.sh |
− | + | regular_run_post_run = /var/spool/sms/regular_run/SOV4018.sh | |
− | + | regular_run_cmdfile = /var/spool/sms/regular_run/SOV4018.cmdfile | |
− | + | regular_run_statfile = /var/spool/sms/regular_run/SOV4018.statfile | |
− | + | ||
− | + | [SOV4019] | |
− | + | device = @103.24.105.19:4019 | |
− | + | incoming = yes | |
− | + | regular_run = /var/spool/sms/regular_run/SOV4019.sh | |
− | + | regular_run_post_run = /var/spool/sms/regular_run/SOV4019.sh | |
− | + | regular_run_cmdfile = /var/spool/sms/regular_run/SOV4019.cmdfile | |
− | + | regular_run_statfile = /var/spool/sms/regular_run/SOV4019.statfile | |
− | + | ||
− | + | [SOV4020] | |
− | + | device = @103.24.105.19:4020 | |
− | + | incoming = yes | |
− | + | regular_run = /var/spool/sms/regular_run/SOV4020.sh | |
− | + | regular_run_post_run = /var/spool/sms/regular_run/SOV4020.sh | |
− | + | regular_run_cmdfile = /var/spool/sms/regular_run/SOV4020.cmdfile | |
− | + | regular_run_statfile = /var/spool/sms/regular_run/SOV4020.statfile | |
− | + | ||
− | + | [SOV4021] | |
− | / | + | device = @103.24.105.19:4021 |
− | + | incoming = yes | |
− | + | regular_run = /var/spool/sms/regular_run/SOV4021.sh | |
− | + | regular_run_post_run = /var/spool/sms/regular_run/SOV4021.sh | |
− | + | regular_run_cmdfile = /var/spool/sms/regular_run/SOV4021.cmdfile | |
− | + | regular_run_statfile = /var/spool/sms/regular_run/SOV4021.statfile | |
− | + | ||
− | + | [SOV4022] | |
− | + | device = @103.24.105.19:4022 | |
− | + | incoming = yes | |
− | + | regular_run = /var/spool/sms/regular_run/SOV4022.sh | |
− | + | regular_run_post_run = /var/spool/sms/regular_run/SOV4022.sh | |
− | + | regular_run_cmdfile = /var/spool/sms/regular_run/SOV4022.cmdfile | |
− | + | regular_run_statfile = /var/spool/sms/regular_run/SOV4022.statfile | |
− | + | ||
− | + | [SOV4023] | |
− | + | device = @103.24.105.19:4023 | |
− | + | incoming = yes | |
− | + | regular_run = /var/spool/sms/regular_run/SOV4023.sh | |
− | + | regular_run_post_run = /var/spool/sms/regular_run/SOV4023.sh | |
− | + | regular_run_cmdfile = /var/spool/sms/regular_run/SOV4023.cmdfile | |
− | + | regular_run_statfile = /var/spool/sms/regular_run/SOV4023.statfile | |
− | + | ||
− | + | [SOV4024] | |
− | + | device = @103.24.105.19:4024 | |
− | + | incoming = yes | |
− | + | regular_run = /var/spool/sms/regular_run/SOV4024.sh | |
− | + | regular_run_post_run = /var/spool/sms/regular_run/SOV4024.sh | |
− | + | regular_run_cmdfile = /var/spool/sms/regular_run/SOV4024.cmdfile | |
− | + | regular_run_statfile = /var/spool/sms/regular_run/SOV4024.statfile | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | = | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | = | ||
− | |||
− | |||
− | === | ||
− | |||
− | |||
− | |||
− | |||
− |
Revisi per 2 September 2014 22.06
SMS Server Setup
The SMS server is managed by SMSTools3, and is installed on the Messaging server in the AWS Virtual Private Cloud. A second installation is present on the training (Sidecar) server.
Configuration file
The contents of smsd.conf on the live server are as follows (IP addresss removed)
# New Server smsd.conf devices = SOV*4009-4024 logfile = /var/log/smstools/smsd.log loglevel = 5 smart_logging = yes stats = /var/spool/sms/stats outgoing = /var/spool/sms/outgoing checked = /var/spool/sms/checked incoming = /var/spool/sms/incoming infofile = /var/run/smstools/smsd.working pidfile = /var/run/smstools/smsd.pid failed = /var/spool/sms/failed sent = /var/spool/sms/sent errorsleeptime = 3 # eventhandler for incoming messages eventhandler = /home/smsd/sms_in.sh # regular run to send new messages with msgid of 0 regular_run = /home/smsd/sms_rr.sh regular_run_interval = 300 user = smsd group = dialout [queues] MAIN = /var/spool/sms/queues/MAIN OTHER = /var/spool/sms/queues/OTHER HALO = /var/spool/sms/queues/HALO SOV4009 = /var/spool/sms/queues/SOV4009 SOV4010 = /var/spool/sms/queues/SOV4010 SOV4011 = /var/spool/sms/queues/SOV4011 SOV4012 = /var/spool/sms/queues/SOV4012 SOV4013 = /var/spool/sms/queues/SOV4013 SOV4014 = /var/spool/sms/queues/SOV4014 SOV4015 = /var/spool/sms/queues/SOV4015 SOV4016 = /var/spool/sms/queues/SOV4016 SOV4017 = /var/spool/sms/queues/SOV4017 SOV4018 = /var/spool/sms/queues/SOV4018 SOV4019 = /var/spool/sms/queues/SOV4019 SOV4020 = /var/spool/sms/queues/SOV4020 SOV4021 = /var/spool/sms/queues/SOV4021 SOV4022 = /var/spool/sms/queues/SOV4022 SOV4023 = /var/spool/sms/queues/SOV4023 SOV4024 = /var/spool/sms/queues/SOV4024 [providers] # telkomsel MAIN = 62811, 62812, 62813, 62821, 62822, 62823, 62852, 62853 # non-telkomsel OTHER = 628 # other (primarily interntational - could be expensive so use postpaid) HALO = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 # short numbers - admin. SOV4017 = s [default] regular_run_interval = 300 queues = modemname, MAIN, OTHER socket_connection_retries = -1 socket_connection_errorsleeptime = 20 socket_connection_alarm_after = 10 [SOV4009] device = @103.24.105.19:4009 incoming = yes regular_run = /var/spool/sms/regular_run/SOV4009.sh regular_run_post_run = /var/spool/sms/regular_run/SOV4009.sh regular_run_cmdfile = /var/spool/sms/regular_run/SOV4009.cmdfile regular_run_statfile = /var/spool/sms/regular_run/SOV4009.statfile [SOV4010] device = @103.24.105.19:4010 incoming = yes regular_run = /var/spool/sms/regular_run/SOV4010.sh regular_run_post_run = /var/spool/sms/regular_run/SOV4010.sh regular_run_cmdfile = /var/spool/sms/regular_run/SOV4010.cmdfile regular_run_statfile = /var/spool/sms/regular_run/SOV4010.statfile [SOV4011] device = @103.24.105.19:4011 incoming = yes regular_run = /var/spool/sms/regular_run/SOV4011.sh regular_run_post_run = /var/spool/sms/regular_run/SOV4011.sh regular_run_cmdfile = /var/spool/sms/regular_run/SOV4011.cmdfile regular_run_statfile = /var/spool/sms/regular_run/SOV4011.statfile [SOV4012] device = @103.24.105.19:4012 incoming = yes regular_run = /var/spool/sms/regular_run/SOV4012.sh regular_run_post_run = /var/spool/sms/regular_run/SOV4012.sh regular_run_cmdfile = /var/spool/sms/regular_run/SOV4012.cmdfile regular_run_statfile = /var/spool/sms/regular_run/SOV4012.statfile [SOV4013] device = @103.24.105.19:4013 incoming = yes regular_run = /var/spool/sms/regular_run/SOV4013.sh regular_run_post_run = /var/spool/sms/regular_run/SOV4013.sh regular_run_cmdfile = /var/spool/sms/regular_run/SOV4013.cmdfile regular_run_statfile = /var/spool/sms/regular_run/SOV4013.statfile [SOV4014] device = @103.24.105.19:4014 incoming = yes regular_run = /var/spool/sms/regular_run/SOV4014.sh regular_run_post_run = /var/spool/sms/regular_run/SOV4014.sh regular_run_cmdfile = /var/spool/sms/regular_run/SOV4014.cmdfile regular_run_statfile = /var/spool/sms/regular_run/SOV4014.statfile [SOV4015] device = @103.24.105.19:4015 incoming = yes regular_run = /var/spool/sms/regular_run/SOV4015.sh regular_run_post_run = /var/spool/sms/regular_run/SOV4015.sh regular_run_cmdfile = /var/spool/sms/regular_run/SOV4015.cmdfile regular_run_statfile = /var/spool/sms/regular_run/SOV4015.statfile [SOV4016] device = @103.24.105.19:4016 incoming = yes regular_run = /var/spool/sms/regular_run/SOV4016.sh regular_run_post_run = /var/spool/sms/regular_run/SOV4016.sh regular_run_cmdfile = /var/spool/sms/regular_run/SOV4016.cmdfile regular_run_statfile = /var/spool/sms/regular_run/SOV4016.statfile # main incoming modem [SOV4017] device = @103.24.105.19:4017 incoming = high queues = SOV4017, HALO regular_run = /var/spool/sms/regular_run/SOV4017.sh regular_run_post_run = /var/spool/sms/regular_run/SOV4017.sh regular_run_cmdfile = /var/spool/sms/regular_run/SOV4017.cmdfile regular_run_statfile = /var/spool/sms/regular_run/SOV4017.statfile [SOV4018] device = @103.24.105.19:4018 incoming = yes regular_run = /var/spool/sms/regular_run/SOV4018.sh regular_run_post_run = /var/spool/sms/regular_run/SOV4018.sh regular_run_cmdfile = /var/spool/sms/regular_run/SOV4018.cmdfile regular_run_statfile = /var/spool/sms/regular_run/SOV4018.statfile [SOV4019] device = @103.24.105.19:4019 incoming = yes regular_run = /var/spool/sms/regular_run/SOV4019.sh regular_run_post_run = /var/spool/sms/regular_run/SOV4019.sh regular_run_cmdfile = /var/spool/sms/regular_run/SOV4019.cmdfile regular_run_statfile = /var/spool/sms/regular_run/SOV4019.statfile [SOV4020] device = @103.24.105.19:4020 incoming = yes regular_run = /var/spool/sms/regular_run/SOV4020.sh regular_run_post_run = /var/spool/sms/regular_run/SOV4020.sh regular_run_cmdfile = /var/spool/sms/regular_run/SOV4020.cmdfile regular_run_statfile = /var/spool/sms/regular_run/SOV4020.statfile [SOV4021] device = @103.24.105.19:4021 incoming = yes regular_run = /var/spool/sms/regular_run/SOV4021.sh regular_run_post_run = /var/spool/sms/regular_run/SOV4021.sh regular_run_cmdfile = /var/spool/sms/regular_run/SOV4021.cmdfile regular_run_statfile = /var/spool/sms/regular_run/SOV4021.statfile [SOV4022] device = @103.24.105.19:4022 incoming = yes regular_run = /var/spool/sms/regular_run/SOV4022.sh regular_run_post_run = /var/spool/sms/regular_run/SOV4022.sh regular_run_cmdfile = /var/spool/sms/regular_run/SOV4022.cmdfile regular_run_statfile = /var/spool/sms/regular_run/SOV4022.statfile [SOV4023] device = @103.24.105.19:4023 incoming = yes regular_run = /var/spool/sms/regular_run/SOV4023.sh regular_run_post_run = /var/spool/sms/regular_run/SOV4023.sh regular_run_cmdfile = /var/spool/sms/regular_run/SOV4023.cmdfile regular_run_statfile = /var/spool/sms/regular_run/SOV4023.statfile [SOV4024] device = @103.24.105.19:4024 incoming = yes regular_run = /var/spool/sms/regular_run/SOV4024.sh regular_run_post_run = /var/spool/sms/regular_run/SOV4024.sh regular_run_cmdfile = /var/spool/sms/regular_run/SOV4024.cmdfile regular_run_statfile = /var/spool/sms/regular_run/SOV4024.statfile