hi, is it possible to change the asterisk cli so that if i do asterisk -vvvvr, is doesnt recognize the command? if so where would the conf file be at to find out how to execute the command? thanks.
asterisk -vvvr is not a CLI command, You can modify asterisk.c around line 2051-2130 (for 1.2.10) this lines has comment “/* Check for options */” i belive thats are options for asterisk
Hmm looked in there and couldnt find anything that makes sence. Maybe this is way out of my leaue. Thanks for the info.
You can add an alias to your .bashrc file to point “asterisk” to something else. It applies to the whole asterisk command and not just to the specific flags passed. So if you want “asterisk -c” to work but not “asterisk -vvvr” then what I’m describing won’t work.
do You use asterisk -vvvvr to connect to already running asterisk ?
i do a test, modify asterisk.c
run asterisk using asterisk -gcv
in second console i type asterisk -b and it works as regular asterisk -r
[code]
MtG:/usr/src/asterisk-1.2.10# asterisk -r
asterisk: invalid option – r
MtG:/usr/src/asterisk-1.2.10# asterisk -b
Asterisk 1.2.10, Copyright © 1999 - 2006 Digium, Inc. and others.
Created by Mark Spencer markster@digium.com
Asterisk comes with ABSOLUTELY NO WARRANTY; type ‘show warranty’ for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type ‘show license’ for details.
Connected to Asterisk 1.2.10 currently running on MtG (pid = 24767)
Verbosity is at least 1
MtG*CLI>[/code]
all what i changed in asterisk.c is commented here (cat -n asterisk.c)
2052 /* orginal while((c=getopt(argc, argv, "tThfdvVqprRgcinx:U:G:C:L:M:")) != -1) { 'r' changed to 'b' */
2053 while((c=getopt(argc, argv, "tThfdvVqpbRgcinx:U:G:C:L:M:")) != -1) {
2054 switch(c) {
2055 case 'd':
2056 option_debug++;
2057 option_nofork++;
2058 break;
2059 case 'c':
2060 option_console++;
2061 option_nofork++;
2062 break;
2063 case 'f':
2064 option_nofork++;
2065 break;
2066 case 'n':
2067 option_nocolor++;
2068 break;
2069 /* orginally was case 'r' */
2070 case 'b':
2071 option_remote++;
2072 option_nofork++;
2073 break;
mayby i don’t understand Your question. sorry.
err, ok, the problem i have is that i have a system whych i do asterisk -vvvr and it doesnt get me to the CLI, which leads me to beleive the cli shortcut or whatever you wanna call it has been changed. and i wanted to know where i could change it or verify is has been changed.
Can you post the error message if you’re getting one?
Apologies if you’ve already checked this, but are you running “asterisk -r” as the same user (or root) that initially started asterisk?
do You have any bash output when You do asterisk -vvvr ?
does asterisk is running ? (ps aux | grep asterisk)
[asterisk server ~]$ asterisk -vvvvvr
-bash: asterisk: command not found
I do not have root access to the server(do i need it?)not because of anything bad, it belongs for the company i work for, the previous admin didnt give anyone the password, i know i have to change it however the system is in production and i cant just reset it to change the root passwd.
If i ps -e i do see save_asterisk runnuig along with asterisk so i know it is there.
You need root password.