/l3/users/2014-11-nt-voip/nt-voip/debian4/root :1 :2 :3 :4 |
|
#asterisk -rv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian4 (pid = 2508) Verbosity is at least 1 debian4*CLI> dialplan reload Dialplan reloaded. debian4*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3924.31998.6124 2014-11-25 13:56:26.129955522 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 13:57:00.853955931 +0200 @@ -7,4 +7,4 @@ exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) -exten => _2[12]XX,1,Dial(SIP/atlanta/${EXTEN}) +exten => _22XX,1,Dial(SIP/atlanta/${EXTEN}) |
#asterisk -rv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian4 (pid = 2508) Verbosity is at least 1 debian4*CLI> dialplan reload Dialplan reloaded. [Nov 25 13:57:40] ERROR[2801]: netsock2.c:263 ast_sockaddr_resolve: getaddrinfo("dinamic", "(null)", ...): No address associated with hostname [Nov 25 13:57:40] WARNING[2801]: chan_sip.c:10108 set_destination: Can't find address for host 'dinamic' debian4*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3924.26501.25565 2014-11-25 14:07:42.553963526 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 14:18:02.057970859 +0200 @@ -9,4 +9,8 @@ exten => _22XX,1,Dial(SIP/atlanta/${EXTEN}) +exten => _11XX,1,Dial(SIP/kiev/${EXTEN}) + +exten => _32XX,1<Dial(SIP/london/${EXTEN}) + exten => _ |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3924.26356.19586 2014-11-25 14:19:30.161971901 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 14:19:50.213972137 +0200 @@ -11,6 +11,6 @@ exten => _11XX,1,Dial(SIP/kiev/${EXTEN}) -exten => _32XX,1<Dial(SIP/london/${EXTEN}) +exten => _32XX,1,Dial(SIP/london/${EXTEN}) exten => _ |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3924.6434.12922 2014-11-25 14:20:12.121972399 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 14:23:15.841974572 +0200 @@ -9,8 +9,8 @@ exten => _22XX,1,Dial(SIP/atlanta/${EXTEN}) -exten => _11XX,1,Dial(SIP/kiev/${EXTEN}) +exten => _1XXX,1,Dial(SIP/kiev/${EXTEN}) -exten => _32XX,1,Dial(SIP/london/${EXTEN}) +exten => _3XXX,1,Dial(SIP/london/${EXTEN}) -exten => _ +exten => _23XX,1,Dial(SIP/kiev/${EXTEN}) |
#vim /etc/asterisk/extensions.conf
|
#[ ]
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3924.8829.31662 2014-11-25 15:30:07.878022054 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 15:34:26.346025113 +0200 @@ -14,3 +14,28 @@ exten => _3XXX,1,Dial(SIP/london/${EXTEN}) exten => _23XX,1,Dial(SIP/kiev/${EXTEN}) + +[gr1] + +includ => internal +includ => local +includ => national +includ => international + +[gr2] + +includ => internal +includ => local +includ => national + +[gr3] + +includ => internal +includ => local + +[gr41] + +includ => local +includ => national +includ => international + |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-3924.2242.27504 2014-11-25 15:34:29.762025156 +0200 +++ /etc/asterisk/sip.conf 2014-11-25 15:38:40.266028123 +0200 @@ -1,5 +1,5 @@ [general] -context= +context=default qualify=yes register => ny:1234@192.168.50.1/atlanta @@ -10,17 +10,19 @@ type=friend host=dinamic quality=yes - +contex=gr1 [2101](phone) type=friend secret=1234 host=dynamic +contex=gr1 [2102](phone) type=friend secret=1234 host=dynamic +contex=gr3 [2103](phone) secret=1234 @@ -31,19 +33,21 @@ host=dynamic secret=1234 directmedia=no - +contex=gr4 [kiev] type=friend host=dynamic secret=1234 directmedia=no +contex=gr4 [london] type=friend host=dynamic secret=1234 dierctmedia=no +contex=gr4 |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3924.496.27525 2014-11-25 15:39:02.934028388 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 15:44:11.302032041 +0200 @@ -15,6 +15,28 @@ exten => _23XX,1,Dial(SIP/kiev/${EXTEN}) +[local] + +exten => _21XX,1,Dial(SIP/${EXTEN}) + +[national] + +exten => _22XX,1,Dial(SIP/atlanta/${EXTEN}) + +[international] + +exten => _1XXX,1,Dial(SIP/kiev/${EXTEN}) + +exten => _3XXX,1,Dial(SIP/london/${EXTEN}) + +exten => _23XX,1,Dial(SIP/kiev/${EXTEN}) + +[internal] + +exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) + +exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) + [gr1] includ => internal |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3924.24628.5977 2014-11-25 15:48:40.678035225 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 15:49:18.438035677 +0200 @@ -1,5 +1,3 @@ -[default] - [local] |
#qualify=yes
[gr1] [gr1] includ => internal includ => local includ => national includ => international [gr2] [gr2] includ => internal 34,1 44% [gr3] [gr3] includ => internal includ => local [gr4] [gr4] includ => local includ => national includ => international 48,0-1 Bot |
#vim /etc/asterisk/extensions.conf
|
#less /var/log/asterisk/messages
|
#vim /etc/asterisk/sip.conf
|
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-6610.8058.5461 2014-11-25 16:09:14.162049828 +0200 +++ /etc/asterisk/sip.conf 2014-11-25 16:09:21.058049911 +0200 @@ -33,7 +33,7 @@ host=dynamic secret=1234 directmedia=no -contex=gr2 +contex=gr4 [kiev] type=friend |
#asterisk -rvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian4 (pid = 2508) ... == Using SIP RTP CoS mark 5 [Nov 25 16:09:30] NOTICE[2801]: chan_sip.c:22753 handle_request_invite: Call from 'ny' (192.168.80.1:5060) to extension '2201' rejected because extension not found in context 'default'. == Using SIP RTP CoS mark 5 [Nov 25 16:09:32] NOTICE[2801]: chan_sip.c:22753 handle_request_invite: Call from 'ny' (192.168.10.1:5060) to extension '3201' rejected because extension not found in context 'default'. == Using SIP RTP CoS mark 5 [Nov 25 16:09:35] NOTICE[2801]: chan_sip.c:22753 handle_request_invite: Call from 'ny' (192.168.10.1:5060) to extension '2201' rejected because extension not found in context 'default'. == Using SIP RTP CoS mark 5 [Nov 25 16:09:36] NOTICE[2801]: chan_sip.c:22753 handle_request_invite: Call from 'ny' (192.168.50.1:5060) to extension '2101' rejected because extension not found in context 'default'. debian4*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-6610.5774.28964 2014-11-25 16:09:44.174050182 +0200 +++ /etc/asterisk/sip.conf 2014-11-25 16:10:15.614050555 +0200 @@ -10,19 +10,19 @@ type=friend host=dinamic quality=yes -contex=gr1 +context=gr1 [2101](phone) type=friend secret=1234 host=dynamic -contex=gr1 +context=gr1 [2102](phone) type=friend secret=1234 host=dynamic -contex=gr3 +context=gr3 [2103](phone) secret=1234 @@ -33,21 +33,21 @@ host=dynamic secret=1234 directmedia=no -contex=gr4 +context=gr4 [kiev] type=friend host=dynamic secret=1234 directmedia=no -contex=gr4 +context=gr4 [london] type=friend host=dynamic secret=1234 dierctmedia=no -contex=gr4 +context=gr4 |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-6610.1871.23833 2014-11-25 16:10:36.102050792 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 16:10:50.822050964 +0200 @@ -24,25 +24,25 @@ [gr1] -includ => internal -includ => local -includ => national -includ => international +include => internal +include => local +include => national +include => international [gr2] -includ => internal -includ => local -includ => national +include => internal +include => local +include => national [gr3] -includ => internal -includ => local +include => internal +include => local [gr4] -includ => local -includ => national -includ => international +include => local +include => national +include => international |
#apr-get install sendmail bin
bash: apr-get: command not found |
#apr-get install sendmail bin
bash: apr-get: command not found |
#apt-get install sendmail bin
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package bin |
#apt-get install sendmail bin
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package bin |
#apt-get install sendmail-bin
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: sendmail-base sendmail-cf Suggested packages: sendmail-doc logcheck resolvconf sasl2-bin The following packages will be REMOVED: exim4 exim4-base exim4-config exim4-daemon-light The following NEW packages will be installed: ... please investigate. Warning: These messages were issued while creating sendmail.cf make sure they are benign before starting sendmail! Errors in generating sendmail.cf *** ERROR: FEATURE() should be before MAILER() *** MAILER(`local') must appear after FEATURE(`always_add_domain')*** ERROR: FEATURE() should be before MAILER() *** MAILER(`local') must appear after FEATURE(`allmasquerade')*** ERROR: FEATURE() should be before MAILER() Starting Mail Transport Agent (MTA): sendmail . W: Operation was interrupted before it could finish |
#apt-get install sendmail-bin
Reading package lists... Done Building dependency tree Reading state information... Done sendmail-bin is already the newest version. You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: exim4-base : Depends: exim4-config (>= 4.30) but it is not going to be installed or exim4-config-2 E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). |
#echo debian4.unix.nt >> /etc/mail/local-host-names
|
#vim /etc/mail/sendmail.mc
--- /tmp/l3-saved-3924.17869.28588 2014-11-25 16:35:27.414068446 +0200 +++ /etc/mail/sendmail.mc 2014-11-25 16:37:02.166069572 +0200 @@ -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 +dnl DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=127.0.0.1')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 +dnl DAEMON_OPTIONS(`Family=inet, Name=MSP-v4, Port=submission, M=Ea, Addr=127.0.0.1')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. |
#~
127.0.1.1 debian4 # The following lines are desirable for IPv6 capable hosts ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "/etc/hosts" 7L, 203C written |
#netstat -lnp | grep :25
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 10328/sendmail: MTA |
#netstat -lnp | grep :25
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 10328/sendmail: MTA |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3924.30244.32152 2014-11-26 09:53:05.470805323 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 09:58:50.702809407 +0200 @@ -4,6 +4,10 @@ exten => _21XX,1,Dial(SIP/${EXTEN}) +exten => _33XX,1,Dial(SIP/${EXTEN},5) + +exten => _33XX,n,VoiceMail(${EXTEN}@default) + [national] exten => _22XX,1,Dial(SIP/atlanta/${EXTEN}) @@ -22,6 +26,10 @@ exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) +exten => 8001,1,VoiceMailMain() + +exten => 8300,1,VoiceMailMain(33 + [gr1] include => internal |
#vim /etc/asterisk/voicemail.conf
--- /tmp/l3-saved-3924.19370.23660 2014-11-26 09:59:09.126809626 +0200 +++ /etc/asterisk/voicemail.conf 2014-11-26 10:00:54.926810878 +0200 @@ -381,7 +381,9 @@ [default] -1234 => 4242,Example Mailbox,root@localhost +3301 => 1234.User 1 (3301),user@localhost + +; 1234 => 4242,Example Mailbox,root@localhost ;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 |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-3924.23757.13648 2014-11-26 10:01:12.246811085 +0200 +++ /etc/asterisk/sip.conf 2014-11-26 10:02:58.886812348 +0200 @@ -17,15 +17,19 @@ secret=1234 host=dynamic context=gr1 +mailbox=3301@default [2102](phone) type=friend secret=1234 host=dynamic context=gr1 +mailbox=3302@default [2103](phone) secret=1234 +contex=gr3 +mailbox=3303@default [atlanta](phone) |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3924.26120.19655 2014-11-26 10:03:01.446812377 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 10:06:46.742815043 +0200 @@ -28,7 +28,7 @@ exten => 8001,1,VoiceMailMain() -exten => 8300,1,VoiceMailMain(33 +exten => 8300,1,VoiceMailMain(33${EXTEN:2}@default) [gr1] |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-3924.15507.5683 2014-11-26 10:08:13.626816073 +0200 +++ /etc/asterisk/sip.conf 2014-11-26 10:09:30.806816985 +0200 @@ -17,19 +17,19 @@ secret=1234 host=dynamic context=gr1 -mailbox=3301@default +mailbox=2101@default [2102](phone) type=friend secret=1234 host=dynamic context=gr1 -mailbox=3302@default +mailbox=2102@default [2103](phone) secret=1234 contex=gr3 -mailbox=3303@default +mailbox=2103@default [atlanta](phone) |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3924.7371.5722 2014-11-26 10:09:33.898817022 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 10:11:23.198818316 +0200 @@ -4,9 +4,9 @@ exten => _21XX,1,Dial(SIP/${EXTEN}) -exten => _33XX,1,Dial(SIP/${EXTEN},5) +exten => _21XX,1,Dial(SIP/${EXTEN},5) -exten => _33XX,n,VoiceMail(${EXTEN}@default) +exten => _21XX,n,VoiceMail(${EXTEN}@default) [national] @@ -28,7 +28,7 @@ exten => 8001,1,VoiceMailMain() -exten => 8300,1,VoiceMailMain(33${EXTEN:2}@default) +exten => _83XX,1,VoiceMailMain(21${EXTEN:2}@default) [gr1] |
#asterisk -rw
asterisk: invalid option -- 'w' |
#asterisk -rv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian4 (pid = 2508) Verbosity is at least 4 debian4*CLI> sip reload ... -- Added extension '700' priority 1 to parkedcalls -- Registered extension context 'app_queue_gosub_virtual_context'; registrar: app_queue -- merging incls/swits/igpats from old(app_queue_gosub_virtual_context) to new(app_queue_gosub_virtual_context) context, registrar = pbx_config -- Added extension 's' priority 1 to app_queue_gosub_virtual_context -- Time to scan old dialplan and merge leftovers back into the new: 0.001688 sec -- Time to restore hints and swap in new dialplan: 0.000006 sec -- Time to delete the old dialplan: 0.000085 sec -- Total time merge_contexts_delete: 0.001779 sec debian4*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
|
#asterisk -rv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian4 (pid = 2508) Verbosity is at least 4 debian4*CLI> dialplan reload ... -- Time to delete the old dialplan: 0.000082 sec -- Total time merge_contexts_delete: 0.001827 sec debian4*CLI> sip reload Reloading SIP debian4*CLI> voicemail reload Reloading voicemail configuration... == Parsing '/etc/asterisk/voicemail.conf': == Found == Parsing '/etc/asterisk/users.conf': == Found debian4*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/sip.conf
|
#vim /etc/asterisk/sip.conf
|
#[local]
context=gr1 [2101](phone) type=friend secret=1234 host=dynamic context=gr1 mailbox=2101@default [2102](phone) type=friend secret=1234 ... mailbox=2103@default contex=gr3ne) [atlanta](phone) host=dynamic directmedia=no [kiev](phone) host=dynamic directmedia=no [london](phone) "/etc/asterisk/sip.conf" 57L, 694C written |
#less /var/log/asterisk/messages
|
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-3924.16336.8246 2014-11-26 10:42:21.090840304 +0200 +++ /etc/asterisk/sip.conf 2014-11-26 10:42:34.058840461 +0200 @@ -8,7 +8,7 @@ [phone](!) type=friend -host=dinamic +host=dynamic quality=yes context=gr1 |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3924.3745.3702 2014-11-26 10:42:47.554840618 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 10:43:00.610840785 +0200 @@ -2,10 +2,7 @@ [local] -exten => _21XX,1,Dial(SIP/${EXTEN}) - exten => _21XX,1,Dial(SIP/${EXTEN},5) - exten => _21XX,n,VoiceMail(${EXTEN}@default) [national] |
#asterisk -rvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian4 (pid = 2508) ... -- x=2, open writing: /var/spool/asterisk/voicemail/default/2101/tmp/F4VhzT format: wav, 0x2a943f8 [Nov 26 10:47:30] WARNING[14641]: app.c:855 __ast_play_and_record: No audio available on SIP/2102-00000549?? -- User hung up == Spawn extension (gr1, 2101, 2) exited non-zero on 'SIP/2102-00000549' == Using SIP RTP CoS mark 5 -- Executing [8300@gr1:1] VoiceMailMain("SIP/2101-0000054b", "2100@default") in new stack -- <SIP/2101-0000054b> Playing 'vm-login.gsm' (language 'en') [Nov 26 10:48:03] WARNING[14658]: app_voicemail.c:9799 vm_authenticate: Couldn't read username debian4*CLI> quit Executing last minute cleanups |
## то есть почту просматриваете под юзером
|
#top
top - 11:02:36 up 1 day, 1:40, 6 users, load average: 1.66, 0.94, 0.75 Tasks: 167 total, 5 running, 162 sleeping, 0 stopped, 0 zombie %Cpu(s): 41.7 us, 11.5 sy, 0.0 ni, 46.7 id, 0.1 wa, 0.0 hi, 0.0 si, 0.0 st KiB Mem: 15903488 total, 1376660 used, 14526828 free, 146988 buffers KiB Swap: 16201724 total, 0 used, 16201724 free, 557196 cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 4047 root 20 0 51908 14m 1704 R 99.7 0.1 128:41.71 l3-agent 3891 root 20 0 23908 2076 1020 R 44.9 0.0 0:11.33 screen 3566 user 20 0 1089m 244m 41m S 11.6 1.6 69:50.26 iceweasel 3048 root 20 0 243m 86m 7080 S 8.0 0.6 4:02.76 Xorg ... 2980 root 20 0 129m 5276 2952 S 2.7 0.0 0:25.71 polkitd 14717 root 20 0 0 0 0 S 2.3 0.0 0:00.71 kworker/2:1 3473 user 20 0 538m 27m 15m S 2.0 0.2 0:19.44 gnome-panel 3082 root 20 0 188m 4144 2896 S 0.7 0.0 0:05.79 console-kit-dae 264 root 20 0 0 0 0 S 0.3 0.0 0:03.58 jbd2/sda2-8 2744 messageb 20 0 30696 1880 884 S 0.3 0.0 0:09.38 dbus-daemon 2932 root 20 0 154m 5672 4372 S 0.3 0.0 0:05.24 NetworkManager 3411 user 20 0 30576 1756 760 S 0.3 0.0 0:05.55 dbus-daemon 3498 user 20 0 235m 9352 7000 S 0.3 0.1 0:00.47 polkit-gnome-au 3523 user 20 0 522m 14m 10m S 0.3 0.1 0:00.46 nm-applet |
#screen
|
#less /etc/asterisk/voicemail.conf
|
#echo hello | mutt user
|
#su - user
---Mutt: (no mailbox) [Msgs:0]---(threads/date)-------------------------(all)--- user@debian4:~$ exit logout |
#su - user
---Mutt: (no mailbox) [Msgs:0]---(threads/date)--------------------------------------------------(all)--- user@debian4:~$ exit logout |
#apt-get install sensibme-mda sendmail
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package sensibme-mda |
#apt-get install sensible-mda sendmail
Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: exim4-base : Depends: exim4-config (>= 4.30) but it is not going to be installed or exim4-config-2 E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). |
#apt-get -f install
Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following extra packages will be installed: exim4-config The following packages will be REMOVED: bsd-mailx sendmail-bin The following NEW packages will be installed: exim4-config ... (Reading database ... 132012 files and directories currently installed.) Removing bsd-mailx ... Removing sendmail-bin ... Processing triggers for man-db ... Selecting previously unselected package exim4-config. (Reading database ... 131953 files and directories currently installed.) Unpacking exim4-config (from .../exim4-config_4.80-7+deb7u1_all.deb) ... Processing triggers for man-db ... Setting up exim4-config (4.80-7+deb7u1) ... grep: /etc/inetd.conf: No such file or directory |
#apt-get install sensible-mda sendmail
Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: sendmail : Depends: sendmail-bin but it is not going to be installed E: Unable to correct problems, you have held broken packages. |
#apt-get install sensible-mda sendmail sendmail-bin
Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: sendmail-doc rmail sasl2-bin The following packages will be REMOVED: exim4-base exim4-config The following NEW packages will be installed: sendmail sendmail-bin sensible-mda 0 upgraded, 3 newly installed, 2 to remove and 0 not upgraded. ... /etc/mail/aliases: 13 aliases, longest 10 bytes, 143 bytes total Warning: These messages were issued while creating sendmail.cf make sure they are benign before starting sendmail! Errors in generating sendmail.cf *** ERROR: FEATURE() should be before MAILER() *** MAILER(`local') must appear after FEATURE(`always_add_domain')*** ERROR: FEATURE() should be before MAILER() *** MAILER(`local') must appear after FEATURE(`allmasquerade')*** ERROR: FEATURE() should be before MAILER() Starting Mail Transport Agent (MTA): sendmail. Setting up sensible-mda (8.14.4-4) ... Setting up sendmail (8.14.4-4) ... |
#echo hello | mutt user
|
#apt-cache searche asterisk
E: Invalid operation searche |
#su - user
4 N Nov 26 Asterisk PBX ( 180) [PBX]: New message 2 in mailbox 2102 5 N Nov 26 Asterisk PBX ( 349) [PBX]: New message 1 in mailbox 2101 ( 1) 6 N Nov 26 Asterisk PBX ( 1) [PBX]: New message 2 in mailbox 2101 10 N Nov 26 root 7 N Nov 26 Asterisk PBX ( 388) [PBX]: New message 3 in mailbox 2102 8 N Nov 26 Asterisk PBX ( 437) [PBX]: New message 1 in mailbox 2101 9 N Nov 26 root ---Mutt: /var/mail/user [Msgs:10 New:10 121K]---(threads/date)-----------------------------------(all)--- 10 kept, 0 deleted. user@debian4:~$ exit logout |
#cache searche asterisk
[2102](phone)k/sip.conf" 57L, 694C type=friend secret=1234 [phone]namic [phone] context=gr1 mailbox=2102@default [2101] [2101] [2103](phone) ... [2102]x=2103@default language=ru [2103]ta](phone) [2103] type=friend language=frc secret=1234 directmedia=no context=gr4 "/etc/asterisk/sip.conf" 59L, 729C written |
#cache searche asterisk
asterisk -rv Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian4 (pid = 2508) Verbosity is at least 4 ... -- <SIP/2101-00000558> Playing 'vm-Old.gsm' (language 'de') -- <SIP/2101-00000558> Playing 'vm-messages.gsm' (language 'de') -- <SIP/2101-00000558> Playing 'vm-onefor.gsm' (language 'de') -- <SIP/2101-00000558> Playing 'vm-INBOX.gsm' (language 'de') -- <SIP/2101-00000558> Playing 'vm-messages.gsm' (language 'de') -- <SIP/2101-00000558> Playing 'vm-opts.gsm' (language 'de') -- <SIP/2101-00000558> Playing 'vm-helpexit.gsm' (language 'de') == Spawn extension (gr1, 8301, 1) exited non-zero on 'SIP/2101-00000558' debian4*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-15466.2745.6303 2014-11-26 11:56:39.982893079 +0200 +++ /etc/asterisk/sip.conf 2014-11-26 11:56:56.390893275 +0200 @@ -18,7 +18,7 @@ host=dynamic context=gr1 mailbox=2101@default -language=de +language=ru [2102](phone) type=friend @@ -26,7 +26,7 @@ host=dynamic context=gr1 mailbox=2102@default -language=ru +language=de [2103](phone) secret=1234 |
#cache searche asterisk
[local] [local] exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) "/etc/asterisk/extensions.conf" 53L, 795C [ ] [xten => ]82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) [ ] [xten => 8001,],VoiceMailMain() exten => _83XX,1,VoiceMailMain(21${EXTEN:2}@default) [ ] [gr1] ] d( rd${EXTEN:2}:gsm) include =>81XX,n,Playback(/var/tmp/asterisk/record${EXTEN:2}) exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) include => local include => national include => international [gr2] include => internal include => local "/etc/asterisk/extensions.conf" 54L, 857C written |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-15466.24001.2475 2014-11-26 12:18:30.726908596 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 12:20:36.334910094 +0200 @@ -20,6 +20,7 @@ [internal] exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) + exten => _81XX,n,Playback(/var/tmp/asterisk/record${EXTEN:2}) exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-15466.4287.1136 2014-11-26 12:27:54.350915265 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 12:29:50.942916644 +0200 @@ -2,6 +2,10 @@ [local] +exten => _21XX,n,Set(CALLFILENAME=${EXTEN:1}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H:%M:%S")}) + +exten => _21XX,n,Monitor(wav,${CALLFILENAME},m) + exten => _21XX,1,Dial(SIP/${EXTEN},5) exten => _21XX,n,VoiceMail(${EXTEN}@default) |
#vim /etc/asterisk/extensions.conf
|
#[gr1]
|
#cache searche asterisk
[local] },Europe/Kiev,"%Y-%m-%d-%H:%M:%S")}) exten => _21XX,n,Set(CALLFILENAME=${EXTEN:1}-${CALLERID(num)}-${STRFTIME(${EPOCHH exten => _21XX,n,Monitor(wav,${CALLFILENAME},m) exten => _21XX,1,Dial(SIP/${EXTEN},5) exten => _21XX,n,VoiceMail(${EXTEN}@default) [national] "/etc/asterisk/extensions.conf" 59L, 1025C exten => _22XX,1,Dial(SIP/atlanta/${EXTEN}) [local] ... exten => _81XX,n,Playback(/var/tmp/asterisk/record${EXTEN:2}) exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) exten => 8001,1,VoiceMailMain() exten => _83XX,1,VoiceMailMain(21${EXTEN:2}@default) "/etc/asterisk/extensions.conf" 59L, 1025C written [gr1] include => internal include => local include => national include => international |
#ls /var/spool/asterisk/monitor
102-2101-2014-11-26-12:34:51.wav |
#ls /var/spool/asterisk/monitor
102-2101-2014-11-26-12:34:51.wav 2101-2102-2014-11-26-13:15:26.wav |
#apt-get install mpg123
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libmpg123-0 Suggested packages: alsa-utils jackd nas oss-compat oss4-base The following NEW packages will be installed: libmpg123-0 mpg123 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. ... (Reading database ... 133164 files and directories currently installed.) Unpacking libmpg123-0:amd64 (from .../libmpg123-0_1.14.4-1_amd64.deb) ... Selecting previously unselected package mpg123. Unpacking mpg123 (from .../mpg123_1.14.4-1_amd64.deb) ... Processing triggers for man-db ... Processing triggers for mime-support ... Setting up libmpg123-0:amd64 (1.14.4-1) ... Setting up mpg123 (1.14.4-1) ... update-alternatives: using /usr/bin/mpg123.bin to provide /usr/bin/mpg123 (mpg123) in auto mode update-alternatives: using /usr/bin/mpg123.bin to provide /usr/bin/mp3-decoder (mp3-decoder) in auto mode |
#apt-get install mpg123
|
#"/home/user/Downloads/nightwish.mp3
exten => _3XXX,1,Dial(SIP/london/${EXTEN}) exten => _23XX,1,Dial(SIP/kiev/${EXTEN}) "/etc/asterisk/extensions.conf" 59L, 1023C [internal] exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) exten => _81XX,n,Playback(/var/tmp/asterisk/record${EXTEN:2}) exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) exten => 8001,1,VoiceMailMain() exten => _83XX,1,VoiceMailMain(21${EXTEN:2}@default) [gr1] include => internal include => local include => national |
#include => international
|
#asterisk -rv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian4 (pid = 2508) Verbosity is at least 4 debian4*CLI> re realtime reload debian4*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/musiconhold.conf
--- /tmp/l3-saved-15466.2009.31012 2014-11-26 13:51:03.938974322 +0200 +++ /etc/asterisk/musiconhold.conf 2014-11-26 13:55:08.378977214 +0200 @@ -44,7 +44,7 @@ [default] mode=files -directory=moh +directory=/var/lib/asterisk/moh ; ;[native-random] ;mode=files |
#vim /etc/asterisk/musiconhold.conf
|
#m-a = module-assistant
Starting the Dialog UI... |
#a-i = auto-install
bash: a-i: command not found |
#m-a = module-assistant
Starting the Dialog UI... |
#m-a a-i dahdi
âââââââââââââââââââââ⤠Updating cached package data âââââââââââââââââââââââ â Reading apt-cache output... â â â â â â 100% â â â âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ ââââââââââââââââ⤠Building dahdi, step 2, please wait... ââââââââââââââââââ âm-a install dahdi â â â ... â â â 100% â â â âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ Done with /usr/src/dahdi-modules-3.2.0-4-amd64_2.6.1+dfsg2-1+3.2.63-2+deb7u1_amd64.deb . dpkg -Ei /usr/src/dahdi-modules-3.2.0-4-amd64_2.6.1+dfsg2-1+3.2.63-2+deb7u1_amd64.deb Selecting previously unselected package dahdi-modules-3.2.0-4-amd64. (Reading database ... 142315 files and directories currently installed.) Unpacking dahdi-modules-3.2.0-4-amd64 (from .../dahdi-modules-3.2.0-4-amd64_2.6.1+dfsg2-1+3.2.63-2+deb7u1_amd64.deb) ... Setting up dahdi-modules-3.2.0-4-amd64 (1:2.6.1+dfsg2-1+3.2.63-2+deb7u1) ... |
#modprobe dahdi
|
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#"/home/user/Downloads/nightwish.mp3
[local] [local] exten => _23XX,1,Dial(SIP/kiev/${EXTEN}) "/etc/asterisk/extensions.conf" 59L, 1023C [internal] [xten => ]81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) [ ] [xten => _81XX]n,Playback(/var/tmp/asterisk/record${EXTEN:2}) [ ] exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) [xten => ]001,1,VoiceMailMain() [ ] exten => _801X,1,MeetMe(10${EXTEN:3}) exten => _83XX,1,VoiceMailMain(21${EXTEN:2}@default) [gr1] include => internal include => local "/etc/asterisk/extensions.conf" 61L, 1062C written |
#vim /etc/asterisk/meetme.conf
--- /tmp/l3-saved-15466.29282.19645 2014-11-26 14:17:49.418993322 +0200 +++ /etc/asterisk/meetme.conf 2014-11-26 14:20:04.258994918 +0200 @@ -43,3 +43,19 @@ ; ;conf => 1234 ;conf => 2345,9938 + +conf => 100 +conf => 101 +conf => 102 +conf => 103 +conf => 104 + +conf => 105,1234 +conf => 106,1234 +conf => 107,1234 +conf => 108,1234 +conf => 109,1234 + + + + |
Время первой команды журнала | 12:49:33 2014-11-25 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 13:17:41 2014-11-26 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 9.90 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 2.97 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 5.62 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.30 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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