[asterisk-scf-commits] asterisk-scf/release/media_rtp_pjmedia.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Thu Apr 12 11:15:50 CDT 2012
branch "master" has been updated
via a8c86f003e0cc8dd0d469504bdf7a476a6e4bb8b (commit)
from ad5863936a08a174c134c913483578b0bfef2be7 (commit)
Summary of changes:
config/RtpConfigurator.py | 66 ++++++++++++++++++++++----------------------
1 files changed, 33 insertions(+), 33 deletions(-)
- Log -----------------------------------------------------------------
commit a8c86f003e0cc8dd0d469504bdf7a476a6e4bb8b
Author: David M. Lee <dlee at digium.com>
Date: Thu Apr 12 11:14:45 2012 -0500
Ice.loadSlice -> astscfLoadSlice
Fixed several Rtp -> RTP issues, too.
diff --git a/config/RtpConfigurator.py b/config/RtpConfigurator.py
index a0f7ab7..5d7e4b9 100755
--- a/config/RtpConfigurator.py
+++ b/config/RtpConfigurator.py
@@ -3,7 +3,7 @@
#
# Asterisk SCF -- An open-source communications framework.
#
-# Copyright (C) 2011, Digium, Inc.
+# Copyright (C) 2011-2012, Digium, Inc.
#
# See http://www.asterisk.org for more information about
# the Asterisk SCF project. Please do not directly contact
@@ -16,38 +16,38 @@
# at the top of the source tree.
#
-# Rtp configurator
+# RTP configurator
# Bring in the common configuration infrastructure
import Ice, Configurator, sys, os
# Load our component specific configuration definitions
-Ice.loadSlice("-I" + os.environ["ASTSCF_HOME"] + " -I" + Ice.getSliceDir() + " --all ../slice/AsteriskSCF/Configuration/MediaRTPPJMedia/RtpConfigurationIf.ice")
-import AsteriskSCF.Configuration.MediaRTPPJMedia.V1
+Configurator.astscfLoadSlice("media_rtp_pjmedia", "AsteriskSCF/Configuration/MediaRTPPJMEDIA/RTPConfigurationIf.ice")
+import AsteriskSCF.Configuration.MediaRTPPJMEDIA.V1
# Add our own visitor implementations for the sections we support
-class RtpSectionVisitors(Configurator.SectionVisitors):
+class RTPSectionVisitors(Configurator.SectionVisitors):
def visit_general(self, config, section):
- group = AsteriskSCF.Configuration.MediaRTPPJMedia.V1.RtpGeneralGroup()
+ group = AsteriskSCF.Configuration.MediaRTPPJMEDIA.V1.RTPGeneralGroup()
group.configurationItems = { }
mapper = Configurator.OptionMapper()
- portsItem = AsteriskSCF.Configuration.MediaRTPPJMedia.V1.PortRangesItem()
- mapper.map('startport', portsItem, 'startPort', AsteriskSCF.Configuration.MediaRTPPJMedia.V1.PortRangesItemName, config.getint, 10000)
- mapper.map('endport', portsItem, 'endPort', AsteriskSCF.Configuration.MediaRTPPJMedia.V1.PortRangesItemName, config.getint, 20000)
+ portsItem = AsteriskSCF.Configuration.MediaRTPPJMEDIA.V1.PortRangesItem()
+ mapper.map('startport', portsItem, 'startPort', AsteriskSCF.Configuration.MediaRTPPJMEDIA.V1.PortRangesItemName, config.getint, 10000)
+ mapper.map('endport', portsItem, 'endPort', AsteriskSCF.Configuration.MediaRTPPJMEDIA.V1.PortRangesItemName, config.getint, 20000)
- workerItem = AsteriskSCF.Configuration.MediaRTPPJMedia.V1.WorkerThreadCountItem()
- mapper.map('workerthreadcount', workerItem, 'count', AsteriskSCF.Configuration.MediaRTPPJMedia.V1.WorkerThreadCountItemName, config.getint, 4)
+ workerItem = AsteriskSCF.Configuration.MediaRTPPJMEDIA.V1.WorkerThreadCountItem()
+ mapper.map('workerthreadcount', workerItem, 'count', AsteriskSCF.Configuration.MediaRTPPJMEDIA.V1.WorkerThreadCountItemName, config.getint, 4)
- ipv4BindingItem = AsteriskSCF.Configuration.MediaRTPPJMedia.V1.BindingIPv4Item()
- mapper.map('ipv4bind', ipv4BindingItem, 'address', AsteriskSCF.Configuration.MediaRTPPJMedia.V1.BindingIPv4AddressItemName, config.get, None)
+ ipv4BindingItem = AsteriskSCF.Configuration.MediaRTPPJMEDIA.V1.BindingIPv4Item()
+ mapper.map('ipv4bind', ipv4BindingItem, 'address', AsteriskSCF.Configuration.MediaRTPPJMEDIA.V1.BindingIPv4AddressItemName, config.get, None)
- ipv6BindingItem = AsteriskSCF.Configuration.MediaRTPPJMedia.V1.BindingIPv6Item()
- mapper.map('ipv6bind', ipv6BindingItem, 'address', AsteriskSCF.Configuration.MediaRTPPJMedia.V1.BindingIPv6AddressItemName, config.get, None)
+ ipv6BindingItem = AsteriskSCF.Configuration.MediaRTPPJMEDIA.V1.BindingIPv6Item()
+ mapper.map('ipv6bind', ipv6BindingItem, 'address', AsteriskSCF.Configuration.MediaRTPPJMEDIA.V1.BindingIPv6AddressItemName, config.get, None)
- srtpEnableItem = AsteriskSCF.Configuration.MediaRTPPJMedia.V1.EnableSRTPItem()
- mapper.map('enablesrtp', srtpEnableItem, 'enabled', AsteriskSCF.Configuration.MediaRTPPJMedia.V1.EnableSRTPItemName, config.get, True)
+ srtpEnableItem = AsteriskSCF.Configuration.MediaRTPPJMEDIA.V1.EnableSRTPItem()
+ mapper.map('enablesrtp', srtpEnableItem, 'enabled', AsteriskSCF.Configuration.MediaRTPPJMEDIA.V1.EnableSRTPItemName, config.get, True)
for option in config.options(section):
mapper.execute(group, section, option)
@@ -57,26 +57,26 @@ class RtpSectionVisitors(Configurator.SectionVisitors):
self.groups.append(group)
def visit_rtpoverice(self, config, section):
- group = AsteriskSCF.Configuration.MediaRTPPJMedia.V1.RTPICEConfigurationGroup()
+ 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)
+ 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)
+ 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)
+ 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)
+ 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)
@@ -86,9 +86,9 @@ class RtpSectionVisitors(Configurator.SectionVisitors):
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
+serviceLocatorParams = AsteriskSCF.Core.Discovery.V1.ServiceLocatorParams()
+serviceLocatorParams.category = AsteriskSCF.Configuration.MediaRTPPJMEDIA.V1.ConfigurationDiscoveryCategory
# Make a configurator application and let it run
-app = Configurator.ConfiguratorApp('Rtp.config', RtpSectionVisitors(), None, serviceLocatorParams)
+app = Configurator.ConfiguratorApp('RTP.config', RTPSectionVisitors(), None, serviceLocatorParams)
sys.exit(app.main(sys.argv))
-----------------------------------------------------------------------
--
asterisk-scf/release/media_rtp_pjmedia.git
More information about the asterisk-scf-commits
mailing list