/l3/users/igor-public/nt-voip-2013-11/linux0.unix.nt/root :1 :2 :3 :4 :5 |
|
#tree a
a ├── 1 ├── 2 ├── 3 └── 4 ├── b ├── c └── d ├── aaa ├── ooo └── uuu 10 directories, 0 files |
#ls /usr/share/asterisk/
agi-bin/ documentation/ keys/ sounds/ conf/ firmware/ moh/ static-http/ |
#ls /usr/share/asterisk/sounds/
custom/ en_US/ recordings/ en/ en_US_f_Allison/ |
#ls /usr/share/asterisk/sounds/en
en/ en_US/ en_US_f_Allison/ |
#ls /usr/share/asterisk/sounds/en/
Display all 294 possibilities? (y or n) |
#ls /usr/share/asterisk/sounds/en/de
demo-abouttotry.gsm demo-enterkeywords.gsm demo-nomatch.gsm demo-congrats.gsm demo-instruct.gsm demo-thanks.gsm demo-echodone.gsm demo-moreinfo.gsm descending-2tone.gsm demo-echotest.gsm demo-nogo.gsm |
#cat /etc/asterisk/sip.conf
[general] context=default [3301] type=friend secret=1234 host=dynamic |
#cat /etc/asterisk/sip.conf
[general] context=default [3301] type=friend secret=1234 host=dynamic |
#cat /etc/asterisk/extensions.conf
[default] exten => 4000,1,Answer exten => 4000,n,Playback(demo-thanks) |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-19850.26191.276 2013-11-19 10:03:46.000000000 +0200 +++ /etc/asterisk/extensions.conf 2013-11-19 10:15:55.000000000 +0200 @@ -4,3 +4,8 @@ exten => 4000,1,Answer exten => 4000,n,Playback(demo-thanks) +exten => _33XX,1,Answer +exten => _33XX,n,Dial(SIP/${EXTEN}) + +#include "/etc/asterisk/extensions-ivr.conf" + |
#dpkg -L asterisk-modules | grep app_ | less
|
#{EXTEN})
[general] ; canreinvite=no directmedia=no register => quebec:1234@192.168.15.8/montreal register => quebec:1234@192.168.15.7/ottawa [3301]t=default [3301]riend secret=1234 sost=dynamic host=dynamic ... uanreinvite=no [anreinvi]e=no [ottawa] [ottawa] secret=1234 host=dynamic [ottawa] username=quebec "/etc/asterisk/sip.conf" 29L, 355C written 5 more lines |
#asterisk -rvvv
Asterisk 1.8.13.1~dfsg-3, 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~dfsg-3 currently running on linux0 (pid = 5035) ... -- Registered SIP 'ottawa' at 192.168.15.7:5060 linux0*CLI> sip show peers Name/username Host Dyn Forcerport ACL Port Status 3301 (Unspecified) D N 0 Unmonitored montreal/quebec (Unspecified) D N 0 Unmonitored ottawa/quebec 192.168.15.7 D N 5060 Unmonitored 3 sip peers [Monitored: 0 online, 0 offline Unmonitored: 1 online, 2 offline] -- Registered SIP 'montreal' at 192.168.15.8:5060 linux0*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-19850.3870.20023 2013-11-19 11:09:48.000000000 +0200 +++ /etc/asterisk/extensions.conf 2013-11-19 11:11:37.000000000 +0200 @@ -9,15 +9,15 @@ ; ------------------------------------------------------- ; -; exten => _13XX,1,Answer -; exten => _13XX,n,Dial(SIP/${EXTEN}) +; exten => _23XX,1,Answer +; exten => _23XX,n,Dial(SIP/${EXTEN}) ; -; exten => _11XX,1,Answer -; exten => _11XX,n,Dial(SIP/kiev/${EXTEN}) +; exten => _21XX,1,Answer +; exten => _21XX,n,Dial(SIP/london/${EXTEN}) ; -; exten => _12XX,1,Answer -; exten => _12XX,n,Dial(SIP/kharkov/${EXTEN}) +; exten => _22XX,1,Answer +; exten => _22XX,n,Dial(SIP/manchester/${EXTEN}) ; -; exten => _[23]XXX,1,Answer -; exten => _[23]XXX,n,Dial(SIP/london/${EXTEN}) +; exten => _[13]XXX,1,Answer +; exten => _[13]XXX,n,Dial(SIP/london/${EXTEN}) |
#vim /etc/asterisk/extensions.conf
|
#[ ]
[manchester] type=friend secret=1234 host=dynamic username=london canreinvite=no [liverpool] type=friend secret=1234 host=dynamic ... == Using SIP RTP CoS mark 5 -- Called SIP/liverpool/2301 -- SIP/liverpool-0000002e answered SIP/2101-0000002d -- Locally bridging SIP/2101-0000002d and SIP/liverpool-0000002e == Spawn extension (default, 2301, 2) exited non-zero on 'SIP/2101-0000002d' liniux4*CLI> quit Executing last minute cleanups root@liniux4:~# exit logout Connection to 192.168.15.4 closed. |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-19850.29045.1913 2013-11-19 11:56:08.000000000 +0200 +++ /etc/asterisk/extensions.conf 2013-11-19 13:40:32.000000000 +0200 @@ -1,23 +1,40 @@ - [default] +[internal] + exten => 4000,1,Answer exten => 4000,n,Playback(demo-thanks) +[local] + exten => _33XX,1,Answer exten => _33XX,n,Dial(SIP/${EXTEN}) -; ------------------------------------------------------- -; -; exten => _23XX,1,Answer -; exten => _23XX,n,Dial(SIP/${EXTEN}) -; -; exten => _21XX,1,Answer -; exten => _21XX,n,Dial(SIP/london/${EXTEN}) -; -; exten => _22XX,1,Answer -; exten => _22XX,n,Dial(SIP/manchester/${EXTEN}) -; -; exten => _[13]XXX,1,Answer -; exten => _[13]XXX,n,Dial(SIP/london/${EXTEN}) +[national] + +exten => _31XX,1,Answer +exten => _31XX,n,Dial(SIP/london/${EXTEN}) + +exten => _32XX,1,Answer +exten => _32XX,n,Dial(SIP/manchester/${EXTEN}) + +[international] + +exten => _[12]XXX,1,Answer +exten => _[12]XXX,n,Dial(SIP/london/${EXTEN}) + +[gr1] +include => internal +include => local +include => national +include => international + +[gr2] +include => internal +include => local +include => national + +[gr3] +include => internal +include => local |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-19850.17173.23769 2013-11-19 13:40:36.000000000 +0200 +++ /etc/asterisk/sip.conf 2013-11-19 13:44:05.000000000 +0200 @@ -7,10 +7,17 @@ register => quebec:1234@192.168.15.8/montreal register => quebec:1234@192.168.15.7/ottawa -[3301] +[local-phone](!) type=friend -secret=1234 host=dynamic +directmedia=no +qualify=yes + +[3301](local-phone) +secret=1234 + +[3302](local-phone) +secret=abcdef [montreal] type=friend |
#vim /etc/asterisk/sip.conf
|
#[3302]
|
#ping 192.168.1.10
PING 192.168.1.10 (192.168.1.10) 56(84) bytes of data. From 192.168.1.9 icmp_seq=1 Destination Host Unreachable From 192.168.1.9 icmp_seq=2 Destination Host Unreachable From 192.168.1.9 icmp_seq=3 Destination Host Unreachable ^C --- 192.168.1.10 ping statistics --- 4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3015ms pipe 3 |
#ping 192.168.1.10
PING 192.168.1.10 (192.168.1.10) 56(84) bytes of data. 64 bytes from 192.168.1.10: icmp_req=1 ttl=64 time=0.837 ms 64 bytes from 192.168.1.10: icmp_req=2 ttl=64 time=0.464 ms ^[[A64 bytes from 192.168.1.10: icmp_req=3 ttl=64 time=0.435 ms 64 bytes from 192.168.1.10: icmp_req=4 ttl=64 time=0.430 ms 64 bytes from 192.168.1.10: icmp_req=5 ttl=64 time=0.455 ms ^C --- 192.168.1.10 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 3998ms rtt min/avg/max/mdev = 0.430/0.524/0.837/0.157 ms |
#ssh 192.168.15.5
The authenticity of host '192.168.15.5 (192.168.15.5)' can't be established. ECDSA key fingerprint is 67:6c:b4:43:e0:98:9d:e5:df:19:92:08:17:47:fc:4d. Are you sure you want to continue connecting (yes/no)? ^C |
#ssh 192.168.15.4
[national] exten => _22XX,1,Answer exten => _22XX,n,Dial(SIP/manchester/${EXTEN}) exten => _23XX,1,Answer exten => _23XX,n,Dial(SIP/liverpool/${EXTEN}) [internal] root@192.168.15.4's password: Linux liniux4 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the ... "/etc/asterisk/extensions.conf" 41L, 654C [national] exten => _22XX,1,Answer exten => _22XX,n,Dial(SIP/manchester/${EXTEN}) exten => _23XX,1,Answer exten => _23XX,n,Dial(SIP/liverpool/${EXTEN}) [international] root@liniux4:~# exit logout Connection to 192.168.15.4 closed. |
#chown -R asterisk:asterisk /var/tmp/asterisk/
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-19850.31605.30924 2013-11-19 14:38:44.000000000 +0200 +++ /etc/asterisk/extensions.conf 2013-11-19 14:40:41.000000000 +0200 @@ -12,6 +12,7 @@ [local] exten => _33XX,1,Answer +exten => _33XX,n,Monitor(wav,/var/tmp/asterisk/monitor/123) exten => _33XX,n,Dial(SIP/${EXTEN}) [national] |
#ls /var/spool/asterisk/monitor/
|
#sox
sox soxi |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-19850.30495.15838 2013-11-19 14:44:56.000000000 +0200 +++ /etc/asterisk/extensions.conf 2013-11-19 14:46:49.000000000 +0200 @@ -12,7 +12,8 @@ [local] exten => _33XX,1,Answer -exten => _33XX,n,Monitor(wav,123,m) +exten => _33XX,n,Set(MON_FILE=${EXTEN}-${CALLERID(num)}-${EPOCH}) +exten => _33XX,n,Monitor(wav,${MON_FILE},m) exten => _33XX,n,Dial(SIP/${EXTEN}) [national] |
#vim /etc/asterisk/voicemail.conf
--- /tmp/l3-saved-19850.7607.8881 2013-11-19 15:31:51.000000000 +0200 +++ /etc/asterisk/voicemail.conf 2013-11-19 15:34:32.000000000 +0200 @@ -382,6 +382,8 @@ [default] 1234 => 4242,Example Mailbox,root@localhost +3301 => 1234,User 1,user@localhost + ;4200 => 9855,Mark Spencer,markster@linux-support.net,mypager@digium.com,attach=no|serveremail=myaddy@digium.com|tz=central|maxmsg=10 ;4300 => 3456,Ben Rigas,ben@american-computer.net ;4310 => -5432,Sales,sales@marko.net |
#apt-get install mutt
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libtokyocabinet9 Suggested packages: urlview mixmaster The following NEW packages will be installed: libtokyocabinet9 mutt 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. ... Unpacking libtokyocabinet9:amd64 (from .../libtokyocabinet9_1.4.47-2_amd64.deb) ... Selecting previously unselected package mutt. Unpacking mutt (from .../mutt_1.5.21-6.2+deb7u1_amd64.deb) ... Processing triggers for man-db ... Processing triggers for desktop-file-utils ... Processing triggers for gnome-menus ... Processing triggers for mime-support ... Setting up libtokyocabinet9:amd64 (1.4.47-2) ... Setting up mutt (1.5.21-6.2+deb7u1) ... update-alternatives: using /usr/bin/mutt-org to provide /usr/bin/mutt (mutt) in auto mode |
#su - user
-*-Mutt: /var/mail/user [Msgs:1 0.6K]---(threads/date)----------------(all)--- 1 kept, 0 deleted. user@linux0:~$ exit logout |
#ls -l /var/mail/
total 4 -rw-rw---- 1 user mail 673 Nov 19 15:35 user |
#vim /etc/asterisk/extensions.conf
|
#fg
[ ] [ ] [internal] exten => 4000,1,Answer exten => 8100,1,VoiceMailMain() exten => 4000,n,Playback(demo-thanks) exten => _80XX,1,Answer exten => _80XX,n,Record(/var/tmp/asterisk/records/record${EXTEN:2}:gsm) exten => _80XX,n,Playback(/var/tmp/asterisk/records/record${EXTEN:2}) "/etc/asterisk/extensions.conf" 49L, 952C written exten => _33XX,1,Answer exten => _33XX,n,Set(MON_FILE=${EXTEN}-${CALLERID(num)}-${EPOCH}) exten => _33XX,n,Monitor(wav,${MON_FILE},m) exten => _33XX,n,Dial(SIP/${EXTEN},5) exten => _33XX,n,Voicemail(${EXTEN}@default) [national] exten => _31XX,1,Answer exten => _31XX,n,Dial(SIP/london/${EXTEN}) |
#apt-get install asterisk-core-sounds-fr
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: asterisk-core-sounds-fr-gsm The following NEW packages will be installed: asterisk-core-sounds-fr asterisk-core-sounds-fr-gsm 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 2,174 kB of archives. After this operation, 2,441 kB of additional disk space will be used. ... Fetched 2,174 kB in 7s (305 kB/s) Selecting previously unselected package asterisk-core-sounds-fr-gsm. (Reading database ... 130881 files and directories currently installed.) Unpacking asterisk-core-sounds-fr-gsm (from .../asterisk-core-sounds-fr-gsm_1.4.22-1_all.deb) ... Selecting previously unselected package asterisk-core-sounds-fr. Unpacking asterisk-core-sounds-fr (from .../asterisk-core-sounds-fr_1.4.22-1_all.deb) ... Setting up asterisk-core-sounds-fr-gsm (1.4.22-1) ... Setting up asterisk-core-sounds-fr (1.4.22-1) ... update-alternatives: using /usr/share/asterisk/sounds/fr_CA_f_June to provide /usr/share/asterisk/sounds/fr (asterisk-prompt-fr) in auto mode update-alternatives: using /usr/share/asterisk/sounds/fr_CA_f_June to provide /usr/share/asterisk/sounds/fr_CA (asterisk-prompt-fr-ca) in auto mode |
#apt-get install asterisk-core-sounds-ru
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: asterisk-core-sounds-ru-gsm The following NEW packages will be installed: asterisk-core-sounds-ru asterisk-core-sounds-ru-gsm 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 2,078 kB of archives. After this operation, 2,263 kB of additional disk space will be used. ... Fetched 2,078 kB in 6s (332 kB/s) Selecting previously unselected package asterisk-core-sounds-ru-gsm. (Reading database ... 131391 files and directories currently installed.) Unpacking asterisk-core-sounds-ru-gsm (from .../asterisk-core-sounds-ru-gsm_1.4.22-1_all.deb) ... Selecting previously unselected package asterisk-core-sounds-ru. Unpacking asterisk-core-sounds-ru (from .../asterisk-core-sounds-ru_1.4.22-1_all.deb) ... Setting up asterisk-core-sounds-ru-gsm (1.4.22-1) ... Setting up asterisk-core-sounds-ru (1.4.22-1) ... update-alternatives: using /usr/share/asterisk/sounds/ru_RU_f_IvrvoiceRU to provide /usr/share/asterisk/sounds/ru (asterisk-prompt-ru) in auto mode update-alternatives: using /usr/share/asterisk/sounds/ru_RU_f_IvrvoiceRU to provide /usr/share/asterisk/sounds/ru_RU (asterisk-prompt-ru-ru) in auto mode |
## http://downloads.asterisk.org/pub/telephony/sounds/
|
#tar tvfz asterisk-core-sounds-it-gsm-current.tar.gz | less
|
#ls -l /usr/share/asterisk/souns
ls: cannot access /usr/share/asterisk/souns: No such file or directory |
#ls -l /usr/share/asterisk/sounds
total 56 lrwxrwxrwx 1 root root 36 Apr 9 2013 custom -> ../../../local/share/asterisk/sounds lrwxrwxrwx 1 root root 36 Nov 18 14:55 en -> /etc/alternatives/asterisk-prompt-en lrwxrwxrwx 1 root root 39 Nov 18 14:55 en_US -> /etc/alternatives/asterisk-prompt-en-us drwxr-xr-x 8 root root 20480 Nov 18 14:54 en_US_f_Allison lrwxrwxrwx 1 root root 36 Nov 19 15:51 fr -> /etc/alternatives/asterisk-prompt-fr lrwxrwxrwx 1 root root 39 Nov 19 15:51 fr_CA -> /etc/alternatives/asterisk-prompt-fr-ca drwxr-xr-x 8 root root 20480 Nov 19 15:51 fr_CA_f_June lrwxrwxrwx 1 root root 31 Apr 9 2013 recordings -> /var/lib/asterisk/sounds/custom lrwxrwxrwx 1 root root 36 Nov 19 15:52 ru -> /etc/alternatives/asterisk-prompt-ru lrwxrwxrwx 1 root root 39 Nov 19 15:52 ru_RU -> /etc/alternatives/asterisk-prompt-ru-ru drwxr-xr-x 8 root root 16384 Nov 19 15:52 ru_RU_f_IvrvoiceRU |
#ls /usr/share/asterisk/sounds/fr/ | less
|
#ls -l /usr/share/asterisk/sounds/it/
total 2436 -rw-r--r-- 1 root root 10197 Oct 30 16:40 agent-alreadyon.gsm -rw-r--r-- 1 root root 9273 Oct 30 16:40 agent-incorrect.gsm -rw-r--r-- 1 root root 2211 Oct 30 16:40 agent-loggedoff.gsm -rw-r--r-- 1 root root 2046 Oct 30 16:40 agent-loginok.gsm -rw-r--r-- 1 root root 5181 Oct 30 16:40 agent-newlocation.gsm -rw-r--r-- 1 root root 6369 Oct 30 16:40 agent-pass.gsm -rw-r--r-- 1 root root 9273 Oct 30 16:40 agent-user.gsm -rw-r--r-- 1 root root 363 Oct 30 16:40 ascending-2tone.gsm -rw-r--r-- 1 root root 7821 Oct 30 16:40 auth-incorrect.gsm ... -rw-r--r-- 1 root root 5973 Oct 30 16:40 vm-torerecord.gsm -rw-r--r-- 1 root root 2211 Oct 30 16:40 vm-undeleted.gsm -rw-r--r-- 1 root root 4290 Oct 30 16:40 vm-undelete.gsm -rw-r--r-- 1 root root 2673 Oct 30 16:40 vm-unknown-caller.gsm -rw-r--r-- 1 root root 1155 Oct 30 16:40 vm-Urgent.gsm -rw-r--r-- 1 root root 1023 Oct 30 16:40 vm-vecchi.gsm -rw-r--r-- 1 root root 1089 Oct 30 16:40 vm-vecchio.gsm -rw-r--r-- 1 root root 6303 Oct 30 16:40 vm-whichbox.gsm -rw-r--r-- 1 root root 924 Oct 30 16:40 vm-Work.gsm -rw-r--r-- 1 root root 726 Oct 30 16:40 vm-youhave.gsm |
#ls /usr/share/asterisk/sounds/it | less
|
#apt-cache search dahdi
asterisk-dahdi - DAHDI devices support for the Asterisk PBX dahdi-linux - DAHDI telephony interface - Linux userspace parts dahdi-source - DAHDI telephony interface - source code for kernel driver dahdi - utilities for using the DAHDI kernel modules libtonezone-dev - tonezone library (development) libtonezone2.0 - tonezone library (runtime) libopenr2-3 - MFC/R2 (telephony) call setup library libopenr2-bin - MFC/R2 (telephony) call setup library - test programs libopenr2-dev - MFC/R2 (telephony) call setup library - development headers yate-dahdi - Dahdi support for YATE |
##m-a a-i dahdi
|
#m-a a-i dahdi
ractive mode ├─────────────┐ │ │ │ │ │ │ │ │ │ │ │ │ ──────────────────────────────────────────┘ |
#modprobe dahdi
ls /usr/src/ linux linux-kbuild-3.2 linux-headers-3.2.0-4-amd64 linux-OLDVERSION.1384870202 linux-headers-3.2.0-4-common vpb-driver.tar.bz2 |
#apt-cache search dahdi
asterisk-dahdi - DAHDI devices support for the Asterisk PBX dahdi-linux - DAHDI telephony interface - Linux userspace parts dahdi-source - DAHDI telephony interface - source code for kernel driver dahdi - utilities for using the DAHDI kernel modules libtonezone-dev - tonezone library (development) libtonezone2.0 - tonezone library (runtime) libopenr2-3 - MFC/R2 (telephony) call setup library libopenr2-bin - MFC/R2 (telephony) call setup library - test programs libopenr2-dev - MFC/R2 (telephony) call setup library - development headers yate-dahdi - Dahdi support for YATE |
#apt-get install dahdi-source
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: dahdi-source 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 906 kB of archives. After this operation, 1,020 kB of additional disk space will be used. Get:1 http://192.168.15.254/debian/ wheezy/main dahdi-source all 1:2.6.1+dfsg2-1 [906 kB] Fetched 906 kB in 3s (254 kB/s) Selecting previously unselected package dahdi-source. (Reading database ... 140950 files and directories currently installed.) Unpacking dahdi-source (from .../dahdi-source_1%3a2.6.1+dfsg2-1_all.deb) ... Setting up dahdi-source (1:2.6.1+dfsg2-1) ... |
#dpkg -L dahdi-source
/. /usr /usr/src /usr/src/dahdi.tar.bz2 /usr/include /usr/include/dahdi /usr/include/dahdi/user.h /usr/include/dahdi/wctdm_user.h /usr/include/dahdi/kernel.h /usr/include/dahdi/fasthdlc.h /usr/include/dahdi/dahdi_config.h /usr/share /usr/share/doc /usr/share/doc/dahdi-source /usr/share/doc/dahdi-source/changelog.gz /usr/share/doc/dahdi-source/changelog.Debian.gz /usr/share/doc/dahdi-source/copyright |
#cd /usr/src/
|
#tar xfj dahdi.tar.bz2
|
#ls
dahdi.tar.bz2 linux-headers-3.2.0-4-common modules linux linux-kbuild-3.2 vpb-driver.tar.bz2 linux-headers-3.2.0-4-amd64 linux-OLDVERSION.1384870202 |
#ls modules/
dahdi |
#ls modules/dahdi/
build_tools debian drivers include Makefile |
#cd modules/dahdi/
|
#make
make -C /lib/modules/3.2.0-4-amd64/build SUBDIRS=/usr/src/modules/dahdi/drivers/dahdi DAHDI_INCLUDE=/usr/src/modules/dahdi/include DAHDI_MODULES_EXTRA=" " HOTPLUG_FIRMWARE=yes modules DAHDI_BUILD_ALL=m make[1]: Entering directory `/usr/src/linux-headers-3.2.0-4-amd64' CC [M] /usr/src/modules/dahdi/drivers/dahdi/dahdi-base.o /usr/src/modules/dahdi/drivers/dahdi/dahdi-base.c:91:2: warning: #warning "No CONFIG_BKL is an experimental configuration." [-Wcpp] /usr/src/modules/dahdi/drivers/dahdi/dahdi-base.c:91:2: warning: #warning "No CONFIG_BKL is an experimental configuration." [-Wcpp] CC [M] /usr/src/modules/dahdi/drivers/dahdi/dahdi-sysfs.o CC [M] /usr/src/modules/dahdi/drivers/dahdi/dahdi-version.o LD [M] /usr/src/modules/dahdi/drivers/dahdi/dahdi.o CC [M] /usr/src/modules/dahdi/drivers/dahdi/dahdi_dynamic.o CC [M] /usr/src/modules/dahdi/drivers/dahdi/dahdi_dynamic_loc.o ... LD [M] /usr/src/modules/dahdi/drivers/dahdi/xpp/xpd_fxs.ko CC /usr/src/modules/dahdi/drivers/dahdi/xpp/xpd_pri.mod.o LD [M] /usr/src/modules/dahdi/drivers/dahdi/xpp/xpd_pri.ko CC /usr/src/modules/dahdi/drivers/dahdi/xpp/xpp.mod.o LD [M] /usr/src/modules/dahdi/drivers/dahdi/xpp/xpp.ko CC /usr/src/modules/dahdi/drivers/dahdi/xpp/xpp_usb.mod.o LD [M] /usr/src/modules/dahdi/drivers/dahdi/xpp/xpp_usb.ko CC /usr/src/modules/dahdi/drivers/dahdi/zaphfc/zaphfc.mod.o LD [M] /usr/src/modules/dahdi/drivers/dahdi/zaphfc/zaphfc.ko make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-4-amd64' |
#apt-cache search dahdi source
asterisk-dahdi - DAHDI devices support for the Asterisk PBX dahdi-source - DAHDI telephony interface - source code for kernel driver |
#m-a a-i dahdi
│ │ │ │ │ │ │ │ │ 100% │ │ │ └─────────────────────────────────────────────────────────────────────────┘ Done with /usr/src/dahdi-modules-3.2.0-4-amd64_2.6.1+dfsg2-1+3.2.51-1_amd64.deb . dpkg -Ei /usr/src/dahdi-modules-3.2.0-4-amd64_2.6.1+dfsg2-1+3.2.51-1_amd64.deb Selecting previously unselected package dahdi-modules-3.2.0-4-amd64. (Reading database ... 140961 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.51-1_amd64.deb) ... Setting up dahdi-modules-3.2.0-4-amd64 (1:2.6.1+dfsg2-1+3.2.51-1) ... |
#m-a a-i dahdi
ls /usr/share/asterisk/sounds/fr/ | less r/share/asterisk/sounds/it/f asterisk-core-sounds-it-gsm-current.tar.gz -C /usr |
#http://downloads.asterisk.org/pub/telephony/sounds/
|
#ls /var/spool/asterisk/monitor/
|
#ls -l /usr/share/asterisk/souns
apt-cache search dahdi usr/share/asterisk/sounds/it/f asterisk-core-sounds-it-gsm-current.tar.gz -C /u |
#modprobe dahdi
|
#modprobe dahdi
# apt-get install dahdi-source |
#modprobe dahdi
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-19850.5494.11761 2013-11-19 16:53:08.000000000 +0200 +++ /etc/asterisk/extensions.conf 2013-11-19 16:55:07.000000000 +0200 @@ -10,6 +10,7 @@ exten => _80XX,n,Playback(/var/tmp/asterisk/records/record${EXTEN:2}) exten => 8100,1,VoiceMailMain() +exten => 8101,1,MeetMe(101) [local] |
#asterisk -rv
Asterisk 1.8.13.1~dfsg-3, 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~dfsg-3 currently running on linux0 (pid = 5035) Verbosity is at least 4 linux0*CLI> quit Executing last minute cleanups |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#[ ]
/. /usr /usr/lib /usr/lib/asterisk /usr/lib/asterisk/modules /usr/lib/asterisk/modules/func_math.so /usr/lib/asterisk/modules/func_extstate.so /usr/lib/asterisk/modules/cel_custom.so /usr/lib/asterisk/modules/func_env.so /usr/lib/asterisk/modules/res_jabber.so ... /usr/lib/asterisk/modules/func_db.so /usr/lib/asterisk/modules/func_rand.so /usr/lib/asterisk/modules/func_odbc.so /usr/lib/asterisk/modules/chan_unistim.so /usr/lib/asterisk/modules/format_g726.so /usr/lib/asterisk/modules/res_agi.so /usr/lib/asterisk/modules/app_jack.so /usr/lib/asterisk/modules/func_pitchshift.so /usr/lib/asterisk/modules/app_zapateller.so /usr/lib/asterisk/modules/res_phoneprov.so |
#less /etc/asterisk/features.conf
|
#ls -l ~/
total 0 |
#ls -l /home/user/Do
Documents/ Downloads/ |
#ls -l /home/user/Downloads/
total 5808 -rw-r--r-- 1 user user 5943798 Nov 19 17:21 scorpions_-_still_loving_you_(zaycev.net).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 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 ... 141015 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 /home/user/
.cache/ .fontconfig/ .lilalo/ Pictures/ .config/ .gconf/ .local/ Public/ .dbus/ .gnome2/ Mail/ .pulse/ Desktop/ .gnome2_private/ .mission-control/ .ssh/ Documents/ .gstreamer-0.10/ .mozilla/ Templates/ Downloads/ .gvfs/ Music/ Videos/ |
#mpg123 -w /home/user/Do
Documents/ Downloads/ |
#ls -l /tmp/scorp.wav
-rw-r--r-- 1 root root 65530412 Nov 19 17:23 /tmp/scorp.wav |
#ls -l /tmp/scorp.wav
ls -l /tmp/scorp.wav _still_loving_you_\(zaycev.net /tmp/scorp.wav /home/user/Downloads/scorpions_-_ |
#ls -l /tmp/scorp.*
-rw-r--r-- 1 root root 612975 Nov 19 17:27 /tmp/scorp.gsm -rw-r--r-- 1 root root 65530412 Nov 19 17:23 /tmp/scorp.wav |
#ls -l /tmp/scorp.wav
ls -l /tmp/scorp.wav _still_loving_you_\(zaycev.net /tmp/scorp.wav /home/user/Downloads/scorpions_-_ |
#ls -l /tmp/scorp.*
ls /var/lib/asterisk/moh/ |
#ls /var/lib/asterisk/moh/
|
#cp /tmp/scorp.gsm /var/lib/asterisk/moh/
|
#vim /etc/asterisk/musiconhold.conf
|
#; Other (non-native) playback methods
[ ] ; they will switch to listening to this music class. [ ] ;sort=ran=/var/lib/asterisk/mohs 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. ; ========= "/etc/asterisk/musiconhold.conf" 85L, 2741C written |
#ls -l /var/lib/asterisk/moh/
total 600 -rw-r--r-- 1 root root 612975 Nov 19 17:33 scorp.gsm |
#asterisk -rv
Asterisk 1.8.13.1~dfsg-3, 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~dfsg-3 currently running on linux0 (pid = 23735) Verbosity was 0 and is now 1 linux0*CLI> moh ... linux0*CLI> moh show No such command 'moh show' (type 'core show help moh show' for other possible commands) linux0*CLI> moh show classes files linux0*CLI> moh show classes Class: default Mode: files Directory: /var/lib/asterisk/moh linux0*CLI> quit Executing last minute cleanups |
#[national]
|
#asterisk -rv
Asterisk 1.8.13.1~dfsg-3, 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~dfsg-3 currently running on linux0 (pid = 23735) Verbosity is at least 1 linux0*CLI> dat ... linux0*CLI> database put music 3301 class1 Updated database successfully linux0*CLI> database get music/330 Usage: database get <family> <key> Retrieves an entry in the Asterisk database for a given family and key. linux0*CLI> database get music 3301 Value: class1 linux0*CLI> quit Executing last minute cleanups |
#ls /var/spool/asterisk/
dictate meetme monitor outgoing system tmp voicemail |
#ls /var/lib/asterisk/
astdb moh sounds sqlite.db |
#ls -l /tmp/scorp.wav
apt-get install mpg123 _still_loving_you_\(zaycev.net /tmp/scorp.wav /home/user/Downloads/scorpions_-_ |
#m-a a-i dahdi
ls /usr/share/asterisk/sounds/fr/ | less r/share/asterisk/sounds/it/f asterisk-core-sounds-it-gsm-current.tar.gz -C /usr |
#http://downloads.asterisk.org/pub/telephony/sounds/
|
#vim /etc/asterisk/extensions.conf
|
#Type :quit<Enter> to exit Vim
apt-get install mpg123 _still_loving_you_\(zaycev.net /tmp/scorp.wav /home/user/Downloads/scorpions_-_ |
#modprobe dahdi
|
#m-a a-i dahdi
ls /usr/share/asterisk/sounds/fr/ | less r/share/asterisk/sounls -l /usr/share/asterisk/souns^Ct.tar.gz -C /usr |
#history
1 l3-agent 2 exit 3 l3-agent 4 exit 5 l3-agent 6 date 7 # http://xgu.ru/l3/ 8 vim /tmp/1 9 vim /tmp/1 10 # http://xgu.ru/l3/users/igor-public/nt-voip-2013-11/linux0.unix.nt/root ... 270 vim /etc/asterisk/extensions.conf 271 asterisk -rv 272 asterisk -rv 273 ls /var/spool/asterisk/ 274 ls /var/lib/asterisk/ 275 file /var/lib/asterisk/astdb 276 vim /etc/asterisk/extensions.conf 277 vim /etc/asterisk/sip.conf 278 vim /etc/asterisk/extensions.conf 279 history |
[default] exten => 4000,1,Answer exten => 4000,n,Playback(demo-thanks)
[general] context=default [3301] type=friend secret=1234 host=dynamic
Время первой команды журнала | 16:24:17 2013-11-18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 17:31:30 2013-11-19 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 14.85 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 5.10 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.33 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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