/l3/users/2014-11-nt-voip/nt-voip/debian6/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 |
|
#ls -lh mkdir /var/tmp/asterisk
ls: cannot access mkdir: No such file or directory /var/tmp/asterisk: total 0 |
#chown asterisk:asterisk /var/tmp/asterisk/
|
#asterisk r
Privilege escalation protection disabled! See https://wiki.asterisk.org/wiki/x/1gKfAQ for more details. Asterisk already running on /var/run/asterisk/asterisk.ctl. Use 'asterisk -r' to connect. |
#asterisk -r
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian6 (pid = 2451) [Nov 25 11:57:55] NOTICE[2669]: chan_sip.c:22753 handle_request_invite: Call from '2302' (192.168.60.102:5060) to extension '8100' rejected because extension not found in context 'default'. debian6*CLI> Disconnected from Asterisk server |
#[xten =>]_82XX,n,Playback(/var/tmp/asterisk/recordXX)
|
#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 debian6 (pid = 2451) Verbosity was 0 and is now 3 == Using SIP RTP CoS mark 5 [Nov 25 12:01:30] NOTICE[2669]: chan_sip.c:22753 handle_request_invite: Call from '2302' (192.168.60.102:5060) to extension '8100' rejected because extension not found in context 'default'. == Using SIP RTP CoS mark 5 [Nov 25 12:01:48] NOTICE[2669]: chan_sip.c:22753 handle_request_invite: Call from '2302' (192.168.60.102:5060) to extension '8101' rejected because extension not found in context 'default'. debian6*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4472.27968.6057 2014-11-25 12:03:05.684943606 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 12:04:23.680942559 +0200 @@ -2,8 +2,8 @@ exten => _23XX,1,Dial(SIP/${EXTEN}) -exten => _81XX,n,Record(/var/tmp/asterisk/recordXX:gsm) -exten => _82XX,n,Playback(/var/tmp/asterisk/recordXX) +exten => _81XX,n,Record(/var/tmp/asterisk/record${EXTEN:2}) +exten => _82XX,n,Playback(/var/tmp/asterisk/record${EXTEN}:2) |
#vim /etc/asterisk/extensions.conf
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4472.20332.18180 2014-11-25 12:10:08.848937935 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 12:11:18.804937000 +0200 @@ -1,8 +1,9 @@ [default] exten => _23XX,1,Dial(SIP/${EXTEN}) -exten => _81XX,2,Record(/var/tmp/asterisk/record${EXTEN:2}) -exten => _82XX,3,Playback(/var/tmp/asterisk/record${EXTEN}:2) +exten => _81XX,n,Dial(SIP/${EXTEN}) +exten => _81XX,n,Record(/var/tmp/asterisk/record${EXTEN:2}) +exten => _82XX,n,Playback(/var/tmp/asterisk/record${EXTEN}:2) |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4472.5222.23009 2014-11-25 12:11:34.528936787 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 12:11:42.756936676 +0200 @@ -1,7 +1,6 @@ [default] exten => _23XX,1,Dial(SIP/${EXTEN}) -exten => _81XX,n,Dial(SIP/${EXTEN}) exten => _81XX,n,Record(/var/tmp/asterisk/record${EXTEN:2}) exten => _82XX,n,Playback(/var/tmp/asterisk/record${EXTEN}:2) |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4472.19190.6469 2014-11-25 12:12:15.880936233 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 12:13:15.244935440 +0200 @@ -1,7 +1,7 @@ [default] exten => _23XX,1,Dial(SIP/${EXTEN}) -exten => _81XX,n,Record(/var/tmp/asterisk/record${EXTEN:2}) +exten => _81XX,n,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) exten => _82XX,n,Playback(/var/tmp/asterisk/record${EXTEN}:2) |
#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 debian6 (pid = 2451) ... -- 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.000399 sec -- Time to restore hints and swap in new dialplan: 0.000002 sec -- Time to delete the old dialplan: 0.000019 sec -- Total time merge_contexts_delete: 0.000420 sec debian6*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4472.1764.32643 2014-11-25 12:14:27.156934476 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 12:15:48.324933388 +0200 @@ -2,7 +2,7 @@ exten => _23XX,1,Dial(SIP/${EXTEN}) exten => _81XX,n,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) -exten => _82XX,n,Playback(/var/tmp/asterisk/record${EXTEN}:2) +exten => _82XX,n,Playback(/var/tmp/asterisk/record${EXTEN:2}) |
## Ñ ÑÑÑÑÑ, а вÑ?
|
## и я
|
## Ñ Ð²Ð°Ñ n, а должен вÑегда бÑÑÑ Ð¿ÐµÑвÑÐй Ð½Ð¾Ð¼ÐµÑ 1
|
## всегда '!!!'
|
#ls -l /var/tmp/asterisk/
total 16 -rw-rw---- 1 asterisk asterisk 14322 Nov 25 12:24 record00.gsm |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-4472.11481.2152 2014-11-25 13:20:53.224881073 +0200 +++ /etc/asterisk/sip.conf 2014-11-25 13:21:58.912880190 +0200 @@ -2,6 +2,11 @@ context=default qualify=yes +[minsk] +type=peer +secret=1234 +host=dynamic + [2301] type=friend secret=1234 @@ -12,3 +17,4 @@ secret=1234 host=dynamic + |
#asterisk -rx "sip reload"
|
#asterisk -rx "sip show peers"
Name/username Host Dyn Forcerport ACL Port Status 2301/2301 192.168.60.100 D N 5060 OK (13 ms) 2302/2302 192.168.60.102 D N 5060 OK (1 ms) minsk (Unspecified) D N 0 UNKNOWN 3 sip peers [Monitored: 2 online, 1 offline Unmonitored: 0 online, 0 offline] |
#more /etc/asterisk/
|
#more /etc/asterisk/sip.conf
|
#asterisk -rx "sip show peers"
Name/username Host Dyn Forcerport ACL Port Status 2301/2301 192.168.60.100 D N 5060 OK (21 ms) 2302/2302 192.168.60.102 D N 5060 OK (1 ms) minsk (Unspecified) D N 0 UNKNOWN 3 sip peers [Monitored: 2 online, 1 offline Unmonitored: 0 online, 0 offline] |
#asterisk -rx "sip show peers"
Name/username Host Dyn Forcerport ACL Port Status 2301/2301 192.168.60.100 D N 5060 OK (20 ms) 2302/2302 192.168.60.102 D N 5060 OK (1 ms) minsk/brest 192.168.30.1 D N 5060 OK (1 ms) 3 sip peers [Monitored: 3 online, 0 offline Unmonitored: 0 online, 0 offline] |
#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 debian6 (pid = 2451) Verbosity is at least 3 == Using SIP RTP CoS mark 5 [Nov 25 13:46:52] NOTICE[2669]: chan_sip.c:22753 handle_request_invite: Call from '2301' (192.168.60.100:5060) to extension '1302' rejected because extension not found in context 'default'. debian6*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4472.26234.891 2014-11-25 13:48:07.056859180 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 13:48:24.388858948 +0200 @@ -3,7 +3,7 @@ exten => _23XX,1,Dial(SIP/${EXTEN}) exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) -exten => _13XX,2,Dial(SIP/minsk/${EXTEN}) +exten => _13XX,1,Dial(SIP/minsk/${EXTEN}) |
#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 debian6 (pid = 2451) Verbosity is at least 3 debian6*CLI> sip reload Reloading SIP debian6*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4472.16142.17294 2014-11-25 14:09:15.344842191 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 14:09:25.356842056 +0200 @@ -4,7 +4,7 @@ exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) exten => _13XX,1,Dial(SIP/minsk/${EXTEN}) -exten => _1[12]XX,2,Dial(SIP/minsk/${EXTEN}) +exten => _1[12]XX,1,Dial(SIP/minsk/${EXTEN}) |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4472.16871.16833 2014-11-25 14:13:12.304839016 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 14:13:37.464838677 +0200 @@ -3,8 +3,7 @@ exten => _23XX,1,Dial(SIP/${EXTEN}) exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) -exten => _13XX,1,Dial(SIP/minsk/${EXTEN}) -exten => _1[12]XX,1,Dial(SIP/minsk/${EXTEN}) +exten => _1[123]XX,1,Dial(SIP/minsk/${EXTEN}) |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4472.32625.4651 2014-11-25 14:13:55.244838441 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 14:17:46.736835337 +0200 @@ -3,7 +3,7 @@ exten => _23XX,1,Dial(SIP/${EXTEN}) exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) -exten => _1[123]XX,1,Dial(SIP/minsk/${EXTEN}) +exten => _[123]XX,1,Dial(SIP/minsk/${EXTEN}) |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4472.28646.3515 2014-11-25 14:19:54.096833630 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 14:22:44.188831355 +0200 @@ -3,7 +3,7 @@ exten => _23XX,1,Dial(SIP/${EXTEN}) exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) -exten => _[123]XX,1,Dial(SIP/minsk/${EXTEN}) +exten => _[123][13],1,Dial(SIP/minsk/${EXTEN}) |
#more /etc/asterisk/extensions.conf
|
#vim /etc/asterisk/extensions.conf
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4472.20307.31441 2014-11-25 14:34:55.516821554 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 14:36:08.872820571 +0200 @@ -3,7 +3,7 @@ exten => _23XX,1,Dial(SIP/${EXTEN}) exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) -exten => _[123][123],1,Dial(SIP/minsk/${EXTEN}) +exten => _[123][123]XX,1,Dial(SIP/minsk/${EXTEN}) |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4472.19964.26559 2014-11-25 14:36:32.360820257 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 14:37:07.672819785 +0200 @@ -3,7 +3,7 @@ exten => _23XX,1,Dial(SIP/${EXTEN}) exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) -exten => _[123][123]XX,1,Dial(SIP/minsk/${EXTEN}) +exten => _[123]XX,1,Dial(SIP/minsk/${EXTEN}) |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4472.24502.14434 2014-11-25 14:37:35.284819418 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 14:38:25.812818737 +0200 @@ -3,7 +3,7 @@ exten => _23XX,1,Dial(SIP/${EXTEN}) exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) -exten => _[123]XX,1,Dial(SIP/minsk/${EXTEN}) +exten => _[123][123]XX,1,Dial(SIP/minsk/${EXTEN}) |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-4472.11722.18531 2014-11-25 15:29:08.884777966 +0200 +++ /etc/asterisk/sip.conf 2014-11-25 15:30:13.352777102 +0200 @@ -10,15 +10,17 @@ secret=1234 host=dynamic username=brest +gr4 [2301] type=friend secret=1234 host=dynamic +gr1 [2302] type=friend secret=1234 host=dynamic - +gr3 |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-4472.23871.31841 2014-11-25 15:31:16.020776265 +0200 +++ /etc/asterisk/sip.conf 2014-11-25 15:32:08.096775567 +0200 @@ -10,17 +10,17 @@ secret=1234 host=dynamic username=brest -gr4 +context=gr4 [2301] type=friend secret=1234 host=dynamic -gr1 +context=gr1 [2302] type=friend secret=1234 host=dynamic -gr3 +context=gr3 |
#vim /etc/asterisk/sip.conf
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4472.7946.30777 2014-11-25 15:35:39.200772737 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 15:36:25.372772121 +0200 @@ -20,7 +20,6 @@ [gr1] -include => internal include => local include => national include => international |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4472.9685.18407 2014-11-25 15:36:38.776771942 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 15:37:04.276771598 +0200 @@ -20,6 +20,7 @@ [gr1] +include => internal include => local include => national include => international |
#more /etc/asterisk/extensions.conf
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4472.15078.23055 2014-11-25 16:09:22.652745628 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 16:09:29.360745538 +0200 @@ -16,6 +16,7 @@ [international] ;международные звонки в моем случае через пир минск + exten => _11XX,1,Dial(SIP/minsk/${EXTEN}) exten => _12XX,1,Dial(SIP/minsk/${EXTEN}) exten => _[23][123]XX,1,Dial(SIP/minsk/${EXTEN}) |
#apt-get install sendmail-bin
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libgadu3 libmozjs24d libmysqlclient18 mysql-common xulrunner-24.0 Use 'apt-get autoremove' to remove them. The following extra packages will be installed: sendmail-base sendmail-cf Suggested packages: sendmail-doc logcheck resolvconf sasl2-bin ... 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): send . W: Operation was interrupted before it could finish |
#mcedit /etc/mail/local-host-names
bash: mcedit: command not found |
#vim /etc/mail/local-host-names
--- /tmp/l3-saved-4472.19460.22732 2014-11-25 16:34:10.400725696 +0200 +++ /etc/mail/local-host-names 2014-11-25 16:34:36.036725354 +0200 @@ -1,2 +1,2 @@ localhost -debian6 +debian6.unix.nt |
#cat /etc/mail/local-host-names
localhost debian6.unix.nt |
#vim /etc/mail/sendmail.mc
|
#vim /etc/mail/sendmail.mc
--- /tmp/l3-saved-4472.22049.11897 2014-11-25 16:36:43.160723652 +0200 +++ /etc/mail/sendmail.mc 2014-11-25 16:37:54.652722691 +0200 @@ -54,7 +54,7 @@ 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 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 # |
#cat /etc/mail/sendmail.mc | grep 127
dnl 127.0.0.1')dnl dnl DAEMON_OPTIONS(`Family=inet, Name=MSP-v4, Port=submission, M=Ea, Addr=127.0.0.1')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 10113/sendmail: MTA |
#netstat -lnp
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:45320 0.0.0.0:* LISTEN 1909/rpc.statd tcp 0 0 127.0.0.1:5038 0.0.0.0:* LISTEN 2451/asterisk tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1865/rpcbind tcp 0 0 0.0.0.0:2000 0.0.0.0:* LISTEN 2451/asterisk tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2697/sshd tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 10113/sendmail: MTA tcp6 0 0 :::111 :::* LISTEN 1865/rpcbind tcp6 0 0 :::22 :::* LISTEN 2697/sshd ... unix 2 [ ACC ] STREAM LISTENING 8247 2994/minissdpd /var/run/minissdpd.sock unix 2 [ ACC ] STREAM LISTENING 6975 2766/dbus-daemon /var/run/dbus/system_bus_socket unix 2 [ ACC ] STREAM LISTENING 4999 3323/dbus-daemon @/tmp/dbus-cmhyIeugTQ unix 2 [ ACC ] STREAM LISTENING 7793 2807/avahi-daemon: /var/run/avahi-daemon/socket unix 2 [ ACC ] STREAM LISTENING 4752 2809/bluetoothd /var/run/sdp unix 2 [ ACC ] STREAM LISTENING 6851 2451/asterisk /var/run/asterisk/asterisk.ctl unix 2 [ ACC ] SEQPACKET LISTENING 5853 392/udevd /run/udev/control unix 2 [ ACC ] STREAM LISTENING 8576 3263/gnome-keyring- /home/user/.cache/keyring-cPP9Of/control unix 2 [ ACC ] STREAM LISTENING 3957 2964/gdm-simple-sla @/tmp/gdm-session-KfZVlDdJ unix 2 [ ACC ] STREAM LISTENING 5017 3263/gnome-keyring- /home/user/.cache/keyring-cPP9Of/ssh |
#netstat -lnp | send
bash: send: command not found |
#netstat -lnp | grep send
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 10113/sendmail: MTA unix 2 [ ACC ] STREAM LISTENING 102701 10113/sendmail: MTA /var/run/sendmail/mta/smcontrol |
#clear
|
#cp /etc/asterisk/extensions.conf extensions.conf.bak
|
#cp /etc/asterisk/extensions.conf extensions.conf.bak2
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4472.8972.9446 2014-11-26 09:52:46.663890813 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 09:58:51.203885929 +0200 @@ -6,9 +6,14 @@ exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) +; добавляет номер на который позвонить и узнать свою почту - позвонить на 8001 +exten => 8001,1,VoiceMailMain() +; сразу открыть мой ящик: 83ХХ => открывается ящик 33ХХ + [local] ;внутренние звонки -exten => _23XX,1,Dial(SIP/${EXTEN}) +exten => _23XX,1,Dial(SIP/${EXTEN},5) +exten => _23XX,n,VoiceMail(${EXTEN}@default) [national] |
#vim /etc/asterisk/voicemail.conf
--- /tmp/l3-saved-4472.32510.28338 2014-11-26 09:59:33.547885356 +0200 +++ /etc/asterisk/voicemail.conf 2014-11-26 10:07:50.591878703 +0200 @@ -380,6 +380,8 @@ [default] +;ящик => пароль, имя пользователя (для почты), адрес емайл +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 |
#vim /etc/asterisk/voicemail.conf
--- /tmp/l3-saved-4472.30370.14757 2014-11-26 10:12:17.319875129 +0200 +++ /etc/asterisk/voicemail.conf 2014-11-26 10:13:50.195873885 +0200 @@ -381,7 +381,7 @@ [default] ;ящик => пароль, имя пользователя (для почты), адрес емайл -3301 => 1234,User 1 (3301),user@localhost +2301 => 1234,User 1 (2301),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 |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-4472.643.8741 2014-11-26 10:14:06.823873662 +0200 +++ /etc/asterisk/sip.conf 2014-11-26 10:18:28.803870152 +0200 @@ -17,6 +17,8 @@ secret=1234 host=dynamic context=gr1 +mailbox=2301@default + [2302] type=friend @@ -24,3 +26,5 @@ host=dynamic context=gr1 + + |
#asterisk -r
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian6 (pid = 2451) Verbosity is at least 3 debian6*CLI> dialplan reload ... -- Time to restore hints and swap in new dialplan: 0.000003 sec -- Time to delete the old dialplan: 0.000024 sec -- Total time merge_contexts_delete: 0.000466 sec debian6*CLI> sip reload Reloading SIP == Parsing '/etc/asterisk/sip.conf': == Found == Parsing '/etc/asterisk/users.conf': == Found == Using SIP CoS mark 4 == Parsing '/etc/asterisk/sip_notify.conf': == Found debian6*CLI> exit |
#ÑÑкÑmore /etc/asterisk/Ñextensions.conf
[default] [internal] exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) ; добавлÑÐµÑ Ð½Ð¾Ð¼ÐµÑ Ð½Ð° коÑоÑÑй позвониÑÑ Ð¸ ÑзнаÑÑ ÑÐ²Ð¾Ñ Ð¿Ð¾ÑÑÑ - позвониÑÑ Ð½Ð° 8001 exten => 8001,1,VoiceMailMain() ; ÑÑÐ°Ð·Ñ Ð¾ÑкÑÑÑÑ Ð¼Ð¾Ð¹ ÑÑик: 83ХХ => оÑкÑÑваеÑÑÑ ÑÑик 33ХХ exten => _83XX,1,VoiceMailMain(33${EXTEN:2}@default) [local] ;внÑÑÑенние звонки ... include => local include => national [gr3] include => internal include => local [gr4] include => internal include => local include => national include => international |
#more /etc/asterisk/extensions.conf
|
#mutt
|
#yes
|
#mutt
|
#more /etc/asterisk/extensions.conf
|
#more /etc/asterisk/voicemail.conf
|
#more /etc/asterisk/voicemail.conf
|
#more /etc/asterisk/voicemail.conf
|
#mutt
|
#su - user
---Mutt: (no mailbox) [Msgs:0]---(threads/date)-----------------------------------------------------------------------------(all)--- user@debian6:~$ user@debian6:~$ user@debian6:~$ exit logout |
#less /var/log/mail.log
|
#apt-get install sensible-mda
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 install sensible-mda
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libgadu3 libgnutls-openssl27 libmozjs24d sendmail-base sendmail-cf xulrunner-24.0 Use 'apt-get autoremove' to remove them. The following extra packages will be installed: daemontools fastforward qmail qmail-run qmail-uids-gids runit ucspi-tcp Suggested packages: dot-forward qmail-tools socklog-run ... Package qmail-run which provides mail-transport-agent is not configured yet. Package sendmail-bin which provides mail-transport-agent is not installed. Package exim4-daemon-light which provides mail-transport-agent is not installed. dpkg: error processing sensible-mda (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: qmail qmail-run sensible-mda E: Sub-process /usr/bin/dpkg returned an error code (1) |
#apt-get install sendmail
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libgadu3 libmozjs24d xulrunner-24.0 Use 'apt-get autoremove' to remove them. The following extra packages will be installed: sendmail-bin Suggested packages: sendmail-doc rmail sasl2-bin ... The hostname -f command returned: $1 Your system needs to have a fully qualified domain name (fqdn) in order to install the var-qmail packages. Installation aborted. dpkg: error processing qmail (--configure): subprocess installed post-installation script returned error exit status 1 Setting up sendmail (8.14.4-4) ... Errors were encountered while processing: qmail E: Sub-process /usr/bin/dpkg returned an error code (1) |
#взлп -З йьфшд
bash: $'\320\262\320\267\320\273\320\277': command not found |
#dpkg -P qmail
(Reading database ... 134575 files and directories currently installed.) Removing qmail ... rmdir: failed to remove `/var/lib/qmail': Directory not empty Purging configuration files for qmail ... rmdir: failed to remove `/var/lib/qmail': Directory not empty rmdir: failed to remove `/etc/qmail': Directory not empty Processing triggers for man-db ... |
#взлп -apt-get install sendmail
Reading package lists... Done Building dependency tree Reading state information... Done sendmail is already the newest version. The following packages were automatically installed and are no longer required: libgadu3 libmozjs24d xulrunner-24.0 Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 16 not upgraded. |
#echo hello | mutt user
^C ^Z [1]+ Stopped echo hello | mutt user |
#kill %1
[1]+ Terminated echo hello | mutt user |
#vim /etc/hosts
--- /tmp/l3-saved-4472.16462.22085 2014-11-26 10:58:47.747837744 +0200 +++ /etc/hosts 2014-11-26 10:58:55.259837642 +0200 @@ -1,5 +1,5 @@ 127.0.0.1 localhost -127.0.1.1 debian6 +127.0.1.1 debian6 debian6.unix.nt # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback |
#vim /etc/mail/local-host-names
--- /tmp/l3-saved-4472.22404.20534 2014-11-26 10:59:06.287837496 +0200 +++ /etc/mail/local-host-names 2014-11-26 10:59:12.695837406 +0200 @@ -1,2 +1,3 @@ -anlocalhost -debian6 debian6.unix.nt +localhost +debian6 +debian6.unix.nt |
#/etc/init.d/sendmail restart
Restarting Mail Transport Agent (MTA): sendmail. |
#su - user
---Mutt: /var/mail/user [Msgs:4 New:4 39K]---(threads/date)-----------------------------------------------------------------(all)--- 4 kept, 0 deleted. user@debian6:~$ user@debian6:~$ user@debian6:~$ # вс ё работает user@debian6:~$ клево но вчера я в хостах правил доменное имя -su: $'\320\272\320\273\320\265\320\262\320\276': command not found user@debian6:~$ видно не# сохранил You have new mail in /var/mail/user user@debian6:~$ # там были опечатки user@debian6:~$ su - Password: l3-agent is already running: pid=3573; pidfile=/root/.lilalo/l3-agent.pid |
#more /etc/asterisk/extensions.conf
|
#apt-cache search asterisk-prom
asterisk-core-sounds-en - asterisk PBX sound files - US English asterisk-core-sounds-es - asterisk PBX sound files - Spanish asterisk-core-sounds-fr - asterisk PBX sound files - Canadian French asterisk-core-sounds-ru - asterisk PBX sound files - Russian asterisk-prompt-de - German voice prompts for the Asterisk PBX asterisk-prompt-es-co - Colombian Spanish voice prompts for Asterisk asterisk-prompt-fr-armelle - French voice prompts for Asterisk by Armelle Desjardins asterisk-prompt-fr-proformatique - French voice prompts for Asterisk asterisk-prompt-it - dummy transitional package asterisk-prompt-it-menardi - asterisk PBX Italian sound files asterisk-prompt-it-menardi-alaw - asterisk PBX Italian sound files - a-law prompts asterisk-prompt-it-menardi-gsm - asterisk PBX Italian sound files - gsm prompts asterisk-prompt-it-menardi-wav - asterisk PBX Italian sound files - wav prompts asterisk-prompt-se - Swedish voice prompts for Asterisk |
#apt-cache search asterisk-prom
asterisk-core-sounds-en - asterisk PBX sound files - US English asterisk-core-sounds-es - asterisk PBX sound files - Spanish asterisk-core-sounds-fr - asterisk PBX sound files - Canadian French asterisk-core-sounds-ru - asterisk PBX sound files - Russian asterisk-prompt-de - German voice prompts for the Asterisk PBX asterisk-prompt-es-co - Colombian Spanish voice prompts for Asterisk asterisk-prompt-fr-armelle - French voice prompts for Asterisk by Armelle Desjardins asterisk-prompt-fr-proformatique - French voice prompts for Asterisk asterisk-prompt-it - dummy transitional package asterisk-prompt-it-menardi - asterisk PBX Italian sound files asterisk-prompt-it-menardi-alaw - asterisk PBX Italian sound files - a-law prompts asterisk-prompt-it-menardi-gsm - asterisk PBX Italian sound files - gsm prompts asterisk-prompt-it-menardi-wav - asterisk PBX Italian sound files - wav prompts asterisk-prompt-se - Swedish voice prompts for Asterisk |
#apt-cache search asterisk-prom
asterisk-core-sounds-en - asterisk PBX sound files - US English asterisk-core-sounds-es - asterisk PBX sound files - Spanish asterisk-core-sounds-fr - asterisk PBX sound files - Canadian French asterisk-core-sounds-ru - asterisk PBX sound files - Russian asterisk-prompt-de - German voice prompts for the Asterisk PBX asterisk-prompt-es-co - Colombian Spanish voice prompts for Asterisk asterisk-prompt-fr-armelle - French voice prompts for Asterisk by Armelle Desjardins asterisk-prompt-fr-proformatique - French voice prompts for Asterisk asterisk-prompt-it - dummy transitional package asterisk-prompt-it-menardi - asterisk PBX Italian sound files asterisk-prompt-it-menardi-alaw - asterisk PBX Italian sound files - a-law prompts asterisk-prompt-it-menardi-gsm - asterisk PBX Italian sound files - gsm prompts asterisk-prompt-it-menardi-wav - asterisk PBX Italian sound files - wav prompts asterisk-prompt-se - Swedish voice prompts for Asterisk |
#apt-get install asterisk-core-sounds-ru asterisk-core-sounds-fr asterisk-prompt-de
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libgadu3 libmozjs24d xulrunner-24.0 Use 'apt-get autoremove' to remove them. The following extra packages will be installed: asterisk-core-sounds-fr-gsm asterisk-core-sounds-ru-gsm The following NEW packages will be installed: asterisk-core-sounds-fr asterisk-core-sounds-fr-gsm asterisk-core-sounds-ru asterisk-core-sounds-ru-gsm asterisk-prompt-de ... Unpacking asterisk-prompt-de (from .../asterisk-prompt-de_2.0-1.1_all.deb) ... Setting up asterisk-core-sounds-fr-gsm (1.4.22-1) ... Setting up asterisk-core-sounds-fr (1.4.22-1) ... update-alternatives: using /usr/share/asterisk/sounds/fr_CA_f_June to provide /usr/share/asterisk/sounds/fr (asterisk-prompt-fr) in auto mode update-alternatives: using /usr/share/asterisk/sounds/fr_CA_f_June to provide /usr/share/asterisk/sounds/fr_CA (asterisk-prompt-fr-ca) in auto mode Setting up asterisk-core-sounds-ru-gsm (1.4.22-1) ... Setting up asterisk-core-sounds-ru (1.4.22-1) ... update-alternatives: using /usr/share/asterisk/sounds/ru_RU_f_IvrvoiceRU to provide /usr/share/asterisk/sounds/ru (asterisk-prompt-ru) in auto mode update-alternatives: using /usr/share/asterisk/sounds/ru_RU_f_IvrvoiceRU to provide /usr/share/asterisk/sounds/ru_RU (asterisk-prompt-ru-ru) in auto mode Setting up asterisk-prompt-de (2.0-1.1) ... |
#apt-get install asterisk-core-sounds-ru asterisk-core-sounds-fr asterisk-prompt-de
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libgadu3 libmozjs24d xulrunner-24.0 Use 'apt-get autoremove' to remove them. The following extra packages will be installed: asterisk-core-sounds-fr-gsm asterisk-core-sounds-ru-gsm The following NEW packages will be installed: asterisk-core-sounds-fr asterisk-core-sounds-fr-gsm asterisk-core-sounds-ru asterisk-core-sounds-ru-gsm asterisk-prompt-de ... Unpacking asterisk-prompt-de (from .../asterisk-prompt-de_2.0-1.1_all.deb) ... Setting up asterisk-core-sounds-fr-gsm (1.4.22-1) ... Setting up asterisk-core-sounds-fr (1.4.22-1) ... update-alternatives: using /usr/share/asterisk/sounds/fr_CA_f_June to provide /usr/share/asterisk/sounds/fr (asterisk-prompt-fr) in auto mode update-alternatives: using /usr/share/asterisk/sounds/fr_CA_f_June to provide /usr/share/asterisk/sounds/fr_CA (asterisk-prompt-fr-ca) in auto mode Setting up asterisk-core-sounds-ru-gsm (1.4.22-1) ... Setting up asterisk-core-sounds-ru (1.4.22-1) ... update-alternatives: using /usr/share/asterisk/sounds/ru_RU_f_IvrvoiceRU to provide /usr/share/asterisk/sounds/ru (asterisk-prompt-ru) in auto mode update-alternatives: using /usr/share/asterisk/sounds/ru_RU_f_IvrvoiceRU to provide /usr/share/asterisk/sounds/ru_RU (asterisk-prompt-ru-ru) in auto mode Setting up asterisk-prompt-de (2.0-1.1) ... |
#apt-get install asterisk-core-sounds-ru asterisk-core-sounds-fr asterisk-prompt-de
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libgadu3 libmozjs24d xulrunner-24.0 Use 'apt-get autoremove' to remove them. The following extra packages will be installed: asterisk-core-sounds-fr-gsm asterisk-core-sounds-ru-gsm The following NEW packages will be installed: asterisk-core-sounds-fr asterisk-core-sounds-fr-gsm asterisk-core-sounds-ru asterisk-core-sounds-ru-gsm asterisk-prompt-de ... Unpacking asterisk-prompt-de (from .../asterisk-prompt-de_2.0-1.1_all.deb) ... Setting up asterisk-core-sounds-fr-gsm (1.4.22-1) ... Setting up asterisk-core-sounds-fr (1.4.22-1) ... update-alternatives: using /usr/share/asterisk/sounds/fr_CA_f_June to provide /usr/share/asterisk/sounds/fr (asterisk-prompt-fr) in auto mode update-alternatives: using /usr/share/asterisk/sounds/fr_CA_f_June to provide /usr/share/asterisk/sounds/fr_CA (asterisk-prompt-fr-ca) in auto mode Setting up asterisk-core-sounds-ru-gsm (1.4.22-1) ... Setting up asterisk-core-sounds-ru (1.4.22-1) ... update-alternatives: using /usr/share/asterisk/sounds/ru_RU_f_IvrvoiceRU to provide /usr/share/asterisk/sounds/ru (asterisk-prompt-ru) in auto mode update-alternatives: using /usr/share/asterisk/sounds/ru_RU_f_IvrvoiceRU to provide /usr/share/asterisk/sounds/ru_RU (asterisk-prompt-ru-ru) in auto mode Setting up asterisk-prompt-de (2.0-1.1) ... |
localhost debian6.unix.nt
Время первой команды журнала | 10:56:29 2014-11-25 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 10:45:46 2014-11-26 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 11.88 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 2.97 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 4.88 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.34 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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