[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 27 08:50:23 CDT 2010


branch "master" has been updated
       via  5733cc76b810439c7099114807f96849852dcf99 (commit)
      from  fbc440a50481867ea9be9661fc6171feff128704 (commit)

Summary of changes:
 src/PJSipSessionModule.cpp |   35 ++++++++++++++++++++++++++++++++++-
 1 files changed, 34 insertions(+), 1 deletions(-)


- Log -----------------------------------------------------------------
commit 5733cc76b810439c7099114807f96849852dcf99
Author: Joshua Colp <jcolp at digium.com>
Date:   Mon Sep 27 10:53:07 2010 -0300

    Add log messages which output contents of state items, this will be useful for debugging and will eventually be removed.

diff --git a/src/PJSipSessionModule.cpp b/src/PJSipSessionModule.cpp
index 28b76e5..64b0d21 100644
--- a/src/PJSipSessionModule.cpp
+++ b/src/PJSipSessionModule.cpp
@@ -244,32 +244,64 @@ static void replicateState(PJSipDialogModInfo *dlgInfo, PJSipTransactionModInfo
 {
 	SipStateItemSeq setItems;
 	Ice::StringSeq removeItems;
-	
+
+	std::cout << "========== Begin State Replication Dump ==========" << std::endl;
+
 	if (dlgInfo)
 	{
+		std::cout << "--- Begin Dialog " << dlgInfo->mDialogState->key << std::endl;
+		std::cout << "Callid: " << dlgInfo->mDialogState->mCallId << std::endl;
+		std::cout << "Is Dialog Established: " << dlgInfo->mDialogState->mIsDialogEstablished << std::endl;
+		std::cout << "Is Secure: " << dlgInfo->mDialogState->mIsSecure << std::endl;
+		std::cout << "Local CSeq: " << dlgInfo->mDialogState->mLocalCSeq << std::endl;
+		std::cout << "Local URI: " << dlgInfo->mDialogState->mLocalUri << std::endl;
+		std::cout << "Remote CSeq: " << dlgInfo->mDialogState->mRemoteCSeq << std::endl;
+		std::cout << "Remote URI: " << dlgInfo->mDialogState->mRemoteUri << std::endl;
+		std::cout << "Transport: " << dlgInfo->mDialogState->mTransport << std::endl;
+		std::cout << "UAC Has 2xx: " << dlgInfo->mDialogState->mUacHas2xx << std::endl;
+		std::cout << "Is Uac: " << dlgInfo->mDialogState->mIsUac << std::endl;
 		if (dlgInfo->mNeedsRemoval == true)
 		{
+			std::cout << "Removing dialog" << std::endl;
 			removeItems.push_back(dlgInfo->mDialogState->key);
 		}
 		else if (dlgInfo->mNeedsReplication == true)
 		{
+			std::cout << "Replicating dialog" << std::endl;
 			setItems.push_back(dlgInfo->mDialogState);
 			dlgInfo->mNeedsReplication = false;
 		}
+		std::cout << "--- End Dialog " << dlgInfo->mDialogState->key << std::endl;
 	}
 	if (sessionInfo)
 	{
+		std::cout << "--- Begin Session " << sessionInfo->mSessionState->key << std::endl;
+		std::cout << "Endpoint name: " << sessionInfo->mSessionState->mEndpointName << std::endl;
+		std::cout << "Session object identity: " << sessionInfo->mSessionState->mSessionObjectId.name << std::endl;
+		std::cout << "Media session object identity: " << sessionInfo->mSessionState->mMediaSessionObjectId.name << std::endl;
+		std::cout << "Media session: " << sessionInfo->mSessionState->mMediaSession << std::endl;
+		std::cout << "--- Begin Invite Session " << sessionInfo->mInviteState->key << std::endl;
+		std::cout << "Current state: " << sessionInfo->mInviteState->mCurrentState << std::endl;
+		std::cout << "Cancelling: " << sessionInfo->mInviteState->mCancelling << std::endl;
+		std::cout << "Pending cancel: " << sessionInfo->mInviteState->mPendingCancel << std::endl;
+		std::cout << "Cause: " << sessionInfo->mInviteState->mCause << std::endl;
+		std::cout << "Cause text: " << sessionInfo->mInviteState->mCauseText << std::endl;
+		std::cout << "Notify: " << sessionInfo->mInviteState->mNotify << std::endl;
+		std::cout << "Last Ack CSeq: " << sessionInfo->mInviteState->mLastAckCseq << std::endl;
 		if (sessionInfo->mNeedsRemoval == true)
 		{
 			removeItems.push_back(sessionInfo->mInviteState->key);
 			removeItems.push_back(sessionInfo->mSessionState->key);
+			std::cout << "Removing session and invite session" << std::endl;
 		}
 		else if (sessionInfo->mNeedsReplication == true)
 		{
 			setItems.push_back(sessionInfo->mInviteState);
 			setItems.insert(setItems.begin(), sessionInfo->mSessionState);
 			sessionInfo->mNeedsReplication = false;
+			std::cout << "Replicating session and invite session" << std::endl;
 		}
+		std::cout << "--- End Session and Invite Session" << std::endl;
 	}
 	if (tsxInfo)
 	{
@@ -283,6 +315,7 @@ static void replicateState(PJSipDialogModInfo *dlgInfo, PJSipTransactionModInfo
 			tsxInfo->mNeedsReplication = false;
 		}
 	}
+	std::cout << "========== End State Replication Dump ==========" << std::endl;
 	SipStateReplicatorPrx replicator = SipChannelServiceDataModel::getInstance().getStateReplicator();
 	if (setItems.size() != 0 && replicator)
 	{

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


-- 
asterisk-scf/integration/sip.git



More information about the asterisk-scf-commits mailing list