/l3/users/oleg-public/sl-voip-2016-03/asterisk2.unix.sl/root |
|
#ps aux | grep l3
root 9124 0.0 0.0 12728 2224 pts/3 S+ 16:50 0:00 grep l3 |
#l3-agent
Removing stale pidfile |
#l3-agent
Removing stale pidfile |
#l3-agent
Removing stale pidfile |
#apt-get install curl
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libcurl3 libldap-2.4-2 libsasl2-2 libsasl2-modules libsasl2-modules-db libssh2-1 Suggested packages: libsasl2-modules-otp libsasl2-modules-ldap libsasl2-modules-sql libsasl2-modules-gssapi-mit libsasl2-modules-gssapi-heimdal The following NEW packages will be installed: ... Unpacking libsasl2-modules:amd64 (2.1.26.dfsg1-13+deb8u1) ... Processing triggers for man-db (2.7.0.2-5) ... Setting up libsasl2-modules-db:amd64 (2.1.26.dfsg1-13+deb8u1) ... Setting up libsasl2-2:amd64 (2.1.26.dfsg1-13+deb8u1) ... Setting up libldap-2.4-2:amd64 (2.4.40+dfsg-1+deb8u2) ... Setting up libssh2-1:amd64 (1.4.3-4.1+deb8u1) ... Setting up libcurl3:amd64 (7.38.0-4+deb8u3) ... Setting up curl (7.38.0-4+deb8u3) ... Setting up libsasl2-modules:amd64 (2.1.26.dfsg1-13+deb8u1) ... Processing triggers for libc-bin (2.19-18+deb8u3) ... |
#vim ~/.bashrc
--- /tmp/l3-saved-3055.32704.14715 2016-03-29 11:29:17.454332127 +0300 +++ /root/.bashrc 2016-03-29 11:29:58.298332517 +0300 @@ -16,4 +16,5 @@ # alias rm='rm -i' # alias cp='cp -i' # alias mv='mv -i' +. /etc/bash_completion . /root/.lilalo/l3bashrc && _l3_start |
#apt
apt apt-extracttemplates apt-mark apt-cache apt-ftparchive apt-sortpkgs apt-cdrom apt-get apt-config apt-key |
#apt
apt apt-extracttemplates apt-mark apt-cache apt-ftparchive apt-sortpkgs apt-cdrom apt-get apt-config apt-key |
#apt
apt apt-extracttemplates apt-mark apt-cache apt-ftparchive apt-sortpkgs apt-cdrom apt-get apt-config apt-key |
#apt-get install bash-completion
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: bash-completion 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 182 kB of archives. After this operation, 951 kB of additional disk space will be used. Get:1 http://192.168.10.1:9999//debian/ jessie/main bash-completion all 1:2.1-4 [182 kB] Fetched 182 kB in 0s (15.5 MB/s) Selecting previously unselected package bash-completion. (Reading database ... 59881 files and directories currently installed.) Preparing to unpack .../bash-completion_1%3a2.1-4_all.deb ... Unpacking bash-completion (1:2.1-4) ... Processing triggers for man-db (2.7.0.2-5) ... Setting up bash-completion (1:2.1-4) ... |
#ps aux | grep dhcp
root 3423 0.0 0.1 28488 9496 ? Ss 11:57 0:00 /usr/sbin/dhcpd -q -cf /etc/dhcp/dhcpd.conf -pf /var/run/dhcpd.pid root 4505 0.0 0.0 12728 2100 pts/1 S+ 12:00 0:00 grep dhcp |
#ls -l /var/lib/dhcp/
total 8 -rw-r--r-- 1 root root 0 Mar 28 12:29 dhclient.leases -rw-r--r-- 1 root root 192 Mar 29 11:57 dhcpd.leases -rw-r--r-- 1 root root 125 Mar 29 11:57 dhcpd.leases~ |
#cat /var/lib/dhcp/dhcpd.leases
# The format of this file is documented in the dhcpd.leases(5) manual page. # This lease file was written by isc-dhcp-4.3.1 server-duid "\000\001\000\001\036\214\377\350\034oe\344\253\312"; |
#nmap -p22 192.168.20.0/24
Starting Nmap 6.47 ( http://nmap.org ) at 2016-03-29 12:05 MSK Nmap scan report for 192.168.20.1 Host is up (0.00013s latency). PORT STATE SERVICE 22/tcp open ssh MAC Address: 6C:62:6D:7A:C2:CC (Micro-Star INT'L CO.) Nmap scan report for 192.168.20.200 Host is up (-0.100s latency). PORT STATE SERVICE 22/tcp filtered ssh MAC Address: B8:88:E3:3E:CE:BD (Compal Information (kunshan) CO.) Nmap scan report for asterisk2.unix.sl (192.168.20.2) Host is up (0.000051s latency). PORT STATE SERVICE 22/tcp open ssh Nmap done: 256 IP addresses (3 hosts up) scanned in 3.68 seconds |
#arp -an
? (192.168.20.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.20.200) at b8:88:e3:3e:ce:bd [ether] on eth0 |
#arp -a
? (192.168.20.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.20.200) at b8:88:e3:3e:ce:bd [ether] on eth0 |
#time arp -a
? (192.168.20.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.20.200) at b8:88:e3:3e:ce:bd [ether] on eth0 real 0m0.142s user 0m0.000s sys 0m0.000s |
#time arp -an
? (192.168.20.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.20.200) at b8:88:e3:3e:ce:bd [ether] on eth0 real 0m0.002s user 0m0.000s sys 0m0.000s |
#less /etc/passwd
|
## cat /etc/passwd
|
## less /etc/passwd
|
## more ...
|
## view
|
## vim
|
## dd if=/dev/passwd
|
#cat ~/.vimrc
cat: /root/.vimrc: No such file or directory |
#vim ~/.vimrc
--- /dev/null 2016-03-29 09:50:45.984426694 +0300 +++ /root/.vimrc 2016-03-29 12:10:07.138355506 +0300 @@ -0,0 +1,2 @@ +syn on + |
#view
view viewres |
#view /etc/passwd
games:x:5:60:games:/usr/games:/usr/sbin/nologin man:x:6:12:man:/var/cache/man:/usr/sbin/nologin lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin mail:x:8:8:mail:/var/mail:/usr/sbin/nologin news:x:9:9:news:/var/spool/news:/usr/sbin/nologin nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologingin uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin systemd-timesync:x:100:103:systemd Time Synchronization,,,:/run/systemd:/bin/fall proxy:x:13:13:proxy:/bin:/usr/sbin/nologinManagement,,,:/run/systemd/netif:/bin// 19,1 Bot www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin nackup:x:34:34:backup:/var/backups:/usr/sbin/nologin list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologii |
#nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
|
#su - user
Password: su: Authentication failure |
#su user
|
$apt-get install
Display all 42252 possibilities? (y or n) |
$exit
exit |
#ps aux | grep vim
root 8278 0.0 0.0 51088 3736 pts/1 S+ 15:00 0:00 sudo vim /etc/asterisk/extensions.conf root 8279 0.1 0.1 38880 7072 pts/1 S+ 15:00 0:00 vim /etc/asterisk/extensions.conf root 8352 0.0 0.0 12728 2264 pts/5 S+ 15:00 0:00 grep vim |
#ps aux | grep vim
root 8368 0.0 0.0 12728 2100 pts/5 S+ 15:00 0:00 grep vim |
#ps aux | grep vim
root 8377 0.0 0.0 12728 2096 pts/5 R+ 15:00 0:00 grep vim |
#unit0
bash: unit0: command not found |
#unit 1
bash: unit: command not found |
#asterisk -rvvv
Asterisk 11.13.1~dfsg-2+b1, Copyright (C) 1999 - 2013 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 11.13.1~dfsg-2+b1 currently running on asterisk2 (pid = 442) asterisk2*CLI> asterisk2*CLI> asterisk2*CLI> quit Asterisk cleanly ending (0). Executing last minute cleanups |
#asterisk -rvvv
Asterisk 11.13.1~dfsg-2+b1, Copyright (C) 1999 - 2013 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 11.13.1~dfsg-2+b1 currently running on asterisk2 (pid = 442) == Using SIP RTP CoS mark 5 -- Executing [4000@gr1:1] Record("SIP/1201-00000068", "/var/tmp/asterisk/message00:gsm") in new stack ... -- Auto fallthrough, channel 'SIP/1201-00000069' status is 'UNKNOWN' == Using SIP RTP CoS mark 5 -- Executing [4001@gr1:1] Record("SIP/1201-0000006a", "/var/tmp/asterisk/message01:gsm") in new stack -- <SIP/1201-0000006a> Playing 'beep.gsm' (language 'ru') -- Executing [4001@gr1:2] Playback("SIP/1201-0000006a", "/var/tmp/asterisk/message01") in new stack -- <SIP/1201-0000006a> Playing '/var/tmp/asterisk/message01.gsm' (language 'ru') -- Auto fallthrough, channel 'SIP/1201-0000006a' status is 'UNKNOWN' asterisk2*CLI> quit Asterisk cleanly ending (0). Executing last minute cleanups |
#chown asterisk:asterisk /var/tmp/asterisk/message05.gsm
|
#{EXTEN})
message00.gsm message02.gsm message04.gsm message01.gsm message03.gsm message05.gsm |
#учше
bash: учше: command not found |
#ls -l /var/spool/asterisk/
total 28 drwxr-x--- 2 asterisk asterisk 4096 Jan 6 2015 dictate drwxr-x--- 2 asterisk asterisk 4096 Jan 6 2015 meetme drwxr-x--- 2 asterisk asterisk 4096 Mar 31 11:54 monitor drwxr-x--- 2 asterisk asterisk 4096 Jan 6 2015 outgoing drwxr-x--- 2 asterisk asterisk 4096 Jan 6 2015 system drwxr-x--- 2 asterisk asterisk 4096 Jan 6 2015 tmp drwxr-x--- 3 asterisk asterisk 4096 Mar 30 13:39 voicemail |
#ls -l /var/spool/asterisk/monitor/
total 3000 -rw-rw---- 1 asterisk asterisk 134764 Mar 30 16:04 1201-s-2016-03-30-16:04:10.wav -rw-rw---- 1 asterisk asterisk 114924 Mar 30 16:31 1201-s-2016-03-30-16-30-52.wav -rw-r--r-- 1 root root 1014458 Mar 31 11:23 1.wav -rw-r--r-- 1 root root 897562 Mar 31 11:54 belki1.wav -rw-r--r-- 1 root root 897518 Mar 31 11:52 belki.wav |
#less /var/spool/asterisk/monitor/belki.wav
|
#less /var/spool/asterisk/monitor/belki1.wav
|
#mpg123
mpg123 mpg123-id3dump mpg123-openal mpg123-strip mpg123-alsa mpg123-jack mpg123-oss mpg123.bin mpg123-nas mpg123-portaudio |
#mpg123 /var/spool/asterisk/monitor/belki1.wav
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3 version 1.20.1; written and copyright by Michael Hipp and others free software (LGPL) without any warranty but with best wishes Directory: /var/spool/asterisk/monitor/ Playing MPEG stream 1 of 1: belki1.wav ... MPEG 1.0 layer I, 33 kbit/s (free format), 44100 Hz stereo [layer1.c:30] error: Illegal bit allocation value. [layer1.c:171] error: Aborting layer I decoding after step one. [layer1.c:30] error: Illegal bit allocation value. [layer1.c:171] error: Aborting layer I decoding after step one. ... MPEG 2.0 layer I, 17 kbit/s (free format), 22050 Hz stereo [layer1.c:30] error: Illegal bit allocation value. [layer1.c:171] error: Aborting layer I decoding after step one. Note: Illegal Audio-MPEG-Header 0x0ccd0cb6 at offset 8431. Note: Trying to resync... Note: Skipped 1024 bytes in input. [parse.c:1210] error: Giving up resync after 1024 bytes - your stream is not nice... (maybe increasing resync limit could help). [mpg123.c:695] error: ...in decoding next frame: Failed to find valid MPEG data within limit on resync. (code 28) This was a Frankenstein track. [0:00] Decoding of belki1.wav finished. |
#play /var/spool/asterisk/monitor/belki.wav
/var/spool/asterisk/monitor/belki.wav: File Size: 898k Bit Rate: 256k Encoding: Signed PCM Channels: 1 @ 16-bit Samplerate: 16000Hz Replaygain: off Duration: 00:00:28.05 In:20.1% 00:00:05.63 [00:00:22.41] Out:229k [ =====|===== ] Hd:4.4 Clip:0 Aborted. |
#asterisk -rvvv
Asterisk 11.13.1~dfsg-2+b1, Copyright (C) 1999 - 2013 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 11.13.1~dfsg-2+b1 currently running on asterisk2 (pid = 691) == Using SIP RTP CoS mark 5 -- Executing [4211@gr1:1] Goto("SIP/1201-00000027", "menu,s,1") in new stack ... == CDR updated on SIP/1201-00000027 -- Executing [1@menu:1] Goto("SIP/1201-00000027", "submenu,s,start") in new stack -- Goto (submenu,s,2) -- Executing [s@submenu:2] BackGround("SIP/1201-00000027", "/var/tmp/asterisk/message11") in new stack -- <SIP/1201-00000027> Playing '/var/tmp/asterisk/message11.gsm' (language 'ru') == Spawn extension (submenu, s, 2) exited non-zero on 'SIP/1201-00000027' asterisk2*CLI> asterisk2*CLI> quit Asterisk cleanly ending (0). Executing last minute cleanups |
#less /etc/asterisk/extensions.conf
|
#asterisk -rvvv
Asterisk 11.13.1~dfsg-2+b1, Copyright (C) 1999 - 2013 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 11.13.1~dfsg-2+b1 currently running on asterisk2 (pid = 691) asterisk2*CLI> dialplan reload Dialplan reloaded. ... asterisk2*CLI> == CDR updated on SIP/1201-00000028 -- Executing [1@menu:1] Goto("SIP/1201-00000028", "submenu,s,start") in new stack -- Goto (submenu,s,2) -- Executing [s@submenu:2] BackGround("SIP/1201-00000028", "/var/tmp/asterisk/message11") in new stack -- <SIP/1201-00000028> Playing '/var/tmp/asterisk/message11.gsm' (language 'ru') == Spawn extension (submenu, s, 2) exited non-zero on 'SIP/1201-00000028' asterisk2*CLI> quit Asterisk cleanly ending (0). Executing last minute cleanups |
#asterisk -rvvv
Asterisk 11.13.1~dfsg-2+b1, Copyright (C) 1999 - 2013 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 11.13.1~dfsg-2+b1 currently running on asterisk2 (pid = 691) asterisk2*CLI> asterisk2*CLI> ... == Using SIP RTP CoS mark 5 -- Executing [4211@gr1:1] Goto("SIP/1201-0000002b", "menu,s,1") in new stack -- Goto (menu,s,1) -- Executing [s@menu:1] Answer("SIP/1201-0000002b", "") in new stack -- Executing [s@menu:2] BackGround("SIP/1201-0000002b", "/var/tmp/asterisk/message06") in new stack -- <SIP/1201-0000002b> Playing '/var/tmp/asterisk/message06.gsm' (language 'ru') [Mar 31 14:11:33] WARNING[4789][C-0000002c]: pbx.c:6696 __ast_pbx_run: Invalid extension '17', but no rule 'i' or 'e' in context 'menu' asterisk2*CLI> quit Asterisk cleanly ending (0). Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4705.18978.12663 2016-03-31 14:11:41.947529863 +0300 +++ /etc/asterisk/extensions.conf 2016-03-31 14:11:59.047530026 +0300 @@ -62,7 +62,7 @@ exten => s,n,Background(/var/tmp/asterisk/message09) exten => s,n,Hangup -exten => 1,1,Goto(submenu,s,start) +exten => 2,1,Goto(submenu,s,start) exten => 9,1,Goto(s,start) |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4705.4511.585 2016-03-31 14:12:17.751530205 +0300 +++ /etc/asterisk/extensions.conf 2016-03-31 14:12:33.707530357 +0300 @@ -62,7 +62,7 @@ exten => s,n,Background(/var/tmp/asterisk/message09) exten => s,n,Hangup -exten => 2,1,Goto(submenu,s,start) +exten => 1,1,Goto(submenu,s,start) exten => 9,1,Goto(s,start) |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4705.15765.9641 2016-03-31 14:14:46.763531627 +0300 +++ /etc/asterisk/extensions.conf 2016-03-31 14:14:51.935531676 +0300 @@ -63,7 +63,6 @@ exten => s,n,Hangup exten => 1,1,Goto(submenu,s,start) -exten => 2,1, exten => 3,1,Dial(SIP/2102) exten => 9,1,Goto(s,start) |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-5038.5536.24836 2016-03-31 14:34:35.315542970 +0300 +++ /etc/asterisk/extensions.conf 2016-03-31 14:35:11.315543314 +0300 @@ -74,10 +74,10 @@ [order-status] ; order status -exten => 2,1,Read(ORDER,/var/tmp/asterisk/message00) -exten => 2,n,Playback(/var/tmp/asterisk/message01) -exten => 2,n,SayDigits(${ORDER}) -exten => 2,n,Playback(/var/tmp/asterisk/message0${DB(order/${ORDER})}) +exten => s,1,Read(ORDER,/var/tmp/asterisk/message00) +exten => s,n,Playback(/var/tmp/asterisk/message01) +exten => s,n,SayDigits(${ORDER}) +exten => s,n,Playback(/var/tmp/asterisk/message0${DB(order/${ORDER})}) exten => s,n,Goto(menu,s,start) |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-5284.19155.5070 2016-03-31 15:01:57.459558642 +0300 +++ /etc/asterisk/extensions.conf 2016-03-31 15:02:14.679558807 +0300 @@ -21,7 +21,7 @@ exten => 4205,n,System(touch /tmp/hello-from-asterisk) exten => 4211,1,Goto(menu,s,1) -exten => 422X,1,AgentLogin(${EXTEN:3}) +exten => _422X,1,AgentLogin(${EXTEN:3}) ;exten => 4206,1,Answer |
#ls
asterisk-chan-dongle |
#cd asterisk-chan-dongle/
|
#ls
aclocal.m4 at_response.h configure.in LICENSE.txt pdu.h app.c autom4te.cache contrib Makefile.in README.txt app.h BUGS COPYRIGHT.txt manager.c ringbuffer.c at_command.c chan_dongle.c cpvt.c manager.h ringbuffer.h at_command.h chan_dongle.h cpvt.h memmem.c single.c at_parse.c channel.c dc_config.c memmem.h stamp-h.in at_parse.h channel.h dc_config.h mixbuffer.c test at_queue.c char_conv.c etc mixbuffer.h TODO.txt at_queue.h char_conv.h export.h mutils.h tools at_read.c cli.c helpers.c pdiscovery.c at_read.h cli.h helpers.h pdiscovery.h at_response.c config.h.in INSTALL pdu.c |
#cd ..
|
#ls /root/
|
#w
11:16:40 up 1:34, 5 users, load average: 0.14, 0.06, 0.05 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT user :0 :0 09:43 ?xdm? 48.04s 0.01s /bin/sh /etc/xd user pts/0 :0.0 09:44 1:03 0.11s 0.04s script -f -c ba user pts/2 :0.0 09:54 47:39 0.06s 0.00s script -f -c ba user pts/4 :0.0 09:54 1.00s 0.15s 0.08s script -f -c ba root pts/6 192.168.20.1 11:16 0.00s 0.08s 0.00s script -f -c ba |
#cd /
|
#ls
bin etc lost+found root tmp boot home media run usr dev initrd.img mnt sbin var dongle-asterisk-11-patched lib opt srv vmlinuz dongle-asterisk-11-patched.tar.gz lib64 proc sys |
#mv dongle-asterisk-11-patched* /usr/src/
|
#cd /usr/src/
|
#ls
asterisk-chan-dongle dongle-asterisk-11-patched.tar.gz dongle-asterisk-11-patched |
#cd dongle-asterisk-11-patched/
|
#./configure
checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes ... checking for strchr... yes checking for strncasecmp... yes checking for strtol... yes checking for realpath... yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands |
#make
gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DASTERISK_VERSION_NUM=110000 -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT app.o -MF .app.o.d -MP -o app.o -c app.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DASTERISK_VERSION_NUM=110000 -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT at_command.o -MF .at_command.o.d -MP -o at_command.o -c at_command.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DASTERISK_VERSION_NUM=110000 -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT at_parse.o -MF .at_parse.o.d -MP -o at_parse.o -c at_parse.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DASTERISK_VERSION_NUM=110000 -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT at_queue.o -MF .at_queue.o.d -MP -o at_queue.o -c at_queue.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DASTERISK_VERSION_NUM=110000 -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT at_read.o -MF .at_read.o.d -MP -o at_read.o -c at_read.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DASTERISK_VERSION_NUM=110000 -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT at_response.o -MF .at_response.o.d -MP -o at_response.o -c at_response.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DASTERISK_VERSION_NUM=110000 -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT chan_dongle.o -MF .chan_dongle.o.d -MP -o chan_dongle.o -c chan_dongle.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DASTERISK_VERSION_NUM=110000 -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT channel.o -MF .channel.o.d -MP -o channel.o -c channel.c channel.c:1401:2: warning: initialization from incompatible pointer type .requester = channel_request, ... gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DASTERISK_VERSION_NUM=110000 -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT helpers.o -MF .helpers.o.d -MP -o helpers.o -c helpers.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DASTERISK_VERSION_NUM=110000 -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT manager.o -MF .manager.o.d -MP -o manager.o -c manager.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DASTERISK_VERSION_NUM=110000 -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT memmem.o -MF .memmem.o.d -MP -o memmem.o -c memmem.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DASTERISK_VERSION_NUM=110000 -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT ringbuffer.o -MF .ringbuffer.o.d -MP -o ringbuffer.o -c ringbuffer.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DASTERISK_VERSION_NUM=110000 -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT cpvt.o -MF .cpvt.o.d -MP -o cpvt.o -c cpvt.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DASTERISK_VERSION_NUM=110000 -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT dc_config.o -MF .dc_config.o.d -MP -o dc_config.o -c dc_config.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DASTERISK_VERSION_NUM=110000 -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT pdu.o -MF .pdu.o.d -MP -o pdu.o -c pdu.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DASTERISK_VERSION_NUM=110000 -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT mixbuffer.o -MF .mixbuffer.o.d -MP -o mixbuffer.o -c mixbuffer.c gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/usr/include -I/usr/include -DASTERISK_VERSION_NUM=110000 -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT pdiscovery.o -MF .pdiscovery.o.d -MP -o pdiscovery.o -c pdiscovery.c gcc -shared -Xlinker -x -o chan_dongle.so app.o at_command.o at_parse.o at_queue.o at_read.o at_response.o chan_dongle.o channel.o char_conv.o cli.o helpers.o manager.o memmem.o ringbuffer.o cpvt.o dc_config.o pdu.o mixbuffer.o pdiscovery.o |
#make install
./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged config.status: executing depfiles commands strip chan_dongle.so /usr/bin/install -c -m 755 chan_dongle.so /usr/lib/asterisk/modules |
#callingpres=allowed_passed_screen ; set caller ID presentation by defauu
; if 'no' waiting calls just ignored device and just ignore this sectionBSOLETED by initstate: if 'yes' no load this of 'stop' 'start' 'remote' initstate=start ; 'remove' same as 'disable=yes'e, must be onee s ; exten for start incoming calls, only in case of Subscriber Numm ber not available!, also set to CALLERID(ndid) exten=+1234567890 ; exten for start incoming calls, only in case oo alues: dtmf=relax ; off - off DTMF tones detection, voice datt a passed to asterisk unaltered ; use this value for gateways or iff not use DTMF for AVR or inside dialplan ; inband - do DTMF tones detection ; relax - like inband but with relaxdtmf optii on "/etc/asterisk/dongle.conf" 91L, 4814C written |
#vim /etc/asterisk/extensions.conf
|
#exten => s,1,Goto(menu,s,1)
Asterisk 11.13.1~dfsg-2+b1, Copyright (C) 1999 - 2013 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 11.13.1~dfsg-2+b1 currently running on asterisk2 (pid = 9381) asterisk2*CLI> dongle reload now == Parsing '/etc/asterisk/dongle.conf': Found ... -- Total time merge_contexts_delete: 0.001379 sec [Apr 1 11:52:23] WARNING[9705]: pbx.c:12279 ast_context_verify_includes: Context 'gr2' tries to include nonexistent context 'res1' asterisk2*CLI> [Apr 1 11:52:43] WARNING[9707][C-00000002]: pbx.c:6646 __ast_pbx_run: Channel 'Dongle/dongle0-0100000002' sent to invalid extension but no invalid handler: context,exten,priority=dongle,+375447373039,1 asterisk2*CLI> uit No such command 'uit' (type 'core show help uit' for other possible commands) asterisk2*CLI> asterisk2*CLI> quit Asterisk cleanly ending (0). Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
|
#exten => s,1,Goto(menu,s,1)
callwaiting=auto ; if 'yes' allow incoming calls waiting; by defaa ult use network settings ; if 'no' waiting calls just ignored device and just ignore this sectionBSOLETED by initstate: if 'yes' no load this of 'stop' 'start' 'remote' initstate=start ; 'remove' same as 'disable=yes'e, must be onee ber not available!, also set to CALLERID(ndid) exten=s ; exten for start incoming calls, only in case of Subscriber Numm |
#vim /etc/asterisk/dongle.conf
|
#;jbenable = yes ; Enables the use of a jitterbuffer on the receii
[gr2] include => local [gr2] include => res1 include => res2 [dongle] exten => +375447373039,1,Goto(menu,s,1) "/etc/asterisk/extensions.conf" 156L, 4506C written |
#asterisk -rvvv
Asterisk 11.13.1~dfsg-2+b1, Copyright (C) 1999 - 2013 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 11.13.1~dfsg-2+b1 currently running on asterisk2 (pid = 9381) asterisk2*CLI> dialplan reload Dialplan reloaded. ... -- <Dongle/dongle0-0100000005> Playing '/var/tmp/asterisk/message11.gsm' (language 'en') -- Executing [1@submenu:1] AGI("Dongle/dongle0-0100000005", "/usr/local/bin/asterisk-festival.pl,/var/tmp/belki.txt") in new stack -- Launched AGI Script /usr/local/bin/asterisk-festival.pl -- AGI Script Executing Application: (Playback) Options: (/var/lib/asterisk/sounds/tts/tts-0d70b4e597139d61cf2468e31ec3ea70) -- <Dongle/dongle0-0100000005> Playing '/var/lib/asterisk/sounds/tts/tts-0d70b4e597139d61cf2468e31ec3ea70.slin' (language 'en') -- <Dongle/dongle0-0100000005>AGI Script /usr/local/bin/asterisk-festival.pl completed, returning 0 -- Auto fallthrough, channel 'Dongle/dongle0-0100000005' status is 'UNKNOWN' asterisk2*CLI> quit Asterisk cleanly ending (0). Executing last minute cleanups |
# The format of this file is documented in the dhcpd.leases(5) manual page. # This lease file was written by isc-dhcp-4.3.1 server-duid "\000\001\000\001\036\214\377\350\034oe\344\253\312";
Время первой команды журнала | 15:50:11 2016- 3-28 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 10:56:52 2016- 4- 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 94 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 4.26 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 4.26 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.86 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.55 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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