Compare commits
3 Commits
d23c1fbedb
...
6d016d272f
Author | SHA1 | Date | |
---|---|---|---|
6d016d272f | |||
9571f38965 | |||
c21f8f0e16 |
6
docs/extension/multiple-rfps.md
Normal file
6
docs/extension/multiple-rfps.md
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# Multiple RFPs
|
||||||
|
|
||||||
|
The [network setup described in the install section](../install/network.md) already accounts for multiple RFPs.
|
||||||
|
Just add more to the same LAN.
|
||||||
|
The DHCP options tell the other RFPs where they find the OMM.
|
||||||
|
The additional RFPs show up in the OMM and have to be activated manually.
|
10
docs/reference/ywsd.md
Normal file
10
docs/reference/ywsd.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# YWSD
|
||||||
|
|
||||||
|
FieldPOC is using [Yate Wähl System Digital](https://github.com/eventphone/ywsd) for call routing.
|
||||||
|
|
||||||
|
The routes are stored in a PostgreSQL database that is populated by FieldPOC.
|
||||||
|
Actual routing is handled by the YWSD software that is started as part of FieldPOC.
|
||||||
|
|
||||||
|
When FieldPOC stopped, YWSD is stopped to.
|
||||||
|
Therefore running calls will continue as long as everything else is working.
|
||||||
|
But new calls can not be established.
|
@ -1,12 +1,18 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
class ConfigBase:
|
class ConfigBase:
|
||||||
|
_DEFAULTS = {}
|
||||||
|
|
||||||
def __init__(self, c):
|
def __init__(self, c):
|
||||||
self._c = c
|
self._c = c
|
||||||
|
|
||||||
def __getattr__(self, name):
|
def __getattr__(self, name):
|
||||||
|
# check if key is in config
|
||||||
if name in self._c.keys():
|
if name in self._c.keys():
|
||||||
return self._c.get(name)
|
return self._c.get(name)
|
||||||
|
# check if key is in default config
|
||||||
|
elif name in self._DEFAULTS.keys():
|
||||||
|
return self._DEFAULTS.get(name)
|
||||||
else:
|
else:
|
||||||
raise AttributeError()
|
raise AttributeError()
|
||||||
|
|
||||||
@ -20,6 +26,10 @@ class DatabaseConfig(ConfigBase):
|
|||||||
|
|
||||||
|
|
||||||
class DectConfig(ConfigBase):
|
class DectConfig(ConfigBase):
|
||||||
|
_DEFAULTS = {
|
||||||
|
"enabled": True,
|
||||||
|
}
|
||||||
|
|
||||||
def __init__(self, c):
|
def __init__(self, c):
|
||||||
self._c = c
|
self._c = c
|
||||||
|
|
||||||
@ -30,7 +40,9 @@ class ExtensionsConfig(ConfigBase):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
class YateConfig(ConfigBase):
|
class YateConfig(ConfigBase):
|
||||||
pass
|
_DEFAULTS = {
|
||||||
|
"enabled": True,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
|
@ -42,13 +42,15 @@ class FieldPOC:
|
|||||||
logger.info("initialising threads")
|
logger.info("initialising threads")
|
||||||
self.threads = {
|
self.threads = {
|
||||||
"controller": threading.Thread(target=self._controller.run),
|
"controller": threading.Thread(target=self._controller.run),
|
||||||
"dect": threading.Thread(target=self._dect.run),
|
"dect": threading.Thread(target=self._dect.run) if self.config.dect.enabled == True else None,
|
||||||
"routing": threading.Thread(target=self._routing.run),
|
"routing": threading.Thread(target=self._routing.run),
|
||||||
"ywsd": threading.Thread(target=self._ywsd.run, daemon=True),
|
"ywsd": threading.Thread(target=self._ywsd.run, daemon=True) if self.config.yate.enabled == True else None,
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set thread names
|
# Set thread names
|
||||||
for name, thread in self.threads.items():
|
for name, thread in self.threads.items():
|
||||||
|
if thread is None:
|
||||||
|
continue
|
||||||
thread.name = name
|
thread.name = name
|
||||||
|
|
||||||
def queue_all(self, msg):
|
def queue_all(self, msg):
|
||||||
@ -79,6 +81,8 @@ class FieldPOC:
|
|||||||
logger.info("starting threads")
|
logger.info("starting threads")
|
||||||
|
|
||||||
for name, thread in self.threads.items():
|
for name, thread in self.threads.items():
|
||||||
|
if thread is None:
|
||||||
|
continue
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
logger.info("started threads")
|
logger.info("started threads")
|
||||||
|
@ -7,12 +7,14 @@
|
|||||||
"port": 9437
|
"port": 9437
|
||||||
},
|
},
|
||||||
"dect": {
|
"dect": {
|
||||||
|
"enabled": false,
|
||||||
"host": "10.222.222.11",
|
"host": "10.222.222.11",
|
||||||
"username": "omm",
|
"username": "omm",
|
||||||
"password": "xxx",
|
"password": "xxx",
|
||||||
"sipsecret": "51df84aace052b0e75b8c1da5a6da9e2"
|
"sipsecret": "51df84aace052b0e75b8c1da5a6da9e2"
|
||||||
},
|
},
|
||||||
"yate": {
|
"yate": {
|
||||||
|
"enabled": false,
|
||||||
"host": "127.0.0.1",
|
"host": "127.0.0.1",
|
||||||
"port": 5039
|
"port": 5039
|
||||||
},
|
},
|
||||||
|
@ -18,8 +18,10 @@ nav:
|
|||||||
- reference/configuration.md
|
- reference/configuration.md
|
||||||
- reference/extensions.md
|
- reference/extensions.md
|
||||||
- reference/controller.md
|
- reference/controller.md
|
||||||
|
- reference/ywsd.md
|
||||||
- Operation:
|
- Operation:
|
||||||
- operation/claim-dect-extension.md
|
- operation/claim-dect-extension.md
|
||||||
- operation/troubleshooting.md
|
- operation/troubleshooting.md
|
||||||
- Extend:
|
- Extend:
|
||||||
- extension/nerd.md
|
- extension/nerd.md
|
||||||
|
- extension/multiple-rfps.md
|
||||||
|
Loading…
Reference in New Issue
Block a user