[asterisk-commits] tzafrir: branch tzafrir/monitor-rtp r218692 - in /team/tzafrir/monitor-rtp: c...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Sep 15 14:52:37 CDT 2009


Author: tzafrir
Date: Tue Sep 15 14:52:33 2009
New Revision: 218692

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=218692
Log:
Setting our hostname in monitor.conf is now optional.

Modified:
    team/tzafrir/monitor-rtp/configs/monitor.conf.sample
    team/tzafrir/monitor-rtp/res/res_monitor.c

Modified: team/tzafrir/monitor-rtp/configs/monitor.conf.sample
URL: http://svn.asterisk.org/svn-view/asterisk/team/tzafrir/monitor-rtp/configs/monitor.conf.sample?view=diff&rev=218692&r1=218691&r2=218692
==============================================================================
--- team/tzafrir/monitor-rtp/configs/monitor.conf.sample (original)
+++ team/tzafrir/monitor-rtp/configs/monitor.conf.sample Tue Sep 15 14:52:33 2009
@@ -14,8 +14,9 @@
 ; recording server.
 ;rtp_server = newton
 ;
-; My local host name. Must be resolvable to an IP address that the recording
-; server can use (e.g. not "localhost").
+; My local host name. Use it to override the system default, if needed.
+; This should be the name of the IP address from which the packets are
+; sent.
 ;reporting_host  = myhostname
 
 ; Used to set base ports for the DAHDI channel-offset based allocation of

Modified: team/tzafrir/monitor-rtp/res/res_monitor.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/tzafrir/monitor-rtp/res/res_monitor.c?view=diff&rev=218692&r1=218691&r2=218692
==============================================================================
--- team/tzafrir/monitor-rtp/res/res_monitor.c (original)
+++ team/tzafrir/monitor-rtp/res/res_monitor.c Tue Sep 15 14:52:33 2009
@@ -1241,6 +1241,10 @@
 			ast_log(LOG_NOTICE, "%s:%d: Bad config option '%s' - (ignoring)\n",
 					config_file, v->lineno, v->name);
 		}
+		if (rtp_server_name[0] && !reporting_host[0]) {
+			gethostname(reporting_host, sizeof(reporting_host) - 1);
+			
+		}
 	}
 	ast_log(LOG_DEBUG, "monitor to %s [RX=%d, TX=%d]\n",
 			rtp_server_name, rtp_portbase_rx, rtp_portbase_tx);




More information about the asterisk-commits mailing list