/l3/users/2014-11-nt-voip/nt-voip/debian2/root :1 :2 :3 :4 :5 :6 :7 |
|
#vi /etc/asterisk/VoiceMail
|
#~
|
#~
|
#~
|
#~
|
#asterisk -rx 'dialplan reload'
Dialplan reloaded. |
## проверяйте пожалуйста
|
#asterisk
.aptitude/ .cache/ .lilalo/ .ssh/ .asterisk_history .config/ Mail/ .viminfo .bash_history .dbus/ .profile .bash_profile .gconf/ .pulse-cookie .bashrc .l3rc .rnd |
#asterisk cach
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. |
#sterisk cach
[1201] [1201] type=friend secret=1234 language=frc [1202] [1202]t=gr1 "/etc/asterisk/sip.conf" 27L, 325C language=de [kiev] context=gr4 type=friend host=dynamic secret=1234 ~ ~ ~ ~ ~ "/etc/asterisk/sip.conf" 29L, 349C written |
#sterisk cach
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 debian2 (pid = 2861) Verbosity is at least 3 debian2*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 debian2*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#sterisk cach
[general] context=default qualify=yes "/etc/asterisk/sip.conf" 29L, 349C [egister]> komsomolsk:1234@192.168.10.1/kiev [1201] [1201] [1201]riend secret=1234 host=dynamic ... ~ "/etc/asterisk/sip.conf" 29L, 369C written [kiev] context=gr4 type=friend host=dynamic secret=1234 directmedia=no username=komsomolsk ~ |
#sterisk cach
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 debian2 (pid = 2861) Verbosity is at least 3 debian2*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 debian2*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#sterisk cach
asterisk -rvvv^C |
# asterisk -rvvv
|
#sterisk cach
vi /etc/asterisk/extension.conf |
#~
|
# asterisk -rvvv
exten => _12XX,1,Dial(SIP/${EXTEN},5) exten => _12XX,n,VoiceMail(${EXTEN}@default) [national] "/etc/asterisk/extensions.conf" 44L, 808C exten=> _11XX,1,Dial(SIP/kiev/${EXTEN}) [international] exten=> _[123][123]XX,1,Dial(SIP/kiev/${EXTEN}) [gr1] include=>internal include=>local include=>national include=>international [gr2] include=>internal include=>local [ ] [ ] [gr3] ] exten => _81XX,n,Playback(/var/tmp/asterisk/record${EXTEN:2}:gsm) exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) "/etc/asterisk/extensions.conf" 46L, 875C written |
# asterisk -rvvv
|
#sterisk cach
|
#vi /etc/asterisk/sip.conf
--- /tmp/l3-saved-13021.12893.13625 2014-11-26 12:14:52.393761327 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 12:15:10.621761542 +0200 @@ -3,7 +3,7 @@ [internal] exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) -exten => _81XX,n,Playback(/var/tmp/asterisk/record${EXTEN:2}:gsm) +exten => _81XX,n,Playback(/var/tmp/asterisk/record${EXTEN:2}) exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) |
#vi /etc/asterisk/extension.conf
|
#vi /etc/asterisk/extension.conf
|
#tar xfz asterisk-core-sounds-ru-gsm-current.tar.gz -C /usr/share/asterisk/sound
tar: /usr/share/asterisk/sound: Cannot open: No such file or directory tar: Error is not recoverable: exiting now |
#vi /etc/asterisk/extensions.conf
|
#~
|
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-13021.23177.2863 2014-11-26 12:23:57.393767776 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 12:38:37.097778189 +0200 @@ -14,9 +14,15 @@ [local] ; не было таймаута + +exten => _12XX,n,Set(CALLFILENAME=${EXTEN:1}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H:%M:%S")}) +exten => _12XX,n,Monitor(wav,${CALLFILENAME},m) + exten => _12XX,1,Dial(SIP/${EXTEN},5) exten => _12XX,n,VoiceMail(${EXTEN}@default) + + [national] exten=> _11XX,1,Dial(SIP/kiev/${EXTEN}) |
#vi /etc/asterisk/extensions.conf
|
# 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 debian2 (pid = 2861) ... -- Registered extension context 'app_dial_gosub_virtual_context'; registrar: app_dial -- merging incls/swits/igpats from old(app_dial_gosub_virtual_context) to new(app_dial_gosub_virtual_context) context, registrar = pbx_config -- Added extension 's' priority 1 to app_dial_gosub_virtual_context -- Time to scan old dialplan and merge leftovers back into the new: 0.000676 sec -- Time to restore hints and swap in new dialplan: 0.000006 sec -- Time to delete the old dialplan: 0.000077 sec -- Total time merge_contexts_delete: 0.000759 sec debian2*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#vi /etc/asterisk/extension.conf
|
#~
|
#vi /etc/asterisk/extensions.conf
|
# asterisk -rvvv
|
#sterisk cach
[internal] exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) exten => _81XX,n,Playback(/var/tmp/asterisk/record${EXTEN:2}) exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) exten => 8001,1,VoiceMailMain() "%Y-%m-%d-%H:%M:%S")}) ; был пробел после подчёркивания exten => _12XX,n,Monitor(wav,${CALLFILENAME},m) exten => _83XX,1,VoiceMailMain(12${EXTEN:2}@default) exten => _12XX,1,Dial(SIP/${EXTEN},5) ... include=>local include=>national [gr3] [gr3] include=>local [gr4] [gr4] include => local include => national include => internal 49,1 84% |
#vi /etc/asterisk/extensions.conf
|
#[local]
|
#ls /var/spool/asterisk/monitor/
|
#vi /etc/asterisk/extensions.conf
|
#vi /etc/asterisk/extension.conf
--- /tmp/l3-saved-13021.12179.11263 2014-11-26 13:12:41.853802390 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 13:13:05.089802665 +0200 @@ -15,7 +15,7 @@ [local] ; не было таймаута -exten => _12XX,1,Set(CALLFILENAME=${EXTEN:1}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H:%M:%S")}) +exten => _12XX,1,Set(CALLFILENAME=${EXTEN}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H:%M:%S")}) exten => _12XX,n,Monitor(wav,${CALLFILENAME},m) exten => _12XX,n,Dial(SIP/${EXTEN},5) |
#~
|
#vi /etc/asterisk/extensions.conf
|
#vi /etc/asterisk/extension.conf
|
#vi /etc/asterisk/extensions.conf
|
# asterisk -rvvv
r-proformatique apt-get install asterisk-core-sounds-ru asterisk-prompt-de asterisk-prompt-fr Reading package lists... Done Building dependency tree Reading state information... Done asterisk-core-sounds-ru is already the newest version. asterisk-prompt-de is already the newest version. asterisk-prompt-fr-proformatique is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
#ls /var/spool/asterisk/monitor/
1201-1202-2014-11-26-13:14:43.wav 1202-1201-2014-11-26-13:18:29.wav 1201-1202-2014-11-26-13:15:14.wav 202-1201-2014-11-26-13:11:08.wav 1201-1202-2014-11-26-13:20:30.wav 202-1201-2014-11-26-13:11:35.wav 1202-1201-2014-11-26-13:14:21.wav 202-1201-2014-11-26-13:12:02.wav |
#play 1202-1201-2014-11-26-13:18:29.wav
play WARN alsa: can't encode 0-bit Unknown or not applicable play FAIL formats: can't open input file `1202-1201-2014-11-26-13:18:29.wav': No such file or directory |
#ls -lsUt /var/spool/asterisk/monitor/
total 1980 164 -rw-rw---- 1 asterisk asterisk 163884 Nov 26 13:23 1201-1202-2014-11-26-13:22:55-in.wav 100 -rw-rw---- 1 asterisk asterisk 98348 Nov 26 13:23 1201-1202-2014-11-26-13:22:55-out.wav 4 -rw-rw---- 1 asterisk asterisk 364 Nov 26 13:22 1202-1201-2014-11-26-13:22:01.wav 96 -rw-rw---- 1 asterisk asterisk 97644 Nov 26 13:20 1201-1202-2014-11-26-13:20:30.wav 4 -rw-rw---- 1 asterisk asterisk 44 Nov 26 13:18 1202-1201-2014-11-26-13:18:29.wav 1372 -rw-rw---- 1 asterisk asterisk 1404204 Nov 26 13:16 1201-1202-2014-11-26-13:15:14.wav 224 -rw-rw---- 1 asterisk asterisk 227564 Nov 26 13:15 1201-1202-2014-11-26-13:14:43.wav 4 -rw-rw---- 1 asterisk asterisk 44 Nov 26 13:14 1202-1201-2014-11-26-13:14:21.wav 4 -rw-rw---- 1 asterisk asterisk 44 Nov 26 13:12 202-1201-2014-11-26-13:12:02.wav 4 -rw-rw---- 1 asterisk asterisk 44 Nov 26 13:11 202-1201-2014-11-26-13:11:35.wav 4 -rw-rw---- 1 asterisk asterisk 44 Nov 26 13:11 202-1201-2014-11-26-13:11:08.wav |
#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 debian2 (pid = 2861) Verbosity is at least 4 debian2*CLI> sip show peers Name/username Host Dyn Forcerport ACL Port Status 1201/1201 192.168.20.100 D N 5060 OK (18 ms) 1202/1202 192.168.20.102 D N 35152 OK (17 ms) kiev/komsomolsk 192.168.10.1 D N 5060 OK (1 ms) 3 sip peers [Monitored: 3 online, 0 offline Unmonitored: 0 online, 0 offline] debian2*CLI> quit Executing last minute cleanups |
#[1202]
bash: :q: command not found |
#vi /etc/asterisk/voicemail.conf
--- /tmp/l3-saved-4317.30229.13882 2014-11-26 13:28:30.661813620 +0200 +++ /etc/asterisk/voicemail.conf 2014-11-26 13:28:47.089813815 +0200 @@ -381,6 +381,7 @@ [default] 1201 => 1234,User 1 (1201),user@localhost +1202 => 1234,User 1 (1202),user@localhost 1234 => 4242,Example Mailbox,root@localhost |
#vim /etc/asterisk/voicemail.conf
--- /tmp/l3-saved-16506.31061.28414 2014-11-26 13:28:40.841813741 +0200 +++ /etc/asterisk/voicemail.conf 2014-11-26 13:29:10.377814089 +0200 @@ -381,6 +381,7 @@ [default] 1201 => 1234,User 1 (1201),user@localhost +1202 => 1234,User 2 (1202),user@localhost 1234 => 4242,Example Mailbox,root@localhost |
#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 debian2 (pid = 2861) Verbosity is at least 4 -- <SIP/1201-00000083> Playing 'beep.gsm' (language 'ru') ... -- x=2, open writing: /var/spool/asterisk/voicemail/default/1202/tmp/JjxsgP format: wav, 0x18177d8 debian2*CLI> voicemail reload Reloading voicemail configuration... == Parsing '/etc/asterisk/voicemail.conf': == Found == Parsing '/etc/asterisk/users.conf': == Found debian2*CLI> -- User hung up == Spawn extension (gr1, 1202, 4) exited non-zero on 'SIP/1201-00000083' debian2*CLI> quit Executing last minute cleanups |
#mpg123 -w /tmp/adele.wav /home/user/Downloads/
X-Lite_Win32_4.7.1_74247.exe Ðни Ð w 2012) [Ñ ÑайÑа www.ololo.fm].mp3 |
#apt-get install mpg123
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libmpg123-0 Suggested packages: alsa-utils jackd nas oss-compat oss4-base The following NEW packages will be installed: libmpg123-0 mpg123 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. ... (Reading database ... 133163 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 |
#sox -t wav /tmp/music.wav -r 8000 -c1 -t gsm /tmp/music.gsm
sox WARN rate: rate clipped 26 samples; decrease volume? sox WARN dither: dither clipped 24 samples; decrease volume? |
#ls /tmp/
music.gsm orbit-user pulse-z41qPVTxaHtG tracker-user music.wav pulse-c82mH4n1Tooo ssh-PYMiyoHJvHiw |
#asterisk -rvvvv
ls -lsUt /var/spool/asterisk/monitor/ total 3180 152 -rw-rw---- 1 asterisk asterisk 155244 Nov 26 13:29 1202-1201-2014-11-26-13:29:07.wav 4 -rw-rw---- 1 asterisk asterisk 44 Nov 26 13:25 1202-1201-2014-11-26-13:25:15.wav 1308 -rw-rw---- 1 asterisk asterisk 1337644 Nov 26 13:24 1201-1202-2014-11-26-13:22:55.wav 4 -rw-rw---- 1 asterisk asterisk 364 Nov 26 13:22 1202-1201-2014-11-26-13:22:01.wav 96 -rw-rw---- 1 asterisk asterisk 97644 Nov 26 13:20 1201-1202-2014-11-26-13:20:30.wav 4 -rw-rw---- 1 asterisk asterisk 44 Nov 26 13:18 1202-1201-2014-11-26-13:18:29.wav 1372 -rw-rw---- 1 asterisk asterisk 1404204 Nov 26 13:16 1201-1202-2014-11-26-13:15:14.wav 224 -rw-rw---- 1 asterisk asterisk 227564 Nov 26 13:15 1201-1202-2014-11-26-13:14:43.wav 4 -rw-rw---- 1 asterisk asterisk 44 Nov 26 13:14 1202-1201-2014-11-26-13:14:21.wav 4 -rw-rw---- 1 asterisk asterisk 44 Nov 26 13:12 202-1201-2014-11-26-13:12:02.wav 4 -rw-rw---- 1 asterisk asterisk 44 Nov 26 13:11 202-1201-2014-11-26-13:11:35.wav 4 -rw-rw---- 1 asterisk asterisk 44 Nov 26 13:11 202-1201-2014-11-26-13:11:08.wav |
#play /tmp/music.gsm
play WARN alsa: can't encode 0-bit Unknown or not applicable /tmp/music.gsm: File Size: 330k Encoding: GSM Channels: 1 @ 16-bit Samplerate: 8000Hz Replaygain: off Duration: unknown In:0.00% 00:02:22.34 [00:00:00.00] Out:1.14M [!=====|=====!] Hd:0.0 Clip:0 Aborted. |
#asterisk -rvvvv
vi /etc/asterisk/extension.conf |
#~
|
#asterisk -rvvvv
exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) exten => 8001,1,VoiceMailMain() Y-%m-%d-%H:%M:%S")}) ; был пробел после подчёркивания exten => _12XX,n,Monitor(wav,${CALLFILENAME},m) exten => _83XX,1,VoiceMailMain(12${EXTEN:2}@default) exten => _12XX,n,Dial(SIP/${EXTEN},5) [national]12XX,n,VoiceMail(${EXTEN}@default) [local] exten=> _11XX,1,Dial(SIP/kiev/${EXTEN}) ; не было таймаута [international] exten => _12XX,1,Set(CALLFILENAME=${EXTEN}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,"%% exten=> _[123][123]XX,1,Dial(SIP/kiev/${EXTEN}) [gr1] include=>internal "/etc/asterisk/extensions.conf" 52L, 1038C include=>local include=>national include=>international [gr2] |
#include=>internal
; ; they will switch to listening to this music class. ;sort=random ; Sort the files in random order ;[native-alphabetical] ;mode=files ;directory=moh =/var/lib/asterisk/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 mode=files 71,1 71% "/etc/asterisk/musiconhold.conf" 84L, 2740C written |
#asterisk -rvvvv
asterisk -rvvvv Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian2 (pid = 2861) Verbosity is at least 4 debian2*CLI> moh reload == Parsing '/etc/asterisk/musiconhold.conf': == Found debian2*CLI> moh show files Class: default File: /var/lib/asterisk/moh/music debian2*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#asterisk -rvvvv
|
#asterisk -rvvvv
"/etc/asterisk/extensions.conf" 52L, 1038C [nclude=>local] [ ] [gr1]de=>national [gr1] include=>international [gr2] [gr2] include=>local include=>national ... [gr2] [gr4] [gr4] [gr3] [gr3] include => local [gr4]de => national [gr4] include => international include => internal 45,0-1 Bot |
#[gr4]
|
#apt-get install dahdi source
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package source |
#apt-get install dahdi source
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package source |
#m-a a-i dahdi
┌────────────────────┤ Updating cached package data ├─────────────────────┐ │ Reading apt-cache output... │ │ │ │ │ │ 100% │ │ │ └─────────────────────────────────────────────────────────────────────────┘ Updated infos about 1 packages unpack The source tarball could not be found! Package dahdi not installed? Running "m-a -f get dahdi" may help. "/usr/share/modass/packages/default.sh" build KVERS=3.2.0-4-amd64 KSRC=/lib/modules/3.2.0-4-amd64/build KDREV=3.2.63-2+deb7u1 kdist_image find: `/usr/src/modules/dahdi*': No such file or directory |
#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. |
#asterisk -rvvvv
|
#asterisk -rvvvv
|
#asterisk -rvvvv
|
#asterisk -rvvvv
ls -lsUt /var/spool/asterisk/monitor/ total 3708 44 -rw-rw---- 1 asterisk asterisk 43884 Nov 26 13:58 1201-1101-2014-11-26-13:58:06.wav 48 -rw-rw---- 1 asterisk asterisk 47724 Nov 26 13:57 1201-1101-2014-11-26-13:57:51.wav 436 -rw-rw---- 1 asterisk asterisk 443244 Nov 26 13:57 1201-1202-2014-11-26-13:56:42.wav 152 -rw-rw---- 1 asterisk asterisk 155244 Nov 26 13:29 1202-1201-2014-11-26-13:29:07.wav 4 -rw-rw---- 1 asterisk asterisk 44 Nov 26 13:25 1202-1201-2014-11-26-13:25:15.wav 1308 -rw-rw---- 1 asterisk asterisk 1337644 Nov 26 13:24 1201-1202-2014-11-26-13:22:55.wav 4 -rw-rw---- 1 asterisk asterisk 364 Nov 26 13:22 1202-1201-2014-11-26-13:22:01.wav 96 -rw-rw---- 1 asterisk asterisk 97644 Nov 26 13:20 1201-1202-2014-11-26-13:20:30.wav 4 -rw-rw---- 1 asterisk asterisk 44 Nov 26 13:18 1202-1201-2014-11-26-13:18:29.wav 1372 -rw-rw---- 1 asterisk asterisk 1404204 Nov 26 13:16 1201-1202-2014-11-26-13:15:14.wav 224 -rw-rw---- 1 asterisk asterisk 227564 Nov 26 13:15 1201-1202-2014-11-26-13:14:43.wav 4 -rw-rw---- 1 asterisk asterisk 44 Nov 26 13:14 1202-1201-2014-11-26-13:14:21.wav 4 -rw-rw---- 1 asterisk asterisk 44 Nov 26 13:12 202-1201-2014-11-26-13:12:02.wav 4 -rw-rw---- 1 asterisk asterisk 44 Nov 26 13:11 202-1201-2014-11-26-13:11:35.wav 4 -rw-rw---- 1 asterisk asterisk 44 Nov 26 13:11 202-1201-2014-11-26-13:11:08.wav |
#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
Usage: /etc/init.d/asterisk {start|stop|restart|reload|status|debug|logger-reload|extensions-reload|restart-convenient|force-reload} |
#asterisk -rvvvv
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 ... == Spawn extension (gr1, 8010, 1) exited non-zero on 'SIP/1201-00000005' == Using SIP RTP CoS mark 5 == Using SIP RTP CoS mark 5 == Spawn extension (gr1, 3291, 1) exited non-zero on 'SIP/1201-00000006' == Using SIP RTP CoS mark 5 == Using SIP RTP CoS mark 5 == Spawn extension (gr4, 1202, 4) exited non-zero on 'SIP/kiev-00000008' debian2*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4317.19691.9957 2014-11-26 14:34:56.605860797 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 14:35:23.157861111 +0200 @@ -22,8 +22,8 @@ exten => _12XX,n,Dial(SIP/${EXTEN},5) exten => _12XX,n,VoiceMail(${EXTEN}@default) -exten => _339X,1,NoOp(Conferences for external users) -exten => _339X,n,MeetMe(10${EXTEN:3}) +exten => _129X,1,NoOp(Conferences for external users) +exten => _129X,n,MeetMe(10${EXTEN:3}) [national] |
#vi /etc/asterisk/extensions.conf
|
#vim /etc/asterisk/sip.conf
|
#~
[default] [internal] exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) exten => _81XX,n,Playback(/var/tmp/asterisk/record${EXTEN:2}) exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) exten => 8001,1,VoiceMailMain() ; был пробел после подчёркивания exten => _83XX,1,VoiceMailMain(12${EXTEN:2}@default) exten => _801X,1,MeetMe(10${EXTEN:3}) [local] ... "/etc/asterisk/extensions.conf" 55L, 1168C written 30 exten=> _11XX,1,Dial(SIP/kiev/${EXTEN}) 31 32 [international] 33 exten=> _[123][123]XX,1,Dial(SIP/kiev/${EXTEN}) 34 [gr1] 35 include=>internal 36 include=>local 37 include=>national 38 include=>international |
#less /var/log/asterisk/messages
|
#~
[default] [internal] exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) exten => _81XX,n,Playback(/var/tmp/asterisk/record${EXTEN:2}) exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) exten => 8001,1,VoiceMailMain() ; бÑл пÑобел поÑле подÑÑÑÐºÐ¸Ð²Ð°Ð½Ð¸Ñ exten => _83XX,1,VoiceMailMain(12${EXTEN:2}@default) exten => _801X,1,MeetMe(10${EXTEN:3}) "/etc/asterisk/extensions.conf" 55L, 1168C ... [national] exten=> _11XX,1,Dial(SIP/kiev/${EXTEN}) "/etc/asterisk/extensions.conf" 56L, 1208C written [international] exten=> _[123][123]XX,1,Dial(SIP/kiev/${EXTEN}) [gr1] include=>internal include=>local include=>national include=>international |
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-13021.24824.1630 2014-11-26 15:36:18.697904377 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 15:39:39.881906759 +0200 @@ -1,5 +1,5 @@ -[default] +[al(SIP/1201&SIP/1202)d [internal] exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) @@ -13,13 +13,12 @@ exten => _801X,1,MeetMe(10${EXTEN:3}) -[local] +[local]i ; не было таймаута - -exten => _129X,1,NoOp(Conferences for external users) +exten => 1292,1,Dial(SIP/1201&SIP/1202) +exte => _129X,1,NoOp(Conferences for external users) exten => _129X,n,MeetMe(10${EXTEN:3}) -exten => 1292,1,Dial(SIP/1201&SIP/1202) exten => _12XX,1,Set(CALLFILENAME=${EXTEN}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H:%M:%S")}) exten => _12XX,n,Monitor(wav,${CALLFILENAME},m) |
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-13021.15730.20437 2014-11-26 15:39:44.013906809 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 15:40:45.377907534 +0200 @@ -16,8 +16,8 @@ [local]i ; не было таймаута exten => 1292,1,Dial(SIP/1201&SIP/1202) -exte => _129X,1,NoOp(Conferences for external users) -exten => _129X,n,MeetMe(10${EXTEN:3}) +exten => _1291,1,NoOp(Conferences for external users) +exten => _1291,n,MeetMe(10${EXTEN:3}) exten => _12XX,1,Set(CALLFILENAME=${EXTEN}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H:%M:%S")}) |
#sterisk -rvvv
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 debian2 (pid = 22881) Verbosity is at least 4 debian2*CLI> dialplan reload Dialplan reloaded. == Parsing '/etc/asterisk/extensions.conf': == Found [Nov 26 15:40:50] WARNING[23537]: config.c:1139 process_text_line: parse error: no closing ']', line 2 of /etc/asterisk/extensions.conf debian2*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-13021.27063.10599 2014-11-26 15:40:57.169907673 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 15:41:08.913907812 +0200 @@ -13,7 +13,7 @@ exten => _801X,1,MeetMe(10${EXTEN:3}) -[local]i +[local] ; не было таймаута exten => 1292,1,Dial(SIP/1201&SIP/1202) exten => _1291,1,NoOp(Conferences for external users) |
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-13021.1704.8105 2014-11-26 15:41:22.725907973 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 15:41:40.729908189 +0200 @@ -1,5 +1,5 @@ -[al(SIP/1201&SIP/1202)d +[default] [internal] exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) |
Время первой команды журнала | 09:02:18 2014-11-26 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 14:43:03 2014-11-26 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 17.82 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.99 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 3.57 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.47 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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