/l3/users/bds/ais-voip-2011-jun/linux4.unix.ais/root :1 :2 |
|
#vim ~/.bash_profile
|
#l3-agent
|
#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-cashe search asterisk extra
bash: apt-cashe: команда не найдена |
#apt-cache search asterisk extra
asterisk-moh-opsound-g722 - asterisk extra sound files - English/g722 asterisk-moh-opsound-gsm - asterisk extra sound files - English/gsm asterisk-moh-opsound-wav - asterisk extra sound files - English/wav asterisk-sounds-extra - Additional sound files for the Asterisk PBX |
#apt-get install asterisk-sound-extra
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово E: Не удалось найти пакет asterisk-sound-extra |
#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с (4 832 kБ/c) Выбор ранее не выбранного пакета asterisk-sounds-extra. (Чтение базы данных ... на данный момент установлено 109058 файлов и каталогов.) Распаковывается пакет asterisk-sounds-extra (из файла .../asterisk-sounds-extra_1.4.9-1_all.deb)... Настраивается пакет asterisk-sounds-extra (1.4.9-1) ... |
#dpkg -L asterisk | less
|
#cd etc/asterisk
bash: cd: etc/asterisk: Нет такого файла или каталога |
#cd /etc/asterisk
|
#mv sip.conf sip.conf.save
|
#vim sip.conf
--- /dev/null 2011-06-27 14:44:11.435282546 +0400 +++ sip.conf 2011-06-27 16:48:45.000000000 +0400 @@ -0,0 +1,6 @@ +context=default +[2201] +type=friend +secret=1234 +host=dynamic +canreinvite=no |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#sip reload
bash: sip: команда не найдена |
#asterisk -rvvv
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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux4 (pid = 5488) Verbosity was 0 and is now 3 linux4*CLI> sip reload No such command 'sip reload' (type 'core show help sip reload' for other possible commands) linux4*CLI> exit Executing last minute cleanups |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#mv extensions.
extensions.ael extensions.conf extensions.lua |
#dir
adsi.conf extconfig.conf oss.conf adtranvofr.conf extensions.ael phone.conf agents.conf extensions.conf phoneprov.conf ais.conf extensions.lua queuerules.conf alarmreceiver.conf extensions_minivm.conf queues.conf alsa.conf features.conf res_config_sqlite.conf amd.conf festival.conf res_ldap.conf asterisk.adsi followme.conf res_odbc.conf asterisk.conf func_odbc.conf res_pgsql.conf cdr_adaptive_odbc.conf gtalk.conf res_snmp.conf ... cli_aliases.conf manager.conf smdi.conf cli.conf manager.d telcordia-1.adsi cli_permissions.conf meetme.conf udptl.conf codecs.conf mgcp.conf unistim.conf console.conf minivm.conf usbradio.conf dbsep.conf misdn.conf users.conf dnsmgr.conf modules.conf voicemail.conf dsp.conf musiconhold.conf vpb.conf dundi.conf muted.conf enum.conf osp.conf |
#mv extensions.conf extensions.conf.save
|
#vim ^C
|
#vim extensions.conf
--- /tmp/l3-saved-2394.8163.8487 2011-06-28 11:12:34.000000000 +0400 +++ extensions.conf 2011-06-28 11:14:24.000000000 +0400 @@ -0,0 +1,3 @@ +[default] + +exten => 8000,1,Playback(welcome) |
#vim extensions.conf
|
#~
bash: asrerisk: команда не найдена |
#vim extensions.conf
--- /tmp/l3-saved-2394.27362.21622 2011-06-28 11:19:33.000000000 +0400 +++ extensions.conf 2011-06-28 11:25:24.000000000 +0400 @@ -1,3 +1,7 @@ [default] exten => 8000,1,Playback(welcome) + +exten => _22xx,1,Answer +exten => _22XX,n,Dial(SIP/${EXTEN}) + |
#asrerisk -rvvv
bash: asrerisk: команда не найдена |
#asterisk -rvvv
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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux4 (pid = 5583) Verbosity is at least 3 linux4*CLI> sip show peers Name/username Host Dyn Nat ACL Port Status 2201/2201 192.168.15.224 D 5060 Unmonitored 1 sip peers [Monitored: 0 online, 0 offline Unmonitored: 1 online, 0 offline] [Jun 28 11:25:57] NOTICE[5623]: chan_sip.c:21768 handle_request_register: Registration from '"2202"<sip:2202@192.168.15.4>' failed for '192.168.15.240' - No matching peer found linux4*CLI> exit Executing last minute cleanups |
#~
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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux4 (pid = 5583) ... [Jun 28 11:34:07] NOTICE[5623]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2202 [Jun 28 11:37:07] NOTICE[5623]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2202 [Jun 28 11:40:07] NOTICE[5623]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2202 [Jun 28 11:43:07] NOTICE[5623]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2202 [Jun 28 11:46:07] NOTICE[5623]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2202 [Jun 28 11:49:07] NOTICE[5623]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2202 [Jun 28 11:52:07] NOTICE[5623]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2202 [Jun 28 11:55:07] NOTICE[5623]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2202 linux4*CLI> exit Executing last minute cleanups |
#asterisk -rvvv
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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux4 (pid = 5583) Verbosity is at least 3 [Jun 28 12:13:07] NOTICE[5623]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2202 linux4*CLI> sip reload Reloading SIP == Parsing '/etc/asterisk/sip.conf': == Found == Parsing '/etc/asterisk/users.conf': == Found [Jun 28 12:13:15] NOTICE[5623]: chan_sip.c:24174 build_peer: The 'username' field for sip peers has been deprecated in favor of the term 'defaultuser' == Parsing '/etc/asterisk/sip_notify.conf': == Found [Jun 28 12:13:15] WARNING[5623]: chan_sip.c:18287 handle_response_register: Got 404 Not found on SIP register to service gr@192.168.15.6, giving up linux4*CLI> exit Executing last minute cleanups |
#vim sip.conf
--- /tmp/l3-saved-2394.14416.12215 2011-06-28 12:13:43.000000000 +0400 +++ sip.conf 2011-06-28 12:14:21.000000000 +0400 @@ -1,7 +1,7 @@ [general] context=default -register => gr:1234@192.168.15.6/mn +register => gr:1234@192.168.15.3/mn [2201] type=friend |
#asterisk -rvvv
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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux4 (pid = 5583) ... -- Packet2Packet bridging SIP/192.168.15.3-00000008 and SIP/2201-00000009 == Spawn extension (default, 2201, 2) exited non-zero on 'SIP/192.168.15.3-00000008' == Using SIP RTP CoS mark 5 [Jun 28 12:20:44] NOTICE[5623]: chan_sip.c:20281 handle_request_invite: Call from '2201' to extension '2101' rejected because extension not found in context 'default'. == Using SIP RTP CoS mark 5 [Jun 28 12:20:51] NOTICE[5623]: chan_sip.c:20281 handle_request_invite: Call from '2201' to extension '2101' rejected because extension not found in context 'default'. linux4*CLI> exit\ No such command 'exit\' (type 'core show help exit' for other possible commands) linux4*CLI> exit Executing last minute cleanups |
#vim extensions.conf
--- /tmp/l3-saved-2394.10531.27605 2011-06-28 12:21:24.000000000 +0400 +++ extensions.conf 2011-06-28 12:22:48.000000000 +0400 @@ -5,3 +5,5 @@ exten => _22xx,1,Answer exten => _22XX,n,Dial(SIP/${EXTEN}) +exten => _21xx,1,Answer +exten => _21XX,n,Dial(SIP/mn/${EXTEN}) |
#asterisk -rvvv
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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux4 (pid = 5583) ... -- Auto fallthrough, channel 'SIP/2201-0000000f' status is 'CHANUNAVAIL' == Using SIP RTP CoS mark 5 -- Executing [2101@default:1] Answer("SIP/2201-00000010", "") in new stack -- Executing [2101@default:2] Dial("SIP/2201-00000010", "SIP/mn/2101") in new stack == Using SIP RTP CoS mark 5 [Jun 28 12:24:31] WARNING[6640]: app_dial.c:1747 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Unknown) == Everyone is busy/congested at this time (1:0/0/1) -- Auto fallthrough, channel 'SIP/2201-00000010' status is 'CHANUNAVAIL' linux4*CLI> exit Executing last minute cleanups |
#vim extensions.conf
--- /tmp/l3-saved-2394.6758.12839 2011-06-28 12:25:10.000000000 +0400 +++ extensions.conf 2011-06-28 12:25:49.000000000 +0400 @@ -2,8 +2,8 @@ exten => 8000,1,Playback(welcome) -exten => _22xx,1,Answer +exten => _22XX,1,Answer exten => _22XX,n,Dial(SIP/${EXTEN}) -exten => _21xx,1,Answer +exten => _21XX,1,Answer exten => _21XX,n,Dial(SIP/mn/${EXTEN}) |
#asterisk -rvvv
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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux4 (pid = 5583) ... -- Called 2201 [Jun 28 12:28:02] NOTICE[6677]: channel.c:3066 __ast_read: Dropping incompatible voice frame on SIP/mn-00000013 of format ulaw since our native format has changed to 0x8 (alaw) -- SIP/2201-00000014 is ringing -- SIP/2201-00000014 answered SIP/mn-00000013 [Jun 28 12:28:08] NOTICE[5623]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2202 == Spawn extension (default, 2201, 2) exited non-zero on 'SIP/mn-00000013' [Jun 28 12:31:08] NOTICE[5623]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2202 [Jun 28 12:34:08] NOTICE[5623]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2202 linux4*CLI> exit Executing last minute cleanups |
#vim extensions.conf
|
#~
[2203] [2203] secret=1234 [2203] [mn] secret=1234 [mn]=dynamic [mn] canreinvite=no username=gr type=friend 30,0-1 Внизу |
#vim sip.conf
--- /tmp/l3-saved-2394.7378.12890 2011-06-28 12:45:05.000000000 +0400 +++ sip.conf 2011-06-28 12:45:58.000000000 +0400 @@ -28,3 +28,4 @@ canreinvite=no username=gr + |
#asterisk -rvvv
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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux4 (pid = 5583) ... -- SIP/2201-00000026 is ringing == Spawn extension (default, 2201, 2) exited non-zero on 'SIP/mn-00000025' [Jun 28 13:07:08] NOTICE[5623]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2202 [Jun 28 13:10:08] NOTICE[5623]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2202 [Jun 28 13:13:08] NOTICE[5623]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2202 [Jun 28 13:16:08] NOTICE[5623]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2202 [Jun 28 13:19:08] NOTICE[5623]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2202 [Jun 28 13:22:08] NOTICE[5623]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2202 linux4*CLI> exit Executing last minute cleanups |
#vim sip.conf
--- /tmp/l3-saved-2394.13659.9500 2011-06-28 13:24:58.000000000 +0400 +++ sip.conf 2011-06-28 13:27:17.000000000 +0400 @@ -8,12 +8,16 @@ secret=1234 host=dynamic canreinvite=no +callerid="Dmitriy" <2201> [2202] type=friend secret=1234 host=dynamic canreinvite=no +callerid="Dmitriy softfon " <2202> + + [2203] type=friend |
#asterisk -rvvv
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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux4 (pid = 5583) ... -- Executing [2201@default:2] Dial("SIP/mn-0000002d", "SIP/2201") in new stack == Using SIP RTP CoS mark 5 -- Called 2201 [Jun 28 13:29:51] NOTICE[6866]: channel.c:3066 __ast_read: Dropping incompatible voice frame on SIP/mn-0000002d of format ulaw since our native format has changed to 0x2 (gsm) -- SIP/2201-0000002e is ringing == Spawn extension (default, 2201, 2) exited non-zero on 'SIP/mn-0000002d' [Jun 28 13:31:08] NOTICE[5623]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2202 [Jun 28 13:34:08] NOTICE[5623]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2202 linux4*CLI> exit Executing last minute cleanups |
#vim extensions.conf
--- /tmp/l3-saved-2394.21667.11528 2011-06-28 13:34:20.000000000 +0400 +++ extensions.conf 2011-06-28 13:40:25.000000000 +0400 @@ -1,16 +1,41 @@ [default] +[internal] exten => 8000,1,Playback(welcome) + +[local] exten => _22XX,1,Answer exten => _22XX,n,Dial(SIP/${EXTEN}) +[national] exten => _21XX,1,Answer exten => _21XX,n,Dial(SIP/mn/${EXTEN}) +[international] + + exten => _11XX,1,Dial(SIP/mn/${EXTEN}) exten => _12XX,1,Dial(SIP/mn/${EXTEN}) exten => _31XX,1,Dial(SIP/mn/${EXTEN}) exten => _32XX,1,Dial(SIP/mn/${EXTEN}) +[gr1] + +include => local +include => internal + + +[gr2] + +include => local +include => internal +include => national + +[gr3] + +include => local +include => national +include => international +include => internal |
#vim sip.conf
--- /tmp/l3-saved-2394.4048.24603 2011-06-28 13:40:30.000000000 +0400 +++ sip.conf 2011-06-28 13:49:25.000000000 +0400 @@ -1,35 +1,40 @@ [general] -context=default +context=gr1 -register => gr:1234@192.168.15.3/mn - -[2201] +[2202] type=friend secret=1234 host=dynamic canreinvite=no -callerid="Dmitriy" <2201> +callerid="Dmitriy softfon " <2202> -[2202] +context=gr2 + +[mn] type=friend secret=1234 host=dynamic canreinvite=no -callerid="Dmitriy softfon " <2202> +username=gr +context=gr3 -[2203] +[2201] + type=friend secret=1234 host=dynamic canreinvite=no +callerid="Dmitriy" <2201> -[mn] +[2203] type=friend secret=1234 host=dynamic canreinvite=no -username=gr +context=gr4 + +register => gr:1234@192.168.15.3/mn |
#vim extensions.conf
--- /tmp/l3-saved-2394.5552.24608 2011-06-28 13:49:28.000000000 +0400 +++ extensions.conf 2011-06-28 13:50:58.000000000 +0400 @@ -39,3 +39,10 @@ include => international include => internal +[gr4] + +include => local +include => national +include => international + + |
#asterisk -rvvv
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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux4 (pid = 5583) ... -- Executing [2101@gr2:2] Dial("SIP/2202-00000035", "SIP/mn/2101") in new stack == Using SIP RTP CoS mark 5 -- Called mn/2101 -- SIP/mn-00000036 is circuit-busy == Everyone is busy/congested at this time (1:0/1/0) -- Auto fallthrough, channel 'SIP/2202-00000035' status is 'CONGESTION' == Using SIP RTP CoS mark 5 [Jun 28 13:53:00] NOTICE[5623]: chan_sip.c:20281 handle_request_invite: Call from '2201' to extension '2101' rejected because extension not found in context 'gr1'. linux4*CLI> exit Executing last minute cleanups |
#vim sip.conf
--- /tmp/l3-saved-2394.1651.28282 2011-06-28 13:53:17.000000000 +0400 +++ sip.conf 2011-06-28 13:53:56.000000000 +0400 @@ -34,6 +34,13 @@ host=dynamic canreinvite=no +[mn] +type=friend +secret=1234 +host=dynamic +canreinvite=no +username=gr + context=gr4 register => gr:1234@192.168.15.3/mn |
#asterisk -rvvv
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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux4 (pid = 5583) Verbosity is at least 3 linux4*CLI> sip reload Reloading SIP == Parsing '/etc/asterisk/sip.conf': == Found == Parsing '/etc/asterisk/users.conf': == Found == Parsing '/etc/asterisk/sip_notify.conf': == Found == Using SIP RTP CoS mark 5 [Jun 28 13:54:10] NOTICE[5623]: chan_sip.c:20281 handle_request_invite: Call from '2201' to extension '2101' rejected because extension not found in context 'gr1'. linux4*CLI> exit Executing last minute cleanups |
#vim sip.conf
--- /tmp/l3-saved-2394.13576.21164 2011-06-28 13:54:44.000000000 +0400 +++ sip.conf 2011-06-28 14:40:37.000000000 +0400 @@ -1,5 +1,7 @@ [general] -context=gr1 + +register => gr:1234@192.168.15.3/mn + [2202] type=friend @@ -7,8 +9,7 @@ host=dynamic canreinvite=no callerid="Dmitriy softfon " <2202> - -context=gr2 +context=gr1 [mn] type=friend @@ -16,32 +17,16 @@ host=dynamic canreinvite=no username=gr - context=gr3 [2201] - type=friend secret=1234 host=dynamic canreinvite=no callerid="Dmitriy" <2201> +context=gr3 -[2203] -type=friend -secret=1234 -host=dynamic -canreinvite=no - -[mn] -type=friend -secret=1234 -host=dynamic -canreinvite=no -username=gr - -context=gr4 -register => gr:1234@192.168.15.3/mn |
#asterisk -rvvv
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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux4 (pid = 5583) ... == Using SIP RTP CoS mark 5 -- Executing [1103@gr3:1] Dial("SIP/2201-0000003d", "SIP/mn/1103") in new stack == Using SIP RTP CoS mark 5 -- Called mn/1103 -- SIP/mn-0000003e answered SIP/2201-0000003d -- Packet2Packet bridging SIP/2201-0000003d and SIP/mn-0000003e == Spawn extension (gr3, 1103, 1) exited non-zero on 'SIP/2201-0000003d' [Jun 28 14:43:11] NOTICE[5623]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2202 linux4*CLI> exit Executing last minute cleanups |
#vim sip
|
#~
context=gr1 "sip.conf" 32L, 339C [2202] [2202] type=friend secret=1234 host=dynamic [mn]einvite=no [mn] username=gr context=gr3 [2201] 23,1 Наверху |
#hostname -f
linux4.unix.ais |
#host linux4.unix.ais
linux4.unix.ais has address 192.168.15.4 |
#host 192.168.15.4
4.15.168.192.in-addr.arpa domain name pointer linux4.unix.ais. |
#cd /etc/mail
|
#cat local-host-name
cat: local-host-name: Нет такого файла или каталога |
#vim access
--- /tmp/l3-saved-2394.7782.24241 2011-06-28 15:18:27.000000000 +0400 +++ access 2011-06-28 15:19:41.000000000 +0400 @@ -97,10 +97,10 @@ #Connect:172.29 RELAY #Connect:172.30 RELAY #Connect:172.31 RELAY -#Connect:192.168 RELAY -#GreetPause:192.168 0 -#ClientRate:192.168 0 -#ClientConn:192.168 0 +Connect:192.168.15 RELAY +GreetPause:192.168.15 0 +ClientRate:192.168.15 0 +ClientConn:192.168.15 0 # Defaults GreetPause: 5000 ClientRate: 10 |
#vim sendmail.mc
--- /tmp/l3-saved-2394.30098.8450 2011-06-28 15:20:08.000000000 +0400 +++ sendmail.mc 2011-06-28 15:23:29.000000000 +0400 @@ -54,9 +54,9 @@ dnl # FEATURE(`no_default_msa')dnl dnl DAEMON_OPTIONS(`Family=inet6, Name=MTA-v6, Port=smtp, Addr=::1')dnl -DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl +DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=0.0.0.0')dnl dnl DAEMON_OPTIONS(`Family=inet6, Name=MSP-v6, Port=submission, M=Ea, Addr=::1')dnl -DAEMON_OPTIONS(`Family=inet, Name=MSP-v4, Port=submission, M=Ea, Addr=127.0.0.1')dnl +DAEMON_OPTIONS(`Family=inet, Name=MSP-v4, Port=submission, M=Ea, Addr=0.0.0.0')dnl dnl # dnl # Be somewhat anal in what we allow define(`confPRIVACY_FLAGS',dnl |
#/etc/init.d/sendmail restart
Restarting Mail Transport Agent (MTA): sendmail. |
#netstat -lnp | grep :25
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 8499/sendmail: MTA: |
#apt-get install qpopper
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово Будут установлены следующие дополнительные пакеты: openbsd-inetd НОВЫЕ пакеты, которые будут установлены: openbsd-inetd qpopper обновлено 0, установлено 2 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено. Необходимо скачать 460 kБ архивов. После данной операции, объём занятого дискового пространства возрастёт на 745 kB. ... Выбор ранее не выбранного пакета openbsd-inetd. (Чтение базы данных ... на данный момент установлено 110895 файлов и каталогов.) Распаковывается пакет openbsd-inetd (из файла .../openbsd-inetd_0.20080125-6_amd64.deb)... Выбор ранее не выбранного пакета qpopper. Распаковывается пакет qpopper (из файла .../qpopper_4.0.9.dfsg-1.2_amd64.deb)... Обрабатываются триггеры для man-db ... Настраивается пакет openbsd-inetd (0.20080125-6) ... Stopping internet superserver: inetd. Not starting internet superserver: no services enabled. Настраивается пакет qpopper (4.0.9.dfsg-1.2) ... |
#su -user
su: неверный ключ -- «u» Использование: su [параметры] [имя пользователя] Параметры: -c, --command COMMAND передать команду COMMAND вызываемой оболочке -h, --help показать данное сообщение и закончить работу -, -l, --login запускать оболочку как регистрационную -m, -p, --preserve-environment не сбрасывать переменные окружения и сохранить запустившую оболочку -s, --shell SHELL использовать значение переменной SHELL вместо значения из файла passwd |
#su - user
user@linux4:~$ echo privet | mutt user@linux.unix.ais -su: mutt: команда не найдена user@linux4:~$ exit logout |
#apt-get install mutt
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово Будут установлены следующие дополнительные пакеты: libtokyocabinet8 Предлагаемые пакеты: urlview mixmaster НОВЫЕ пакеты, которые будут установлены: libtokyocabinet8 mutt обновлено 0, установлено 2 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено. ... (Чтение базы данных ... на данный момент установлено 110918 файлов и каталогов.) Распаковывается пакет libtokyocabinet8 (из файла .../libtokyocabinet8_1.4.37-6_amd64.deb)... Выбор ранее не выбранного пакета mutt. Распаковывается пакет mutt (из файла .../mutt_1.5.20-9+squeeze1_amd64.deb)... Обрабатываются триггеры для menu ... Обрабатываются триггеры для man-db ... Настраивается пакет libtokyocabinet8 (1.4.37-6) ... Настраивается пакет mutt (1.5.20-9+squeeze1) ... update-alternatives: используется `/usr/bin/mutt-org' для предоставления `/usr/bin/mutt' (mutt) в автоматический режим. Обрабатываются триггеры для menu ... |
#su - user
Оставлено: 2, удалено: 0. У вас есть почта в /var/mail/user user@linux4:~$ exit logout |
#vim /etc/asterisk/e
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-2394.19147.18504 2011-06-28 16:27:11.000000000 +0400 +++ /etc/asterisk/extensions.conf 2011-06-28 16:28:56.000000000 +0400 @@ -7,8 +7,10 @@ [local] exten => _22XX,1,Answer exten => _22XX,n,Dial(SIP/${EXTEN}) +exten => _22XX,n,Voicemail(${EXTEN}@default) [national] + exten => _21XX,1,Answer exten => _21XX,n,Dial(SIP/mn/${EXTEN}) |
#vim /etc/asterisk/voicemail.conf
|
#vim /etc/asterisk/voicemail.conf
--- /tmp/l3-saved-2394.10830.2044 2011-06-28 16:30:26.000000000 +0400 +++ /etc/asterisk/voicemail.conf 2011-06-28 16:34:12.000000000 +0400 @@ -309,6 +309,7 @@ ; listen-control-restart-key=2 ; Customize the key that restarts message playback ; listen-control-stop-key=13456789 ; Customize the keys that interrupt message playback, probably all keys not set above + ; Maximum number of messages allowed in the 'Deleted' folder. If set to 0 ; or no then no deleted messages will be moved. If non-zero (max 9999) then up ; to this number of messages will be automagically saved when they are @@ -328,7 +329,8 @@ [default] -1234 => 4242,Example Mailbox,root@localhost +2202 => 1234,Example Mailbox,user@linux4.unix.ais + ;4200 => 9855,Mark Spencer,markster@linux-support.net,mypager@digium.com,attach=no|serveremail=myaddy@digium.com|tz=central|maxmsg=10 ;4300 => 3456,Ben Rigas,ben@american-computer.net ;4310 => -5432,Sales,sales@marko.net |
#setxkbmap -option "grp:ctrl_shift_toggle,grp_led:scroll
|
#asterisk -rvvv
; If you need to have an external program, i.e. /usr/bin/myapp ; called when a user changes her voicemail password, uncomment this: ;externpasscheck=/usr/bin/myapp ; Arguments for this script are: ; mailbox context oldpass newpass ; For the directory, you can override the intro file if you want ;directoryintro=dir-intro ; The character set for voicemail messages can be specified here ;charset=ISO-8859-1 ; The ADSI feature descriptor number to download to ... ; ; just the CIDNAME, if it is not null, otherwise just the CIDNUM, or "an unknown ; Note: ${IF()} strips spacing at the beginning and end of its true and false ; caller", if they are both null. UM}" = "${ORIG_VM_CIDNUM}"]?left:forwarded)} a ${VM_DUR} long message (number ${VM_MSGNUM})\\ nin mailbox ${VM_MAILBOX} from ${VM_CALLERID}, on ${VM_DATE},\n${IF($["${VM_CIDNUM}" = "${ORR IG_VM_CIDNUM}"]?so:(originally sent by ${ORIG_VM_CALLERID} on ${ORIG_VM_DATE})\nso)} you migg ht want to check it when you get a chance. Thanks!\n\n\t\t\t\t--Asterisk\n ;emailbody=Dear ${VM_NAME}:\n\n\tjust wanted to let you know you were just ${IF($["${VM_CIDNN ; |
#setxkbmap -layout "us,ru"
|
#asterisk -rvvv
asterisk -rvvv 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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux4 (pid = 5583) Verbosity is at least 3 linux4*CLI> sip reload Reloading SIP == Parsing '/etc/asterisk/sip.conf': == Found == Parsing '/etc/asterisk/users.conf': == Found == Parsing '/etc/asterisk/sip_notify.conf': == Found linux4*CLI> exit Executing last minute cleanups |
#mkdir /tmp/ru
|
#cd /tmp/ru
|
#tar xvfz /tmp/asterisk-sounds-ru-gsm-2010-04-28.tar.gz
./ ./dictate.txt ./followme.txt ./phonetic.txt ./ru/ ./ru/vykljuchena.gsm ./ru/queue-holdtime.gsm ./ru/spy-sip.gsm ./ru/is-curntly-unavail.gsm ./ru/spy-agent.gsm ... ./ru/PM.gsm ./ru/vm-saveoper.gsm ./ru/dot.gsm ./ru/vm-incorrect-mailbox.gsm ./ru/spy-skinny.gsm ./ru.txt ./convert.py ./pbdirectory.txt ./digits.txt ./letters.txt |
#mv ru /usr/share/asterisk/sounds/
|
#vim /etc/asterisk/voicemail.conf
--- /tmp/l3-saved-2394.22636.22393 2011-06-28 17:01:26.000000000 +0400 +++ /etc/asterisk/voicemail.conf 2011-06-28 17:01:39.000000000 +0400 @@ -92,7 +92,7 @@ ; For the directory, you can override the intro file if you want ;directoryintro=dir-intro ; The character set for voicemail messages can be specified here -;charset=ISO-8859-1 +charset=UTF-8 ; The ADSI feature descriptor number to download to ;adsifdn=0000000F ; The ADSI security lock code |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-2394.10406.32248 2011-06-29 10:30:06.000000000 +0400 +++ /etc/asterisk/extensions.conf 2011-06-29 10:30:45.000000000 +0400 @@ -9,6 +9,7 @@ exten => _22XX,n,Dial(SIP/${EXTEN},10) exten => _22XX,n,GotoIf($[${DIALSTATUS} = "BUSY")?voicemail) exten => _22XX,n,GotoIf($[${DIALSTATUS} = "NOANSWER")?voicemail) +exten => _22XX,n,Hangup exten => _22XX,n,(voicemail),Voicemail(${EXTEN}@default) exten => _22XX,n,Hangup |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-2394.16806.10121 2011-06-29 10:32:41.000000000 +0400 +++ /etc/asterisk/extensions.conf 2011-06-29 10:34:01.000000000 +0400 @@ -7,8 +7,8 @@ [local] exten => _22XX,1,Answer exten => _22XX,n,Dial(SIP/${EXTEN},10) -exten => _22XX,n,GotoIf($[${DIALSTATUS} = "BUSY")?voicemail) -exten => _22XX,n,GotoIf($[${DIALSTATUS} = "NOANSWER")?voicemail) +exten => _22XX,n,GotoIf($[${DIALSTATUS} = "BUSY"])?voicemail) +exten => _22XX,n,GotoIf($[${DIALSTATUS} = "NOANSWER"])?voicemail) exten => _22XX,n,Hangup exten => _22XX,n,(voicemail),Voicemail(${EXTEN}@default) exten => _22XX,n,Hangup |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-2394.22919.21181 2011-06-29 10:34:41.000000000 +0400 +++ /etc/asterisk/extensions.conf 2011-06-29 10:35:11.000000000 +0400 @@ -7,8 +7,8 @@ [local] exten => _22XX,1,Answer exten => _22XX,n,Dial(SIP/${EXTEN},10) -exten => _22XX,n,GotoIf($[${DIALSTATUS} = "BUSY"])?voicemail) -exten => _22XX,n,GotoIf($[${DIALSTATUS} = "NOANSWER"])?voicemail) +exten => _22XX,n,GotoIf($[${DIALSTATUS} = "BUSY"]?voicemail) +exten => _22XX,n,GotoIf($[${DIALSTATUS} = "NOANSWER"]?voicemail) exten => _22XX,n,Hangup exten => _22XX,n,(voicemail),Voicemail(${EXTEN}@default) exten => _22XX,n,Hangup |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-2394.17365.9609 2011-06-29 10:36:54.000000000 +0400 +++ /etc/asterisk/extensions.conf 2011-06-29 10:38:52.000000000 +0400 @@ -9,6 +9,7 @@ exten => _22XX,n,Dial(SIP/${EXTEN},10) exten => _22XX,n,GotoIf($[${DIALSTATUS} = "BUSY"]?voicemail) exten => _22XX,n,GotoIf($[${DIALSTATUS} = "NOANSWER"]?voicemail) +exten => _22XX,n,GotoIf($[${DIALSTATUS} = "DONTCALL"]?voicemail) exten => _22XX,n,Hangup exten => _22XX,n,(voicemail),Voicemail(${EXTEN}@default) exten => _22XX,n,Hangup |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-2394.7380.21884 2011-06-29 10:39:12.000000000 +0400 +++ /etc/asterisk/extensions.conf 2011-06-29 10:43:54.000000000 +0400 @@ -7,9 +7,9 @@ [local] exten => _22XX,1,Answer exten => _22XX,n,Dial(SIP/${EXTEN},10) -exten => _22XX,n,GotoIf($[${DIALSTATUS} = "BUSY"]?voicemail) -exten => _22XX,n,GotoIf($[${DIALSTATUS} = "NOANSWER"]?voicemail) -exten => _22XX,n,GotoIf($[${DIALSTATUS} = "DONTCALL"]?voicemail) +exten => _22XX,n,GotoIf(i$["${DIALSTATUS}" = "BUSY"]?voicemail) +exten => _22XX,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?voicemail) +exten => _22XX,n,GotoIf($["${DIALSTATUS}" = "DONTCALL"]?voicemail) exten => _22XX,n,Hangup exten => _22XX,n,(voicemail),Voicemail(${EXTEN}@default) exten => _22XX,n,Hangup |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-2394.6129.31990 2011-06-29 10:49:26.000000000 +0400 +++ /etc/asterisk/extensions.conf 2011-06-29 10:51:16.000000000 +0400 @@ -11,7 +11,7 @@ exten => _22XX,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?voicemail) exten => _22XX,n,GotoIf($["${DIALSTATUS}" = "DONTCALL"]?voicemail) exten => _22XX,n,Hangup -exten => _22XX,n,(voicemail),Voicemail(${EXTEN}@default) +exten => _22XX,n(voicemail),Voicemail(${EXTEN}@default) exten => _22XX,n,Hangup |
#asterisk -rvvv
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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux4 (pid = 5583) Verbosity is at least 3 linux4*CLI> exit Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-2394.19943.6014 2011-06-29 10:58:14.000000000 +0400 +++ /etc/asterisk/extensions.conf 2011-06-29 10:59:37.000000000 +0400 @@ -10,6 +10,7 @@ exten => _22XX,n,GotoIf(i$["${DIALSTATUS}" = "BUSY"]?voicemail) exten => _22XX,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?voicemail) exten => _22XX,n,GotoIf($["${DIALSTATUS}" = "DONTCALL"]?voicemail) +exten => _31XX,n,GotoIf($["${DIALSTATUS}" = "CONGESTION"]?voicemail) exten => _22XX,n,Hangup exten => _22XX,n(voicemail),Voicemail(${EXTEN}@default) exten => _22XX,n,Hangup |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-2394.10449.21936 2011-06-29 11:07:01.000000000 +0400 +++ /etc/asterisk/sip.conf 2011-06-29 11:08:58.000000000 +0400 @@ -11,7 +11,7 @@ canreinvite=no callerid="Dmitriy softfon " <2202> language=ru - +mailbox=2202 context=gr1 [mn] @@ -30,6 +30,7 @@ canreinvite=no callerid="Dmitriy" <2201> context=gr3 +mailbox=2201 language=ru |
#vim /etc/asterisk/sip.conf
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-2394.2665.19987 2011-06-29 11:14:15.000000000 +0400 +++ /etc/asterisk/extensions.conf 2011-06-29 11:21:28.000000000 +0400 @@ -3,7 +3,7 @@ [internal] exten => 8000,1,Playback(welcome) exten => 8100,1,VoicemailMain() -exten => _81XX,1,VoicemailMain(11${EXTEN:2}) +exten => _81XX,1,VoicemailMain(22${EXTEN:2}) |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-2394.4342.9817 2011-06-29 11:53:38.000000000 +0400 +++ /etc/asterisk/extensions.conf 2011-06-29 11:55:06.000000000 +0400 @@ -9,6 +9,8 @@ [local] exten => _22XX,1,Answer +exten => _22XX,n,Set(CALLFILENAME=${EXTEN}-${STRFTIME(${EPOCH},Europe/Moscow,"%Y- +%m-%d-%H:%M:%S")}) exten => _22XX,n,Monitor(wav,/var/tmp/monitor) exten => _22XX,n,Dial(SIP/${EXTEN},10) |
#ls /var/spool/asterisk/monitor/
|
#ls /var/spool/asterisk/monitor/
2202-2011-in.wav 2202-2011-out.wav |
#ls /var/spool/asterisk/monitor/
2202-2011-in.wav 2202-2011,m-in.wav 2202-2011,m-out.wav 2202-2011-out.wav |
#vim /etc/asterisk/extensions.conf
|
#ls /var/spool/asterisk/monitor/
2202-2011-in.wav 2202-2011,m-in.wav 2202-2011,m-out.wav 2202-2011, m-in.wav 2202-2011, m-out.wav 2202-2011-out.wav |
#!
bash: syntax error near unexpected token `newline' |
#less /var/log/asterisk/messages
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-2394.22503.19102 2011-06-29 12:08:00.000000000 +0400 +++ /etc/asterisk/extensions.conf 2011-06-29 12:08:18.000000000 +0400 @@ -10,9 +10,8 @@ [local] exten => _22XX,1,Answer -exten => _22XX,n,Set(CALLFILENAME=${EXTEN}-${STRFTIME(${EPOCH},Europe/Moscow,"%Y- -%m-%d-%H:%M:%S")}) -exten => _22XX,n,Monitor(wav,"${CALLFILENAME}", m) +exten => _22XX,n,Set(CALLFILENAME=${EXTEN}-${STRFTIME(${EPOCH},Europe/Moscow,"%Y-%m-%d-%H:%M:%S")}) +exten => _22XX,n,Monitor(wav,${CALLFILENAME},m) exten => _22XX,n,Dial(SIP/${EXTEN},10) exten => _22XX,n,GotoIf(i$["${DIALSTATUS}" = "BUSY"]?voicemail) |
Время первой команды журнала | 13:48:30 2011- 6-27 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 10:07:57 2011- 6-29 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 100 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 7.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 5.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 5.07 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.33 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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