[asterisk-scf-commits] asterisk-scf/integration/media_rtp_pjmedia.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:53:13 CDT 2011


branch "modular-transport-refactor" has been updated
       via  38a7ef028c1a0fa6e8e02aa969fbc43413a14aa3 (commit)
      from  165e325093382173c129f80a7d125ffa52be8622 (commit)

Summary of changes:
 config/RtpConfigurator.py |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)


- Log -----------------------------------------------------------------
commit 38a7ef028c1a0fa6e8e02aa969fbc43413a14aa3
Author: Brent Eagles <beagles at digium.com>
Date:   Wed Jun 29 09:21:53 2011 -0230

    Fixup configuration script to support config properties.

diff --git a/config/RtpConfigurator.py b/config/RtpConfigurator.py
index 018a1e0..2b63946 100755
--- a/config/RtpConfigurator.py
+++ b/config/RtpConfigurator.py
@@ -53,6 +53,35 @@ class RtpSectionVisitors(Configurator.SectionVisitors):
 
         self.groups.append(group)
 
+    def visit_rtpoverice(self, config, section):
+        group = AsteriskSCF.Configuration.MediaRTPPJMedia.V1.RTPICEConfigurationGroup()
+        group.configurationItems = { }
+
+        mapper = Configurator.OptionMapper()
+
+        stunServerItem = AsteriskSCF.Configuration.MediaRTPPJMedia.V1.STUNServerItem()
+        mapper.map('stunserverhost', stunServerItem, 'address', AsteriskSCF.Configuration.MediaRTPPJMedia.V1.STUNServerItemName, config.get, None)
+        mapper.map('stunserverport', stunServerItem, 'port', AsteriskSCF.Configuration.MediaRTPPJMedia.V1.STUNServerItemName, config.getint, 3478)
+        
+        turnServerItem = AsteriskSCF.Configuration.MediaRTPPJMedia.V1.TURNServerItem()
+        mapper.map('turnserverhost', turnServerItem, 'address', AsteriskSCF.Configuration.MediaRTPPJMedia.V1.TURNServerItemName, config.get, None)
+        mapper.map('turnserverport', turnServerItem, 'port', AsteriskSCF.Configuration.MediaRTPPJMedia.V1.TURNServerItemName, config.getint, 3478)
+
+        rtpOverICEItem = AsteriskSCF.Configuration.MediaRTPPJMedia.V1.RTPICETransportFlagsItem()
+        mapper.map('rtpovericeenable', rtpOverICEItem, 'enableICE', AsteriskSCF.Configuration.MediaRTPPJMedia.V1.RTPICETransportFlagsItemName, config.get, None)
+        mapper.map('rtpovericewithturn', rtpOverICEItem, 'enableTURN', AsteriskSCF.Configuration.MediaRTPPJMedia.V1.RTPICETransportFlagsItemName, config.get, None)
+
+        rtpICELimits = AsteriskSCF.Configuration.MediaRTPPJMedia.V1.RTPICETransportLimitsItem()
+        mapper.map('rtpicemaxcandidates', rtpICELimits, 'maxCandidates', AsteriskSCF.Configuration.MediaRTPPJMedia.V1.RTPICELimitsItemName, config.getint, 10)
+        mapper.map('rtpicemaxcalls', rtpICELimits, 'maxCalls', AsteriskSCF.Configuration.MediaRTPPJMedia.V1.RTPICELimitsItemName, config.getint, 50)
+
+        for option in config.options(section):
+            mapper.execute(group, section, option)
+
+        mapper.finish(group)
+
+        self.groups.append(group)
+
 # In order to do service locator based lookup we need to pass in a params object
 serviceLocatorParams = AsteriskSCF.Configuration.MediaRTPPJMedia.V1.RtpConfigurationParams()
 serviceLocatorParams.category = AsteriskSCF.Configuration.MediaRTPPJMedia.V1.ConfigurationDiscoveryCategory

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/media_rtp_pjmedia.git



More information about the asterisk-scf-commits mailing list