[asterisk-scf-commits] asterisk-scf/release/sip.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Sat Jun 25 14:26:53 CDT 2011
branch "master" has been updated
via 85f9eed8c9e2add8d2cb62a7a5b84f5ec9e67bd5 (commit)
from 4cc73e761cbe287f3d79572a07054d22316e665a (commit)
Summary of changes:
config/SipConfigurator.py | 62 ++++++++++++++++++++++----------------------
1 files changed, 31 insertions(+), 31 deletions(-)
- Log -----------------------------------------------------------------
commit 85f9eed8c9e2add8d2cb62a7a5b84f5ec9e67bd5
Author: Joshua Colp <jcolp at digium.com>
Date: Sat Jun 25 16:27:03 2011 -0300
Update to support namespace change and moving of files.
diff --git a/config/SipConfigurator.py b/config/SipConfigurator.py
index 980cded..7db7217 100755
--- a/config/SipConfigurator.py
+++ b/config/SipConfigurator.py
@@ -19,26 +19,26 @@
# Sip configurator
# Bring in the common configuration infrastructure
-import Ice, Configurator, sys
+import Ice, Configurator, sys, os
# Load our component specific configuration definitions
-Ice.loadSlice('-I. -I/opt/Ice-3.4.1/slice -I../../slice --all ../local-slice/SipConfigurationIf.ice')
-import AsteriskSCF.SIP.V1
+Ice.loadSlice("-I" + os.environ["ASTSCF_HOME"] + " -I" + Ice.getSliceDir() + " --all ../slice/AsteriskSCF/Configuration/SipSessionManager/SipConfigurationIf.ice")
+import AsteriskSCF.Configuration.SipSessionManager.V1
# Add our own visitor implementations for the sections we support
class SipSectionVisitors(Configurator.SectionVisitors):
def visit_general(self, config, section):
- group = AsteriskSCF.SIP.V1.SipGeneralGroup()
+ group = AsteriskSCF.Configuration.SipSessionManager.V1.SipGeneralGroup()
group.configurationItems = { }
self.groups.append(group)
def visit_transport_udp(self, config, section):
- group = AsteriskSCF.SIP.V1.SipUDPTransportGroup()
+ group = AsteriskSCF.Configuration.SipSessionManager.V1.SipUDPTransportGroup()
group.name = section
group.configurationItems = { }
mapper = Configurator.OptionMapper()
- item = AsteriskSCF.SIP.V1.SipHostItem()
+ item = AsteriskSCF.Configuration.SipSessionManager.V1.SipHostItem()
mapper.map('host', item, 'host', 'address', config.get, None)
mapper.map('port', item, 'port', 'address', config.getint, 5060)
for option in config.options(section):
@@ -49,12 +49,12 @@ class SipSectionVisitors(Configurator.SectionVisitors):
self.groups.append(group)
def visit_transport_tcp(self, config, section):
- group = AsteriskSCF.SIP.V1.SipTCPTransportGroup()
+ group = AsteriskSCF.Configuration.SipSessionManager.V1.SipTCPTransportGroup()
group.name = section
group.configurationItems = { }
mapper = Configurator.OptionMapper()
- item = AsteriskSCF.SIP.V1.SipHostItem()
+ item = AsteriskSCF.Configuration.SipSessionManager.V1.SipHostItem()
mapper.map('host', item, 'host', 'address', config.get, None)
mapper.map('port', item, 'port', 'address', config.getint, 5060)
for option in config.options(section):
@@ -65,12 +65,12 @@ class SipSectionVisitors(Configurator.SectionVisitors):
self.groups.append(group)
def visit_transport_tls(self, config, section):
- group = AsteriskSCF.SIP.V1.SipTLSTransportGroup()
+ group = AsteriskSCF.Configuration.SipSessionManager.V1.SipTLSTransportGroup()
group.name = section
group.configurationItems = { }
mapper = Configurator.OptionMapper()
- item = AsteriskSCF.SIP.V1.SipHostItem()
+ item = AsteriskSCF.Configuration.SipSessionManager.V1.SipHostItem()
mapper.map('host', item, 'host', 'address', config.get, None)
mapper.map('port', item, 'port', 'address', config.getint, 5060)
for option in config.options(section):
@@ -81,19 +81,19 @@ class SipSectionVisitors(Configurator.SectionVisitors):
self.groups.append(group)
def visit_endpoint(self, config, section):
- group = AsteriskSCF.SIP.V1.SipEndpointGroup()
+ group = AsteriskSCF.Configuration.SipSessionManager.V1.SipEndpointGroup()
group.name = section
group.configurationItems = { }
mapper = Configurator.OptionMapper()
- mapper.map('routing', AsteriskSCF.SIP.V1.SipRoutingItem(), 'routingServiceName', 'routingService', config.get, None)
+ mapper.map('routing', AsteriskSCF.Configuration.SipSessionManager.V1.SipRoutingItem(), 'routingServiceName', 'routingService', config.get, None)
- item = AsteriskSCF.SIP.V1.SipSourceTransportAddressItem()
+ item = AsteriskSCF.Configuration.SipSessionManager.V1.SipSourceTransportAddressItem()
mapper.map('sourcehost', item, 'host', 'sourceaddress', config.get, None)
mapper.map('sourceport', item, 'port', 'sourceaddress', config.getint, 5060)
- item = AsteriskSCF.SIP.V1.SipTargetDestinationAddressItem()
+ item = AsteriskSCF.Configuration.SipSessionManager.V1.SipTargetDestinationAddressItem()
mapper.map('targethost', item, 'host', 'targetaddress', config.get, None)
mapper.map('targetport', item, 'port', 'targetaddress', config.getint, 5060)
@@ -102,35 +102,35 @@ class SipSectionVisitors(Configurator.SectionVisitors):
self.config = config
def get(self, section, item):
if self.config.get(section, item) == 'inbound':
- return AsteriskSCF.SIP.V1.SipAllowableCallDirection.Inbound
+ return AsteriskSCF.Configuration.SipSessionManager.V1.SipAllowableCallDirection.Inbound
elif self.config.get(section, item) == 'outbound':
- return AsteriskSCF.SIP.V1.SipAllowableCallDirection.Outbound
+ return AsteriskSCF.Configuration.SipSessionManager.V1.SipAllowableCallDirection.Outbound
elif self.config.get(section, item) == 'both':
- return AsteriskSCF.SIP.V1.SipAllowableCallDirection.Both
+ return AsteriskSCF.Configuration.SipSessionManager.V1.SipAllowableCallDirection.Both
elif self.config.get(section, item) == 'none':
- return AsteriskSCF.SIP.V1.SipAllowableCallDirection.Disabled
+ return AsteriskSCF.Configuration.SipSessionManager.V1.SipAllowableCallDirection.Disabled
transformer = AllowableCallDirectionTransformer(config)
- mapper.map('direction', AsteriskSCF.SIP.V1.SipAllowableCallDirectionItem(), 'callDirection', 'callDirection', transformer.get, None)
+ mapper.map('direction', AsteriskSCF.Configuration.SipSessionManager.V1.SipAllowableCallDirectionItem(), 'callDirection', 'callDirection', transformer.get, None)
- mapper.map('securetransport', AsteriskSCF.SIP.V1.SipEndpointTransportItem(), 'secureTransport', 'transport', transformer.get, None)
+ mapper.map('securetransport', AsteriskSCF.Configuration.SipSessionManager.V1.SipEndpointTransportItem(), 'secureTransport', 'transport', transformer.get, None)
- item = AsteriskSCF.SIP.V1.SipRTPMediaServiceItem()
+ item = AsteriskSCF.Configuration.SipSessionManager.V1.SipRTPMediaServiceItem()
mapper.map('rtpoveripv6', item, 'requireIPv6', 'mediaservice', config.getboolean, None)
- item = AsteriskSCF.SIP.V1.SipCryptoCertificateItem()
+ item = AsteriskSCF.Configuration.SipSessionManager.V1.SipCryptoCertificateItem()
mapper.map('certificateauthorityfile', item, 'certificateAuthority', 'cryptocert', config.get, None)
mapper.map('certificatefile', item, 'certificate', 'cryptocert', config.get, None)
mapper.map('privatekeyfile', item, 'privateKey', 'cryptocert', config.get, None)
mapper.map('privatekeypassword', item, 'privateKeyPassword', 'cryptocert', config.get, None)
- item = AsteriskSCF.SIP.V1.SipCryptoRequirementsItem()
+ item = AsteriskSCF.Configuration.SipSessionManager.V1.SipCryptoRequirementsItem()
mapper.map('requireverifiedserver', item, 'requireVerifiedServer', 'cryptorequirements', config.getboolean, None)
mapper.map('requireverifiedclient', item, 'requireVerifiedClient', 'cryptorequirements', config.getboolean, None)
mapper.map('requireclientcertificate', item, 'requireClientCertificate', 'cryptorequirements', config.getboolean, None)
- item = AsteriskSCF.SIP.V1.SipCryptoItem()
+ item = AsteriskSCF.Configuration.SipSessionManager.V1.SipCryptoItem()
mapper.map('supportedciphers', item, 'supportedCiphers', 'crypto', config.get, None)
mapper.map('tlsservername', item, 'serverName', 'crypto', config.get, None)
mapper.map('tlstimeout', item, 'timeout', 'crypto', config.getint, None)
@@ -140,15 +140,15 @@ class SipSectionVisitors(Configurator.SectionVisitors):
self.config = config
def get(self, section, item):
if self.config.get(section, item) == 'unspecified':
- return AsteriskSCF.SIP.V1.TLSProtocolMethod.PROTOCOLMETHODUNSPECIFIED
+ return AsteriskSCF.Configuration.SipSessionManager.V1.TLSProtocolMethod.PROTOCOLMETHODUNSPECIFIED
elif self.config.get(section, item) == 'tlsv1':
- return AsteriskSCF.SIP.V1.TLSProtocolMethod.PROTOCOLMETHODTLSV1
+ return AsteriskSCF.Configuration.SipSessionManager.V1.TLSProtocolMethod.PROTOCOLMETHODTLSV1
elif self.config.get(section, item) == 'sslv2':
- return AsteriskSCF.SIP.V1.TLSProtocolMethod.PROTOCOLMETHODTSSLV2
+ return AsteriskSCF.Configuration.SipSessionManager.V1.TLSProtocolMethod.PROTOCOLMETHODTSSLV2
elif self.config.get(section, item) == 'sslv3':
- return AsteriskSCF.SIP.V1.TLSProtocolMethod.PROTOCOLMETHODSSLV3
+ return AsteriskSCF.Configuration.SipSessionManager.V1.TLSProtocolMethod.PROTOCOLMETHODSSLV3
elif self.config.get(section, item) == 'sslv23':
- return AsteriskSCF.SIP.V1.TLSProtocolMethod.PROTOCOLMETHODSSLV23
+ return AsteriskSCF.Configuration.SipSessionManager.V1.TLSProtocolMethod.PROTOCOLMETHODSSLV23
transformer = TLSProtocolMethodTransformer(config)
mapper.map('tlsprotocolmethod', item, 'protocolMethod', 'crypto', transformer.get, None)
@@ -170,8 +170,8 @@ class SipSectionVisitors(Configurator.SectionVisitors):
self.visit_endpoint(config, section)
# In order to do service locator based lookup we need to pass in a params object
-serviceLocatorParams = AsteriskSCF.SIP.V1.SipConfigurationParams()
-serviceLocatorParams.category = AsteriskSCF.SIP.V1.ConfigurationDiscoveryCategory
+serviceLocatorParams = AsteriskSCF.Configuration.SipSessionManager.V1.SipConfigurationParams()
+serviceLocatorParams.category = AsteriskSCF.Configuration.SipSessionManager.V1.ConfigurationDiscoveryCategory
# Make a configurator application and let it run
app = Configurator.ConfiguratorApp('Sip.config', SipSectionVisitors(), None, serviceLocatorParams)
-----------------------------------------------------------------------
--
asterisk-scf/release/sip.git
More information about the asterisk-scf-commits
mailing list