[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 22 08:33:58 CDT 2010


branch "master" has been updated
       via  1ac6c37311cae4c867170448ba66a62278a2c9aa (commit)
      from  f6c5d04774ec99050fbb7146a56946bd14120504 (commit)

Summary of changes:
 local-slice/SipStateReplicationIf.ice |   23 +++++++++++++++++++++++
 src/SipStateReplicatorListener.cpp    |   11 ++++++++++-
 2 files changed, 33 insertions(+), 1 deletions(-)


- Log -----------------------------------------------------------------
commit 1ac6c37311cae4c867170448ba66a62278a2c9aa
Author: Joshua Colp <jcolp at digium.com>
Date:   Wed Sep 22 10:36:50 2010 -0300

    Add the beginning of the invite session state item. This is not yet complete as it does not include the copies of packets the invite session keeps.

diff --git a/local-slice/SipStateReplicationIf.ice b/local-slice/SipStateReplicationIf.ice
index f723e0e..90297ed 100644
--- a/local-slice/SipStateReplicationIf.ice
+++ b/local-slice/SipStateReplicationIf.ice
@@ -60,6 +60,29 @@ module V1
 	  bool mIsUac;
    };
 
+   enum InviteSessionState
+   {
+      // This enumeration is based on pjsip_inv_state
+      InviteSessionStateNull,
+      InviteSessionStateCalling,
+      InviteSessionStateIncoming,
+      InviteSessionStateEarly,
+      InviteSessionStateConnecting,
+      InviteSessionStateConfirmed,
+      InviteSessionStateDisconnected
+   };
+
+   class SipInviteSessionStateItem extends SipStateItem
+   {
+      InviteSessionState mCurrentState;
+      bool mCancelling;
+      bool mPendingCancel;
+      int mCause;
+      string mCauseText;
+      bool mNotify;
+      int mLastAckCseq;
+   };
+
    enum TransactionState
    {
       //This enumeration is based on the pjsip_tsx_state_e
diff --git a/src/SipStateReplicatorListener.cpp b/src/SipStateReplicatorListener.cpp
index 7e0229e..ab9d25b 100644
--- a/src/SipStateReplicatorListener.cpp
+++ b/src/SipStateReplicatorListener.cpp
@@ -60,6 +60,7 @@ public:
 	 std::map<std::string, boost::shared_ptr<SipStateReplicatorItem> >::iterator i = mStateItems.find((*item)->mSessionId);
 	 SipSessionStateItemPtr session;
 	 SipDialogStateItemPtr dialog;
+	 SipInviteSessionStateItemPtr invitesession;
 	 SipTransactionStateItemPtr transaction;
 	 boost::shared_ptr<SipStateReplicatorItem> localitem;
 
@@ -148,13 +149,21 @@ public:
 
 	    // TODO: Handle mTransport, which is rather difficult since transport is decided on a packet basis... do we even need it?
 	 }
-	 else if ((transaction = SipTransactionStateItemPtr::dynamicCast((*item))))
+	 else if ((invitesession = SipInviteSessionStateItemPtr::dynamicCast((*item))))
 	 {
 	    // This check also needs to look for the dialog
 	    if (i == mStateItems.end())
 	    {
 	       continue;
 	    }
+	 }
+	 else if ((transaction = SipTransactionStateItemPtr::dynamicCast((*item))))
+	 {
+	    // This check also needs to look for the dialog and invite session
+	    if (i == mStateItems.end())
+	    {
+	       continue;
+	    }
 	    localitem = i->second;
 	 }
       }

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


-- 
asterisk-scf/integration/sip.git



More information about the asterisk-scf-commits mailing list