Журнал лабораторных работ

Содержание

Журнал

Среда (06/29/11)

/dev/pts/1
08:25:39
#~

/dev/pts/2
08:25:39
#~

/dev/pts/1
08:25:44
#vim extensions.conf
/dev/pts/2
08:25:44
#vim extensions.conf
--- /tmp/l3-saved-2226.3941.24881	2011-06-29 10:25:45.000000000 +0400
+++ extensions.conf	2011-06-29 10:33:59.000000000 +0400
@@ -9,7 +9,17 @@
 [local]
 exten => _12XX,1,Answer
 exten => _12XX,n,Dial(SIP/${EXTEN},10)
-exten => _12XX,n,Voicemail(${EXTEN}@default)
+
+exten => _12XX,n,GotoIf($[${DIALSTATUS} = "BUSY"])?voicemail)
+
+
+exten => _12XX,n,GotoIf($[${DIALSTATUS} = "NOANSWER"])?voicemail)
+
+exten => _12XX,n,Hangup
+exten => _12XX,n,(voicemail),Voicemail(${EXTEN}@default)
+exten => _12XX,n,Hangup
+
+
 
 ;M/G
 [national]
/dev/pts/1
08:33:59
#vim extensions.conf
/dev/pts/2
08:33:59
#vim extensions.conf
--- /tmp/l3-saved-2226.1847.26284	2011-06-29 10:34:00.000000000 +0400
+++ extensions.conf	2011-06-29 10:35:39.000000000 +0400
@@ -9,18 +9,12 @@
 [local]
 exten => _12XX,1,Answer
 exten => _12XX,n,Dial(SIP/${EXTEN},10)
-
-exten => _12XX,n,GotoIf($[${DIALSTATUS} = "BUSY"])?voicemail)
-
-
-exten => _12XX,n,GotoIf($[${DIALSTATUS} = "NOANSWER"])?voicemail)
-
+exten => _12XX,n,GotoIf($[${DIALSTATUS} = "BUSY"]?voicemail)
+exten => _12XX,n,GotoIf($[${DIALSTATUS} = "NOANSWER"]?voicemail)
 exten => _12XX,n,Hangup
 exten => _12XX,n,(voicemail),Voicemail(${EXTEN}@default)
 exten => _12XX,n,Hangup
 
-
-
 ;M/G
 [national]
 exten => _11XX,1,Dial(SIP/ast/${EXTEN})
/dev/pts/1
08:43:09
#asterisk -rx 'dialplan reload'
Dialplan reloaded.
/dev/pts/2
08:43:09
#asterisk -rx 'dialplan reload'
Dialplan reloaded.
/dev/pts/1
08:45:34
#vim extensions.conf
/dev/pts/2
08:45:34
#vim extensions.conf
--- /tmp/l3-saved-2226.3728.7762	2011-06-29 10:45:36.000000000 +0400
+++ extensions.conf	2011-06-29 10:45:55.000000000 +0400
@@ -20,7 +20,7 @@
 [national]
 exten => _11XX,1,Dial(SIP/ast/${EXTEN})
 
-:M/N
+;M/N
 [international]
 exten => _21XX,1,Dial(SIP/mn/${EXTEN})
 exten => _22XX,1,Dial(SIP/mn/${EXTEN})
/dev/pts/1
08:48:16
#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 = 1313)
Verbosity is at least 2
linux2*CLI> dialplan reload
Dialplan reloaded.
  == Parsing '/etc/asterisk/extensions.conf':   == Found
  == Parsing '/etc/asterisk/users.conf':   == Found
  == Using SIP RTP CoS mark 5
  == Using SIP RTP CoS mark 5
[Jun 29 10:48:42] NOTICE[2687]: pbx.c:3744 pbx_extension_helper: No such label 'voicemail' in extension '1202' in context 'gr1'
[Jun 29 10:48:42] WARNING[2687]: pbx.c:9625 pbx_parseable_goto: Priority 'voicemail' must be a number > 0, or valid label
  == Spawn extension (gr1, 1202, 4) exited non-zero on 'SIP/1201-00000008'
linux2*CLI> exit
/dev/pts/2
08:48:16
#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 = 1313)
Verbosity is at least 2
linux2*CLI> dialplan reload
Dialplan reloaded.
  == Parsing '/etc/asterisk/extensions.conf':   == Found
  == Parsing '/etc/asterisk/users.conf':   == Found
  == Using SIP RTP CoS mark 5
  == Using SIP RTP CoS mark 5
[Jun 29 10:48:42] NOTICE[2687]: pbx.c:3744 pbx_extension_helper: No such label 'voicemail' in extension '1202' in context 'gr1'
[Jun 29 10:48:42] WARNING[2687]: pbx.c:9625 pbx_parseable_goto: Priority 'voicemail' must be a number > 0, or valid label
  == Spawn extension (gr1, 1202, 4) exited non-zero on 'SIP/1201-00000008'
linux2*CLI> exit
/dev/pts/1
08:48:58
#vim extensions.conf
/dev/pts/2
08:48:58
#vim extensions.conf
--- /tmp/l3-saved-2226.27682.26088	2011-06-29 10:49:00.000000000 +0400
+++ extensions.conf	2011-06-29 10:51:39.000000000 +0400
@@ -13,7 +13,7 @@
 exten => _12XX,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?voicemail)
 exten => _12XX,n,GotoIf($["${DIALSTATUS}" = "DONTCALL"]?voicemail)
 exten => _12XX,n,Hangup
-exten => _12XX,n,(voicemail),Voicemail(${EXTEN}@default)
+exten => _12XX,n(voicemail),Voicemail(${EXTEN}@default)
 exten => _12XX,n,Hangup
 
 ;M/G
/dev/pts/1
08:51:39
#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 = 1313)
Verbosity is at least 2
linux2*CLI> dialplan reload
Dialplan reloaded.
  == Parsing '/etc/asterisk/extensions.conf':   == Found
  == Parsing '/etc/asterisk/users.conf':   == Found
  == Using SIP RTP CoS mark 5
  == Using SIP RTP CoS mark 5
  == Spawn extension (gr1, 1202, 7) exited non-zero on 'SIP/1201-0000000c'
  == Using SIP RTP CoS mark 5
  == Using SIP RTP CoS mark 5
  == Spawn extension (gr1, 1202, 2) exited non-zero on 'SIP/1201-0000000e'
[Jun 29 10:53:32] NOTICE[1442]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201
linux2*CLI> exit
/dev/pts/2
08:51:39
#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 = 1313)
Verbosity is at least 2
linux2*CLI> dialplan reload
Dialplan reloaded.
  == Parsing '/etc/asterisk/extensions.conf':   == Found
  == Parsing '/etc/asterisk/users.conf':   == Found
  == Using SIP RTP CoS mark 5
  == Using SIP RTP CoS mark 5
  == Spawn extension (gr1, 1202, 7) exited non-zero on 'SIP/1201-0000000c'
  == Using SIP RTP CoS mark 5
  == Using SIP RTP CoS mark 5
  == Spawn extension (gr1, 1202, 2) exited non-zero on 'SIP/1201-0000000e'
[Jun 29 10:53:32] NOTICE[1442]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1201
linux2*CLI> exit
прошло 15 минут
/dev/pts/1
09:06:57
#vim sip.conf
/dev/pts/2
09:06:57
#vim sip.conf
--- /tmp/l3-saved-2226.7841.29905	2011-06-29 11:07:00.000000000 +0400
+++ sip.conf	2011-06-29 11:08:27.000000000 +0400
@@ -13,6 +13,7 @@
 callerid = "Max Moscow <1201>"
 context=gr1
 language=ru
+mailbox=1201
 
 [1202]
 type=friend
@@ -21,10 +22,10 @@
 canreinvite=no
 callerid = "Max Moscow <1202>"
 context=gr2
+mailbox=1202
 ;language=ru
 
 
-
 [ast]
 type=friend
 secret=password
/dev/pts/1
09:08:27
#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 = 1313)
Verbosity is at least 2
linux2*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 29 11:09:30] NOTICE[1442]: chan_sip.c:20281 handle_request_invite: Call from '1202' to extension '8100' rejected because extension not found in context 'gr2'.
linux2*CLI> exit
/dev/pts/2
09:08:27
#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 = 1313)
Verbosity is at least 2
linux2*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 29 11:09:30] NOTICE[1442]: chan_sip.c:20281 handle_request_invite: Call from '1202' to extension '8100' rejected because extension not found in context 'gr2'.
linux2*CLI> exit
/dev/pts/1
09:09:37
#vim extensions.conf
/dev/pts/2
09:09:37
#vim extensions.conf
--- /tmp/l3-saved-2226.22517.21608	2011-06-29 11:09:42.000000000 +0400
+++ extensions.conf	2011-06-29 11:09:54.000000000 +0400
@@ -3,7 +3,7 @@
 
 [internal]
 exten => 8000,1,Playback(welcome)
-;exten => 8100,1,VoicemailMain()
+exten => 8100,1,VoicemailMain()
 
 ;Local
 [local]
/dev/pts/1
09:09:54
#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 = 1313)
Verbosity is at least 2
linux2*CLI> dialplan reload
Dialplan reloaded.
  == Parsing '/etc/asterisk/extensions.conf':   == Found
  == Parsing '/etc/asterisk/users.conf':   == Found
  == Using SIP RTP CoS mark 5
linux2*CLI> exit
/dev/pts/2
09:09:54
#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 = 1313)
Verbosity is at least 2
linux2*CLI> dialplan reload
Dialplan reloaded.
  == Parsing '/etc/asterisk/extensions.conf':   == Found
  == Parsing '/etc/asterisk/users.conf':   == Found
  == Using SIP RTP CoS mark 5
linux2*CLI> exit
/dev/pts/1
09:11:13
#vim sip.conf
/dev/pts/2
09:11:13
#vim sip.conf
--- /tmp/l3-saved-2226.320.8936	2011-06-29 11:11:17.000000000 +0400
+++ sip.conf	2011-06-29 11:11:31.000000000 +0400
@@ -23,7 +23,8 @@
 callerid = "Max Moscow <1202>"
 context=gr2
 mailbox=1202
-;language=ru
+language=ru
+
 
 
 [ast]
/dev/pts/1
09:11:31
#vim extensions.conf
/dev/pts/2
09:11:31
#vim extensions.conf
--- /tmp/l3-saved-2226.15637.15498	2011-06-29 11:11:33.000000000 +0400
+++ extensions.conf	2011-06-29 11:15:58.000000000 +0400
@@ -4,6 +4,7 @@
 [internal]
 exten => 8000,1,Playback(welcome)
 exten => 8100,1,VoicemailMain()
+exten => _81XX,1,VoicemailMain(11${EXTEN:2})
 
 ;Local
 [local]
/dev/pts/1
09:15:58
#vim extensions.conf
/dev/pts/2
09:15:58
#vim extensions.conf
--- /tmp/l3-saved-2226.14689.5928	2011-06-29 11:16:06.000000000 +0400
+++ extensions.conf	2011-06-29 11:17:21.000000000 +0400
@@ -4,8 +4,10 @@
 [internal]
 exten => 8000,1,Playback(welcome)
 exten => 8100,1,VoicemailMain()
+;In the phone 1201 needs enter 8101, on 1202 enter 8102 ..etc
 exten => _81XX,1,VoicemailMain(11${EXTEN:2})
 
+
 ;Local
 [local]
 exten => _12XX,1,Answer
/dev/pts/1
09:17:21
#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 = 1313)
Verbosity is at least 2
linux2*CLI> dialplan reload
Dialplan reloaded.
  == Parsing '/etc/asterisk/extensions.conf':   == Found
  == Parsing '/etc/asterisk/users.conf':   == Found
  == Using SIP RTP CoS mark 5
[Jun 29 11:17:50] WARNING[2949]: app_voicemail.c:9070 vm_authenticate: Couldn't read username
linux2*CLI> exit
/dev/pts/2
09:17:21
#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 = 1313)
Verbosity is at least 2
linux2*CLI> dialplan reload
Dialplan reloaded.
  == Parsing '/etc/asterisk/extensions.conf':   == Found
  == Parsing '/etc/asterisk/users.conf':   == Found
  == Using SIP RTP CoS mark 5
[Jun 29 11:17:50] WARNING[2949]: app_voicemail.c:9070 vm_authenticate: Couldn't read username
linux2*CLI> exit
/dev/pts/1
09:18:04
#vim sip.conf
/dev/pts/2
09:18:04
#vim sip.conf
/dev/pts/1
09:20:42
#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 = 1313)
Verbosity is at least 2
linux2*CLI> dialplan reload
...
  == Spawn extension (gr2, 1202, 2) exited non-zero on 'SIP/1202-00000023'
  == Using SIP RTP CoS mark 5
[Jun 29 11:20:57] WARNING[3016]: app_voicemail.c:9102 vm_authenticate: Unable to read password
  == Using SIP RTP CoS mark 5
  == Using SIP RTP CoS mark 5
  == Everyone is busy/congested at this time (1:1/0/0)
  == Spawn extension (gr2, 1202, 7) exited non-zero on 'SIP/1202-00000026'
  == Using SIP RTP CoS mark 5
  == Using SIP RTP CoS mark 5
linux2*CLI> exit
/dev/pts/2
09:20:42
#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 = 1313)
Verbosity is at least 2
linux2*CLI> dialplan reload
...
  == Spawn extension (gr2, 1202, 2) exited non-zero on 'SIP/1202-00000023'
  == Using SIP RTP CoS mark 5
[Jun 29 11:20:57] WARNING[3016]: app_voicemail.c:9102 vm_authenticate: Unable to read password
  == Using SIP RTP CoS mark 5
  == Using SIP RTP CoS mark 5
  == Everyone is busy/congested at this time (1:1/0/0)
  == Spawn extension (gr2, 1202, 7) exited non-zero on 'SIP/1202-00000026'
  == Using SIP RTP CoS mark 5
  == Using SIP RTP CoS mark 5
linux2*CLI> exit
/dev/pts/1
09:21:57
#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 = 1313)
Verbosity is at least 2
linux2*CLI> dialplan reload
Dialplan reloaded.
  == Parsing '/etc/asterisk/extensions.conf':   == Found
  == Parsing '/etc/asterisk/users.conf':   == Found
linux2*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 29 11:26:23] WARNING[3052]: app_voicemail.c:9070 vm_authenticate: Couldn't read username
linux2*CLI> exit
/dev/pts/2
09:21:57
#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 = 1313)
Verbosity is at least 2
linux2*CLI> dialplan reload
Dialplan reloaded.
  == Parsing '/etc/asterisk/extensions.conf':   == Found
  == Parsing '/etc/asterisk/users.conf':   == Found
linux2*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 29 11:26:23] WARNING[3052]: app_voicemail.c:9070 vm_authenticate: Couldn't read username
linux2*CLI> exit
/dev/pts/1
09:26:34
#vim extensions.conf
/dev/pts/2
09:26:34
#vim extensions.conf
/dev/pts/1
09:28:45
#asterisk -rx 'voicemail reload'
Reloading voicemail configuration...
/dev/pts/2
09:28:45
#asterisk -rx 'voicemail reload'
Reloading voicemail configuration...
прошло 24 минуты
/dev/pts/1
09:53:09
#vim extensions.conf
/dev/pts/2
09:53:09
#vim extensions.conf
--- /tmp/l3-saved-2226.476.10280	2011-06-29 11:53:10.000000000 +0400
+++ extensions.conf	2011-06-29 11:56:59.000000000 +0400
@@ -13,6 +13,7 @@
 [local]
 exten => _12XX,1,Answer
 ;write all dial to the one file
+exten => _12XX,n,Set(CALLFILENAME=${EXTEN}-${STRFTIME(${EPOCH},Europe/MOscow,"%Y-%m-%d-%H:%M:%S")}
 exten => _12XX,n,Monitor(wav,/var/tmp/monitor)
 exten => _12XX,n,Dial(SIP/${EXTEN},10)
 
/dev/pts/1
09:56:59
#vim extensions.conf
/dev/pts/2
09:56:59
#vim extensions.conf
/dev/pts/1
09:57:21
#[local]
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 = 1313)
Verbosity is at least 2
linux2*CLI> dialplan reload
Dialplan reloaded.
  == Parsing '/etc/asterisk/extensions.conf':   == Found
  == Parsing '/etc/asterisk/users.conf':   == Found
linux2*CLI> exit
/dev/pts/2
09:57:21
#[local]
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 = 1313)
Verbosity is at least 2
linux2*CLI> dialplan reload
Dialplan reloaded.
  == Parsing '/etc/asterisk/extensions.conf':   == Found
  == Parsing '/etc/asterisk/users.conf':   == Found
linux2*CLI> exit
/dev/pts/1
09:57:39
#less /var/spool/asterisk/monitor
/dev/pts/2
09:57:39
#less /var/spool/asterisk/monitor
/dev/pts/1
09:57:56
#less /var/spool/asterisk/monitor/
/dev/pts/2
09:57:56
#less /var/spool/asterisk/monitor/
/dev/pts/1
09:59:03
#less /var/spool/asterisk/monitor/
/dev/pts/2
09:59:03
#less /var/spool/asterisk/monitor/
/dev/pts/1
09:59:05
#less /var/spool/asterisk/monitor/
/dev/pts/2
09:59:05
#less /var/spool/asterisk/monitor/
/dev/pts/1
09:59:36
#less /var/spool/Asterisk/monitor/
/dev/pts/2
09:59:36
#less /var/spool/Asterisk/monitor/
/dev/pts/1
09:59:42
#less /var/spool/sterisk/monitor/
/dev/pts/2
09:59:42
#less /var/spool/sterisk/monitor/
/dev/pts/1
09:59:46
#less /var/spool/asterisk/monitor/
/dev/pts/2
09:59:46
#less /var/spool/asterisk/monitor/
/dev/pts/1
09:59:51
#less /root
/dev/pts/2
09:59:51
#less /root
/dev/pts/1
10:00:03
#less /root/
/dev/pts/2
10:00:03
#less /root/
/dev/pts/1
10:03:46
#ls /var/spool/asterisk/monitor
1202-2011-06-29-07:59:23,m-in.wav   1202-2011-06-29-12:03:39.wav
1202-2011-06-29-07:59:23,m-out.wav
/dev/pts/2
10:03:46
#ls /var/spool/asterisk/monitor
1202-2011-06-29-07:59:23,m-in.wav   1202-2011-06-29-12:03:39.wav
1202-2011-06-29-07:59:23,m-out.wav
/dev/pts/1
10:04:49
#[local]
1202-2011-06-29-07:59:23,m-in.wav   1202-2011-06-29-12:03:39.wav
1202-2011-06-29-07:59:23,m-out.wav
/dev/pts/2
10:04:49
#[local]
1202-2011-06-29-07:59:23,m-in.wav   1202-2011-06-29-12:03:39.wav
1202-2011-06-29-07:59:23,m-out.wav
/dev/pts/1
10:09:50
#apt-get install samba
account_policy_get: tdb_fetch_uint32 failed for type 3 (user must logon to change password), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 4 (maximum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 5 (minimum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 6 (lockout duration), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 7 (reset count minutes), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 8 (bad lockout attempt), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 9 (disconnect time), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 10 (refuse machine password change), returning 0
Importing account for nobody...ok
Importing account for user...ok
Добавляется группа «sambashare» (GID 115) ...
Готово.
update-alternatives: используется `/usr/bin/smbstatus.samba3' для предоставления `/usr/bin/smbstatus' (smbstatus) в автоматический режим.
Starting Samba daemons: nmbd smbd.
Настраивается пакет samba-common-bin (2:3.5.6~dfsg-3squeeze4) ...
update-alternatives: используется `/usr/bin/nmblookup.samba3' для предоставления `/usr/bin/nmblookup' (nmblookup) в автоматический режим.
update-alternatives: используется `/usr/bin/net.samba3' для предоставления `/usr/bin/net' (net) в автоматический режим.
update-alternatives: используется `/usr/bin/testparm.samba3' для предоставления `/usr/bin/testparm' (testparm) в автоматический режим.
/dev/pts/2
10:09:50
#apt-get install samba
Настраивается пакет samba (2:3.5.6~dfsg-3squeeze4) ...
Generating /etc/default/samba...
tdbsam_open: Converting version 0.0 database to version 4.0.
tdbsam_convert_backup: updated /var/lib/samba/passdb.tdb file.
account_policy_get: tdb_fetch_uint32 failed for type 1 (min password length), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 2 (password history), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 3 (user must logon to change password), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 4 (maximum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 5 (minimum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for type 6 (lockout duration), returning 0
...
Importing account for nobody...ok
Importing account for user...ok
Добавляется группа «sambashare» (GID 115) ...
Готово.
update-alternatives: используется `/usr/bin/smbstatus.samba3' для предоставления `/usr/bin/smbstatus' (smbstatus) в автоматический режим.
Starting Samba daemons: nmbd smbd.
Настраивается пакет samba-common-bin (2:3.5.6~dfsg-3squeeze4) ...
update-alternatives: используется `/usr/bin/nmblookup.samba3' для предоставления `/usr/bin/nmblookup' (nmblookup) в автоматический режим.
update-alternatives: используется `/usr/bin/net.samba3' для предоставления `/usr/bin/net' (net) в автоматический режим.
update-alternatives: используется `/usr/bin/testparm.samba3' для предоставления `/usr/bin/testparm' (testparm) в автоматический режим.
/dev/pts/1
10:10:13
#smppasswd -a user
bash: smppasswd: команда не найдена
/dev/pts/2
10:10:13
#smppasswd -a user
bash: smppasswd: команда не найдена
/dev/pts/1
10:10:39
#smbpasswd -a user
New SMB password:
Retype new SMB password:
/dev/pts/2
10:10:39
#smbpasswd -a user
New SMB password:
Retype new SMB password:
/dev/pts/1
10:10:57
#vim /samba/smb.conf
/dev/pts/2
10:10:57
#vim /samba/smb.conf
/dev/pts/1
10:11:38
#~
# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
# through syslog you should set the following parameter to something higher.
   syslog = 0
# Do something sensible when Samba crashes: mail the admin a backtrace
   panic action = /usr/share/samba/panic-action %d
####### Authentication #######
# "security = user" is always a good idea. This will require a Unix account
                                                                         98,1          24%
# Using the following line enables you to customise your configuration
...
   path = /var/spool/asterisk/monitor
   guest ok = yes
# The CD-ROM gets unmounted automatically after the connection to the
#
# If you don't want to use auto-mounting/unmounting make sure the CD
#       is mounted on /cdrom
#
;   preexec = /bin/mount /cdrom
;   postexec = /bin/umount /cdrom
"/etc/samba/smb.conf" 325L, 11911C записано
/dev/pts/2
10:11:38
#~
# interface names are normally preferred
;   interfaces = 127.0.0.0/8 eth0
# Only bind to the named interfaces and/or networks; you must use the
# 'interfaces' option above to use this.
# It is recommended that you enable this feature if your Samba machine is
# not protected by a firewall or is a firewall itself.  However, this
# option cannot handle dynamic or non-broadcast interfaces correctly.
;   bind interfaces only = yes
                                                                         73,0-1        16%
# SAMR RPC pipe.
...
   path = /var/spool/asterisk/monitor
   guest ok = yes
# The CD-ROM gets unmounted automatically after the connection to the
#
# If you don't want to use auto-mounting/unmounting make sure the CD
#       is mounted on /cdrom
#
;   preexec = /bin/mount /cdrom
;   postexec = /bin/umount /cdrom
"/etc/samba/smb.conf" 325L, 11911C записано
/dev/pts/1
10:13:17
#/etc/init.d/samba restart
Stopping Samba daemons: nmbd smbd.
Starting Samba daemons: nmbd smbd.
/dev/pts/2
10:13:17
#/etc/init.d/samba restart
Stopping Samba daemons: nmbd smbd.
Starting Samba daemons: nmbd smbd.
/dev/pts/1
10:14:04
#vim /etc/group
/dev/pts/2
10:14:04
#vim /etc/group
--- /tmp/l3-saved-2226.8935.5445	2011-06-29 12:15:34.000000000 +0400
+++ /etc/group	2011-06-29 12:16:11.000000000 +0400
@@ -49,7 +49,7 @@
 Debian-gdm:x:109:
 scanner:x:110:saned
 saned:x:111:
-asterisk:x:112:
+asterisk:x:112:user
 smmta:x:113:
 smmsp:x:114:
 sambashare:x:115:
/dev/pts/1
10:16:11
#/etc/init.d/samba restart
Stopping Samba daemons: nmbd smbd.
Starting Samba daemons: nmbd smbd.
/dev/pts/2
10:16:11
#/etc/init.d/samba restart
Stopping Samba daemons: nmbd smbd.
Starting Samba daemons: nmbd smbd.
/dev/pts/1
10:17:11
#vim extensions.conf
/dev/pts/2
10:17:11
#vim extensions.conf
--- /tmp/l3-saved-2226.28944.31236	2011-06-29 12:18:57.000000000 +0400
+++ extensions.conf	2011-06-29 12:22:54.000000000 +0400
@@ -4,6 +4,7 @@
 [internal]
 exten => 8000,1,Playback(welcome)
 exten => 8100,1,VoicemailMain()
+
 ;In the phone 1201 needs enter 8101, on 1202 enter 8102 ..etc
 exten => _81XX,1,VoicemailMain(12${EXTEN:2})
 
@@ -12,9 +13,14 @@
 ;Local
 [local]
 exten => _12XX,1,Answer
-;write all dial to the one file
+
+;write each dial to the one file
+;set var
 exten => _12XX,n,Set(CALLFILENAME=${EXTEN}-${STRFTIME(${EPOCH},Europe/Moscow,"%Y-%m-%d-%H-%M-%S")})
+
+;Monitor does record dial in var seted up
 exten => _12XX,n,Monitor(wav,${CALLFILENAME},m)
+
 ; m - merge in and out files
 exten => _12XX,n,Dial(SIP/${EXTEN},10)
 
/dev/pts/1
10:22:54
#vim extensions.conf
/dev/pts/2
10:22:54
#vim extensions.conf
--- /tmp/l3-saved-2226.18821.29625	2011-06-29 12:22:55.000000000 +0400
+++ extensions.conf	2011-06-29 12:25:38.000000000 +0400
@@ -16,18 +16,19 @@
 
 ;write each dial to the one file
 ;set var
+
 exten => _12XX,n,Set(CALLFILENAME=${EXTEN}-${STRFTIME(${EPOCH},Europe/Moscow,"%Y-%m-%d-%H-%M-%S")})
 
-;Monitor does record dial in var seted up
+;Monitor does record dial in var seted up there
 exten => _12XX,n,Monitor(wav,${CALLFILENAME},m)
 
 ; m - merge in and out files
 exten => _12XX,n,Dial(SIP/${EXTEN},10)
 
-exten => _12XX,n,
 exten => _12XX,n,GotoIf($["${DIALSTATUS}" = "BUSY"]?voicemail)
 exten => _12XX,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?voicemail)
 exten => _12XX,n,GotoIf($["${DIALSTATUS}" = "DONTCALL"]?voicemail)
+exten => _12XX,n,GotoIf($["${DIALSTATUS}" = "CONGESTION"]?voicemail)
 exten => _12XX,n,Hangup
 exten => _12XX,n(voicemail),Voicemail(${EXTEN}@default)
 exten => _12XX,n,Hangup
/dev/pts/1
10:25:38
#vim extensions.conf
/dev/pts/2
10:25:38
#vim extensions.conf
--- /tmp/l3-saved-2226.108.16709	2011-06-29 12:25:39.000000000 +0400
+++ extensions.conf	2011-06-29 12:26:27.000000000 +0400
@@ -8,6 +8,8 @@
 ;In the phone 1201 needs enter 8101, on 1202 enter 8102 ..etc
 exten => _81XX,1,VoicemailMain(12${EXTEN:2})
 
+;Record
+exten =>
 
 
 ;Local
/dev/pts/1
10:26:27
#mkdir /var/tmp/asterisk

/dev/pts/2
10:26:27
#mkdir /var/tmp/asterisk

/dev/pts/1
10:26:40
#vim extensions.conf
/dev/pts/2
10:26:40
#vim extensions.conf
--- /tmp/l3-saved-2226.23012.8776	2011-06-29 12:26:50.000000000 +0400
+++ extensions.conf	2011-06-29 12:27:35.000000000 +0400
@@ -9,7 +9,7 @@
 exten => _81XX,1,VoicemailMain(12${EXTEN:2})
 
 ;Record
-exten =>
+exten => _8200,1,Record(/var/tmp/asterisk/message00)
 
 
 ;Local
/dev/pts/1
10:27:35
#chown asterisk:asterisk /var/tmp/asterisk

/dev/pts/2
10:27:35
#chown asterisk:asterisk /var/tmp/asterisk

/dev/pts/1
10:31:08
#ls /var/tmp/asterisk

/dev/pts/2
10:31:08
#ls /var/tmp/asterisk

/dev/pts/1
10:31:24
#ls /var/tmp/asterisk

Статистика

Время первой команды журнала08:25:39 2011- 6-29
Время последней команды журнала10:31:24 2011- 6-29
Количество командных строк в журнале101
Процент команд с ненулевым кодом завершения, %19.80
Процент синтаксически неверно набранных команд, % 1.98
Суммарное время работы с терминалом *, час 2.10
Количество командных строк в единицу времени, команда/мин 0.80
Частота использования команд
vim38|=====================================| 37.62%
asterisk18|=================| 17.82%
less18|=================| 17.82%
ls5|====| 4.95%
[local]4|===| 3.96%
~4|===| 3.96%
/etc/init.d/samba4|===| 3.96%
mkdir2|=| 1.98%
smbpasswd2|=| 1.98%
apt-get2|=| 1.98%
chown2|=| 1.98%
smppasswd2|=| 1.98%
____
*) Интервалы неактивности длительностью 30 минут и более не учитываются

Справка

Для того чтобы использовать LiLaLo, не нужно знать ничего особенного: всё происходит само собой. Однако, чтобы ведение и последующее использование журналов было как можно более эффективным, желательно иметь в виду следующее:
  1. В журнал автоматически попадают все команды, данные в любом терминале системы.

  2. Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.

  3. Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
    $ l s-l
    bash: l: command not found
    

  4. Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
    $ test 5 -lt 4
    Обратите внимание на то, что код завершения команды может быть отличен от нуля не только в тех случаях, когда команда была выполнена с ошибкой. Многие команды используют код завершения, например, для того чтобы показать результаты проверки

  5. Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
    $ 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
    

  6. Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
    # id
    uid=0(root) gid=0(root) Gruppen=0(root)
    

  7. Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
    $ vi ~/.bashrc
    2a3,5
    >    if [ -f /usr/local/etc/bash_completion ]; then
    >         . /usr/local/etc/bash_completion
    >        fi
    

  8. Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
    $ patch ~/.bashrc
    В данном случае изменения применяются к файлу ~/.bashrc

  9. Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.

    Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.

  10. Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.

  11. Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора

  12. Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.

  13. Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.

  14. Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:

    $ whoami
    
    user
    
    $ #^ Интересно, кто я?
    
    в журнале это будет выглядеть так:
    $ whoami
    
    user
    
    Интересно, кто я?

  15. Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:

    $ whoami
    
    user
    
    $ cat > /dev/null #^ Интересно, кто я?
    
    Программа whoami выводит имя пользователя, под которым 
    мы зарегистрировались в системе.
    -
    Она не может ответить на вопрос о нашем назначении 
    в этом мире.
    
    В журнале это будет выглядеть так:
    $ whoami
    user
    
    Интересно, кто я?
    Программа whoami выводит имя пользователя, под которым
    мы зарегистрировались в системе.

    Она не может ответить на вопрос о нашем назначении
    в этом мире.
    Для разделения нескольких абзацев между собой используйте символ "-", один в строке.

  16. Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=

  17. Содержимое файла может быть показано в журнале. Для этого его нужно вывести с помощью программы cat. Если вывод команды отметить симоволами #!, содержимое файла будет показано в журнале в специально отведённой для этого секции.
  18. Для того чтобы вставить скриншот интересующего вас окна в журнал, нужно воспользоваться командой l3shot. После того как команда вызвана, нужно с помощью мыши выбрать окно, которое должно быть в журнале.
  19. Команды в журнале расположены в хронологическом порядке. Если две команды давались одна за другой, но на разных терминалах, в журнале они будут рядом, даже если они не имеют друг к другу никакого отношения.
    1
        2
    3   
        4
    
    Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.

О программе

LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008

$Id$