Added --report-file options in siprtp

git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@454 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjsip-apps/src/samples/siprtp.c b/pjsip-apps/src/samples/siprtp.c
index 1483064..46d6cba 100644
--- a/pjsip-apps/src/samples/siprtp.c
+++ b/pjsip-apps/src/samples/siprtp.c
@@ -47,6 +47,7 @@
 "   --log-level=N,    -l    Set log verbosity level (default=5)\n"
 "   --app-log-level=N       Set app screen log verbosity (default=3)\n"
 "   --log-file=FILE         Write log to file FILE\n"
+"   --report-file=FILE      Write report to file FILE\n"
 "\n"
 /* Don't support this anymore, because codec is properly examined in
    pjmedia_session_info_from_sdp() function.
@@ -155,6 +156,7 @@
     int			 app_log_level;
     int			 log_level;
     char		*log_filename;
+    char		*report_filename;
 
     struct codec	 audio_codec;
 
@@ -820,7 +822,8 @@
 
     enum { OPT_START,
 	   OPT_APP_LOG_LEVEL, OPT_LOG_FILE, 
-	   OPT_A_PT, OPT_A_NAME, OPT_A_CLOCK, OPT_A_BITRATE, OPT_A_PTIME };
+	   OPT_A_PT, OPT_A_NAME, OPT_A_CLOCK, OPT_A_BITRATE, OPT_A_PTIME,
+	   OPT_REPORT_FILE };
 
     struct pj_getopt_option long_options[] = {
 	{ "count",	    1, 0, 'c' },
@@ -834,6 +837,8 @@
 	{ "app-log-level",  1, 0, OPT_APP_LOG_LEVEL },
 	{ "log-file",	    1, 0, OPT_LOG_FILE },
 
+	{ "report-file",    1, 0, OPT_REPORT_FILE },
+
 	/* Don't support this anymore, see comments in USAGE above.
 	{ "a-pt",	    1, 0, OPT_A_PT },
 	{ "a-name",	    1, 0, OPT_A_NAME },
@@ -927,6 +932,9 @@
 	case OPT_A_PTIME:
 	    app.audio_codec.ptime = atoi(pj_optarg);
 	    break;
+	case OPT_REPORT_FILE:
+	    app.report_filename = pj_optarg;
+	    break;
 
 	default:
 	    puts(USAGE);
diff --git a/pjsip-apps/src/samples/siprtp_report.c b/pjsip-apps/src/samples/siprtp_report.c
index 192f223..6fd7bb7 100644
--- a/pjsip-apps/src/samples/siprtp_report.c
+++ b/pjsip-apps/src/samples/siprtp_report.c
@@ -58,6 +58,9 @@
 
     pj_gettimeofday(&now);
 
+    if (app.report_filename)
+	puts(app.report_filename);
+
     /* Print duration */
     if (inv->state >= PJSIP_INV_STATE_CONFIRMED && call->connect_time.sec) {