[asterisk-scf-commits] asterisk-scf/integration/sip.git branch "modular-transport-refactor" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Wed Jun 29 06:54:27 CDT 2011
branch "modular-transport-refactor" has been updated
via 9c3967be554742f817d7c5e798f1cb5f3f8341b1 (commit)
from 6b1dcf996494c7f590078c51913e9e498280e481 (commit)
Summary of changes:
config/SipConfigurator.py | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
- Log -----------------------------------------------------------------
commit 9c3967be554742f817d7c5e798f1cb5f3f8341b1
Author: Brent Eagles <beagles at digium.com>
Date: Wed Jun 29 09:23:35 2011 -0230
Fixup configuration script to support new properties
diff --git a/config/SipConfigurator.py b/config/SipConfigurator.py
index 7db7217..284c30d 100755
--- a/config/SipConfigurator.py
+++ b/config/SipConfigurator.py
@@ -80,6 +80,27 @@ class SipSectionVisitors(Configurator.SectionVisitors):
self.groups.append(group)
+ def visit_transport_stun(self, config, section):
+ group = AsteriskSCF.Configuration.SipSessionManager.V1.SipSTUNTransportGroup()
+ group.name = section
+ group.configurationItems = {}
+ mapper = Configurator.OptionMapper()
+
+ item = AsteriskSCF.Configuration.SipSessionManager.V1.SipSignalingSTUNHostItem()
+ mapper.map('stunhost', item, 'address', 'stunServer', config.get, None)
+ mapper.map('stunport', item, 'port', 'stunServer', config.getint, 3478)
+
+ item = AsteriskSCF.Configuration.SipSessionManager.V1.SipHostItem()
+ mapper.map('baseaddress', item, 'host', 'baseAddress', config.get, None)
+ mapper.map('baseport', item, 'port', 'baseAddress', config.getint, 4512)
+
+ for option in config.options(section):
+ mapper.execute(group, section, option)
+
+ mapper.finish(group)
+
+ self.groups.append(group)
+
def visit_endpoint(self, config, section):
group = AsteriskSCF.Configuration.SipSessionManager.V1.SipEndpointGroup()
group.name = section
@@ -97,6 +118,13 @@ class SipSectionVisitors(Configurator.SectionVisitors):
mapper.map('targethost', item, 'host', 'targetaddress', config.get, None)
mapper.map('targetport', item, 'port', 'targetaddress', config.getint, 5060)
+ item = AsteriskSCF.Configuration.SipSessionManager.V1.SipSignalingNATItem()
+ mapper.map('enablestun', item, 'stun', 'enableSTUN', config.get, None)
+
+ item = AsteriskSCF.Configuration.SipSessionManager.V1.SipMediaNATItem()
+ mapper.map('enablertpoverice', item, 'enableICE', 'enableRTPICE', config.get, None)
+ mapper.map('enableturn', item, 'enableTURN', 'enableRTPICE', config.get, None)
+
class AllowableCallDirectionTransformer():
def __init__(self, config):
self.config = config
-----------------------------------------------------------------------
--
asterisk-scf/integration/sip.git
More information about the asterisk-scf-commits
mailing list