/l3/users/Kzn/Asterisk22/debian2/root :1 :2 :3 :4 :5 :6 :7 |
|
#asterisk -rvvvvv
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 debian2 (pid = 2640) ... debian2*CLI> debian2*CLI> debian2*CLI> co config console core debian2*CLI> core No such command 'core ' (type 'core show help core' for other possible commands) debian2*CLI> core show version Asterisk 1.8.13.1~dfsg1-3+deb7u3 built by pbuilder @ pungenday on a x86_64 running Linux on 2014-01-04 01:03:48 UTC debian2*CLI> quit Executing last minute cleanups |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#/etc/init.d/asterisk stop
Stopping Asterisk PBX: asterisk. |
#asterisk -r
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. ========================================================================= Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?) |
#ps aux | grep [a]sterisk
|
#ps aux | grep [a]sterisk
|
#ls -l /var/run/asterisk/asterisk.ctl
srwxrwx--- 1 asterisk asterisk 0 Апр 22 15:01 /var/run/asterisk/asterisk.ctl |
#asterisk -rvvvvvvv
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 debian2 (pid = 3773) ... debian2*CLI> core set verbose 999999 Verbosity was 9 and is now 999999 -- Remote UNIX connection -- Remote UNIX connection disconnected debian2*CLI> asterisk -rx 'core show version' No such command ' asterisk -rx 'core show version'' (type 'core show help asterisk -rx' for other possible commands) -- Remote UNIX connection -- Remote UNIX connection disconnected debian2*CLI> quit Executing last minute cleanups |
#asterisk -rx 'core show version'
Asterisk 1.8.13.1~dfsg1-3+deb7u3 built by pbuilder @ pungenday on a x86_64 running Linux on 2014-01-04 01:03:48 UTC |
#д3ÐÐдÐl3pwd
/users/Kzn/Asterisk22/debian2/root |
#w
15:28:37 up 34 min, 2 users, load average: 0,08, 0,03, 0,05 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT user pts/0 debian2 14:54 5.00s 0.07s 0.02s sshd: user [pri |
#ls -l /etc/asterisk/sip.conf
-rw-r----- 1 asterisk asterisk 79163 Янв 4 03:07 /etc/asterisk/sip.conf |
#mv /etc/asterisk/sip.conf{,.SAVED}
|
#ls -l /etc/asterisk/sip.conf.SAVED
-rw-r----- 1 asterisk asterisk 79163 Янв 4 03:07 /etc/asterisk/sip.conf.SAVED |
#vim /etc/asterisk/sip.conf
--- /dev/null 2014-04-22 14:54:06.680144806 +0300 +++ /etc/asterisk/sip.conf 2014-04-22 15:54:24.166934900 +0300 @@ -0,0 +1,23 @@ +context=default + +; peer +; 1401 - 1499 вÑе ТÑенеÑа +; 1201 - 1299 вÑе мое + + +;[1401] +;type=friend +;secret=1234 +;host=dynamic + +[1201] +type=friend +secret=1234 +host=dynamic + +[1202] +type=friend +secret=1234 +host=dynamic + + |
#ifconfig
eth0 Link encap:Ethernet HWaddr 2c:27:d7:46:19:8f inet addr:192.168.12.2 Bcast:192.168.12.255 Mask:255.255.255.0 inet6 addr: fe80::2e27:d7ff:fe46:198f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:8597 errors:0 dropped:0 overruns:0 frame:0 TX packets:1720 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1971880 (1.8 MiB) TX bytes:273138 (266.7 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:4 errors:0 dropped:0 overruns:0 frame:0 TX packets:4 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:240 (240.0 B) TX bytes:240 (240.0 B) |
#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 debian2 (pid = 3773) Verbosity is at least 9999999 debian2*CLI> sip show p ... 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] -- Registered SIP '1202' at 192.168.12.102:5060 > Saved useragent "Linphone/3.7.0 (belle-sip/1.3.0)" for peer 1202 debian2*CLI> sip show peers Name/username Host Dyn Forcerport ACL Port Status 1201 (Unspecified) D N 0 Unmonitored 1202/1202 192.168.12.102 D N 5060 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 1 online, 1 offline] debian2*CLI> quit Executing last minute cleanups |
## Instalim DHCP
|
##apt-cache search dhcp server
|
##apt-get install isc-dhcp-server
|
## dpkg -L isc-dhcp-server | grep /etc/
|
#ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 2c:27:d7:46:19:8f brd ff:ff:ff:ff:ff:ff inet 192.168.12.2/24 brd 192.168.12.255 scope global eth0 inet6 fe80::2e27:d7ff:fe46:198f/64 scope link valid_lft forever preferred_lft forever |
##cat /etc/default/isc-dhcp-server
|
##Ukazivaem interfeis DHCP servera
|
#cat /etc/default/isc-dhcp-server
cat: /etc/default/isc-dhcp-server: Нет такого файла или каталога |
##/etc/init.d/isc-dhcp-server restart
|
#dpkg -L isc-dhcp-server | grep /etc/
dpkg-query: пакет «isc-dhcp-server» не установлен Для проверки файлов архивов используйте команду dpkg --info (dpkg-deb --info), для вывода списка файлов в них — команду dpkg--contents (dpkg-deb --contents). |
##/etc/init.d/isc-dhcp-server restart
|
#ps aux | grep [d]hcp
|
#ps aux | grep dhcp
root 4249 0.0 0.0 7856 868 pts/1 S+ 16:30 0:00 grep dhcp |
#ps aux | grep [d]hcp
|
#ps aux | grep dhcp
root 4267 0.0 0.0 7856 872 pts/1 S+ 16:31 0:00 grep dhcp |
#ps aux | grep [d]hcp
|
#ps aux | grep [a]sterisk
asterisk 3773 0.1 0.1 760528 30448 ? Ssl 15:01 0:06 /usr/sbin/asterisk -p -U asterisk asterisk 3774 0.0 0.0 13912 768 ? S 15:01 0:00 astcanary /var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet 3773 |
#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 debian2 (pid = 3773) ... debian2*CLI> core set verbose 0 0... 1 1... 2 2... 3 3... 4 4... 5 5... 6 6... 7 7... 8 8... 9 9... off atleast debian2*CLI> core set verbose 999 Verbosity was 9999999 and is now 999 debian2*CLI> debian2*CLI> debian2*CLI> debian2*CLI> quit Executing last minute cleanups |
#iconfig
l3script: iconfig: команда не найдена |
#ip
ip ipcmk ipod-time-sync iptables-restore ip6tables ipcrm ipptool iptables-save ip6tables-apply ipcs iproxy iptables-xml ip6tables-restore ipmaddr iptables iptunnel ip6tables-save ipod-read-sysinfo-extended iptables-apply |
#ip
.ICE-unix/ pulse-OG4mtcFOfbuR/ pulse-PKdhtXMmr18n/ .X0-lock .X11-unix/ |
#ip
.ICE-unix/ pulse-OG4mtcFOfbuR/ pulse-PKdhtXMmr18n/ .X0-lock .X11-unix/ |
#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 debian2 (pid = 3773) ... Option "load" forces lookup of peer in realtime storage. debian2*CLI> sip show peers Name/username Host Dyn Forcerport ACL Port Status 1201/1201 192.168.12.208 D N 5060 Unmonitored 1202/1202 192.168.12.102 D N 5060 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline] -- Remote UNIX connection -- Remote UNIX connection disconnected debian2*CLI> quit Executing last minute cleanups |
#~
Name/username Host Dyn Forcerport ACL Port Status 1201/1201 192.168.12.208 D N 5060 Unmonitored 1202/1202 192.168.12.102 D N 5060 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline] |
#[1202]
|
#less /var/log/asterisk/messages
|
#mv /etc/asterisk/extensions.conf /etc/asterisk/extensions.conf.SAVE
|
#vim /etc/asterisk/extensions.conf
--- /dev/null 2014-04-22 14:54:06.680144806 +0300 +++ /etc/asterisk/extensions.conf 2014-04-22 17:22:16.662963904 +0300 @@ -0,0 +1,11 @@ +[default] + +;exten => _12xx,1,Answer + +exten => _12xx,n,Dial(SIP/${EXTEN}) + + +;exten => 1201,n,Hungup + + + |
#ael
|
#less /var/log/asterisk/messages
|
#vim /etc/asterisk/extensions.conf
|
#vim /etc/asterisk/sip.conf
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3452.23782.14694 2014-04-22 17:26:28.346965288 +0300 +++ /etc/asterisk/extensions.conf 2014-04-22 17:26:58.026965462 +0300 @@ -1,11 +1,5 @@ [default] -;exten => _12xx,1,Answer exten => _12xx,n,Dial(SIP/${EXTEN}) - -;exten => 1201,n,Hungup - - - |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3452.26713.18098 2014-04-22 17:28:06.466965826 +0300 +++ /etc/asterisk/extensions.conf 2014-04-22 17:28:35.450965987 +0300 @@ -1,5 +1,5 @@ [default] -exten => _12xx,n,Dial(SIP/${EXTEN}) +exten => _12xx,1,Dial(SIP/${EXTEN}) |
#netstat -nmp
netstat: неверный ключ -- «m» usage: netstat [-vWeenNcCF] [<Af>] -r netstat {-V|--version|-h|--help} netstat [-vWnNcaeol] [<Socket> ...] netstat { [-vWeenNac] -i | [-cWnNe] -M | -s } -r, --route display routing table -i, --interfaces display interface table -g, --groups display multicast group memberships -s, --statistics display networking statistics (like SNMP) -M, --masquerade display masqueraded connections -v, --verbose be verbose ... -a, --all, --listening display all sockets (default: connected) -o, --timers display timers -F, --fib display Forwarding Information Base (default) -C, --cache display routing cache instead of FIB <Socket>={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx --netrom <AF>=Use '-6|-4' or '-A <af>' or '--<af>'; default: inet List of possible address families (which support routing): inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25) netrom (AMPR NET/ROM) ipx (Novell IPX) ddp (Appletalk DDP) x25 (CCITT X.25) |
#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.2:22 192.168.12.102:52559 ESTABLISHED 3349/sshd: user [pr Active UNIX domain sockets (w/o servers) Proto RefCnt Flags Type State I-Node PID/Program name Path unix 18 [ ] DGRAM 10272 2200/rsyslogd /dev/log unix 2 [ ] DGRAM 18483 3773/asterisk unix 3 [ ] STREAM CONNECTED 10840 2660/dbus-daemon /var/run/dbus/system_bus_socket unix 3 [ ] STREAM CONNECTED 5677 3411/su unix 2 [ ] DGRAM 5674 3411/su ... unix 3 [ ] STREAM CONNECTED 12354 2774/avahi-daemon: unix 3 [ ] STREAM CONNECTED 12353 2773/avahi-daemon: unix 2 [ ] DGRAM 12351 2773/avahi-daemon: unix 3 [ ] STREAM CONNECTED 6533 2660/dbus-daemon unix 3 [ ] STREAM CONNECTED 6532 2660/dbus-daemon unix 2 [ ] DGRAM 10295 2326/acpid unix 3 [ ] STREAM CONNECTED 6465 1879/rpc.idmapd unix 3 [ ] STREAM CONNECTED 6464 1879/rpc.idmapd unix 3 [ ] DGRAM 6262 373/udevd unix 3 [ ] DGRAM 6261 373/udevd |
#su-
l3script: su-: команда не найдена |
#screen -x
|
#ls -l
итого 0 |
#w
09:46:34 up 18:52, 3 users, load average: 0,00, 0,01, 0,05 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT user pts/0 debian2 09:37 2.00s 0.06s 0.02s sshd: user [priv] root pts/3 teach:S.0 09:41 2.00s 0.00s 0.00s script -f -c l3script -q /root/.lilalo// |
#w
09:46:52 up 18:52, 3 users, load average: 0,00, 0,01, 0,05 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT user pts/0 debian2 09:37 4.00s 0.06s 0.02s sshd: user [priv] root pts/3 teach:S.0 09:41 4.00s 0.00s 0.00s script -f -c l3script -q /root/.lilalo// |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-5367.8912.14119 2014-04-23 09:48:50.967289549 +0300 +++ /etc/asterisk/sip.conf 2014-04-23 09:49:20.371289698 +0300 @@ -23,3 +23,7 @@ host=dynamic +[1203] +type=friend +secret=1234 +host=dynamic |
#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 debian2 (pid = 3773) Verbosity is at least 999 debian2*CLI> sip show pee ... -- Called SIP/1201 -- SIP/1201-00000009 is ringing -- SIP/1201-00000009 answered SIP/192.168.12.1-00000008 -- Remotely bridging SIP/192.168.12.1-00000008 and SIP/1201-00000009 [Apr 23 11:30:31] WARNING[3796]: chan_sip.c:20457 handle_response_invite: just did sched_add waitid(186) for sip_reinvite_retry for dialog 0b7bfab410d41f6e39601e0000ba34d3@192.168.12.1:5060 in handle_response_invite == Spawn extension (default, 1201, 1) exited non-zero on 'SIP/192.168.12.1-00000008' [Apr 23 11:31:03] WARNING[3796]: chan_sip.c:3656 retrans_pkt: Retransmission timeout reached on transmission 0b7bfab410d41f6e39601e0000ba34d3@192.168.12.1:5060 for seqno 103 (Critical Response) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions Packet timed out after 32000ms with no response debian2*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-5367.1167.24863 2014-04-23 11:31:18.931323355 +0300 +++ /etc/asterisk/sip.conf 2014-04-23 11:45:26.551328017 +0300 @@ -1,11 +1,10 @@ [general] context=default +;canreinvite=no +directmedia=no -; peer -; 1401 - 1499 все Тренера -; 1201 - 1299 все мое - +register => kiev:1234@192.168.12.1/nikolaev ;[1401] ;type=friend @@ -27,3 +26,11 @@ type=friend secret=1234 host=dynamic + + +[nikolaev] +type=friend +secret=1234 +host=dynamic +username=kiev + |
#vim /etc/asterisk/sip.conf
|
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-5367.22601.17202 2014-04-23 11:50:11.059329591 +0300 +++ /etc/asterisk/sip.conf 2014-04-23 11:52:06.211330216 +0300 @@ -6,10 +6,6 @@ register => kiev:1234@192.168.12.1/nikolaev -;[1401] -;type=friend -;secret=1234 -;host=dynamic [1201] type=friend |
#vim /etc/asterisk/sip.conf
|
#vim /etc/asterisk/sip.conf
|
#vim /etc/asterisk/sip.conf
|
#vim /etc/asterisk/sip.conf
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-5367.29326.24521 2014-04-23 12:05:42.827334724 +0300 +++ /etc/asterisk/extensions.conf 2014-04-23 12:08:39.175335684 +0300 @@ -2,4 +2,4 @@ exten => _12xx,1,Dial(SIP/${EXTEN}) - +exten => _11xx,1,Dial(SIP/nikolaev/${EXTEN}) |
#vim /etc/asterisk/extensions.conf
|
#less /etc/asterisk/sip.conf
|
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-5367.27363.7425 2014-04-23 12:23:59.967340744 +0300 +++ /etc/asterisk/sip.conf 2014-04-23 12:24:46.087340999 +0300 @@ -4,8 +4,8 @@ directmedia=no register => kiev:1234@192.168.12.1/nikolaev -register => kiev:1234@192.168.12.1/berlin -register => kiev:1234@192.168.12.1/havana +register => kiev:1234@192.168.12.3/berlin +register => kiev:1234@192.168.12.7/havana [1201] |
#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 debian2 (pid = 3773) Verbosity is at least 999 debian2*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/sip.conf
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-5367.12105.3560 2014-04-23 13:09:52.275355886 +0300 +++ /etc/asterisk/extensions.conf 2014-04-23 13:12:37.011356792 +0300 @@ -3,7 +3,7 @@ exten => _12xx,1,Dial(SIP/${EXTEN}) exten => _11xx,1,Dial(SIP/nikolaev/${EXTEN}) -exten => _3xxx,1,Dial(SIP/havana/${EXTEN}) +exten => _3[12]xx,1,Dial(SIP/havana/${EXTEN}) exten => _xxxx,1,Dial(SIP/berlin/${EXTEN}) |
#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 debian2 (pid = 3773) Verbosity is at least 999 debian2*CLI> quit Executing last minute cleanups |
#screen
|
#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 debian2 (pid = 3773) ... == Using SIP RTP CoS mark 5 ^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[^[Ошибка сегментирования [ [ [Apr 23 13:35:00] NOTICE[3796]: chan_sip.c:22753 handle_request_invite: Call from '1201' (192.168.12.208:5060) to extension '1301' rejected because extension not found in context 'default'. == Spawn extension (default, 2301, 1) exited non-zero on 'SIP/havana-000000a2' == Using SIP RTP CoS mark 5 [Apr 23 13:35:07] NOTICE[3796]: chan_sip.c:22753 handle_request_invite: Call from 'kiev' (192.168.12.7:5060) to extension '1301' rejected because extension not found in context 'default'. == Using SIP RTP CoS mark 5 [Apr 23 13:35:16] NOTICE[3796]: chan_sip.c:22753 handle_request_invite: Call from 'kiev' (192.168.12.7:5060) to extension '1302' rejected because extension not found in context 'default'. |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-6128.6086.20109 2014-04-23 13:19:13.439358973 +0300 +++ /etc/asterisk/extensions.conf 2014-04-23 13:22:49.347360160 +0300 @@ -5,7 +5,7 @@ exten => _11xx,1,Dial(SIP/nikolaev/${EXTEN}) exten => _3[12]xx,1,Dial(SIP/havana/${EXTEN}) -exten => _xxxx,1,Dial(SIP/berlin/${EXTEN}) - - +exten => _2xxx,1,Dial(SIP/berlin/${EXTEN}) +exten => _33xx,1,Dial(SIP/berlin/${EXTEN}) +exten => _14xx,1,Dial(SIP/berlin/${EXTEN}) |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-5367.10154.3004 2014-04-23 13:36:17.407364604 +0300 +++ /etc/asterisk/extensions.conf 2014-04-23 13:36:43.811364751 +0300 @@ -7,5 +7,5 @@ exten => _2xxx,1,Dial(SIP/berlin/${EXTEN}) exten => _33xx,1,Dial(SIP/berlin/${EXTEN}) -exten => _14xx,1,Dial(SIP/berlin/${EXTEN}) +exten => _13xx,1,Dial(SIP/berlin/${EXTEN}) |
#vim /etc/asterisk/extensions.confq
|
#~
[default] exten => _12xx,1,Dial(SIP/${EXTEN}) exten => _11xx,1,Dial(SIP/nikolaev/${EXTEN}) exten => _3[12]xx,1,Dial(SIP/havana/${EXTEN}) exten => _2xxx,1,Dial(SIP/berlin/${EXTEN}) exten => _33xx,1,Dial(SIP/berlin/${EXTEN}) exten => _13xx,1,Dial(SIP/berlin/${EXTEN}) "/etc/asterisk/extensions.conf" 11L, 270C |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-5367.4762.26911 2014-04-23 14:15:06.139377416 +0300 +++ /etc/asterisk/extensions.conf 2014-04-23 14:20:44.851379279 +0300 @@ -1,8 +1,29 @@ [default] +;;exten => _12xx,1,Dial(SIP/${EXTEN}) +;;exten => _11xx,1,Dial(SIP/nikolaev/${EXTEN}) +;;exten => _3[12]xx,1,Dial(SIP/havana/${EXTEN}) +;; +;;exten => _2xxx,1,Dial(SIP/berlin/${EXTEN}) +;;exten => _33xx,1,Dial(SIP/berlin/${EXTEN}) +;;exten => _13xx,1,Dial(SIP/berlin/${EXTEN}) + + +[internal] + + +[local] + exten => _12xx,1,Dial(SIP/${EXTEN}) + +[national] + exten => _11xx,1,Dial(SIP/nikolaev/${EXTEN}) + + +[international] + exten => _3[12]xx,1,Dial(SIP/havana/${EXTEN}) exten => _2xxx,1,Dial(SIP/berlin/${EXTEN}) |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-5367.22587.14343 2014-04-23 14:27:00.983381360 +0300 +++ /etc/asterisk/sip.conf 2014-04-23 14:32:11.707383058 +0300 @@ -17,7 +17,7 @@ type=friend secret=1234 host=dynamic - +context=gr3 [1203] type=friend |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-5367.26132.17588 2014-04-23 14:32:13.663383069 +0300 +++ /etc/asterisk/extensions.conf 2014-04-23 14:36:38.323384580 +0300 @@ -30,6 +30,15 @@ exten => _33xx,1,Dial(SIP/berlin/${EXTEN}) exten => _13xx,1,Dial(SIP/berlin/${EXTEN}) + +[gr_relay] + +inclube => internal +inclube => local +inclube => national +inclube => international + + [gr1] inclube => internal |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-6128.14815.24805 2014-04-23 14:34:19.711383762 +0300 +++ /etc/asterisk/sip.conf 2014-04-23 14:35:31.463384172 +0300 @@ -30,16 +30,19 @@ secret=1234 host=dynamic username=kiev +context=gr_relay [berlin] type=friend secret=1234 host=dynamic username=kiev +context=gr_relay [havana] type=friend secret=1234 host=dynamic username=kiev +context=gr_relay |
#ast
astcanary asterisk astgenkey |
#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 debian2 (pid = 3773) ... -- Executing [5678@gr1:1] Playback("SIP/1201-00000908", "/var/tmp/asterisk/message") in new stack -- <SIP/1201-00000908> Playing '/var/tmp/asterisk/message.gsm' (language 'en') -- Auto fallthrough, channel 'SIP/1201-00000908' status is 'UNKNOWN' -- Executing [h@gr1:1] Playback("SIP/1201-00000908", "/var/tmp/asterisk/message") in new stack [Apr 23 16:18:31] WARNING[7965]: file.c:766 ast_readaudio_callback: Failed to write frame -- <SIP/1201-00000908> Playing '/var/tmp/asterisk/message.gsm' (language 'en') [Apr 23 16:18:31] WARNING[7965]: app_playback.c:475 playback_exec: ast_streamfile failed on SIP/1201-00000908 for /var/tmp/asterisk/message debian2*CLI> debian2*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-5367.4300.17328 2014-04-23 14:45:20.631387397 +0300 +++ /etc/asterisk/extensions.conf 2014-04-23 14:48:03.343388300 +0300 @@ -15,49 +15,47 @@ [local] -exten => _12xx,1,Dial(SIP/${EXTEN}) +exten => _12XX,1,Dial(SIP/${EXTEN}) [national] -exten => _11xx,1,Dial(SIP/nikolaev/${EXTEN}) +exten => _11XX,1,Dial(SIP/nikolaev/${EXTEN}) [international] -exten => _3[12]xx,1,Dial(SIP/havana/${EXTEN}) +exten => _3[12]XX,1,Dial(SIP/havana/${EXTEN}) -exten => _2xxx,1,Dial(SIP/berlin/${EXTEN}) -exten => _33xx,1,Dial(SIP/berlin/${EXTEN}) -exten => _13xx,1,Dial(SIP/berlin/${EXTEN}) +exten => _2XXX,1,Dial(SIP/berlin/${EXTEN}) +exten => _33XX,1,Dial(SIP/berlin/${EXTEN}) +exten => _13XX,1,Dial(SIP/berlin/${EXTEN}) [gr_relay] -inclube => internal -inclube => local -inclube => national -inclube => international +include => internal +include => local +include => national +include => international [gr1] -inclube => internal -inclube => local -inclube => national -inclube => international +include => internal +include => local +include => national +include => international [gr2] -inclube => internal -inclube => local -inclube => national +include => internal +include => local +include => national [gr3] -inclube => internal -inclube => local - - +include => internal +include => local |
#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 debian2 (pid = 3773) Verbosity is at least 999 == Using SIP RTP CoS mark 5 ... -- Executing [2201@gr_relay:1] Dial("SIP/nikolaev-00000164", "SIP/berlin/2201") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/berlin/2201 -- SIP/berlin-00000165 answered SIP/nikolaev-00000164 -- Locally bridging SIP/nikolaev-00000164 and SIP/berlin-00000165 == Spawn extension (gr_relay, 2201, 1) exited non-zero on 'SIP/nikolaev-00000164' == Using SIP RTP CoS mark 5 [Apr 23 14:50:05] NOTICE[3796]: chan_sip.c:22753 handle_request_invite: Call from '1202' (192.168.12.102:5060) to extension '1101' rejected because extension not found in context 'gr3'. debian2*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
|
#{EXTEN})
итого 20 lrwxrwxrwx 1 root root 36 Янв 4 03:07 custom -> ../../../local/share/asterisk/sounds lrwxrwxrwx 1 root root 36 Апр 22 14:27 en -> /etc/alternatives/asterisk-prompt-en lrwxrwxrwx 1 root root 39 Апр 22 14:27 en_US -> /etc/alternatives/asterisk-prompt-en-us drwxr-xr-x 8 root root 20480 Апр 22 14:26 en_US_f_Allison lrwxrwxrwx 1 root root 31 Янв 4 03:07 recordings -> /var/lib/asterisk/sounds/custom |
#ls -l /usr/share/asterisk/sounds/en/ | less
|
#ls -l /usr/share/asterisk/sounds/en/ | less
|
#mkdir -p /var/tmp/asterisk/
|
Время первой команды журнала | 13:56:25 2014- 4-22 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 14:57:56 2014- 4-23 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 100 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 15.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 7.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 4.29 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.39 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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