/l3/users/azhun/nt-voip-2014-apr/debian/root :1 :2 :3 :4 :5 :6 :7 :8 |
|
#ifconfig
eth0 Link encap:Ethernet HWaddr 2c:27:d7:46:1a:a4 inet addr:192.168.12.7 Bcast:192.168.12.255 Mask:255.255.255.0 inet6 addr: fe80::2e27:d7ff:fe46:1aa4/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:30563 errors:0 dropped:0 overruns:0 frame:0 TX packets:3035 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:35932677 (34.2 MiB) TX bytes:367967 (359.3 KiB) Interrupt:20 Memory:fe400000-fe420000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:60 errors:0 dropped:0 overruns:0 frame:0 TX packets:60 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:3600 (3.5 KiB) TX bytes:3600 (3.5 KiB) |
#date
Tue Apr 22 14:08:15 EEST 2014 |
#lsb_release
No LSB modules are available. |
#uname -a
Linux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64 GNU/Linux |
#lsb_release ?
Usage: lsb_release [options] lsb_release: error: No arguments are permitted |
#lsb_release --help
Usage: lsb_release [options] Options: -h, --help show this help message and exit -v, --version show LSB modules this system supports -i, --id show distributor ID -d, --description show description of this distribution -r, --release show release number of this distribution -c, --codename show code name of this distribution -a, --all show all of the above information -s, --short show requested information in short format |
#lsb_release -v
No LSB modules are available. |
#lsb_release -a
No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 7.4 (wheezy) Release: 7.4 Codename: wheezy |
#nano .bashrc
--- /tmp/l3-saved-11921.6617.7573 2014-04-22 14:10:34.041133595 +0300 +++ .bashrc 2014-04-22 14:10:54.825131900 +0300 @@ -17,3 +17,4 @@ # alias cp='cp -i' # alias mv='mv -i' [ $0 == l3script ] && . /root/.lilalo/l3bashrc && _l3_start +. l3script |
#~/.bashrc: executed by bash(1) for non-login shells.
|
#apt-get install asterisk
Unpacking libcurl3:amd64 (from .../libcurl3_7.26.0-1+wheezy9_amd64.deb) ... Selecting previously unselected package libgettextpo0:amd64. Unpacking libgettextpo0:amd64 (from .../libgettextpo0_0.18.1.1-9_amd64.deb) ... Selecting previously unselected package libodbc1:amd64. Unpacking libodbc1:amd64 (from .../libodbc1_2.2.14p2-5_amd64.deb) ... Selecting previously unselected package libsensors4:amd64. Unpacking libsensors4:amd64 (from .../libsensors4_1%3a3.3.2-2+deb7u1_amd64.deb) ... Selecting previously unselected package freetds-common. Unpacking freetds-common (from .../freetds-common_0.91-2+deb7u1_all.deb) ... Selecting previously unselected package libsybdb5:amd64. ... Setting up libmail-sendmail-perl (0.79.16-1) ... Setting up libsox2 (14.4.0-3) ... Setting up libsox-fmt-alsa (14.4.0-3) ... Setting up libsox-fmt-base (14.4.0-3) ... Setting up module-assistant (0.11.4) ... Setting up rsync (3.0.9-4) ... update-rc.d: using dependency based boot sequencing Setting up sox (14.4.0-3) ... Setting up vpb-driver-source (4.2.55-1) ... Setting up asterisk-moh-opsound-gsm (2.03-1) ... |
#dpkg -l sterisk
dpkg-query: no packages found matching sterisk |
#dpkg -l asterisk
Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-============-============-================================= ii asterisk 1:1.8.13.1~d amd64 Open Source Private Branch Exchan |
#dpkg -L asterisk | less
|
#/etc/init.d/asterisk stop
Stopping Asterisk PBX: asterisk. |
#ps aux | grep asterisk
root 16959 0.0 0.0 7832 880 pts/2 S+ 15:00 0:00 grep asterisk |
#asterisk -rvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core 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 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?) |
#ls -l /var/run/asterisk/asterisk.ctl
ls: cannot access /var/run/asterisk/asterisk.ctl: No such file or directory |
#ls - /etc/asterisk/sip.conf
ls: cannot access -: No such file or directory /etc/asterisk/sip.conf |
#ls -l /etc/asterisk/sip.conf
-rw-r----- 1 asterisk asterisk 79163 Jan 4 03:07 /etc/asterisk/sip.conf |
#mv /etc/asterisk/sip.conf /etc/asterisk/sip.conf.SEVED
|
#nano /etc/asterisk/sip.conf
--- /dev/null 2014-04-22 13:06:30.798645062 +0300 +++ /etc/asterisk/sip.conf 2014-04-22 15:44:32.485229217 +0300 @@ -0,0 +1,8 @@ +context=default + +; peer +;3101 - 3199 all my +[3101] +type=friend +secret=1234 +host=dynamic |
#context=default
context=default ; peer ;3101 - 3199 all my [3101] type=friend secret=1234 host=dynamic |
#[general]
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core 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 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian (pid = 16994) ... 3101 (Unspecified) D N 0 Unmonitored 1 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 1 offline] -- Remote UNIX connection -- Remote UNIX connection disconnected debian*CLI> sip show peers Name/username Host Dyn Forcerport ACL Port Status 3101 (Unspecified) D N 0 Unmonitored 1 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 1 offline] debian*CLI> quit Executing last minute cleanups |
#apt-cash search irs-dhcp-server
l3script: apt-cash: command not found |
#apt-cashe search irs-dhcp-server
l3script: apt-cashe: command not found |
#apt-cache search irs-dhcp-server
|
#apt-apt install irs-dhcp-server
l3script: apt-apt: command not found |
#apt-get install irs-dhcp-server
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package irs-dhcp-server |
#apt-get install irc-dhcp-server
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package irc-dhcp-server |
#apt-get install isc-dhcp-server
Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: isc-dhcp-server-ldap The following NEW packages will be installed: isc-dhcp-server 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 935 kB of archives. After this operation, 2,075 kB of additional disk space will be used. ... Preconfiguring packages ... Selecting previously unselected package isc-dhcp-server. (Reading database ... 133062 files and directories currently installed.) Unpacking isc-dhcp-server (from .../isc-dhcp-server_4.2.2.dfsg.1-5+deb70u6_amd64.deb) ... Processing triggers for man-db ... Setting up isc-dhcp-server (4.2.2.dfsg.1-5+deb70u6) ... Generating /etc/default/isc-dhcp-server... [FAIL] Starting ISC DHCP server: dhcpd[....] check syslog for diagnostics. ... failed! failed! invoke-rc.d: initscript isc-dhcp-server, action "start" failed. |
#apt-get remove isc-dhcp-server
Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: isc-dhcp-server 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. After this operation, 2,075 kB disk space will be freed. Do you want to continue [Y/n]? y (Reading database ... 133076 files and directories currently installed.) Removing isc-dhcp-server ... [FAIL] Stopping ISC DHCP server: dhcpd failed! Processing triggers for man-db ... |
#ps aux | grep dhscp
root 18810 0.0 0.0 7832 872 pts/0 S+ 16:25 0:00 grep dhscp |
#ps aux | grep dhcp
root 18819 0.0 0.0 7832 872 pts/0 S+ 16:25 0:00 grep dhcp |
#grep d
d d d d d d d2 d2 ^C |
#sterisk -rvvvv
l3script: sterisk: command not found |
#asterisk -rvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core 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 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian (pid = 16994) ... -- Remote UNIX connection -- Remote UNIX connection disconnected -- Remote UNIX connection -- Remote UNIX connection disconnected -- Remote UNIX connection -- Remote UNIX connection disconnected -- Remote UNIX connection -- Remote UNIX connection disconnected debian*CLI> quit Executing last minute cleanups |
#asterisk -rvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core 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 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian (pid = 16994) ... -- Remote UNIX connection -- Remote UNIX connection disconnected -- Remote UNIX connection -- Remote UNIX connection disconnected -- Remote UNIX connection -- Remote UNIX connection disconnected -- Remote UNIX connection -- Remote UNIX connection disconnected debian*CLI> quit Executing last minute cleanups |
#asterisk -rx "sip show peers"
Name/username Host Dyn Forcerport ACL Port Status 3101/3101 192.168.12.201 D N 5060 Unmonitored 3102/3102 192.168.12.107 D N 5060 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline] |
#asterisk -rx
asterisk: option requires an argument -- 'x' |
#asterisk -rvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core 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 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian (pid = 16994) Verbosity is at least 4 -- Remote UNIX connection -- Remote UNIX connection disconnected == Using SIP RTP CoS mark 5 [Apr 22 17:09:16] NOTICE[17032]: chan_sip.c:22753 handle_request_invite: Call from '3102' (192.168.12.107:5060) to extension '3101' rejected because extension not found in context 'default'. debian*CLI> quit Executing last minute cleanups |
#mc /etc/asterisk/extensions.conf /etc/asterisk/extensions.conf.SAVE
|
#^C
|
#asterisk -rx 'dial reload'
No such command 'dial reload' (type 'core show help dial reload' for other possible commands) |
#asterisk -rx 'core dial reload'
No such command 'core dial reload' (type 'core show help core dial reload' for other possible commands) |
#asterisk -rvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core 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 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian (pid = 16994) ... == Using SIP RTP CoS mark 5 -- Executing [3102@default:1] Dial("SIP/3101-00000001", "SIP/$3{EXTEN}") in new stack == Using SIP RTP CoS mark 5 [Apr 22 17:24:57] ERROR[19228]: netsock2.c:263 ast_sockaddr_resolve: getaddrinfo("$3{EXTEN}", "(null)", ...): No address associated with hostname [Apr 22 17:24:57] WARNING[19228]: chan_sip.c:5498 create_addr: No such host: $3{EXTEN} [Apr 22 17:24:57] WARNING[19228]: app_dial.c:2274 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Unknown) == Everyone is busy/congested at this time (1:0/0/1) -- Auto fallthrough, channel 'SIP/3101-00000001' status is 'CHANUNAVAIL' debian*CLI> quit Executing last minute cleanups |
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-18007.6529.3008 2014-04-22 17:26:29.917332585 +0300 +++ /etc/asterisk/extensions.conf 2014-04-22 17:26:36.573332697 +0300 @@ -1,4 +1,4 @@ [default] ;exten => 3101,1,Dial(SIP/3101) -exten => _31XX,1,Dial(SIP/$3{EXTEN}) +exten => _31XX,1,Dial(SIP/${EXTEN}) |
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-18007.30280.9783 2014-04-22 17:29:26.033335561 +0300 +++ /etc/asterisk/extensions.conf 2014-04-22 17:33:50.317340029 +0300 @@ -2,3 +2,5 @@ ;exten => 3101,1,Dial(SIP/3101) exten => _31XX,1,Dial(SIP/${EXTEN}) +exten => _31XX,2,Hangup(SIP/${EXTEN}) + |
#[default]
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core 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 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian (pid = 16994) Verbosity is at least 4 debian*CLI> dialplan reload ... == Using SIP RTP CoS mark 5 -- Executing [3101@default:1] Dial("SIP/3102-00000006", "SIP/3101") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/3101 -- SIP/3101-00000007 is ringing -- SIP/3101-00000007 answered SIP/3102-00000006 -- Remotely bridging SIP/3102-00000006 and SIP/3101-00000007 == Spawn extension (default, 3101, 1) exited non-zero on 'SIP/3102-00000006' debian*CLI> quit Executing last minute cleanups |
#netstatn -np
l3script: netstatn: command not found |
#netstat -np
Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 192.168.12.7:54765 46.4.144.245:18030 TIME_WAIT - tcp 0 0 192.168.12.7:22 192.168.12.107:50146 ESTABLISHED 19229/sshd: user [p tcp 0 0 192.168.12.7:54766 46.4.144.245:18030 TIME_WAIT - Active UNIX domain sockets (w/o servers) Proto RefCnt Flags Type State I-Node PID/Program name Path unix 18 [ ] DGRAM 10381 2382/rsyslogd /dev/log unix 2 [ ] DGRAM 53460 16994/asterisk unix 3 [ ] STREAM CONNECTED 51481 19229/sshd: user [p ... unix 3 [ ] STREAM CONNECTED 6561 2833/dbus-daemon /var/run/dbus/system_bus_socket unix 3 [ ] STREAM CONNECTED 10470 2879/bluetoothd unix 2 [ ] DGRAM 10466 2879/bluetoothd unix 3 [ ] STREAM CONNECTED 6532 2833/dbus-daemon unix 3 [ ] STREAM CONNECTED 6531 2833/dbus-daemon unix 2 [ ] DGRAM 10396 2468/acpid unix 3 [ ] STREAM CONNECTED 6367 1949/rpc.idmapd unix 3 [ ] STREAM CONNECTED 6366 1949/rpc.idmapd unix 3 [ ] DGRAM 6223 396/udevd unix 3 [ ] DGRAM 6222 396/udevd |
#lf
l3script: lf: command not found |
#l3-agent
l3-agent is already running: pid=11943; pidfile=/root/.lilalo/l3-agent.pid |
##heloo!
|
#asterisk -rvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core 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 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian (pid = 16994) Verbosity is at least 4 -- Remote UNIX connection disconnected debian*CLI> sip sho peers No such command 'sip sho peers' (type 'core show help sip sho peers' for other possible commands) debian*CLI> sip show peers Name/username Host Dyn Forcerport ACL Port Status 3101/3101 192.168.12.201 D N 5060 Unmonitored 3102/3102 (Unspecified) D N 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 1 online, 1 offline] debian*CLI> quit Executing last minute cleanups |
#screen -x
|
#sreen -x
l3script: sreen: command not found |
#screen -x
|
#sc
scanimage scrollkeeper-get-content-list scanin scrollkeeper-get-extended-content-list scp scrollkeeper-get-index-from-docpath screen scrollkeeper-get-toc-from-docpath screendump scrollkeeper-get-toc-from-id script scrollkeeper-install scriptreplay scrollkeeper-preinstall scrollkeeper-config scrollkeeper-rebuilddb scrollkeeper-extract scrollkeeper-uninstall scrollkeeper-gen-seriesid scrollkeeper-update scrollkeeper-get-cl |
#sc
scanimage scrollkeeper-get-content-list scanin scrollkeeper-get-extended-content-list scp scrollkeeper-get-index-from-docpath screen scrollkeeper-get-toc-from-docpath screendump scrollkeeper-get-toc-from-id script scrollkeeper-install scriptreplay scrollkeeper-preinstall scrollkeeper-config scrollkeeper-rebuilddb scrollkeeper-extract scrollkeeper-uninstall scrollkeeper-gen-seriesid scrollkeeper-update scrollkeeper-get-cl |
#screen
|
#screen
|
#screen -x
|
#asterisk -ex 'sip show peers'
Privilege escalation protection disabled! See https://wiki.asterisk.org/wiki/x/1gKfAQ for more details. Asterisk already running on /var/run/asterisk/asterisk.ctl. Use 'asterisk -r' to connect. |
#asterisk -rx 'sip show peers'
Name/username Host Dyn Forcerport ACL Port Status 3101/3101 192.168.12.201 D N 5060 Unmonitored 3102/3102 192.168.12.107 D N 33784 Unmonitored 3103 (Unspecified) D N 0 Unmonitored 3 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 1 offline] |
#nano /etc/asterisk/sip.conf
--- /tmp/l3-saved-24029.25624.30628 2014-04-23 11:32:16.094433417 +0300 +++ /etc/asterisk/sip.conf 2014-04-23 11:46:52.090448216 +0300 @@ -1,5 +1,9 @@ [general] context=default +; canreinvite=0 -old version asterisk +directmedia=no + +register =>havana:1234@192.168.12.8/santiago ; peer ;3101 - 3199 all my @@ -18,3 +22,8 @@ secret=1234 host=dynamic +[santiago] +type=friend +secret=1234 +host=dynamic +username=havana |
#^C
|
#asterisk -rx 'sip reload'
|
#asterisk -rvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core 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 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian (pid = 16994) Verbosity is at least 4 debian*CLI> sip reload Reloading SIP [Apr 23 11:47:59] WARNING[17032]: chan_sip.c:20720 handle_response_register: Forbidden - wrong password on authentication for REGISTER for 'havana' to '192.168.12.8' debian*CLI> quit Executing last minute cleanups |
#screen -x
|
#nano /etc/asterisk/sip.conf
--- /tmp/l3-saved-24351.14989.548 2014-04-23 11:50:07.470451519 +0300 +++ /etc/asterisk/sip.conf 2014-04-23 11:51:32.138452951 +0300 @@ -3,7 +3,7 @@ ; canreinvite=0 -old version asterisk directmedia=no -register =>havana:1234@192.168.12.8/santiago +register => havana:1234@192.168.12.8/santiago ; peer ;3101 - 3199 all my |
#[general]
|
#asterisk -rv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core 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 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian (pid = 16994) Verbosity is at least 4 debian*CLI> sip reload ... debian*CLI> sip show peers Name/username Host Dyn Forcerport ACL Port Status 3101/3101 192.168.12.201 D N 5060 Unmonitored 3102/3102 192.168.12.107 D N 33784 Unmonitored 3103 (Unspecified) D N 0 Unmonitored santiago/havana 192.168.12.8 D N 5060 Unmonitored 4 sip peers [Monitored: 0 online, 0 offline Unmonitored: 3 online, 1 offline] debian*CLI> sip show peer re Disconnected from Asterisk server Executing last minute cleanups |
#nano /etc/asterisk/sip.conf
|
#[general]
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core 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 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian (pid = 16994) Verbosity is at least 4 debian*CLI> core reload ... No such command 'show sip peers' (type 'core show help show sip' for other possible commands) debian*CLI> sip show peers Name/username Host Dyn Forcerport ACL Port Status 3101/3101 192.168.12.201 D N 5060 Unmonitored 3102/3102 192.168.12.107 D N 33784 Unmonitored 3103 (Unspecified) D N 0 Unmonitored santiago/havana 192.168.12.8 D N 5060 Unmonitored 4 sip peers [Monitored: 0 online, 0 offline Unmonitored: 3 online, 1 offline] debian*CLI> quit Executing last minute cleanups |
#less /etc/asterisk/sip.conf
|
#asterisk -rvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core 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 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian (pid = 16994) ... Reloading SIP [Apr 23 12:00:19] WARNING[17032]: chan_sip.c:20720 handle_response_register: Forbidden - wrong password on authentication for REGISTER for 'havana' to '192.168.12.8' debian*CLI> sip reload Reloading SIP debian*CLI> -- Remote UNIX connection -- Remote UNIX connection disconnected debian*CLI> sip reload Disconnected from Asterisk server Executing last minute cleanups |
#nano /etc/asterisk/sip.conf
|
#asterisk -rvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core 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 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian (pid = 16994) ... debian*CLI> sip show peers Name/username Host Dyn Forcerport ACL Port Status 3101/3101 192.168.12.201 D N 5060 Unmonitored 3102/3102 192.168.12.107 D N 33784 Unmonitored 3103 (Unspecified) D N 0 Unmonitored santiago/havana 192.168.12.8 D N 5060 Unmonitored 4 sip peers [Monitored: 0 online, 0 offline Unmonitored: 3 online, 1 offline] debian*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-24351.32130.25155 2014-04-23 12:05:48.202467416 +0300 +++ /etc/asterisk/extensions.conf 2014-04-23 12:08:52.570470532 +0300 @@ -2,5 +2,4 @@ ;exten => 3101,1,Dial(SIP/3101) exten => _31XX,1,Dial(SIP/${EXTEN}) -exten => _31XX,2,Hangup(SIP/${EXTEN}) - +exten => _32XX,1,Dial(SIP/santiago/${EXTEN}) |
#[default]
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core 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 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian (pid = 16994) Verbosity is at least 4 debian*CLI> sip reload ... -- Called SIP/3101 -- SIP/3101-0000000d is ringing -- SIP/3101-0000000d answered SIP/santiago-0000000c -- Locally bridging SIP/santiago-0000000c and SIP/3101-0000000d == Spawn extension (default, 3101, 1) exited non-zero on 'SIP/santiago-0000000c' == Using SIP RTP CoS mark 5 [Apr 23 12:09:44] NOTICE[17032]: chan_sip.c:22753 handle_request_invite: Call from '3101' (192.168.12.201:5060) to extension '3201' rejected because extension not found in context 'default'. debian*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#nano /etc/asterisk/extensions.conf
|
#[default]
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core 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 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian (pid = 16994) Verbosity is at least 4 debian*CLI> dialplan reload ... -- Executing [3201@default:1] Dial("SIP/3101-00000016", "SIP/santiago/3201") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/santiago/3201 -- SIP/santiago-00000017 is ringing -- SIP/santiago-00000017 answered SIP/3101-00000016 -- Locally bridging SIP/3101-00000016 and SIP/santiago-00000017 == Spawn extension (default, 3201, 1) exited non-zero on 'SIP/3101-00000016' debian*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-24351.28876.28116 2014-04-23 12:17:08.918478919 +0300 +++ /etc/asterisk/extensions.conf 2014-04-23 12:18:03.394479839 +0300 @@ -3,3 +3,4 @@ ;exten => 3101,1,Dial(SIP/3101) exten => _31XX,1,Dial(SIP/${EXTEN}) exten => _32XX,1,Dial(SIP/santiago/${EXTEN}) +exten => _12XX,1,Dial(SIP,kiev/${EXTEN}) |
#[default]
|
#[general]
|
#[default]
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core 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 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian (pid = 16994) Verbosity is at least 4 debian*CLI> dialplan reload ... Name/username Host Dyn Forcerport ACL Port Status 3101/3101 192.168.12.201 D N 5060 Unmonitored 3102/3102 192.168.12.107 D N 33784 Unmonitored 3103 (Unspecified) D N 0 Unmonitored kiev/havana (Unspecified) D N 0 Unmonitored santiago/havana 192.168.12.8 D N 5060 Unmonitored 5 sip peers [Monitored: 0 online, 0 offline Unmonitored: 3 online, 2 offline] debian*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-24351.22430.31206 2014-04-23 12:23:24.010485257 +0300 +++ /etc/asterisk/extensions.conf 2014-04-23 12:23:42.470485568 +0300 @@ -3,4 +3,4 @@ ;exten => 3101,1,Dial(SIP/3101) exten => _31XX,1,Dial(SIP/${EXTEN}) exten => _32XX,1,Dial(SIP/santiago/${EXTEN}) -exten => _12XX,1,Dial(SIP,kiev/${EXTEN}) +exten => _12XX,1,Dial(SIP/kiev/${EXTEN}) |
#[default]
|
#[general]
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core 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 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian (pid = 16994) Verbosity is at least 4 debian*CLI> dialplan reload ... kiev/havana (Unspecified) D N 0 Unmonitored santiago/havana 192.168.12.8 D N 5060 Unmonitored 5 sip peers [Monitored: 0 online, 0 offline Unmonitored: 3 online, 2 offline] [Apr 23 12:24:41] NOTICE[17032]: chan_sip.c:25030 handle_request_register: Registration from '<sip:vaduz@192.168.12.7>' failed for '192.168.12.9:5060' - Wrong password -- Registered SIP 'kiev' at 192.168.12.2:5060 > Saved useragent "Asterisk PBX 1.8.13.1~dfsg1-3+deb7u3" for peer kiev [Apr 23 12:24:56] NOTICE[17032]: chan_sip.c:25030 handle_request_register: Registration from '<sip:vaduz@192.168.12.7>' failed for '192.168.12.9:5060' - Wrong password debian*CLI> dialplan reload Disconnected from Asterisk server Executing last minute cleanups |
#nano /etc/asterisk/sip.conf
--- /tmp/l3-saved-24351.19630.15968 2014-04-23 12:25:40.946487568 +0300 +++ /etc/asterisk/sip.conf 2014-04-23 12:26:21.742488264 +0300 @@ -33,4 +33,3 @@ secret=1234 host=dynamic username=havana - |
#[general]
|
#[default]
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core 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 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian (pid = 16994) Verbosity is at least 4 debian*CLI> sip reload ... [Apr 23 13:00:04] NOTICE[17032]: chan_sip.c:22753 handle_request_invite: Call from 'havana' (192.168.12.8:5060) to extension '1101' rejected because extension not found in context 'default'. == Using SIP RTP CoS mark 5 -- Executing [1201@default:1] Dial("SIP/santiago-00000038", "SIP/kiev/1201") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/kiev/1201 -- SIP/kiev-00000039 is ringing == Spawn extension (default, 1201, 1) exited non-zero on 'SIP/santiago-00000038' debian*CLI> sip show peers Disconnected from Asterisk server Executing last minute cleanups |
#asterisk -rvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core 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 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian (pid = 16994) ... -- Called SIP/kiev/1201 -- SIP/kiev-0000003b is ringing == Spawn extension (default, 1201, 1) exited non-zero on 'SIP/santiago-0000003a' == Using SIP RTP CoS mark 5 [Apr 23 13:01:04] NOTICE[17032]: chan_sip.c:22753 handle_request_invite: Call from 'havana' (192.168.12.8:5060) to extension '1101' rejected because extension not found in context 'default'. == Using SIP RTP CoS mark 5 [Apr 23 13:01:09] NOTICE[17032]: chan_sip.c:22753 handle_request_invite: Call from 'havana' (192.168.12.8:5060) to extension '1101' rejected because extension not found in context 'default'. debian*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-24351.6042.13814 2014-04-23 13:01:47.742524184 +0300 +++ /etc/asterisk/extensions.conf 2014-04-23 13:04:22.926526809 +0300 @@ -3,4 +3,5 @@ ;exten => 3101,1,Dial(SIP/3101) exten => _31XX,1,Dial(SIP/${EXTEN}) exten => _32XX,1,Dial(SIP/santiago/${EXTEN}) -exten => _12XX,1,Dial(SIP/kiev/${EXTEN}) +exten => _1XXX,1,Dial(SIP/kiev/${EXTEN}) +;exten => _12XX,1,Dial(SIP/kiev/${EXTEN}) |
#[default]
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core 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 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian (pid = 16994) Verbosity is at least 4 == Using SIP RTP CoS mark 5 ... -- Executing [3201@default:1] Dial("SIP/kiev-00000046", "SIP/santiago/3201") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/santiago/3201 -- SIP/santiago-00000047 is ringing -- SIP/santiago-00000047 answered SIP/kiev-00000046 -- Locally bridging SIP/kiev-00000046 and SIP/santiago-00000047 == Spawn extension (default, 3201, 1) exited non-zero on 'SIP/kiev-00000046' debian*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-24351.18225.26096 2014-04-23 13:11:37.386534149 +0300 +++ /etc/asterisk/extensions.conf 2014-04-23 13:12:54.602535455 +0300 @@ -3,5 +3,5 @@ ;exten => 3101,1,Dial(SIP/3101) exten => _31XX,1,Dial(SIP/${EXTEN}) exten => _32XX,1,Dial(SIP/santiago/${EXTEN}) -exten => _1XXX,1,Dial(SIP/kiev/${EXTEN}) -;exten => _12XX,1,Dial(SIP/kiev/${EXTEN}) +;exten => _1XXX,1,Dial(SIP/kiev/${EXTEN}) +exten => _[12]XXX,1,Dial(SIP/kiev/${EXTEN}) |
Время первой команды журнала | 13:01:36 2014- 4-22 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 12:11:33 2014- 4-23 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 100 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 17.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 9.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 4.20 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.40 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ find / -name abc find: /home/devi-orig/.gnome2: Keine Berechtigung find: /home/devi-orig/.gnome2_private: Keine Berechtigung find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung find: /home/devi-orig/.metacity: Keine Berechtigung find: /home/devi-orig/.inkscape: Keine Berechtigung ^C |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008