[asterisk-commits] oej: trunk r93854 - in /trunk: CHANGES doc/asterisk.sgml main/asterisk.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Dec 19 01:01:40 CST 2007
Author: oej
Date: Wed Dec 19 01:01:40 2007
New Revision: 93854
URL: http://svn.digium.com/view/asterisk?view=rev&rev=93854
Log:
Add option for starting remote Asterisk by naming the actual runtime socket instead of pointing
to configuration file with -C
Reported by: sobomax
Patches:
asterisk.c.diff.trunk uploaded by sobomax (license 359)
doc changes by committer
(closes issue #11598)
Modified:
trunk/CHANGES
trunk/doc/asterisk.sgml
trunk/main/asterisk.c
Modified: trunk/CHANGES
URL: http://svn.digium.com/view/asterisk/trunk/CHANGES?view=diff&rev=93854&r1=93853&r2=93854
==============================================================================
--- trunk/CHANGES (original)
+++ trunk/CHANGES Wed Dec 19 01:01:40 2007
@@ -395,4 +395,7 @@
set to false; setting that to true will force the use of the new algorithm.
Also, the cli commands "dialplan set extenpatternmatchingnew true/false" can
be used to switch the algorithms at run time.
-
+ * A new option when starting a remote asterisk (rasterisk, asterisk -r) for
+ specifying which socket to use to connect to the running Asterisk daemon
+ (-s)
+
Modified: trunk/doc/asterisk.sgml
URL: http://svn.digium.com/view/asterisk/trunk/doc/asterisk.sgml?view=diff&rev=93854&r1=93853&r2=93854
==============================================================================
--- trunk/doc/asterisk.sgml (original)
+++ trunk/doc/asterisk.sgml Wed Dec 19 01:01:40 2007
@@ -8,7 +8,7 @@
<application>asterisk</application>
</refentrytitle>
<manvolnum>8</manvolnum>
- <refmiscinfo>asterisk 1.2</refmiscinfo>
+ <refmiscinfo>asterisk 1.6</refmiscinfo>
</refmeta>
<refnamediv>
<refname>
@@ -21,7 +21,7 @@
<refsynopsisdiv>
<cmdsynopsis>
<command>asterisk</command>
-<arg><option>-tThfdvVqpRgciIn</option></arg>
+<arg><option>-tThfdvVqpRgciIns</option></arg>
<arg><option>-C </option><replaceable class="parameter">file</replaceable></arg>
<arg><option>-U </option><replaceable class="parameter">user</replaceable></arg>
<arg><option>-G </option><replaceable class="parameter">group</replaceable></arg>
@@ -38,7 +38,7 @@
</refsynopsisdiv>
<refsect1>
<refsect1info>
- <date>2006-03-29</date>
+ <date>2007-12-19</date>
</refsect1info>
<title>DESCRIPTION</title>
<para>
@@ -47,9 +47,9 @@
Automated Call Distribution (ACD), Voice over IP (VoIP) gatewaying,
Conferencing, and a plethora of other telephony applications to a broad
range of telephony devices including packet voice (SIP, IAX2, MGCP, Skinny,
- H.323) devices (both endpoints and proxies), as well as traditional TDM
+ H.323, Unistim) devices (both endpoints and proxies), as well as traditional TDM
hardware including T1, E1, ISDN PRI, GR-303, RBS, Loopstart, Groundstart,
- ISDN BRI, and many more.
+ ISDN BRI and many more.
</para>
<para>
At start, Asterisk reads the /etc/asterisk/asterisk.conf main configuration
@@ -234,6 +234,15 @@
</listitem>
</varlistentry>
<varlistentry>
+ <term>-s <replaceable class="parameter">socket file name</replaceable></term>
+ <listitem>
+ <para>
+ In combination with <command>-r</command>, connect directly to a specified
+ Asterisk server socket.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
<term>-t</term>
<listitem>
<para>
Modified: trunk/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/trunk/main/asterisk.c?view=diff&rev=93854&r1=93853&r2=93854
==============================================================================
--- trunk/main/asterisk.c (original)
+++ trunk/main/asterisk.c Wed Dec 19 01:01:40 2007
@@ -2398,6 +2398,7 @@
printf(" of output to the CLI\n");
printf(" -v Increase verbosity (multiple v's = more verbose)\n");
printf(" -x <cmd> Execute command <cmd> (only valid with -r)\n");
+ printf(" -s <socket> Connect to Asterisk via socket <socket> (only valid with -r)\n");
printf("\n");
return 0;
}
@@ -2670,6 +2671,7 @@
int isroot = 1;
char *buf;
const char *runuser = NULL, *rungroup = NULL;
+ char *remotesock = NULL;
/* Remember original args for restart */
if (argc > sizeof(_argv) / sizeof(_argv[0]) - 1) {
@@ -2700,7 +2702,7 @@
if (getenv("HOME"))
snprintf(filename, sizeof(filename), "%s/.asterisk_history", getenv("HOME"));
/* Check for options */
- while ((c = getopt(argc, argv, "mtThfFdvVqprRgciInx:U:G:C:L:M:e:")) != -1) {
+ while ((c = getopt(argc, argv, "mtThfFdvVqprRgciInx:U:G:C:L:M:e:s:")) != -1) {
switch (c) {
#if defined(HAVE_SYSINFO)
case 'e':
@@ -2789,6 +2791,9 @@
case 'G':
rungroup = optarg;
break;
+ case 's':
+ remotesock = optarg;
+ break;
case '?':
exit(1);
}
@@ -2820,6 +2825,9 @@
if (ast_opt_console && !option_verbose)
ast_verbose("[ Reading Master Configuration ]\n");
ast_readconfig();
+
+ if (ast_opt_remote && remotesock != NULL)
+ ast_copy_string((char *) ast_config_AST_SOCKET, remotesock, sizeof(ast_config_AST_SOCKET));
if (!ast_language_is_prefix && !ast_opt_remote)
ast_log(LOG_WARNING, "The 'languageprefix' option in asterisk.conf is deprecated; in a future release it will be removed, and your sound files will need to be organized in the 'new style' language layout.\n");
More information about the asterisk-commits
mailing list