[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
Wed Sep 15 08:01:33 CDT 2010


branch "master" has been updated
       via  d81eced6ca8c2edea22bb5e491c2244624a2b9c4 (commit)
       via  0c19a1d81c1227f8385fa76cdf037c373c8bfc12 (commit)
       via  ea5a74e0b9b0920c614c65cea8b5a7947d5ed856 (commit)
      from  f73f78192ac31a578416a7dab314b9585b86eaee (commit)

Summary of changes:
 config/test_sip.conf |    8 ++++++--
 src/SipEndpoint.cpp  |    2 +-
 src/SipSession.cpp   |   32 +++++++++++++++++++++++++++++++-
 3 files changed, 38 insertions(+), 4 deletions(-)


- Log -----------------------------------------------------------------
commit d81eced6ca8c2edea22bb5e491c2244624a2b9c4
Author: Joshua Colp <jcolp at digium.com>
Date:   Wed Sep 15 10:04:40 2010 -0300

    Populate the session information class with an actual state that matches reality. The other fields remain unpopulated.

diff --git a/src/SipSession.cpp b/src/SipSession.cpp
index 8ac8930..56fd9ea 100644
--- a/src/SipSession.cpp
+++ b/src/SipSession.cpp
@@ -188,7 +188,37 @@ AsteriskSCF::SessionCommunications::V1::SessionEndpointPrx SipSession::getEndpoi
  */
 AsteriskSCF::SessionCommunications::V1::SessionInfoPtr SipSession::getInfo(const Ice::Current&)
 {
-   AsteriskSCF::SessionCommunications::V1::SessionInfoPtr sessioninfo;
+   AsteriskSCF::SessionCommunications::V1::SessionInfoPtr sessioninfo = new AsteriskSCF::SessionCommunications::V1::SessionInfo();
+
+   if (!mImplPriv->mInviteSession || mImplPriv->mInviteSession->state == PJSIP_INV_STATE_NULL)
+   {
+      sessioninfo->currentState = "ready";
+   }
+   else if (mImplPriv->mInviteSession->state == PJSIP_INV_STATE_CALLING)
+   {
+      sessioninfo->currentState = "outbound";
+   }
+   else if (mImplPriv->mInviteSession->state == PJSIP_INV_STATE_INCOMING)
+   {
+      sessioninfo->currentState = "inbound";
+   }
+   else if (mImplPriv->mInviteSession->state == PJSIP_INV_STATE_EARLY)
+   {
+      sessioninfo->currentState = "early";
+   }
+   else if (mImplPriv->mInviteSession->state == PJSIP_INV_STATE_CONNECTING)
+   {
+      sessioninfo->currentState = "connecting";
+   }
+   else if (mImplPriv->mInviteSession->state == PJSIP_INV_STATE_CONFIRMED)
+   {
+      sessioninfo->currentState = "connected";
+   }
+   else if (mImplPriv->mInviteSession->state == PJSIP_INV_STATE_DISCONNECTED)
+   {
+      sessioninfo->currentState = "disconnected";
+   }
+
    return sessioninfo;
 }
 

commit 0c19a1d81c1227f8385fa76cdf037c373c8bfc12
Author: Joshua Colp <jcolp at digium.com>
Date:   Wed Sep 15 10:02:17 2010 -0300

    Whoops, can't forget to allow bidirectional calls for my test endpoint.

diff --git a/config/test_sip.conf b/config/test_sip.conf
index bbec012..bfc472a 100644
--- a/config/test_sip.conf
+++ b/config/test_sip.conf
@@ -22,5 +22,6 @@ Sip.Endpoints=cisco 18005558355
 # This is Josh's phone
 Sip.Endpoint.cisco.Session.CallDirection=Both
 
+Sip.Endpoint.18005558355.Session.CallDirection=Both
 Sip.Endpoint.18005558355.Session.SourceAddress=172.16.1.13
 Sip.Endpoint.18005558355.Transport.Address=172.16.1.10

commit ea5a74e0b9b0920c614c65cea8b5a7947d5ed856
Author: Joshua Colp <jcolp at digium.com>
Date:   Wed Sep 15 09:47:39 2010 -0300

    Fix configuration reading.

diff --git a/config/test_sip.conf b/config/test_sip.conf
index e0f0240..bbec012 100644
--- a/config/test_sip.conf
+++ b/config/test_sip.conf
@@ -17,7 +17,10 @@ LocatorService.Proxy=LocatorService:tcp -p 4411
 Sip.Modules=Session
 
 # Endpoints that we know about
-Sip.Endpoints=cisco
+Sip.Endpoints=cisco 18005558355
 
 # This is Josh's phone
-Sip.Endpointcisco.Session.CallDirection=Both
+Sip.Endpoint.cisco.Session.CallDirection=Both
+
+Sip.Endpoint.18005558355.Session.SourceAddress=172.16.1.13
+Sip.Endpoint.18005558355.Transport.Address=172.16.1.10
diff --git a/src/SipEndpoint.cpp b/src/SipEndpoint.cpp
index d964ec1..34d7fbd 100644
--- a/src/SipEndpoint.cpp
+++ b/src/SipEndpoint.cpp
@@ -119,7 +119,7 @@ void SipEndpoint::setTransportConfiguration(Ice::PropertyDict props)
 
 void SipEndpoint::setSessionConfiguration(Ice::PropertyDict props)
 {
-	std::string prefix("Sip.Endpoint");
+	std::string prefix("Sip.Endpoint.");
 	prefix.append(mImplPriv->mName);
 	prefix.append(".Session.");
 	Ice::PropertyDict::iterator direction = props.find(prefix + "CallDirection");

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


-- 
asterisk-scf/integration/sip.git



More information about the asterisk-scf-commits mailing list