/l3/users/andrey-f4/sl-voip-2016-03/asterick8.unix.sl/root :1 :2 :3 |
|
#vim ~/.bash-profile
--- /dev/null 2016-03-28 15:32:38.644463772 +0300 +++ /root/.bash-profile 2016-03-28 16:45:46.055941232 +0300 @@ -0,0 +1 @@ +. ~/.bashrc |
#vim ~/.bash-profile
|
#~
. ~/.bashrc |
#vim ~/.bash-profile
--- /tmp/l3-saved-2713.27727.16012 2016-03-28 16:46:40.247942191 +0300 +++ /root/.bash-profile 2016-03-28 16:47:25.255942988 +0300 @@ -1 +1,2 @@ +l3-agent . ~/.bashrc |
#vim ~/.bashrc
|
#vim ~/.bash_profile
--- /tmp/l3-saved-2979.25717.23433 2016-03-28 16:51:27.239947272 +0300 +++ /root/.bash_profile 2016-03-28 16:51:41.127947518 +0300 @@ -1,2 +1,2 @@ l3-agent - +. ~/.bashrc |
#cat ~/.bash_profile
l3-agent . ~/.bashrc |
#vim /etc/X11/xorg.conf
|
#~
bash: startx: command not found |
#~
|
#vim /root/.l3rc
--- /tmp/l3-saved-3088.19243.32619 2016-03-29 11:37:40.094782336 +0300 +++ /root/.l3rc 2016-03-29 11:37:45.322782428 +0300 @@ -1 +1 @@ -l3cd=/users/andrey_f4/sl-voip-2016-03/asterick8.unix.sl/root +l3cd=/users/andrey-f4/sl-voip-2016-03/asterick8.unix.sl/root |
#pkill -1 l3-agent
|
#vim /etc/ssh/sshd_config
--- /tmp/l3-saved-4163.23018.18418 2016-03-29 12:04:16.914810606 +0300 +++ /etc/ssh/sshd_config 2016-03-29 12:04:33.366810897 +0300 @@ -25,7 +25,7 @@ # Authentication: LoginGraceTime 120 -PermitRootLogin without-password +PermitRootLogin yes StrictModes yes RSAAuthentication yes |
#pkill -1 sshd
|
#time arp -an
? (192.168.80.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.80.200) at 34:e6:d7:57:b1:95 [ether] on eth0 ? (192.168.80.201) at 00:0e:08:d0:0e:dd [ether] on eth0 real 0m0.002s user 0m0.000s sys 0m0.000s |
#time
real 0m0.000s user 0m0.000s sys 0m0.000s |
#man time
|
#apt-get install asterisk
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: asterisk-config asterisk-core-sounds-en asterisk-core-sounds-en-gsm asterisk-modules asterisk-moh-opsound-gsm asterisk-voicemail freetds-common libcfg4 libcoroipcc4 libcpg4 libcurl3 libfreeradius-client2 libiksemel3 libodbc1 libpj2 libpjlib-util2 libpjmedia-audiodev2 libpjmedia-codec2 libpjmedia-videodev2 libpjmedia2 libpjnath2 libpjsip-simple2 libpjsip-ua2 libpjsip2 libpjsua2 libpq5 libresample1 libsensors4 libsnmp-base libsnmp30 ... Adding user `asterisk' to group `audio' ... Adding user asterisk to group audio Done. Setting up asterisk-voicemail (1:11.13.1~dfsg-2+b1) ... Setting up libsox-fmt-alsa:amd64 (14.4.1-5) ... Setting up libsox-fmt-base:amd64 (14.4.1-5) ... Setting up sox (14.4.1-5) ... Setting up asterisk-moh-opsound-gsm (2.03-1) ... Processing triggers for libc-bin (2.19-18+deb8u3) ... Processing triggers for systemd (215-17+deb8u3) ... |
#ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 110768 5084 ? Ss 10:19 0:00 /sbin/init root 2 0.0 0.0 0 0 ? S 10:19 0:00 [kthreadd] root 3 0.0 0.0 0 0 ? S 10:19 0:00 [ksoftirqd/0] root 5 0.0 0.0 0 0 ? S< 10:19 0:00 [kworker/0:0H] root 7 0.0 0.0 0 0 ? S 10:19 0:02 [rcu_sched] root 8 0.0 0.0 0 0 ? S 10:19 0:00 [rcu_bh] root 9 0.0 0.0 0 0 ? S 10:19 0:00 [migration/0] root 10 0.0 0.0 0 0 ? S 10:19 0:00 [watchdog/0] root 11 0.0 0.0 0 0 ? S 10:19 0:00 [watchdog/1] ... root 4163 0.0 0.0 22092 3996 pts/6 Ss+ 12:04 0:00 bash root 4204 0.0 0.0 0 0 ? S 12:04 0:00 [kworker/1:1] root 4339 0.0 0.0 56936 3460 pts/3 S+ 12:08 0:00 su root 4340 0.0 0.0 16268 2068 pts/3 S+ 12:08 0:00 script -f -c ba root 4371 0.0 0.0 16272 156 pts/3 S+ 12:08 0:00 script -f -c ba root 4372 0.0 0.0 22100 4032 pts/7 Ss 12:08 0:00 bash root 4401 0.0 0.0 0 0 ? S 12:09 0:00 [kworker/1:0] asterisk 6084 1.3 0.5 1741936 43408 ? Ssl 12:12 0:00 /usr/sbin/aster asterisk 6085 0.0 0.0 14588 1492 ? S 12:12 0:00 astcanary /var/ root 6160 0.0 0.0 19100 2452 pts/7 R+ 12:13 0:00 ps aux |
#ps aux | grep aster*
avahi 427 0.0 0.0 32232 2780 ? Ss 10:19 0:00 avahi-daemon: running [asterick8.local] asterisk 6084 1.1 0.5 1741936 43408 ? Ssl 12:12 0:00 /usr/sbin/asterisk -p -U asterisk asterisk 6085 0.0 0.0 14588 1492 ? S 12:12 0:00 astcanary /var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet 6084 root 6169 0.0 0.0 12732 2244 pts/7 S+ 12:13 0:00 grep aster* |
#dpkg -L asterisk
/. /var /var/lib /var/lib/asterisk /var/lib/asterisk/moh /var/lib/asterisk/sounds /var/lib/asterisk/sounds/custom /var/spool /var/spool/asterisk /var/spool/asterisk/dictate ... /usr/sbin/astgenkey /usr/sbin/smsq /usr/sbin/aelparse /usr/sbin/autosupport /usr/sbin/astdb2sqlite3 /usr/sbin/astdb2bdb /usr/share/asterisk/sounds/recordings /usr/share/asterisk/sounds/custom /usr/share/man/man8/rasterisk.8.gz /usr/sbin/rasterisk |
#dpkg -L asterisk | grep /etc
/etc /etc/logrotate.d /etc/logrotate.d/asterisk /etc/asterisk /etc/init.d /etc/init.d/asterisk /etc/default /etc/default/asterisk |
#ls -l /var/tmp/asterisk/
total 16 -rw-rw---- 1 asterisk asterisk 13596 Mar 29 15:21 message01.gsm |
#date
Tue Mar 29 15:22:28 MSK 2016 |
#cat /etc/asterisk/extensions.conf
[default] exten => 4000,1,Playback(demo-thanks) exten => 4001,1,Record(/var/tmp/asterisk/message01:gsm) exten => 4001,1,Playback(/var/tmp/asterisk/message01) |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-1565.30489.3461 2016-03-30 09:41:29.462555872 +0300 +++ /etc/asterisk/extensions.conf 2016-03-30 11:02:35.398642018 +0300 @@ -1,15 +1,45 @@ -[default] +;Adding file in dilplan, for best organize +;#include /etc/asterisk/extension.local.conf -exten => 4000,1,Playback(demo-thanks) + +[local] +exten => _24XX,1,Dial(SIP/${EXTEN}) + +exten => 4000,1,Playback(demo-thanks) exten => _40XX,1,Record(/var/tmp/asterisk/message${EXTEN:2}:wav) exten => _40XX,n,Playback(/var/tmp/asterisk/message${EXTEN:2}) - exten => _41XX,1,Playback(/var/tmp/asterisk/message${EXTEN:2}) +[default] + +exten => _1[1234]XX,1,Dial(SIP/kiev/${EXTEN}) +exten => _2[23]XX,1,Dial(SIP/kiev/${EXTEN}) + +;Description resorces +[res1] + + +[res2] + + + +[res3] + + +[gr1] +include => default +include => local + + +[gr2] + +include => local + + + + + -exten => _24XX,1,Dial(SIP/${EXTEN}) -exten => _1[1234]XX,1,Dial(SIP/kiev/${EXTEN}) -exten => _2[234]XX,1,Dial(SIP/kiev/${EXTEN}) |
#asterisk -rvvv
Asterisk 11.13.1~dfsg-2+b1, Copyright (C) 1999 - 2013 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 11.13.1~dfsg-2+b1 currently running on asterick8 (pid = 461) == Using SIP RTP CoS mark 5 -- Executing [2401@gr1:1] Dial("SIP/192.168.70.2-000001a4", "SIP/kiev/2401") in new stack ... [Mar 30 10:57:19] WARNING[577][C-000000d4]: chan_sip.c:23023 handle_response_invite: Received response: "Forbidden" from '<sip:2302@192.168.80.2>;tag=as3f7e566d' == Everyone is busy/congested at this time (1:0/0/1) -- Auto fallthrough, channel 'SIP/192.168.70.2-000001a4' status is 'CHANUNAVAIL' -- Unregistered SIP '2402' -- Registered SIP '2402' at 192.168.80.200:41122 [Mar 30 10:57:23] NOTICE[577]: chan_sip.c:27846 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2402 [Mar 30 10:57:28] NOTICE[577]: chan_sip.c:27846 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2402 asterick8*CLI> quit Asterisk cleanly ending (0). Executing last minute cleanups |
#vim /etc/asterisk/sip.conf
|
#[ontext=]r1
;Description resorces [res1] [res1] [res2]le w [ ] [res3] t [ ] [gr1] [ncl]de => default include => local [gr2] include => local 31,0-1 70% |
#asterisk -rvv
Asterisk 11.13.1~dfsg-2+b1, Copyright (C) 1999 - 2013 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 11.13.1~dfsg-2+b1 currently running on asterick8 (pid = 461) asterick8*CLI> asterick8*CLI> asterick8*CLI> asterick8*CLI> quit Asterisk cleanly ending (0). Executing last minute cleanups |
#asterisk -rvv
Asterisk 11.13.1~dfsg-2+b1, Copyright (C) 1999 - 2013 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 11.13.1~dfsg-2+b1 currently running on asterick8 (pid = 461) == Using SIP RTP CoS mark 5 == Using SIP RTP CoS mark 5 [Mar 30 11:01:17] WARNING[577][C-000000dd]: chan_sip.c:16380 check_auth: username mismatch, have <2401>, digest has <kiev> [Mar 30 11:01:17] NOTICE[577][C-000000dd]: chan_sip.c:25535 handle_request_invite: Failed to authenticate device "2401" <sip:2401@192.168.70.2>;tag=as2aaf0f1f == Everyone is busy/congested at this time (1:0/1/0) asterick8*CLI> quit Asterisk cleanly ending (0). Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-2327.30854.17445 2016-03-30 11:01:42.358641079 +0300 +++ /etc/asterisk/extensions.conf 2016-03-30 11:02:35.398642018 +0300 @@ -14,9 +14,7 @@ [default] exten => _1[1234]XX,1,Dial(SIP/kiev/${EXTEN}) -exten => _2[234]XX,1,Dial(SIP/kiev/${EXTEN}) - - +exten => _2[23]XX,1,Dial(SIP/kiev/${EXTEN}) ;Description resorces [res1] |
#{EXTEN})
exten => 4000,1,Playback(demo-thanks) exten => _40XX,1,Record(/var/tmp/asterisk/message${EXTEN:2}:wav) exten => _40XX,n,Playback(/var/tmp/asterisk/message${EXTEN:2}) exten => _41XX,1,Playback(/var/tmp/asterisk/message${EXTEN:2}) [local] [xten ]> _41XX,1,Playback(/var/tmp/asterisk/message${EXTEN:2}) [default] [ ] [xten =>]_1[1234]XX,1,Dial(SIP/kiev2/${EXTEN}) [1234] ( /${EXTEN}) ... exten => s,n,GotoIf($["$DIALSTATUS" = "NOANSWER"]?label2) exten => s,n,Hangup [ ]?labee l ( ) exten => _41XX,1,Playback(/var/tmp/asterisk/message${EXTEN:2}) ( ) [local]t] [ ] Macro(call) [local] exten => _40XX,n,Playb(call)ar/tmp/asterisk/message${EXTEN:2}) <etc/asterisk/extensions.conf" 57L, 1062C written |
#~
Asterisk 11.13.1~dfsg-2+b1, Copyright (C) 1999 - 2013 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 11.13.1~dfsg-2+b1 currently running on asterick8 (pid = 461) asterick8*CLI> sip show peers Name/username Host Dyn Forcerport Comedia ACL Port Status Description 2401/2401 192.168.80.201 D Auto (No) No 5060 OK (25 ms) 2402/2402 192.168.80.200 D Auto (No) No 41122 OK (11 ms) kiev/lviv 192.168.80.1 D Auto (Yes) No 5060 Unmonitored 3 sip peers [Monitored: 2 online, 0 offline Unmonitored: 1 online, 0 offline] asterick8*CLI> quit Asterisk cleanly ending (0). Executing last minute cleanups |
#vim /etc/asterisk/sip.conf
|
#context=gr1
exten => _41XX,1,Playback(/var/tmp/asterisk/message${EXTEN:2}) [default] exten => _1[1234]XX,1,Dial(SIP/kiev2/${EXTEN}) exten => _2[23]XX,1,Dial(SIP/kiev2/${EXTEN}) ;Description resorces [res1] |
#[res2]
E325: ATTENTION Found a swap file by the name "/etc/asterisk/.sip.conf.swp" owned by: root dated: Wed Mar 30 11:15:44 2016 file name: /etc/asterisk/sip.conf ;section for connect remote server to my ATS [kiev] [kiev] secret=1234 host=dynamic directmedia=no ;username=lviv ;defaultuser=user type=friend 36,0-1 92% If you did this already, delete the swap file "/etc/asterisk/.sip.conf.swp" to avoid this message. Swap file "/etc/asterisk/.sip.conf.swp" already exists! [O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort: |
#;4073 => 1099,Bianca Paige,bianca@biancapaige.com,,delete=1|emailsubb
;#include /etc/asterisk/extension.local.conf [ ] [ ] [macro-call] l2)en => s,1,NoOp(Call from ${CALLERID(num)} to ${MACRO_EXTEN}) exten => s,n,Dial(SIP/${DB(mobile/${MACRO_EXTEN})},10) exten => s,n,GotoIf($["$DIALSTATUS" = "NOANSWER"]?label2) exten => s,n,Hangup exten => s,n(label2),VoiceMail(${MACRO_EXTEN:2}@default)" = ""]?labee [local] exten => s,n,Hangup exten => _24XX,1,Macro(call) "/etc/asterisk/extensions.conf" 57L, 1062C exten => 4000,1,Playback(demo-thanks) 18,0-1 Top |
#[ ]
eastern=America/New_York|'vm-received' Q 'digits/at' IMp central=America/Chicago|'vm-received' Q 'digits/at' IMp european=Europe/Copenhagen|'vm-received' a d b 'digits/at' HM central24=America/Chicago|'vm-received' q 'digits/at' H N 'hours' military=Zulu|'vm-received' q 'digits/at' H N 'hours' 'phonetic/z_p' [default] 01 => 4242, Andrey, andrey@localhost .com,attach=no|serveremail=myaddy@digium.com|tz=central|maxmsg=10 ;4300 => 3456,Ben Rigas,ben@american-computer.net.net,mypager@digiumm cid=yes|dialout=fromvm|callback=fromvm|review=yes|operator=yes|envell ope=yes|moveheard=yes|sayduration=yes|saydurationm=1 ;4069 => 6522,Matt Brooks,matt@marko.net,,|tz=central|attach=yes|sayy ject=You have a new voicemail.|emailbody=Click on the attachment to listen.|rip=2010-06-04 <tc/asterisk/voicemail.conf" 456L, 23812C written |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-1565.25900.24492 2016-03-30 12:56:42.002763229 +0300 +++ /etc/asterisk/extensions.conf 2016-03-30 13:02:56.046769851 +0300 @@ -5,11 +5,12 @@ exten => s,1,NoOp(Call from ${CALLERID(num)} to ${MACRO_EXTEN}) exten => s,n,Dial(SIP/${MACRO_EXTEN},10) -exten => s,n,GotoIf($["$DIALSTATUS" = "NOANSWER"]?label1) +exten => s,n,NoOp(Dialstatus ${DIALSTATUS}) +exten => s,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?label1) exten => s,n,Hangup -exten => s,n(label1),GotoIf($["DB(mobile/${MACRO_EXTEN})" = ""]?label2) +exten => s,n(label1),GotoIf($["{DB(mobile/${MACRO_EXTEN})}" = ""]?label2) exten => s,n,Dial(SIP/${DB(mobile/${MACRO_EXTEN})},10) -exten => s,n,GotoIf($["$DIALSTATUS" = "NOANSWER"]?label2) +exten => s,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?label2) exten => s,n,Hangup exten => s,n(label2),VoiceMail(${MACRO_EXTEN:2}@default) exten => s,n,Hangup |
#vim /etc/asterisk/voicemail.conf
--- /tmp/l3-saved-1565.18941.9459 2016-03-30 13:02:58.466769894 +0300 +++ /etc/asterisk/voicemail.conf 2016-03-30 13:03:41.630770658 +0300 @@ -408,7 +408,7 @@ [default] -01 => 4242, Andrey, andrey@localhost +02 => 4242, Andrey, andrey@default ;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/extensions.conf
|
#exten => _24XX,1,Macro(call)
; eastern=America/New_York|'vm-received' Q 'digits/at' IMp central=America/Chicago|'vm-received' Q 'digits/at' IMp european=Europe/Copenhagen|'vm-received' a d b 'digits/at' HM central24=America/Chicago|'vm-received' q 'digits/at' H N 'hours' military=Zulu|'vm-received' q 'digits/at' H N 'hours' 'phonetic/z_p' [default] .com,attach=no|serveremail=myaddy@digium.com|tz=central|maxmsg=10 ;4300 => 3456,Ben Rigas,ben@american-computer.net.net,mypager@digiumm cid=yes|dialout=fromvm|callback=fromvm|review=yes|operator=yes|envell ope=yes|moveheard=yes|sayduration=yes|saydurationm=1 ;4069 => 6522,Matt Brooks,matt@marko.net,,|tz=central|attach=yes|sayy |
#;4073 => 1099,Bianca Paige,bianca@biancapaige.com,,delete=1|emailsubb
;Adding file in dilplan, for best organize ;#include /etc/asterisk/extension.local.conf [macro-call] exten => s,1,NoOp(Call from ${CALLERID(num)} to ${MACRO_EXTEN}) bel2) exten => s,n,Dial(SIP/${MACRO_EXTEN},10) exten => s,n,Dial(SIP/${DB(mobile/${MACRO_EXTEN})},10) exten => s,n,NoOp(Dialstatus ${DIALSTATUS}) exten => s,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?label2) exten => s,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?label1) exten => s,n,Hangup exten => s,n,Hangup exten => s,n(label2),VoiceMail(${MACRO_EXTEN:2}@default) [local]> s,n(label1),GotoIf($["{DB(mobile/${MACRO_EXTEN})}" = ""]?laa exten => s,n,Hangup exten => _24XX,1,Macro(call)nf" 58L, 1112C 3,0-1 Top |
#[ ]
eastern=America/New_York|'vm-received' Q 'digits/at' IMp central=America/Chicago|'vm-received' Q 'digits/at' IMp european=Europe/Copenhagen|'vm-received' a d b 'digits/at' HM central24=America/Chicago|'vm-received' q 'digits/at' H N 'hours' military=Zulu|'vm-received' q 'digits/at' H N 'hours' 'phonetic/z_p' [default] localhost .com,attach=no|serveremail=myaddy@digium.com|tz=central|maxmsg=10 ;4300 => 3456,Ben Rigas,ben@american-computer.net.net,mypager@digiumm cid=yes|dialout=fromvm|callback=fromvm|review=yes|operator=yes|envell ope=yes|moveheard=yes|sayduration=yes|saydurationm=1 @ y @ <tc/asterisk/voicemail.conf" 457L, 23813C written |
#vim /etc/asterisk/voicemail.conf
|
#;4073 => 1099,Bianca Paige,bianca@biancapaige.com,,delete=1|emailsub
;Adding file in dilplan, for best organize ;#include /etc/asterisk/extension.local.conf [macro-call] exten => s,1,NoOp(Call from ${CALLERID(num)} to ${MACRO_EXTEN}) bel2) exten => s,n,Dial(SIP/${MACRO_EXTEN},10) exten => s,n,Dial(SIP/${DB(mobile/${MACRO_EXTEN})},10) exten => s,n,NoOp(Dialstatus ${DIALSTATUS}) exten => s,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?label2) exten => s,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?label1) exten => s,n,Hangup exten => s,n,Hangup exten => s,n(label2),VoiceMail(${MACRO_EXTEN:2}@default) [local]> s,n(label1),GotoIf($["{DB(mobile/${MACRO_EXTEN})}" = ""]?laa exten => s,n,Hangup exten => _24XX,1,Macro(call)nf" 58L, 1112C 3,0-1 Top |
#[ ]
; R 24 hour time, including minute ; eastern=America/New_York|'vm-received' Q 'digits/at' IMp european=Europe/Copenhagen|'vm-received' a d b 'digits/at' HM central24=America/Chicago|'vm-received' q 'digits/at' H N 'hours' [default]Zulu|'vm-received' q 'digits/at' H N 'hours' 'phonetic/z_p' 02 => 4242, Andrey, andrey@localhost .com,attach=no|serveremail=myaddy@digium.com|tz=central|maxmsg=10 ;4300 => 3456,Ben Rigas,ben@american-computer.net ;4200 => 9855,Mark Spencer,markster@linux-support.net,mypager@digiumm cid=yes|dialout=fromvm|callback=fromvm|review=yes|operator=yes|envell ope=yes|moveheard=yes|sayduration=yes|saydurationm=1 ;4069 => 6522,Matt Brooks,matt@marko.net,,|tz=central|attach=yes|sayy |
#vim /etc/asterisk/voicemail.conf
--- /tmp/l3-saved-3113.6832.16986 2016-03-30 13:58:34.646828957 +0300 +++ /etc/asterisk/voicemail.conf 2016-03-30 13:59:30.906829953 +0300 @@ -408,6 +408,7 @@ [default] +01 => 4242, Andrey, andrey@localhost 02 => 4242, Andrey, andrey@localhost ;4200 => 9855,Mark Spencer,markster@linux-support.net,mypager@digium.com,attach=no|serveremail=myaddy@digium.com|tz=central|maxmsg=10 |
#asterisk -rvvv
Asterisk 11.13.1~dfsg-2+b1, Copyright (C) 1999 - 2013 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 11.13.1~dfsg-2+b1 currently running on asterick8 (pid = 461) == Using SIP RTP CoS mark 5 -- Executing [2402@gr1:1] Macro("SIP/2401-000001d7", "call") in new stack ... -- Executing [s@macro-call:4] GotoIf("SIP/2401-000001d7", "1?label1") in new stack -- Goto (macro-call,s,6) -- Executing [s@macro-call:6] GotoIf("SIP/2401-000001d7", "0?label2") in new stack -- Executing [s@macro-call:7] Dial("SIP/2401-000001d7", "SIP/,10") in new stack [Mar 30 13:59:56] WARNING[3155][C-000000f3]: app_dial.c:2330 dial_exec_full: Dial argument takes format (technology/resource) == Spawn extension (macro-call, s, 7) exited non-zero on 'SIP/2401-000001d7' in macro 'call' == Spawn extension (gr1, 2402, 1) exited non-zero on 'SIP/2401-000001d7' asterick8*CLI> quit Asterisk cleanly ending (0). Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3113.12153.27246 2016-03-30 14:00:23.686830887 +0300 +++ /etc/asterisk/extensions.conf 2016-03-30 14:00:33.826831067 +0300 @@ -8,7 +8,7 @@ exten => s,n,NoOp(Dialstatus ${DIALSTATUS}) exten => s,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?label1) exten => s,n,Hangup -exten => s,n(label1),GotoIf($["{DB(mobile/${MACRO_EXTEN})}" = ""]?label2) +exten => s,n(label1),GotoIf($["${DB(mobile/${MACRO_EXTEN})}" = ""]?label2) exten => s,n,Dial(SIP/${DB(mobile/${MACRO_EXTEN})},10) exten => s,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?label2) exten => s,n,Hangup |
#;4073 => 1099,Bianca Paige,bianca@biancapaige.com,,delete=1|emailsub
;Adding file in dilplan, for best organize ;#include /etc/asterisk/extension.local.conf [macro-call] exten => s,1,NoOp(Call from ${CALLERID(num)} to ${MACRO_EXTEN}) abel2) exten => s,n,Dial(SIP/${MACRO_EXTEN},10) exten => s,n,Dial(SIP/${DB(mobile/${MACRO_EXTEN})},10) exten => s,n,NoOp(Dialstatus ${DIALSTATUS}) exten => s,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?label2) exten => s,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?label1) exten => s,n,Hangup exten => s,n,Hangup exten => s,n(label2),VoiceMail(${MACRO_EXTEN:2}@default) [local]> s,n(label1),GotoIf($["${DB(mobile/${MACRO_EXTEN})}" = ""]?ll exten => s,n,Hangup "/etc/asterisk/extensions.conf" 58L, 1113C |
#exten => _24XX,1,Macro(call)
; R 24 hour time, including minute ; eastern=America/New_York|'vm-received' Q 'digits/at' IMp european=Europe/Copenhagen|'vm-received' a d b 'digits/at' HM central24=America/Chicago|'vm-received' q 'digits/at' H N 'hours' [default]Zulu|'vm-received' q 'digits/at' H N 'hours' 'phonetic/z_p' 01 => 4242, Andrey, andrey@localhost .com,attach=no|serveremail=myaddy@digium.com|tz=central|maxmsg=10 ;4300 => 3456,Ben Rigas,ben@american-computer.net ;4310 => -5432,Sales,sales@marko.netlinux-support.net,mypager@digiumm |
#;4069 => 6522,Matt Brooks,matt@marko.net,,|tz=central|attach=yes|sayy
;Adding file in dilplan, for best organize ;#include /etc/asterisk/extension.local.conf [macro-call] exten => s,1,NoOp(Call from ${CALLERID(num)} to ${MACRO_EXTEN}) abel2) exten => s,n,Dial(SIP/${MACRO_EXTEN},10) exten => s,n,Dial(SIP/${DB(mobile/${MACRO_EXTEN})},10) exten => s,n,NoOp(Dialstatus ${DIALSTATUS}) exten => s,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?label2) exten => s,n,GotoIf($["${DIALSTATUS}" = "NOANSWER"]?label1) exten => s,n,Hangup exten => s,n,Hangup exten => s,n(label2),VoiceMail(${MACRO_EXTEN:2}@default) [local]> s,n(label1),GotoIf($["${DB(mobile/${MACRO_EXTEN})}" = ""]?ll exten => s,n,Hangup "/etc/asterisk/extensions.conf" 58L, 1113C |
#exten => _24XX,1,Macro(call)
; eastern=America/New_York|'vm-received' Q 'digits/at' IMp european=Europe/Copenhagen|'vm-received' a d b 'digits/at' HM central24=America/Chicago|'vm-received' q 'digits/at' H N 'hours' [default]Zulu|'vm-received' q 'digits/at' H N 'hours' 'phonetic/z_p' 01 => 4242, Andrey, andrey@local 01 => 4242, softphone, softphone@local .com,attach=no|serveremail=myaddy@digium.com|tz=central|maxmsg=10 ;4300 => 3456,Ben Rigas,ben@american-computer.net @ ;4069 => 6522,Matt Brooks,matt@marko.net,,|tz=central|attach=yes|sayy cid=yes|dialout=fromvm|callback=fromvm|review=yes|operator=yes|envell ope=yes|moveheard=yes|sayduration=yes|saydurationm=1 <tc/asterisk/voicemail.conf" 458L, 23848C written |
#vim /etc/asterisk/extensions.conf
|
#exten => _24XX,1,Macro(call)
; eastern=America/New_York|'vm-received' Q 'digits/at' IMp european=Europe/Copenhagen|'vm-received' a d b 'digits/at' HM central24=America/Chicago|'vm-received' q 'digits/at' H N 'hours' [default]Zulu|'vm-received' q 'digits/at' H N 'hours' 'phonetic/z_p' , andrey@local 01 => 4242, Andrey, andrey@local .com,attach=no|serveremail=myaddy@digium.com|tz=central|maxmsg=10 ;4300 => 3456,Ben Rigas,ben@american-computer.net cid=yes|dialout=fromvm|callback=fromvm|review=yes|operator=yes|envell ope=yes|moveheard=yes|sayduration=yes|saydurationm=1 E37: No write since last change (add ! to override) |
#; R 24 hour time, including minute
; eastern=America/New_York|'vm-received' Q 'digits/at' IMp european=Europe/Copenhagen|'vm-received' a d b 'digits/at' HM central24=America/Chicago|'vm-received' q 'digits/at' H N 'hours' [default]Zulu|'vm-received' q 'digits/at' H N 'hours' 'phonetic/z_p' andrey@local 01 => 4242, Andrey, andrey@local .com,attach=no|serveremail=myaddy@digium.com|tz=central|maxmsg=10 ;4300 => 3456,Ben Rigas,ben@american-computer.net cid=yes|dialout=fromvm|callback=fromvm|review=yes|operator=yes|envell ope=yes|moveheard=yes|sayduration=yes|saydurationm=1 <tc/asterisk/voicemail.conf" 458L, 23848C written |
#vim /etc/asterisk/voicemail.conf
|
#useradd -m -s /bin/bash andrey
|
#passwd andrey
Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully |
#su andrey
andrey@asterick8:/root$ andrey@asterick8:/root$ andrey@asterick8:/root$ mail No mail for andrey andrey@asterick8:/root$ mail No mail for andrey andrey@asterick8:/root$ mail No mail for andrey andrey@asterick8:/root$ mail No mail for andrey andrey@asterick8:/root$ exit exit |
#ls -l /var/mail/
total 28 -rw-rw---- 1 asterisk mail 28623 Mar 30 14:13 asterisk |
#less /var/mail/
|
#less /var/mail/asterisk
|
#exten => _24XX,1,Macro(call)
This does sknot currently work with the "#include <file>" directive for Asterii ; Do not use them with this configuration file.static configuration. ; for [general] ; voicemail, only the first format specified will be used. ; Formats for writing Voicemail. Note that when using IMAP storage ;format=g723sf|wav49|wav format=wav49|gsm|wav "/etc/asterisk/voicemail.conf" 458L, 23848C ; ; WARNING: |
#asterisk -rvvvv
Asterisk 11.13.1~dfsg-2+b1, Copyright (C) 1999 - 2013 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 11.13.1~dfsg-2+b1 currently running on asterick8 (pid = 461) asterick8*CLI> asterick8*CLI> quit Asterisk cleanly ending (0). Executing last minute cleanups |
#vim /etc/asterisk/voicemail.conf
--- /tmp/l3-saved-4954.30587.23188 2016-03-30 14:14:52.862846275 +0300 +++ /etc/asterisk/voicemail.conf 2016-03-30 14:15:02.714846450 +0300 @@ -408,8 +408,8 @@ [default] -01 => 4242, Andrey, andrey@local -02 => 4242, softphone, softphone@local +01 => 4242, Andrey, andrey@localhost +02 => 4242, softphone, softphone@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 |
#asterisk -rvvvv
Asterisk 11.13.1~dfsg-2+b1, Copyright (C) 1999 - 2013 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 11.13.1~dfsg-2+b1 currently running on asterick8 (pid = 461) asterick8*CLI> voicemail reload Reloading voicemail configuration... ... -- Recording the message -- x=0, open writing: /var/spool/asterisk/voicemail/default/01/tmp/JKDY0J format: wav49, 0x7fc78c00a1d8 -- x=1, open writing: /var/spool/asterisk/voicemail/default/01/tmp/JKDY0J format: gsm, 0x7fc78c0d7738 -- x=2, open writing: /var/spool/asterisk/voicemail/default/01/tmp/JKDY0J format: wav, 0x7fc78c0d7d58 -- User hung up == Spawn extension (macro-call, s, 10) exited non-zero on 'SIP/2402-000001e1' in macro 'call' == Spawn extension (gr1, 2401, 1) exited non-zero on 'SIP/2402-000001e1' asterick8*CLI> quit Asterisk cleanly ending (0). Executing last minute cleanups |
#vim /etc/asterisk/voicemail.conf
|
#{IF(${ISNULL(${ORIG_VM_DATE})}?${VM_DATE}:${ORIG_VM_DATE})}
total 28 -rw-rw---- 1 andrey mail 0 Mar 30 14:16 andrey -rw-rw---- 1 asterisk mail 28623 Mar 30 14:13 asterisk |
#find /var/spool/asterisk/
/var/spool/asterisk/ /var/spool/asterisk/monitor /var/spool/asterisk/dictate /var/spool/asterisk/outgoing /var/spool/asterisk/voicemail /var/spool/asterisk/voicemail/default /var/spool/asterisk/voicemail/default/02 /var/spool/asterisk/voicemail/default/02/INBOX /var/spool/asterisk/voicemail/default/02/INBOX/msg0001.WAV /var/spool/asterisk/voicemail/default/02/INBOX/msg0001.txt ... /var/spool/asterisk/voicemail/default/01/INBOX/msg0000.txt /var/spool/asterisk/voicemail/default/01/INBOX/msg0000.WAV /var/spool/asterisk/voicemail/default/01/INBOX/msg0000.gsm /var/spool/asterisk/voicemail/default/01/INBOX/msg0001.gsm /var/spool/asterisk/voicemail/default/01/INBOX/msg0000.wav /var/spool/asterisk/voicemail/default/01/INBOX/msg0001.wav /var/spool/asterisk/voicemail/default/01/tmp /var/spool/asterisk/meetme /var/spool/asterisk/tmp /var/spool/asterisk/system |
#find /var/spool/asterisk/ | less
|
#apt-get install sox
Reading package lists... Done Building dependency tree Reading state information... Done sox is already the newest version. sox set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
#apt-get install mpg123
Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: alsa-utils jackd nas oss-compat oss4-base The following NEW packages will be installed: mpg123 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 165 kB of archives. After this operation, 402 kB of additional disk space will be used. Get:1 http://192.168.10.1:9999/debian/ jessie/main mpg123 amd64 1.20.1-2 [165 kB] Fetched 165 kB in 0s (15.6 MB/s) Selecting previously unselected package mpg123. (Reading database ... 138103 files and directories currently installed.) Preparing to unpack .../mpg123_1.20.1-2_amd64.deb ... Unpacking mpg123 (1.20.1-2) ... Processing triggers for mime-support (3.58) ... Processing triggers for man-db (2.7.0.2-5) ... Setting up mpg123 (1.20.1-2) ... 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 |
#mpg123 -w /home/user/Do
Documents/ Downloads/ |
#mpg123 -w /home/user/Do
Documents/ Downloads/ |
#ls
asterisk-core-sounds-ru-gsm-current.tar.gz install sounds Desktop Music Templates Documents Pictures Videos Downloads Public |
#cd ~/Downloads
bash: cd: /root/Downloads: No such file or directory |
#cd /Downloads
bash: cd: /Downloads: No such file or directory |
#cd Downloads
|
#ls
file.mp3 music1.wav |
#ls
1.gsm file.mp3 music1.wav |
#cd ~
|
#ls
|
#cd Downloads
bash: cd: Downloads: No such file or directory |
#cd /home/user/Down
bash: cd: /home/user/Down: No such file or directory |
#cd /home/user/Downloads/
|
#cp 1.gsm /var/tmp/asterisk/message01.
message01.gsm message01.wav |
#cp 1.gsm /var/tmp/asterisk/message01.gsm
|
[default] exten => 4000,1,Playback(demo-thanks) exten => 4001,1,Record(/var/tmp/asterisk/message01:gsm) exten => 4001,1,Playback(/var/tmp/asterisk/message01)
l3-agent . ~/.bashrc
Время первой команды журнала | 15:44:07 2016- 3-28 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 13:59:28 2016- 3-30 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 100 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 10.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 2.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.62 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.64 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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