[asterisk-commits] oej: branch oej/pinefrog-rtcp-1.8 r382782 - in /team/oej/pinefrog-rtcp-1.8: c...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Mar 11 04:39:23 CDT 2013


Author: oej
Date: Mon Mar 11 04:39:12 2013
New Revision: 382782

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=382782
Log:
- logging channel added
- working on realtime Call Quality Records 

Modified:
    team/oej/pinefrog-rtcp-1.8/channels/chan_sip.c
    team/oej/pinefrog-rtcp-1.8/channels/sip/rtcp.c
    team/oej/pinefrog-rtcp-1.8/configs/extconfig.conf.sample
    team/oej/pinefrog-rtcp-1.8/include/asterisk/logger.h
    team/oej/pinefrog-rtcp-1.8/main/logger.c
    team/oej/pinefrog-rtcp-1.8/res/res_rtp_asterisk.c

Modified: team/oej/pinefrog-rtcp-1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinefrog-rtcp-1.8/channels/chan_sip.c?view=diff&rev=382782&r1=382781&r2=382782
==============================================================================
--- team/oej/pinefrog-rtcp-1.8/channels/chan_sip.c (original)
+++ team/oej/pinefrog-rtcp-1.8/channels/chan_sip.c Mon Mar 11 04:39:12 2013
@@ -18041,7 +18041,7 @@
 	int realtimertpqos = FALSE;
 
 	realtimepeers = ast_check_realtime("sippeers");
-	realtimertpqos = ast_check_realtime("rtpqos");
+	realtimertpqos = ast_check_realtime("rtpcqr");
 
 	if (argc < 4)
 		return CLI_SHOWUSAGE;
@@ -18678,7 +18678,7 @@
 
 	realtimepeers = ast_check_realtime("sippeers");
 	realtimeregs = ast_check_realtime("sipregs");
-	realtimertpqos = ast_check_realtime("rtpqos");
+	realtimertpqos = ast_check_realtime("rtpcqr");
 
 	ast_mutex_lock(&authl_lock);
 	credentials = authl;
@@ -18759,7 +18759,7 @@
 		ast_cli(a->fd, "  SIP realtime:           Disabled\n" );
 	else
 		ast_cli(a->fd, "  SIP realtime:           Enabled\n" );
-	ast_cli(a->fd, "  QOS realtime reports:   %s\n", realtimertpqos ? "Enabled" : "Disabled" );
+	ast_cli(a->fd, "  QoS realtime reports:   %s\n", realtimertpqos ? "Enabled" : "Disabled" );
 	ast_cli(a->fd, "  Qualify Freq :          %d ms\n", global_qualifyfreq);
 	ast_cli(a->fd, "  Q.850 Reason header:    %s\n", AST_CLI_YESNO(ast_test_flag(&global_flags[1], SIP_PAGE2_Q850_REASON)));
 	ast_cli(a->fd, "  Store SIP_CAUSE:        %s\n", AST_CLI_YESNO(global_store_sip_cause));

Modified: team/oej/pinefrog-rtcp-1.8/channels/sip/rtcp.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinefrog-rtcp-1.8/channels/sip/rtcp.c?view=diff&rev=382782&r1=382781&r2=382782
==============================================================================
--- team/oej/pinefrog-rtcp-1.8/channels/sip/rtcp.c (original)
+++ team/oej/pinefrog-rtcp-1.8/channels/sip/rtcp.c Mon Mar 11 04:39:12 2013
@@ -47,7 +47,7 @@
 {
 	struct ast_rtp_instance_stats qual;
 	//char *rtpqstring = NULL;
-	//int qosrealtime = ast_check_realtime("rtpqos");
+	//int qosrealtime = ast_check_realtime("rtpcqr");
 	unsigned int duration;	/* Duration in secs */
  	int readtrans = FALSE, writetrans = FALSE;
 	memset(&qual, 0, sizeof(qual));
@@ -201,7 +201,7 @@
 	char buf_remoteip[25];
 	char buf_inpacketloss[25], buf_outpacketloss[25];
 	char buf_outpackets[25], buf_inpackets[25];
-	int qosrealtime = ast_check_realtime("rtpqos");
+	int qosrealtime = ast_check_realtime("rtpcqr");
 
 	ast_log(LOG_DEBUG, "************* QOS END REPORTS: The final countdown!!!!! Yeah. \n");
 
@@ -243,7 +243,7 @@
 	//sprintf(buf_outpackets, "%d", qual->local_count);
 
 	ast_log(LOG_DEBUG, "************* QOS END REPORTS: Probing new logging channel LOG_CQR!!!!! Yeah. \n");
-	ast_log(LOG_DEBUG, "RTPQOS Channel: %s Uid %s Bch %s Buid %s Pvt %s Media %s Lssrc %s Rssrc %s Rip %s Rtt %s:%s:%s Ljitter %s Rjitter %s Rtcpstatus %s Dur %s Pout %s Plossout %s Pin %s Plossin %s\n",
+	ast_log(LOG_CQR, "CQR Channel: %s Uid %s Bch %s Buid %s Pvt %s Media %s Lssrc %s Rssrc %s Rip %s Rtt %s:%s:%s Ljitter %s Rjitter %s Rtcpstatus %s Dur %s Pout %s Plossout %s Pin %s Plossin %s\n",
 		qual->channel[0] ? qual->channel : "",
 		qual->uniqueid[0] ? qual->uniqueid : "",
 		qual->bridgedchan[0] ? qual->bridgedchan : "" ,
@@ -266,8 +266,39 @@
 	if (!qosrealtime) {
 		return;
 	}
-
-	ast_store_realtime("rtpqos", 
+/* Example database schema for MySQL:
+CREATE TABLE `astcqr` (
+  `channel` varchar(50) NOT NULL,
+  `uniqueid` varchar(35) NOT NULL,
+  `bridgedchan` varchar(50) NOT NULL,
+  `bridgeduniqueid` varchar(35) NOT NULL,
+  `pvtcallid` varchar(80) NOT NULL,
+  `rtpmedia` varchar(50) NOT NULL,
+  `localssrc` varchar(50) NOT NULL,
+  `remotessrc` varchar(50) NOT NULL,
+  `rtt` varchar(10) NOT NULL,
+  `localjitter` varchar(10) NOT NULL,
+  `remotejitter` varchar(10) NOT NULL,
+  `sendformat` varchar(10) NOT NULL,
+  `receiveformat` varchar(10) NOT NULL,
+  `rtcpstatus` varchar(10) NOT NULL,
+  `duration` varchar(10) NOT NULL,
+  `packetsent` varchar(30) NOT NULL,
+  `packetreceived` varchar(30) NOT NULL,
+  `packetlossin` varchar(30) NOT NULL,
+  `packetlossout` varchar(30) NOT NULL,
+  `rttmax` varchar(12) NOT NULL,
+  `rttmin` varchar(12) NOT NULL,
+  `writetranslator` varchar(15) NOT NULL,
+  `readtranslator` varchar(15) NOT NULL,
+  `writecost` varchar(10) NOT NULL,
+  `readcost` varchar(10) NOT NULL,
+  `remoteip` varchar(25) NOT NULL,
+  KEY `ChannelUnique` (`channel`,`uniqueid`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='FOr pinefrog stats'
+*/
+
+	ast_store_realtime("rtpcqr", 
 		"channel", qual->channel[0] ? qual->channel : "--no channel--",
 		"uniqueid", qual->uniqueid[0] ? qual->uniqueid : "--no uniqueid --",
 		"bridgedchan", qual->bridgedchan[0] ? qual->bridgedchan : "" ,

Modified: team/oej/pinefrog-rtcp-1.8/configs/extconfig.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinefrog-rtcp-1.8/configs/extconfig.conf.sample?view=diff&rev=382782&r1=382781&r2=382782
==============================================================================
--- team/oej/pinefrog-rtcp-1.8/configs/extconfig.conf.sample (original)
+++ team/oej/pinefrog-rtcp-1.8/configs/extconfig.conf.sample Mon Mar 11 04:39:12 2013
@@ -76,6 +76,7 @@
 ;queue_members => odbc,asterisk
 ;musiconhold => mysql,general
 ;queue_log => mysql,general
+;rtpcqr => mysql,general	; RTP Call Quality Records
 ;
 ;
 ; While most dynamic realtime engines are automatically used when defined in

Modified: team/oej/pinefrog-rtcp-1.8/include/asterisk/logger.h
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinefrog-rtcp-1.8/include/asterisk/logger.h?view=diff&rev=382782&r1=382781&r2=382782
==============================================================================
--- team/oej/pinefrog-rtcp-1.8/include/asterisk/logger.h (original)
+++ team/oej/pinefrog-rtcp-1.8/include/asterisk/logger.h Mon Mar 11 04:39:12 2013
@@ -192,7 +192,7 @@
 #endif
 #define AST_LOG_CQR    __LOG_CQR, _A_
 
-#define NUMLOGLEVELS 32
+#define NUMLOGLEVELS 64		/* Highest bit */
 
 /*!
  * \brief Get the debug level for a module

Modified: team/oej/pinefrog-rtcp-1.8/main/logger.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinefrog-rtcp-1.8/main/logger.c?view=diff&rev=382782&r1=382781&r2=382782
==============================================================================
--- team/oej/pinefrog-rtcp-1.8/main/logger.c (original)
+++ team/oej/pinefrog-rtcp-1.8/main/logger.c Mon Mar 11 04:39:12 2013
@@ -186,7 +186,7 @@
 	COLOR_RED,
 	COLOR_GREEN,
 	COLOR_BRGREEN,
-	0,
+	COLOR_BRBLUE,
 	0,
 	0,
 	0,

Modified: team/oej/pinefrog-rtcp-1.8/res/res_rtp_asterisk.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinefrog-rtcp-1.8/res/res_rtp_asterisk.c?view=diff&rev=382782&r1=382781&r2=382782
==============================================================================
--- team/oej/pinefrog-rtcp-1.8/res/res_rtp_asterisk.c (original)
+++ team/oej/pinefrog-rtcp-1.8/res/res_rtp_asterisk.c Mon Mar 11 04:39:12 2013
@@ -3183,15 +3183,18 @@
 		ast_debug(1, "!!!!!! Setting bridged channel name \n");
 		ast_copy_string(rtp->rtcp->bridgedchan, bridgedchan, sizeof(rtp->rtcp->bridgedchan));
 	} else {
-		ast_debug(1, "!!!!!! REmoving bridged channel name \n");
-		rtp->rtcp->bridgedchan[0] = '\0';
+		if(rtp->rtcp->bridgedchan[0] != '\0') {
+			ast_debug(1, "!!!!!! Keeping bridged channel name \n");
+		}
+		//rtp->rtcp->bridgedchan[0] = '\0';
 	}
 	if (bridgeduniqueid) {
 		ast_debug(1, "!!!!!! Setting bridged unique id \n");
 		ast_copy_string(rtp->rtcp->bridgeduniqueid, bridgeduniqueid, sizeof(rtp->rtcp->bridgeduniqueid));
 	} else {
-		ast_debug(1, "!!!!!! Removing bridged unique id \n");
-		rtp->rtcp->bridgeduniqueid[0] = '\0';
+		if(rtp->rtcp->bridgeduniqueid[0] != '\0') {
+			ast_debug(1, "!!!!!! Keeping bridged unique id \n");
+		}
 	}
 }
 




More information about the asterisk-commits mailing list