[asterisk-scf-commits] asterisk-scf/integration/sip.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Thu Oct 21 19:15:41 CDT 2010


branch "master" has been updated
       via  b55c0debb55b0b9f43f9a63116c5f558d15aece7 (commit)
      from  44058534d36001e9c805c774f640151d166c68cb (commit)

Summary of changes:
 config/test_sip.conf         |    4 ++++
 src/SipChannelServiceApp.cpp |    4 +++-
 2 files changed, 7 insertions(+), 1 deletions(-)


- Log -----------------------------------------------------------------
commit b55c0debb55b0b9f43f9a63116c5f558d15aece7
Author: Mark Michelson <mmichelson at digium.com>
Date:   Thu Oct 21 19:17:19 2010 -0500

    Add configuration property for Routing ID.
    
    If multiple active SIP components are to be used, it is important
    that each registers with separate identities so that the routing
    service can consistently route to the correct instance for specific
    endpoints.

diff --git a/config/test_sip.conf b/config/test_sip.conf
index be1bcce..7c108a5 100644
--- a/config/test_sip.conf
+++ b/config/test_sip.conf
@@ -20,6 +20,10 @@ LocatorServiceManagement.Proxy=LocatorServiceManagement:tcp -p 4422
 # A proxy to the service locator service
 LocatorService.Proxy=LocatorService:tcp -p 4411
 
+# ID to use when registering with the routing service
+# Useful if registering multiple active SIP session managers
+Sip.RoutingId=pjsip
+
 # PJSIP Modules to register
 Sip.Modules=Session
 
diff --git a/src/SipChannelServiceApp.cpp b/src/SipChannelServiceApp.cpp
index d1d7d76..a553c10 100644
--- a/src/SipChannelServiceApp.cpp
+++ b/src/SipChannelServiceApp.cpp
@@ -317,8 +317,10 @@ void SipChannelService::registerWithRoutingService()
 
    mEndpointFactory->generateRoutingDestinations(destinations);
 
+   std::string routingId = mCommunicator->getProperties()->getPropertyWithDefault("Sip.RoutingId", "pjsip");
+
    EndpointLocatorPrx locator = EndpointLocatorPrx::uncheckedCast(mGlobalAdapter->createDirectProxy(mCommunicator->stringToIdentity(EndpointLocatorObjectId)));
-   mRoutingServiceLocatorRegistry->addEndpointLocator("pjsip", destinations, locator);
+   mRoutingServiceLocatorRegistry->addEndpointLocator(routingId, destinations, locator);
 }
 
 /**

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


-- 
asterisk-scf/integration/sip.git



More information about the asterisk-scf-commits mailing list