[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
Mon Sep 13 08:48:41 CDT 2010
branch "master" has been updated
via 41f321fc6a05642f7818d07d90a5788b01d9d323 (commit)
from 26887fd9e1a87935620e949174f6655288305d0a (commit)
Summary of changes:
src/SipChannelServiceApp.cpp | 3 +--
src/SipEndpointFactory.cpp | 9 +++++++++
src/SipEndpointFactory.h | 2 ++
3 files changed, 12 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit 41f321fc6a05642f7818d07d90a5788b01d9d323
Author: Joshua Colp <jcolp at digium.com>
Date: Mon Sep 13 10:54:37 2010 -0300
Add configured endpoints to the routing service and not just a dummy one.
diff --git a/src/SipChannelServiceApp.cpp b/src/SipChannelServiceApp.cpp
index 55d33a0..6e3f471 100644
--- a/src/SipChannelServiceApp.cpp
+++ b/src/SipChannelServiceApp.cpp
@@ -318,8 +318,7 @@ void SipChannelServiceApp::registerWithRoutingService()
{
RegExSeq destinations;
- // Based on configuration we should populate destinations but for now just have destination 100 for testing
- destinations.push_back("18005558355");
+ mDataModelInstance.mEndpointFactory->generateRoutingDestinations(destinations);
EndpointLocatorPrx locator = EndpointLocatorPrx::uncheckedCast(mAdapter->createDirectProxy(communicator()->stringToIdentity(EndpointLocatorObjectId)));
mDataModelInstance.mRoutingServiceLocatorRegistry->addEndpointLocator("pjsip", destinations, locator);
diff --git a/src/SipEndpointFactory.cpp b/src/SipEndpointFactory.cpp
index cfa0648..e9d7240 100644
--- a/src/SipEndpointFactory.cpp
+++ b/src/SipEndpointFactory.cpp
@@ -43,5 +43,14 @@ SipEndpointPtr SipEndpointFactory::findByName(std::string endpointName)
return 0;
}
+void SipEndpointFactory::generateRoutingDestinations(AsteriskSCF::Core::Routing::V1::RegExSeq& destinations)
+{
+ std::vector<SipEndpointPtr>::iterator iter;
+ for (iter = mEndpoints.begin(); iter != mEndpoints.end(); ++ iter)
+ {
+ destinations.push_back((*iter)->getName());
+ }
+}
+
}; // end SipChannelService
}; // end AsteriskSCF
diff --git a/src/SipEndpointFactory.h b/src/SipEndpointFactory.h
index f1b6d19..d8977f8 100644
--- a/src/SipEndpointFactory.h
+++ b/src/SipEndpointFactory.h
@@ -35,6 +35,8 @@ SipEndpointFactory(Ice::ObjectAdapterPtr adapter) : mAdapter(adapter) { };
void remove(SipEndpointPtr);
SipEndpointPtr findByName(std::string endpointName);
+
+ void generateRoutingDestinations(AsteriskSCF::Core::Routing::V1::RegExSeq&);
private:
/**
* A pointer to the object adapter that endpoints will be added to.
-----------------------------------------------------------------------
--
asterisk-scf/integration/sip.git
More information about the asterisk-scf-commits
mailing list