diff --git a/CHANGES b/CHANGES index 2fc85752d4..91a6c3f3b6 100644 --- a/CHANGES +++ b/CHANGES @@ -395,4 +395,7 @@ Miscellaneous 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) diff --git a/doc/asterisk.sgml b/doc/asterisk.sgml index ff257ff671..ebcecfc064 100644 --- a/doc/asterisk.sgml +++ b/doc/asterisk.sgml @@ -8,7 +8,7 @@ asterisk 8 - asterisk 1.2 + asterisk 1.6 @@ -21,7 +21,7 @@ asterisk - + file user group @@ -38,7 +38,7 @@ - 2006-03-29 + 2007-12-19 DESCRIPTION @@ -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. At start, Asterisk reads the /etc/asterisk/asterisk.conf main configuration @@ -233,6 +233,15 @@ + + -s socket file name + + + In combination with -r, connect directly to a specified + Asterisk server socket. + + + -t diff --git a/main/asterisk.c b/main/asterisk.c index c8c32d4f77..4e29663831 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -2398,6 +2398,7 @@ static int show_cli_help(void) { printf(" of output to the CLI\n"); printf(" -v Increase verbosity (multiple v's = more verbose)\n"); printf(" -x Execute command (only valid with -r)\n"); + printf(" -s Connect to Asterisk via socket (only valid with -r)\n"); printf("\n"); return 0; } @@ -2670,6 +2671,7 @@ int main(int argc, char *argv[]) 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 @@ int main(int argc, char *argv[]) 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 @@ int main(int argc, char *argv[]) case 'G': rungroup = optarg; break; + case 's': + remotesock = optarg; + break; case '?': exit(1); } @@ -2821,6 +2826,9 @@ int main(int argc, char *argv[]) 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");