/l3/users/2014-11-nt-voip/nt-voip/debian1/root :1 :2 :3 :4 |
|
#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 debian1 (pid = 13150) Verbosity is at least 3 debian1*CLI> dialplan reload ... -- Called SIP/1102 -- SIP/1102-00000007 is ringing -- SIP/1102-00000007 answered SIP/1101-00000006 -- Remotely bridging SIP/1101-00000006 and SIP/1102-00000007 == Spawn extension (default, 1102, 1) exited non-zero on 'SIP/1101-00000006' -- Remote UNIX connection -- Remote UNIX connection disconnected -- Remote UNIX connection -- Remote UNIX connection disconnected debian1*CLI> exit |
#cat /etc/asterisk/sip.conf
[general] context=default [1101] type=friend secret=1234 host=dynamic [1102] type=friend secret=1234 host=dynamic |
#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 debian1 (pid = 2476) Verbosity was 0 and is now 1 debian1*CLI> sip show peers Name/username Host Dyn Forcerport ACL Port Status 1101/1101 192.168.10.100 D N 5060 Unmonitored 1102/1102 192.168.10.101 D N 35840 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline] debian1*CLI> quit Executing last minute cleanups |
#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 debian1 (pid = 2476) Verbosity is at least 1 debian1*CLI> sip reload ... [Nov 25 09:58:16] NOTICE[2717]: chan_sip.c:20886 handle_response_peerpoke: Peer '1101' is now Reachable. (34ms / 2000ms) debian1*CLI> sip show peers Name/username Host Dyn Forcerport ACL Port Status 1101/1101 192.168.10.100 D N 5060 OK (18 ms) 1102/1102 192.168.10.101 D N 35840 OK (6 ms) 2 sip peers [Monitored: 2 online, 0 offline Unmonitored: 0 online, 0 offline] debian1*CLI> q No such command 'q' (type 'core show help q' for other possible commands) debian1*CLI> quit Executing last minute cleanups |
#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 debian1 (pid = 2476) Verbosity is at least 2 debian1*CLI> sip show peers Name/username Host Dyn Forcerport ACL Port Status 1101/1101 192.168.10.100 D N 5060 OK (12 ms) 1102/1102 192.168.10.101 D N 35840 OK (6 ms) 2 sip peers [Monitored: 2 online, 0 offline Unmonitored: 0 online, 0 offline] debian1*CLI> quit |
#asterisk -rvv
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 debian1 (pid = 2476) Verbosity was 1 and is now 2 debian1*CLI> sip show peers Name/username Host Dyn Forcerport ACL Port Status 1101/1101 192.168.10.100 D N 5060 OK (17 ms) 1102/1102 192.168.10.101 D N 35840 OK (5 ms) 2 sip peers [Monitored: 2 online, 0 offline Unmonitored: 0 online, 0 offline] debian1*CLI> quit Executing last minute cleanups |
#chown asterisk:asterisk /var/tmp/asterisk
|
#exten => _81XX,n,Record(/var/tmp/asterisk/record${EXTEN:2})
bash: syntax error near unexpected token `(' |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4151.27751.30313 2014-11-25 12:19:57.682823318 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 12:20:28.850823687 +0200 @@ -1,5 +1,7 @@ [default] -exten => _81XX,1,Record(var/tmp/asterisk/record${EXTEN:2}:gsm) -exten => _82XX,1,Playback(var/tmp/asterisk/record${EXTEN:2}) +exten => _11XX,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}) |
#sip reload
bash: sip: command not found |
#vi /etc/asterisk/extensions.conf
|
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4151.11684.29861 2014-11-25 13:52:53.478889312 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 13:56:56.794892193 +0200 @@ -5,3 +5,4 @@ exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) +exten => _1[12]XX,1,Dial(SIP/komsomolsk/${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 debian1 (pid = 2476) ... -- Locally bridging SIP/komsomolsk-00000062 and SIP/1101-00000063 == Spawn extension (default, 1101, 1) exited non-zero on 'SIP/komsomolsk-00000062' == Using SIP RTP CoS mark 5 -- Executing [1102@default:1] Dial("SIP/1101-00000064", "SIP/1102") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/1102 -- SIP/1102-00000065 is ringing == Spawn extension (default, 1102, 1) exited non-zero on 'SIP/1101-00000064' debian1*CLI> quit Executing last minute cleanups |
#username=kiev
include => international [gr1] [gr1] [gr2] [gr2]de => internal [gr2] include => local include => national [gr3] [gr3] include => internal include => local [gr4] [gr4] include => internal include => local include => national include => international -- INSERT -- 48,1 90% |
#vi /etc/asterisk/sip.conf
|
#[ ]
exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) exten => _12XX,1,Dial(SIP/komsomolsk/${EXTEN}) exten => _[12]3XX,1,Dial(SIP/minsk/${EXTEN}) exten => _[23][123]XX,1,Dial(SIP/ny/${EXTEN}) [local] exten => _11XX,1,Dial(SIP/${EXTEN}) [national] exten => _12XX,1,Dial(SIP/komsomolsk/${EXTEN}) [international] "/etc/asterisk/extensions.conf" 49L, 775C exten => _[23][123]XX,1,Dial(SIP/ny/${EXTEN}) [gr1] include => internal include => local include => national include => international [gr2] include => internal include => local include => national |
#vi /etc/asterisk/sip.conf
|
#vi /etc/asterisk/sip.conf
|
#vi /etc/asterisk/extensions.conf
|
#include => local
context=gr3 "/etc/asterisk/sip.conf" 44L, 542C [komsomolsk] type=friend host=dynamic secret=1234 directmedia=no username=kiev context=gr4 [minsk] type=friend host=dynamic secret=1234 directmedia=no username=kiev context=gr4 [ny] |
#asterisk -rvv
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 debian1 (pid = 2476) Verbosity is at least 3 debian1*CLI> debian1*CLI> debian1*CLI> == Using SIP RTP CoS mark 5 [Nov 25 16:11:36] NOTICE[2717]: chan_sip.c:22753 handle_request_invite: Call from 'kiev' (192.168.40.1:5060) to extension '1301' rejected because extension not found in context 'gr4'. == Spawn extension (gr4, 1201, 1) exited non-zero on 'SIP/ny-0000030e' == Using SIP RTP CoS mark 5 [Nov 25 16:11:40] NOTICE[2717]: chan_sip.c:22753 handle_request_invite: Call from 'kiev' (192.168.40.1:5060) to extension '1301' rejected because extension not found in context 'gr4'. debian1*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
|
#type=friend
E325: ATTENTION Found a swap file by the name "/etc/asterisk/.extensions.conf.swp" owned by: root dated: Tue Nov 25 16:11:47 2014 file name: /etc/asterisk/extensions.conf modified: no user name: root host name: debian1 process ID: 7200 (still running) While opening file "/etc/asterisk/extensions.conf" dated: Tue Nov 25 15:57:13 2014 [ ] ... include => internal include => local include => national include => international 46,0-1 88% Press ENTER or type command to continue to avoid this message. (see ":help recovery"). If you did this already, delete the swap file "/etc/asterisk/.extensions.co Swap file "/etc/asterisk/.extensions.conf.swp" already exists! [O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort: |
#qualify=yes
exten => _[23][123]XX,1,Dial(SIP/ny/${EXTEN}) "/etc/asterisk/extensions.conf" 48L, 658C exten => _[12]3XX,1,Dial(SIP/minsk/${EXTEN}) [gr1] include => internal include => local include => national include => international [gr2] include => internal include => local include => national [gr3] |
#include => internal
[general] context=default qualify=yes register => kiev:1234@192.168.20.1/komsomolsk register => kiev:1234@192.168.30.1/minsk "/etc/asterisk/sip.conf" 44L, 542C [egister]=> kiev:1234@192.168.40.1/ny [1101] type=friend [1101]=1234 ... context=gr4 [minsk] type=friend host=dynamic secret=1234 directmedia=no username=kiev context=gr4 [ny] type=friend |
#apt-cache search sox gsm
asterisk-core-sounds-en-gsm - asterisk PBX sound files - en-us/gsm asterisk-core-sounds-es-gsm - asterisk PBX sound files - es-mx/gsm asterisk-core-sounds-fr-gsm - asterisk PBX sound files - fr-ca/gsm asterisk-core-sounds-ru-gsm - asterisk PBX sound files - ru-ru/gsm asterisk-moh-opsound-gsm - asterisk extra sound files - English/gsm asterisk-prompt-it-menardi-gsm - asterisk PBX Italian sound files - gsm prompts libsox-fmt-base - Minimal set of SoX format libraries sox - Swiss army knife of sound processing |
#apt-get install sox libsox-fmt-base
Reading package lists... Done Building dependency tree Reading state information... Done libsox-fmt-base is already the newest version. libsox-fmt-base set to manually installed. sox is already the newest version. sox set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
##play /path/to/a/gsm/file.gsm
|
#play /path/to/a/gsm/file.gsm
play WARN alsa: can't encode 0-bit Unknown or not applicable play FAIL formats: can't open input file `/path/to/a/gsm/file.gsm': No such file or directory |
#apt-get install sendmail-mta
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package sendmail-mta |
#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: ... 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. (Reading database ... 132029 files and directories currently installed.) Removing exim4-base ... Processing triggers for man-db ... |
#cat /etc/mail/local-host-names
localhost debian1 |
#echo debian1.unix.nt >> /etc/mail/local-host-names
|
#/etc/init.d/sendmail restart
Restarting Mail Transport Agent (MTA): sendmail. |
#grep 127 /etc/hosts
127.0.0.1 localhost 127.0.1.1 debian1 |
#~
Restarting Mail Transport Agent (MTA): sendmail. |
#vi /etc/asterisk/voicemail.conf
|
#vi /etc/asterisk/voicemail.conf
--- /tmp/l3-saved-4151.8539.6421 2014-11-26 10:11:19.963754588 +0200 +++ /etc/asterisk/voicemail.conf 2014-11-26 10:16:33.427758297 +0200 @@ -381,6 +381,7 @@ [default] +1101 => 1234,User 1 (1101),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 |
#vi /etc/asterisk/voicemail.conf
|
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4151.5865.19120 2014-11-26 10:45:45.303779036 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 10:48:23.967780912 +0200 @@ -7,7 +7,7 @@ exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) exten => 8001,1,VoiceMailMain() -exten => 8300,1,VoiceMailMain(11${EXTEN:2}@default) +exten => _83XX,1,VoiceMailMain(11${EXTEN:2}@default) [local] |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-14629.7039.24265 2014-11-26 11:02:16.051790759 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 11:03:29.911791634 +0200 @@ -12,7 +12,8 @@ [local] -exten => _11XX,1,Dial(SIP/${EXTEN}) +; не было таймаута в Dial +exten => _11XX,1,Dial(SIP/${EXTEN},5) exten => _11XX,n,VoiceMail(${EXTEN}@default) |
#less /etc/asterisk/voicemail.conf
|
#vi /etc/asterisk/sip.conf
--- /tmp/l3-saved-4151.5545.10515 2014-11-26 11:53:18.283827004 +0200 +++ /etc/asterisk/sip.conf 2014-11-26 11:53:52.031827403 +0200 @@ -12,7 +12,7 @@ host=dynamic context=gr1 mailbox=1101@default -language=fr +language=ru [1102] type=friend @@ -20,7 +20,7 @@ host=dynamic context=gr1 mailbox=1102@default -language=de +language=ru [komsomolsk] type=friend |
#cat /tmp/1
cat: /tmp/1: No such file or directory |
#.tar.gz.tar.gz
bash: .tar.gz.tar.gz: command not found |
#.tar.gz
bash: .tar.gz: command not found |
#tar xfz asterisk-core-sounds-ru-gsm-current.tar.gz
|
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4151.4448.29592 2014-11-26 12:24:14.139848969 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 12:40:08.083860261 +0200 @@ -17,6 +17,8 @@ ; не было таймаута в Dial exten => _11XX,1,Dial(SIP/${EXTEN},5) exten => _11XX,n,VoiceMail(${EXTEN}@default) +exten => _11XX,n,Set(CALLFILENAME=${EXTEN:1}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H:%M:%S")}) +exten => _11XX,n,Monitor(wav,${CALLFILENAME},m) [national] |
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4151.17263.22476 2014-11-26 13:09:00.887880773 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 13:12:21.443883143 +0200 @@ -17,7 +17,7 @@ ; не было таймаута в Dial exten => _11XX,1,Dial(SIP/${EXTEN},5) exten => _11XX,n,VoiceMail(${EXTEN}@default) -exten => _11XX,n,Set(CALLFILENAME=${EXTEN:1}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H:%M:%S")}) +exten => _11XX,n,Set(CALLFILENAME=${EXTEN}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H:%M:%S")}) exten => _11XX,n,Monitor(wav,${CALLFILENAME},m) |
#ls /var/spool/asterisk/monitor
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-16416.7309.110 2014-11-26 13:17:36.991886876 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 13:18:04.003887196 +0200 @@ -15,10 +15,11 @@ [local] ; не было таймаута в Dial -exten => _11XX,1,Dial(SIP/${EXTEN},5) +exten => _11XX,1,NoOp(Processing local calls) exten => _11XX,n,VoiceMail(${EXTEN}@default) exten => _11XX,n,Set(CALLFILENAME=${EXTEN}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H:%M:%S")}) exten => _11XX,n,Monitor(wav,${CALLFILENAME},m) +exten => _11XX,n,Dial(SIP/${EXTEN},5) [national] |
#asterisk -vvv
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 Privilege escalation protection disabled! See https://wiki.asterisk.org/wiki/x/1gKfAQ for more details. == Parsing '/etc/asterisk/extconfig.conf': == Found Asterisk already running on /var/run/asterisk/asterisk.ctl. Use 'asterisk -r' to connect. |
#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 debian1 (pid = 2476) ... -- merging incls/swits/igpats from old(demo) to new(demo) context, registrar = pbx_config -- Including switch 'Lua/' in context 'demo' -- Time to scan old dialplan and merge leftovers back into the new: 0.001541 sec -- Time to restore hints and swap in new dialplan: 0.000005 sec -- Time to delete the old dialplan: 0.000088 sec -- Total time merge_contexts_delete: 0.001634 sec debian1*CLI> debian1*CLI> debian1*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-16647.21282.24786 2014-11-26 13:22:16.051890181 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 13:22:23.759890270 +0200 @@ -16,10 +16,10 @@ ; не было таймаута в Dial exten => _11XX,1,NoOp(Processing local calls) -exten => _11XX,n,VoiceMail(${EXTEN}@default) exten => _11XX,n,Set(CALLFILENAME=${EXTEN}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H:%M:%S")}) exten => _11XX,n,Monitor(wav,${CALLFILENAME},m) exten => _11XX,n,Dial(SIP/${EXTEN},5) +exten => _11XX,n,VoiceMail(${EXTEN}@default) [national] |
#[ ]
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 ... 133180 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 |
#mpg123 -w /tmp/adele.wav /home/user/Downloads/
queen_-_show_must_go_on_(zaycev.net).mp3 X-Lite_Win32_4.7.1_74247.exe |
#sox -t wav /tmp/queen.wav -r 8000 -c1 -t gsm /tmp/queen.gsm
|
#play /tmp/queen.gsm
play WARN alsa: can't encode 0-bit Unknown or not applicable /tmp/queen.gsm: File Size: 449k Encoding: GSM Channels: 1 @ 16-bit Samplerate: 8000Hz Replaygain: off Duration: unknown In:0.00% 00:00:28.67 [00:00:00.00] Out:229k [ -====|====- ] Clip:0 Aborted. |
#[local]
|
#vi /etc/asterisk/musiconhold.conf
|
#-- INSERT --
;sort=random ; Sort the files in random order ;[native-alphabetical] ;mode=files ;directory=moh ;sort=alpha ; Sort the files in alphabetical order. If this option is ; ; not specified, the sort order is undefined. ; ========= ; Other (non-native) playback methods ; ========= ;[manual] ;mode=custom ; Note that with mode=custom, a directory is not required, such as when reading ; from a stream. ;directory=/var/lib/asterisk/mohmp3 ;application=/usr/bin/mpg123 -q -r 8000 -f 8192 -b 2048 --mono -s mode=files 72,1 73% =/var/lib/asterisk/moh ;[ulawstream] ;mode=custom 75,1 80% "/etc/asterisk/musiconhold.conf" 84L, 2740C written |
#include => local
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: dahdi-linux fxload The following NEW packages will be installed: dahdi-linux dahdi-source fxload 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. Need to get 1,014 kB of archives. After this operation, 1,357 kB of additional disk space will be used. ... (Reading database ... 133221 files and directories currently installed.) Unpacking fxload (from .../fxload_0.0.20081013-1_amd64.deb) ... Selecting previously unselected package dahdi-linux. Unpacking dahdi-linux (from .../dahdi-linux_1%3a2.6.1+dfsg2-1_all.deb) ... Selecting previously unselected package dahdi-source. Unpacking dahdi-source (from .../dahdi-source_1%3a2.6.1+dfsg2-1_all.deb) ... Processing triggers for man-db ... Setting up fxload (0.0.20081013-1) ... Setting up dahdi-linux (1:2.6.1+dfsg2-1) ... Setting up dahdi-source (1:2.6.1+dfsg2-1) ... |
#m-a a-i dahdi
Updated infos about 1 packages Getting source for kernel version: 3.2.0-4-amd64 apt-get install linux-headers-3.2.0-4-amd64 Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: cpp-4.6 gcc-4.6 gcc-4.6-base linux-headers-3.2.0-4-common linux-kbuild-3.2 Suggested packages: gcc-4.6-locales gcc-4.6-multilib libmudflap0-4.6-dev gcc-4.6-doc libgcc1-dbg ... â â â 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 ... 142331 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
|
#lsmod | grep dahdi
dahdi 191056 0 crc_ccitt 12347 1 dahdi |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#[local]
[urope/K]ev,"%Y-%m-%d-%H:%M:%S")}) [xten => ]11XX,n,Monitor(wav,${CALLFILENAME},m)ault) [ ] exten => _11XX,n,Dial(SIP/${EXTEN},5) exten => _11XX,n,VoiceMail(${EXTEN}@default) [local] exten => _801X,1,MeetMe(10${EXTEN:3}) [national]ло ÑаймаÑÑа в Dial exten => _11XX,1,NoOp(Processing local calls) exten => _12XX,1,Dial(SIP/komsomolsk/${EXTEN})ALLERID(num)}-${STRFTIME(${EPOCH},, "/etc/asterisk/extensions.conf" 59L, 1105C [international] exten => _[23][123]XX,1,Dial(SIP/ny/${EXTEN}) exten => _[12]3XX,1,Dial(SIP/minsk/${EXTEN}) [gr1] include => internal "/etc/asterisk/extensions.conf" 59L, 1142C written |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#apt-get install asterisk-dahdi
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libopenr2-3 libpri1.4 libss7-1 The following NEW packages will be installed: asterisk-dahdi libopenr2-3 libpri1.4 libss7-1 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. Need to get 1,252 kB of archives. After this operation, 2,271 kB of additional disk space will be used. ... Selecting previously unselected package libpri1.4. Unpacking libpri1.4 (from .../libpri1.4_1.4.12-2_amd64.deb) ... Selecting previously unselected package libss7-1. Unpacking libss7-1 (from .../libss7-1_1.0.2-3_amd64.deb) ... Selecting previously unselected package asterisk-dahdi. Unpacking asterisk-dahdi (from .../asterisk-dahdi_1%3a1.8.13.1~dfsg1-3+deb7u3_amd64.deb) ... Setting up libopenr2-3 (1.3.2-1.1) ... Setting up libpri1.4 (1.4.12-2) ... Setting up libss7-1 (1.0.2-3) ... Setting up asterisk-dahdi (1:1.8.13.1~dfsg1-3+deb7u3) ... |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#vi /etc/asterisk/extensions.conf
|
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4151.15720.11959 2014-11-26 14:45:02.423948962 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 14:45:20.223949172 +0200 @@ -19,7 +19,7 @@ exten => _11XX,n,Set(CALLFILENAME=${EXTEN}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H:%M:%S")}) exten => _11XX,n,Monitor(wav,${CALLFILENAME},m) exten => _11XX,n,Dial(SIP/${EXTEN},5) -exten => _11XX,n,VoiceMail(${EXTEN}@default) +;exten => _11XX,n,VoiceMail(${EXTEN}@default) [national] |
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4151.18372.23874 2014-11-26 14:45:35.471949353 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 14:45:42.199949431 +0200 @@ -19,7 +19,7 @@ exten => _11XX,n,Set(CALLFILENAME=${EXTEN}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H:%M:%S")}) exten => _11XX,n,Monitor(wav,${CALLFILENAME},m) exten => _11XX,n,Dial(SIP/${EXTEN},5) -;exten => _11XX,n,VoiceMail(${EXTEN}@default) +exten => _11XX,n,VoiceMail(${EXTEN}@default) [national] |
#vi /etc/asterisk/extensions.conf
|
#screen -x
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4151.18095.18996 2014-11-26 14:51:06.163953267 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 14:52:06.559953982 +0200 @@ -13,7 +13,8 @@ [local] -exten => _119X,1,NoOp(Conferences for external users) exten => _119X,n,MeetMe(10${EXTEN:3}) +exten => _119X,1,NoOp(Conferences for external users) +exten => _119X,n,MeetMe(10${EXTEN:3}) exten => _119X,n,Hangup ; не было таймаута в Dial |
#vim /etc/asterisk/extensions.conf
|
#[local]
exten => 8001,1,VoiceMailMain() [ ] [xten =>]_83XX,1,VoiceMailMain(11${EXTEN:2}@default) exten => _801X,1,MeetMe(10${EXTEN:3}) CH},Europe/Kiev,"%Y-%m-%d-%H:%M:%S")}) exten => _11[0-8]X,n,Monitor(wav,${CALLFILENAME},m) exten => _11[0-8]X,n,Dial(SIP/${EXTEN},5)ernal users) exten => _11[0-8]X,n,VoiceMail(${EXTEN}@default) exten => _119X,n,Hangup [national]ло ÑаймаÑÑа в Dial ... exten => _[12]3XX,1,Dial(SIP/minsk/${EXTEN}) -- INSERT -- 4,1 Top [ ] [local] [local] 91,1,NoOp(Conferences for external users) 91,n,MeetMe(10${EXTEN:3}) 91,n,Hangup exten => 1192,1,Dial(SIP/1101&SIP/1102) "/etc/asterisk/extensions.conf" 63L, 1286C written |
#vim /etc/asterisk/features.conf
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4151.16612.30532 2014-11-26 16:09:37.360009028 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 16:11:49.980010597 +0200 @@ -22,7 +22,7 @@ exten => _11[0-8]X,1,NoOp(Local Phones) exten => _11[0-8]X,n,Set(CALLFILENAME=${EXTEN}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H:%M:%S")}) exten => _11[0-8]X,n,Monitor(wav,${CALLFILENAME},m) -exten => _11[0-8]X,n,Dial(SIP/${EXTEN},5) +exten => _11[0-8]X,n,Dial(SIP/${EXTEN},5,tT) exten => _11[0-8]X,n,VoiceMail(${EXTEN}@default) |
#;comebacktoorigin = yes ; Setting this option configures the behavior off
; ; Sample Call Features (parking, transfer, etc) configuration ; ng lot. ing lott_exclusive=yes ; Specify that the parkext created for this parkk ; will only access this parking lot. (default iss no)ext => 700 ; What extension to dial to park. Set per parkii rking lot) 701-720 ; What extensions to park calls on. (defafult paa ; These need to be numeric, as Asterisk starts ff rom the start position ; and increments with one for the next parked caa ll. ; Set per parking lot. king lot)> parkedcalls ; Which context parked calls are in (default parr ; Set per parking lot. slots (default is no). ; Add hints priorities automatically for parkingg ; Set per parking lot. returning.me => 45 ; Number of seconds a call can be parked before ; Set per parking lot. (default is 45 seconds) "/etc/asterisk/features.conf" 202L, 13690C |
#;comebacktoorigin = yes ; Setting this option configures the behavior off
; ; Sample Call Features (parking, transfer, etc) configuration ; ng lot. ing lott_exclusive=yes ; Specify that the parkext created for this parkk ; will only access this parking lot. (default iss no)ext => 700 ; What extension to dial to park. Set per parkii rking lot) 701-720 ; What extensions to park calls on. (defafult paa ; These need to be numeric, as Asterisk starts ff rom the start position ... call parking when the ;comebacktoorigin = yes ; parked call times out (See the parkingtime optt ion). The default value is 'yes'. ; Operates on all parking lots. ; ; 'yes' - When the parked call times out, attempp t to send the call back to the peer ; that parked this call. This is done bb y saving off the name of the channel E486: Pattern not found: parck 4,0-1 Top |
#vim /etc/asterisk/features.conf
--- /tmp/l3-saved-4151.19105.11441 2014-11-26 16:36:51.940028375 +0200 +++ /etc/asterisk/features.conf 2014-11-26 16:38:20.440029420 +0200 @@ -123,7 +123,7 @@ ;disconnect => *0 ; Disconnect (default is *) -- Make sure to set the H and/or h option in the Dial() or Queue() app call! ;automon => *1 ; One Touch Record a.k.a. Touch Monitor -- Make sure to set the W and/or w option in the Dial() or Queue() app call! atxfer => *2 ; Attended transfer -- Make sure to set the T and/or t option in the Dial() or Queue() app call! -;parkcall => #72 ; Park call (one step parking) -- Make sure to set the K and/or k option in the Dial() app call! +parkcall => #700 ; Park call (one step parking) -- Make sure to set the K and/or k option in the Dial() app call! ;automixmon => *3 ; One Touch Record a.k.a. Touch MixMonitor -- Make sure to set the X and/or x option in the Dial() or Queue() app call! [applicationmap] |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4151.11611.20961 2014-11-26 16:54:01.496040558 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 16:57:30.616043033 +0200 @@ -10,6 +10,11 @@ exten => 8001,1,VoiceMailMain() exten => _83XX,1,VoiceMailMain(11${EXTEN:2}@default) exten => _801X,1,MeetMe(10${EXTEN:3}) + +exten => 8300,1,System(touch /tmp/someone-called-8300) +exten => 8301,1,System(echo ${CALLEtouch /tmp/someone-called-8300) +exten => 8302,1,System(sudo /etc/init.d/sendmail restart) + include => parkedcalls [local] |
#vim /etc/asterisk/extensions.conf
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4151.8383.10659 2014-11-26 17:07:46.576050326 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 17:10:07.928051999 +0200 @@ -12,7 +12,7 @@ exten => _801X,1,MeetMe(10${EXTEN:3}) exten => 8300,1,System(touch /tmp/someone-called-8300) -exten => 8301,1,System(echo ${CALLERID(num) > /tmp/someone-called-8300) +exten => 8301,1,System(sh -c "echo${CALLERID(num)} > /tmp/someone-called-8301") exten => 8302,1,System(sudo /etc/init.d/sendmail restart) include => parkedcalls |
#ls /tmp/
asterisk gnash-cookies.UaiFJy queen.gsm gnash-cookies.0kyyXq gnash-cookies.XsvQNx queen.wav gnash-cookies.F0xloe gnash-cookies.YaOiDY ssh-vHNjewC1NgIA gnash-cookies.klU9ui orbit-user tracker-user gnash-cookies.tNRjcQ pulse-mZZS8BsnDrTe gnash-cookies.U04YbB pulse-pNIbyoKUVy2b |
#ls /tmp/
asterisk gnash-cookies.UaiFJy queen.gsm gnash-cookies.0kyyXq gnash-cookies.XsvQNx queen.wav gnash-cookies.F0xloe gnash-cookies.YaOiDY someone-called-8300 gnash-cookies.klU9ui orbit-user someone-called-8301 gnash-cookies.tNRjcQ pulse-mZZS8BsnDrTe ssh-vHNjewC1NgIA gnash-cookies.U04YbB pulse-pNIbyoKUVy2b tracker-user |
#ls /tmp/
asterisk gnash-cookies.UaiFJy queen.gsm gnash-cookies.0kyyXq gnash-cookies.XsvQNx queen.wav gnash-cookies.F0xloe gnash-cookies.YaOiDY someone-called-8300 gnash-cookies.klU9ui orbit-user someone-called-8301 gnash-cookies.tNRjcQ pulse-mZZS8BsnDrTe ssh-vHNjewC1NgIA gnash-cookies.U04YbB pulse-pNIbyoKUVy2b tracker-user |
[general] context=default [1101] type=friend secret=1234 host=dynamic [1102] type=friend secret=1234 host=dynamic
localhost debian1
cat: /tmp/1: No such file or directory
Время первой команды журнала | 17:17:22 2014-11-24 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 16:12:16 2014-11-26 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 4.95 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 1.98 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 8.40 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.20 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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