/l3/users/maxim/ais-voip-2011-jun/linux2.unix.ais/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 |
|
#l3-agent
l3-agent is already running: pid=4799; pidfile=/root/.lilalo/l3-agent.pid |
#l3-agent
l3-agent is already running: pid=4799; pidfile=/root/.lilalo/l3-agent.pid |
#pkill l3-agent
|
#l3-agent
l3-agent is already running: pid=4799; pidfile=/root/.lilalo/l3-agent.pid |
#l3-agent
l3-agent is already running: pid=4799; pidfile=/root/.lilalo/l3-agent.pid |
#ls /
bin dev home lib lost+found mnt proc sbin srv tmp var boot etc initrd.img lib64 media opt root selinux sys usr vmlinuz |
#ls /
bin dev home lib lost+found mnt proc sbin srv tmp var boot etc initrd.img lib64 media opt root selinux sys usr vmlinuz |
#apt-get install asterisk
Настройка пакета ┌──────────────────────┤ Настраивается пакет libvpb0 ├──────────────────────┐ │ Здесь задаётся код региона вашей телефонной системы (например, 61 -- │ │ Австралия, 7 -- Россия). Он используется для настройки региональных │ │ стандартов по умолчанию, которые должно соблюдать оборудование телефонии │ │ Voicetronix. │ │ │ │ Телефонный код, согласно ITU-T: │ │ │ │ 7________________________________________________________________________ │ ... Настраивается пакет unixodbc (2.2.14p2-1) ... Настраивается пакет asterisk (1:1.6.2.9-2+squeeze2) ... Adding system user for Asterisk Добавляется пользователь «asterisk» в группу «dialout» ... Добавление пользователя asterisk в группу dialout Готово. Добавляется пользователь «asterisk» в группу «audio» ... Добавление пользователя asterisk в группу audio Готово. Starting Asterisk PBX: asterisk. |
#apt-get install asterisk
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово Настройка пакета ┌──────────────────────┤ Настраивается пакет libvpb0 ├──────────────────────┐ │ Здесь задаётся код региона вашей телефонной системы (например, 61 -- │ │ Австралия, 7 -- Россия). Он используется для настройки региональных │ │ стандартов по умолчанию, которые должно соблюдать оборудование телефонии │ │ Voicetronix. │ │ │ ... Настраивается пакет unixodbc (2.2.14p2-1) ... Настраивается пакет asterisk (1:1.6.2.9-2+squeeze2) ... Adding system user for Asterisk Добавляется пользователь «asterisk» в группу «dialout» ... Добавление пользователя asterisk в группу dialout Готово. Добавляется пользователь «asterisk» в группу «audio» ... Добавление пользователя asterisk в группу audio Готово. Starting Asterisk PBX: asterisk. |
#apt-get install asterisk-sounds-extra
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово НОВЫЕ пакеты, которые будут установлены: asterisk-sounds-extra обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено. Необходимо скачать 3 419 kБ архивов. После данной операции, объём занятого дискового пространства возрастёт на 6 562 kB. Получено:1 http://192.168.15.253/debian/ squeeze/main asterisk-sounds-extra all 1.4.9-1 [3 419 kB] Получено 3 419 kБ за 0с (5 772 kБ/c) Выбор ранее не выбранного пакета asterisk-sounds-extra. (Чтение базы данных ... на данный момент установлено 109272 файла и каталога.) Распаковывается пакет asterisk-sounds-extra (из файла .../asterisk-sounds-extra_1.4.9-1_all.deb)... Настраивается пакет asterisk-sounds-extra (1.4.9-1) ... |
#apt-get install asterisk-sounds-extra
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово НОВЫЕ пакеты, которые будут установлены: asterisk-sounds-extra обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено. Необходимо скачать 3 419 kБ архивов. После данной операции, объём занятого дискового пространства возрастёт на 6 562 kB. Получено:1 http://192.168.15.253/debian/ squeeze/main asterisk-sounds-extra all 1.4.9-1 [3 419 kB] Получено 3 419 kБ за 0с (5 772 kБ/c) Выбор ранее не выбранного пакета asterisk-sounds-extra. (Чтение базы данных ... на данный момент установлено 109272 файла и каталога.) Распаковывается пакет asterisk-sounds-extra (из файла .../asterisk-sounds-extra_1.4.9-1_all.deb)... Настраивается пакет asterisk-sounds-extra (1.4.9-1) ... |
#ls /usr/share/asterisk/sounds
1-for-am-2-for-pm.gsm 1-yes-2-no.gsm abandon-all-hope.gsm abandons.gsm academic-support.gsm access-code.gsm access-denied.gsm access-granted.gsm accessible-through-system.gsm account-balance-is.gsm ... your.gsm your-msg-has-been-saved.gsm your-msg-is-too-short.gsm your-notifications.gsm your-req-notification.gsm your-temp-greeting.gsm you-seem-impatient.gsm you-sound-cute.gsm you-wish-to-join.gsm zip-code.gsm |
#ls /usr/share/asterisk/sounds
1-for-am-2-for-pm.gsm 1-yes-2-no.gsm abandon-all-hope.gsm abandons.gsm academic-support.gsm access-code.gsm access-denied.gsm access-granted.gsm accessible-through-system.gsm account-balance-is.gsm ... your.gsm your-msg-has-been-saved.gsm your-msg-is-too-short.gsm your-notifications.gsm your-req-notification.gsm your-temp-greeting.gsm you-seem-impatient.gsm you-sound-cute.gsm you-wish-to-join.gsm zip-code.gsm |
#vim sip.conf
--- /dev/null 2011-06-27 16:38:02.932501586 +0400 +++ sip.conf 2011-06-27 16:48:48.000000000 +0400 @@ -0,0 +1,6 @@ +context=default +[1201] +type=friend +secret=1234 +host=dynamic +canreinvate=no |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze2 currently running on linux2 (pid = 6950) linux2*CLI> sip reload linux2*CLI> sip show peers ... Name/username Host Dyn Nat ACL Port Status 1201/1201 192.168.15.225 D 59622 Unmonitored 1 sip peers [Monitored: 0 online, 0 offline Unmonitored: 1 online, 0 offline] [Jun 27 17:06:47] NOTICE[6989]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 27 17:07:48] NOTICE[6989]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 27 17:09:49] NOTICE[6989]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 27 17:12:50] NOTICE[6989]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 27 17:15:51] NOTICE[6989]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 27 17:18:51] NOTICE[6989]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 linux2*CLI> exit |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze2 currently running on linux2 (pid = 6950) linux2*CLI> sip reload linux2*CLI> sip show peers ... Name/username Host Dyn Nat ACL Port Status 1201/1201 192.168.15.225 D 59622 Unmonitored 1 sip peers [Monitored: 0 online, 0 offline Unmonitored: 1 online, 0 offline] [Jun 27 17:06:47] NOTICE[6989]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 27 17:07:48] NOTICE[6989]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 27 17:09:49] NOTICE[6989]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 27 17:12:50] NOTICE[6989]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 27 17:15:51] NOTICE[6989]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 27 17:18:51] NOTICE[6989]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 linux2*CLI> exit |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) linux2*CLI> sip show peers Name/username Host Dyn Nat ACL Port Status 1201/1201 192.168.15.228 D 53432 Unmonitored 1202 (Unspecified) D 5060 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline] [Jun 28 10:17:45] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 10:17:47] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 linux2*CLI> exit |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) linux2*CLI> sip show peers Name/username Host Dyn Nat ACL Port Status 1201/1201 192.168.15.228 D 53432 Unmonitored 1202 (Unspecified) D 5060 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline] [Jun 28 10:17:45] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 10:17:47] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 linux2*CLI> exit |
#ping ya.ru
PING ya.ru (77.88.21.3) 56(84) bytes of data. 64 bytes from www.yandex.ru (77.88.21.3): icmp_req=1 ttl=56 time=4.11 ms 64 bytes from www.yandex.ru (77.88.21.3): icmp_req=2 ttl=56 time=3.84 ms ^C --- ya.ru ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1000ms rtt min/avg/max/mdev = 3.842/3.979/4.117/0.151 ms |
#ping ya.ru
PING ya.ru (77.88.21.3) 56(84) bytes of data. 64 bytes from www.yandex.ru (77.88.21.3): icmp_req=1 ttl=56 time=4.11 ms 64 bytes from www.yandex.ru (77.88.21.3): icmp_req=2 ttl=56 time=3.84 ms ^C --- ya.ru ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1000ms rtt min/avg/max/mdev = 3.842/3.979/4.117/0.151 ms |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) [Jun 28 10:20:19] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 10:22:20] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 ... notify prune qualify reload set show unregister linux2*CLI> sip notify prune qualify reload set show unregister linux2*CLI> sip show p peers peer [Jun 28 10:28:01] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 10:29:02] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 linux2*CLI> exit |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) [Jun 28 10:20:19] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 10:22:20] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 ... notify prune qualify reload set show unregister linux2*CLI> sip notify prune qualify reload set show unregister linux2*CLI> sip show p peers peer [Jun 28 10:28:01] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 10:29:02] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 linux2*CLI> exit |
#vim sip.conf
--- /tmp/l3-saved-2329.10470.17409 2011-06-28 10:35:45.000000000 +0400 +++ sip.conf 2011-06-28 10:36:30.000000000 +0400 @@ -12,3 +12,4 @@ secret=1234 host=dynamic canreinvite=no + |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) linux2*CLI> sip reload linux2*CLI> sip show peers ... 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline] [Jun 28 10:37:04] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 10:40:05] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 10:43:05] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 10:45:24] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 10:46:26] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 10:48:27] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 10:51:27] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 10:54:28] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 linux2*CLI> exit |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) linux2*CLI> sip reload linux2*CLI> sip show peers ... 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline] [Jun 28 10:37:04] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 10:40:05] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 10:43:05] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 10:45:24] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 10:46:26] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 10:48:27] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 10:51:27] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 10:54:28] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 linux2*CLI> exit |
#tail /var/log/deamon.log
tail: невозможно открыть «/var/log/deamon.log» для чтения: Нет такого файла или каталога |
#tail /var/log/deamon.log
tail: невозможно открыть «/var/log/deamon.log» для чтения: Нет такого файла или каталога |
#mv extenshion.conf extenshion.conf.SAVE
mv: невозможно выполнить stat для «extenshion.conf»: Нет такого файла или каталога |
#mv extenshion.conf extenshion.conf.SAVE
mv: невозможно выполнить stat для «extenshion.conf»: Нет такого файла или каталога |
#mv extenshions.conf extenshions.conf.SAVE
mv: невозможно выполнить stat для «extenshions.conf»: Нет такого файла или каталога |
#mv extenshions.conf extenshions.conf.SAVE
mv: невозможно выполнить stat для «extenshions.conf»: Нет такого файла или каталога |
#vim extensions.conf
--- /dev/null 2011-06-28 10:14:07.005087511 +0400 +++ extensions.conf 2011-06-28 11:09:49.000000000 +0400 @@ -0,0 +1,4 @@ + +[default] + +exten => 8000,1,Playback(welcom) |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) linux2*CLI> dialplan reload Dialplan reloaded. linux2*CLI> dialplan reload Dialplan reloaded. [Jun 28 11:18:36] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 linux2*CLI> exit |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) linux2*CLI> dialplan reload Dialplan reloaded. linux2*CLI> dialplan reload Dialplan reloaded. [Jun 28 11:18:36] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 linux2*CLI> exit |
#vim extensions.conf
--- /tmp/l3-saved-2329.20508.27123 2011-06-28 11:19:57.000000000 +0400 +++ extensions.conf 2011-06-28 11:24:33.000000000 +0400 @@ -3,3 +3,5 @@ exten => 8000,1,Playback(welcome) +exten => _12XX,1,Answer +exten => _12XX,n,Dial(SIP/${EXTEN}) |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) [Jun 28 11:24:37] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 linux2*CLI> dialplan reload Dialplan reloaded. linux2*CLI> exit |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) [Jun 28 11:24:37] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 linux2*CLI> dialplan reload Dialplan reloaded. linux2*CLI> exit |
#[ ]
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) linux2*CLI> dialplan reload Dialplan reloaded. [Jun 28 11:27:37] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 11:27:44] NOTICE[1375]: chan_sip.c:20281 handle_request_invite: Call from '1201' to extension '1101' rejected because extension not found in context 'default'. [Jun 28 11:28:01] WARNING[2783]: chan_sip.c:5467 create_addr: No such host: 1206 [Jun 28 11:28:01] WARNING[2783]: app_dial.c:1747 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Unknown) linux2*CLI> exit |
#[ ]
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) linux2*CLI> dialplan reload Dialplan reloaded. [Jun 28 11:27:37] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 11:27:44] NOTICE[1375]: chan_sip.c:20281 handle_request_invite: Call from '1201' to extension '1101' rejected because extension not found in context 'default'. [Jun 28 11:28:01] WARNING[2783]: chan_sip.c:5467 create_addr: No such host: 1206 [Jun 28 11:28:01] WARNING[2783]: app_dial.c:1747 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Unknown) linux2*CLI> exit |
#[ ]
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) linux2*CLI> console dial 1201 [Jun 28 11:29:07] WARNING[2809]: chan_oss.c:486 setformat: Unable to re-open DSP device /dev/dsp: No such file or directory ... [Jun 28 11:45:36] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 11:46:16] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 11:47:12] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 11:48:13] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 11:50:14] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 11:53:17] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 11:56:17] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 11:59:18] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 12:02:18] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 linux2*CLI> exit |
#[ ]
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) linux2*CLI> console dial 1201 [Jun 28 11:29:07] WARNING[2809]: chan_oss.c:486 setformat: Unable to re-open DSP device /dev/dsp: No such file or directory ... [Jun 28 11:45:36] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 11:46:16] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 11:47:12] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 11:48:13] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 11:50:14] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 11:53:17] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 11:56:17] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 11:59:18] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 [Jun 28 12:02:18] NOTICE[1375]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201 linux2*CLI> exit |
#vim sip.conf
--- /tmp/l3-saved-2329.5057.1702 2011-06-28 12:03:31.000000000 +0400 +++ sip.conf 2011-06-28 12:10:20.000000000 +0400 @@ -1,15 +1,25 @@ [general] context=default +register => msk:password@192.168.15.1/ast + [1201] type=friend secret=1234 host=dynamic canreinvite=no -[1202] +[v1202] type=friend secret=1234 host=dynamic canreinvite=no +[ast] +type=friend +secret=password +host=dynamic +canreinvite=no +username=msk + + |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) linux2*CLI> exit |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) linux2*CLI> exit |
#asterisk
Asterisk already running on /var/run/asterisk/asterisk.ctl. Use 'asterisk -r' to connect. |
#asterisk
Asterisk already running on /var/run/asterisk/asterisk.ctl. Use 'asterisk -r' to connect. |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) [Jun 28 12:11:40] NOTICE[1375]: chan_sip.c:11696 sip_reg_timeout: -- Registration for 'msk@192.168.15.1' timed out, trying again (Attempt #1) linux2*CLI> sip show peers Name/username Host Dyn Nat ACL Port Status 1201/1201 192.168.15.228 D 35118 Unmonitored ast/msk (Unspecified) D 5060 Unmonitored v1202 (Unspecified) D 5060 Unmonitored 3 sip peers [Monitored: 0 online, 0 offline Unmonitored: 3 online, 0 offline] linux2*CLI> exit |
#asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze2 currently running on linux2 (pid = 1214) [Jun 28 12:11:40] NOTICE[1375]: chan_sip.c:11696 sip_reg_timeout: -- Registration for 'msk@192.168.15.1' timed out, trying again (Attempt #1) linux2*CLI> sip show peers Name/username Host Dyn Nat ACL Port Status 1201/1201 192.168.15.228 D 35118 Unmonitored ast/msk (Unspecified) D 5060 Unmonitored v1202 (Unspecified) D 5060 Unmonitored 3 sip peers [Monitored: 0 online, 0 offline Unmonitored: 3 online, 0 offline] linux2*CLI> exit |
#ping 192.168.15.1
PING 192.168.15.1 (192.168.15.1) 56(84) bytes of data. 64 bytes from 192.168.15.1: icmp_req=1 ttl=64 time=0.123 ms 64 bytes from 192.168.15.1: icmp_req=2 ttl=64 time=0.119 ms ^C --- 192.168.15.1 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.119/0.121/0.123/0.002 ms |
#ping 192.168.15.1
PING 192.168.15.1 (192.168.15.1) 56(84) bytes of data. 64 bytes from 192.168.15.1: icmp_req=1 ttl=64 time=0.123 ms 64 bytes from 192.168.15.1: icmp_req=2 ttl=64 time=0.119 ms ^C --- 192.168.15.1 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.119/0.121/0.123/0.002 ms |
Время первой команды журнала | 14:04:05 2011- 6-27 | ||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 10:12:10 2011- 6-28 | ||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 100 | ||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 30.00 | ||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 2.00 | ||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.18 | ||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.76 | ||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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