/l3/users/KAZNA/asterisk/linux8.unix.nt/root :1 :2 :3 :4 :5 :6 |
|
#vim /etc/asterisk/queues.conf
![]() --- /tmp/l3-saved-3270.32487.30566 2011-10-19 14:27:51.000000000 +0300 +++ /etc/asterisk/queues.conf 2011-10-19 14:32:58.000000000 +0300 @@ -496,5 +496,15 @@ ; ;member => Agent/@1 ; Any agent in group 1 ;member => Agent/:1,1 ; Any agent in group 1, wait for first + ; available, but consider with penalty +[queue1] + +strategy=ringall + +mamber => SIP/2401 +mamber => SIP/2402 + + + |
#vim /etc/asterisk/extensions.conf
![]() --- /tmp/l3-saved-3270.21489.5447 2011-10-19 14:33:02.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-10-19 14:34:56.000000000 +0300 @@ -34,6 +34,9 @@ exten => _24XX,1,Macro(monitor,SIP/${EXTEN}) exten => _24XX,n,Voicemail(${EXTEN}@default) +exten => 2433,1,Queue(queue1) + + [national] exten => _2[34]XX,1,Macro(monitor,SIP/msk/${EXTEN}) exten => _31XX,1,Dial(SIP/kln/${EXTEN}) |
#vim /etc/asterisk/extensions.conf
![]() |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Asterisk PBX is already running. Use restart. |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#ast
![]() astcanary asterisk astgenkey astman astribank_allow astribank_hexload astribank_is_starting astribank_tool |
#asterisk -rvvvvvvvvv
Asterisk 1.6.2.9-2+squeeze3, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze3 currently running on linux8 (pid = 20018) ... linux8*CLI> queue show queue1 has 0 calls (max unlimited) in 'ringall' strategy (0s holdtime, 0s talktime), W:0, C:0, A:3, SL:0.0% within 0s No Members No Callers -- Remote UNIX connection Executing last minute cleanups == Destroying musiconhold processes linux8*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#[local]
![]() ;[markq] ; ; A sample call queue ; ; Musicclass sets which music applies for this particular call queue. ; The only class which can override this one is if the MOH class is set ; directly on the channel using Set(CHANNEL(musicclass)=whatever) in the ; dialplan. ; ;musicclass = default ... ; not propagate down to the Agent system so if you want round robin, least [queue1] [queue1], etc, you should list all the agents in this file individually and not ; use agent groups. strategy=ringall ;umber => SIP/2401 umber => SIP/2402 ;member => Agent/@1 mamber => SIP/2401 "/etc/asterisk/queues.conf" 510L, 22521C written |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#vim /etc/asterisk/queues.conf
![]() --- /tmp/l3-saved-3270.7973.24460 2011-10-19 14:44:11.000000000 +0300 +++ /etc/asterisk/queues.conf 2011-10-19 14:44:31.000000000 +0300 @@ -503,8 +503,8 @@ strategy=ringall -mumber => SIP/2401 -mumber => SIP/2402 +member => SIP/2401 +member => SIP/2402 |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#vim /etc/asterisk/agents.conf
![]() |
#asterisk -rvvvvvvvvv
Asterisk 1.6.2.9-2+squeeze3, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze3 currently running on linux8 (pid = 20579) ... [Oct 19 14:57:19] WARNING[20600]: chan_sip.c:17987 handle_response_invite: Received response: "Forbidden" from '"2301" <sip:2301@192.168.80.1>;tag=as742865b8' -- SIP/msk-00000006 is circuit-busy == Everyone is busy/congested at this time (1:0/1/0) -- Auto fallthrough, channel 'SIP/msk-00000005' status is 'CONGESTION' -- Remote UNIX connection Executing last minute cleanups == Destroying musiconhold processes linux8*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#~
![]() ;[markq] ; ; A sample call queue ; ; Musicclass sets which music applies for this particular call queue. ; The only class which can override this one is if the MOH class is set ; directly on the channel using Set(CHANNEL(musicclass)=whatever) in the ; dialplan. ; ;musicclass = default ... ~ ~ ~ ~ ~ ~ ~ ~ ~ "/etc/asterisk/queues.conf" 512L, 22557C written |
#vim /etc/asterisk/agents.conf
![]() --- /tmp/l3-saved-3270.9372.12848 2011-10-19 14:52:42.000000000 +0300 +++ /etc/asterisk/agents.conf 2011-10-19 14:53:37.000000000 +0300 @@ -111,3 +111,8 @@ ; ;agent => 1001,4321,Mark Spencer ;agent => 1002,4321,Will Meadows + + +agent => 1,1234,Agent 1 +agent => 1,1234,Agent 2 + |
#vim /etc/asterisk/extensions.conf
![]() --- /tmp/l3-saved-3270.5167.15976 2011-10-19 14:53:54.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-10-19 14:56:22.000000000 +0300 @@ -16,6 +16,8 @@ [internal] +exten = > 247X,1,Agentlogin(${EXTEN:3}) + exten => _247X,1,GotoIf($["${CALLERID(num)}"!="240${EXTEN:3}"] ?password) exten => _247X,n,VoicemailMain(240${EXTEN:3},s) exten => _247X,n,Hangup |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#vim /etc/asterisk/extensions.conf
![]() --- /tmp/l3-saved-3270.12736.19900 2011-10-19 14:57:32.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-10-19 14:57:54.000000000 +0300 @@ -16,7 +16,7 @@ [internal] -exten = > 247X,1,Agentlogin(${EXTEN:3}) +exten = > 246X,1,Agentlogin(${EXTEN:3}) exten => _247X,1,GotoIf($["${CALLERID(num)}"!="240${EXTEN:3}"] ?password) exten => _247X,n,VoicemailMain(240${EXTEN:3},s) |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -rvvvvvvvvv
Asterisk 1.6.2.9-2+squeeze3, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze3 currently running on linux8 (pid = 20686) ... == Everyone is busy/congested at this time (1:0/0/1) -- Executing [2461@gr3:2] VoiceMail("SIP/2401-00000003", "2461@default") in new stack [Oct 19 14:58:26] WARNING[20743]: app_voicemail.c:5260 leave_voicemail: No entry in voicemail config file for '2461' -- Auto fallthrough, channel 'SIP/2401-00000003' status is 'CHANUNAVAIL' -- Remote UNIX connection Executing last minute cleanups == Destroying musiconhold processes linux8*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
![]() --- /tmp/l3-saved-3270.10009.24447 2011-10-19 14:58:50.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-10-19 15:00:11.000000000 +0300 @@ -16,7 +16,7 @@ [internal] -exten = > 246X,1,Agentlogin(${EXTEN:3}) +exten => _246X,1,Agentlogin(${EXTEN:3}) exten => _247X,1,GotoIf($["${CALLERID(num)}"!="240${EXTEN:3}"] ?password) exten => _247X,n,VoicemailMain(240${EXTEN:3},s) |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#vim /etc/asterisk/extensions.conf
![]() |
#include => local
![]() ; ;musiconhold => default ; ; Define the default good bye sound file for agents ; default to vm-goodbye ; ;goodbye => goodbye_file ; ; Define updatecdr. This is whether or not to change the source ; channel in the CDR record for this call to agent/agent_id so ... ; -------------------------------------------------- ; ; This section contains the agent definitions, in the form: ; ; agent => agentid,agentpassword,name ; ;agent => 1001,4321,Mark Spencer ;agent => 1002,4321,Will Meadows agent => 1,1234,Agent 1 agent => 1,1234,Agent 2 |
#~
![]() ;[markq] ; ; A sample call queue ; ; Musicclass sets which music applies for this particular call queue. ; The only class which can override this one is if the MOH class is set ; directly on the channel using Set(CHANNEL(musicclass)=whatever) in the ; dialplan. ; ;musicclass = default ... ;member => Agent/1001 ;member => Agent/1002 ;member => Local/1000@default,0,John Smith,SIP/1000 ; ; Note that using agent groups is probably not what you want. Strategies do ; not propagate down to the Agent system so if you want round robin, least ; recent, etc, you should list all the agents in this file individually and not ; use agent groups. ; ;member => Agent/@1 |
#member => Agent/2
![]() |
#cat /etc/asterisk/queues.conf | sed 's/;.*//' | expand | grep -xv ' *' | less
|
#cat /etc/asterisk/queues.conf | sed 's/;.*//' | expand | grep -xv ' *' | less
|
#cat /etc/asterisk/queues.conf | sed 's/;.*//' | expand | grep -xv ' *' | less
|
#vim /etc/asterisk/features.conf
![]() --- /tmp/l3-saved-3270.24500.9405 2011-10-19 15:12:06.000000000 +0300 +++ /etc/asterisk/features.conf 2011-10-19 15:12:48.000000000 +0300 @@ -58,10 +58,10 @@ [featuremap] -;blindxfer => #1 ; Blind transfer (default is #) -- Make sure to set the T and/or t option in the Dial() or Queue() app call! +blindxfer => #1 ; Blind transfer (default is #) -- Make sure to set the T and/or t option in the Dial() or Queue() app call! ;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! +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! ;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! |
#vim /etc/asterisk/extensions.conf
![]() --- /tmp/l3-saved-3270.7547.5156 2011-10-19 15:13:24.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-10-19 15:14:20.000000000 +0300 @@ -9,7 +9,7 @@ exten => s,n,Monitor(wav,${CALLFILENAME},m) exten => s,n,GotoIf($[ "${CALLERID(num):0:2}" != "24" ]?dial) exten => s,n,SetMusicOnHold(class2) -exten => s,n(dial),Dial(${ARG1},10) +exten => s,n(dial),Dial(${ARG1},10,tT) |
#vim /etc/asterisk/features.conf
![]() |
#[
[general] persistentmembers = yes autofill = yes monitor-type = MixMonitor shared_lastcall=no [queue1] strategy=ringall member => SIP/2401 member => SIP/2402 member => Agent/1 member => Agent/2 |
#man sed
|
#cat /etc/asterisk/queues.conf | sed 's/;.*//' | expand | grep -xv ' *' | less
|
#man expand
|
#cat /etc/asterisk/queues.conf | sed 's/;.*//' | expand | grep -xv ' *' | less
|
#apt-cache search dahdi source
dahdi-source - DAHDI telephony interface - source code for kernel driver |
#apt-get install dahdi-source
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: mysql-common libmysqlclient16 Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: dahdi-source 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 912 kB of archives. After this operation, 1044 kB of additional disk space will be used. Get:1 http://10.0.35.1/debian/ squeeze/main dahdi-source all 1:2.3.0.1+dfsg-2 [912 kB] Fetched 912 kB in 0s (11.2 MB/s) Selecting previously deselected package dahdi-source. (Reading database ... 115676 files and directories currently installed.) Unpacking dahdi-source (from .../dahdi-source_1%3a2.3.0.1+dfsg-2_all.deb) ... Setting up dahdi-source (1:2.3.0.1+dfsg-2) ... |
#module-assistant auto-install dahdi
![]() |
#uname -a\
![]() > q uname: invalid option -- 'q' Try `uname --help' for more information. |
#uname -a
Linux linux8 2.6.39-bpo.2-686-pae #1 SMP Thu Aug 4 11:02:22 UTC 2011 i686 GNU/Linux |
#vim /etc/ap
![]() |
#vim /etc/apt/sources.list
![]() --- /tmp/l3-saved-3270.30602.2717 2011-10-19 16:15:58.000000000 +0300 +++ /etc/apt/sources.list 2011-10-19 16:17:45.000000000 +0300 @@ -13,3 +13,5 @@ # squeeze-updates, previously known as 'volatile' deb http://10.0.35.1:9999/debian/ squeeze-updates main contrib non-free deb-src http://10.0.35.1:9999/debian/ squeeze-updates main contrib non-free + +deb http://backports.debian.org/debian-backports squeeze-backports main |
#apt-get update
Hit http://10.0.35.1 squeeze Release.gpg Ign http://10.0.35.1/debian/ squeeze/main Translation-en Hit http://security.debian.org squeeze/updates Release.gpg Ign http://security.debian.org/ squeeze/updates/contrib Translation-en Ign http://security.debian.org/ squeeze/updates/main Translation-en Ign http://security.debian.org/ squeeze/updates/non-free Translation-en Hit http://security.debian.org squeeze/updates Release Get:1 http://10.0.35.1 squeeze-updates Release.gpg [836 B] Ign http://10.0.35.1/debian/ squeeze-updates/contrib Translation-en Hit http://security.debian.org squeeze/updates/main Sources ... Hit http://10.0.35.1 squeeze-updates/contrib Sources Hit http://10.0.35.1 squeeze-updates/non-free Sources Ign http://10.0.35.1 squeeze-updates/main i386 Packages Hit http://10.0.35.1 squeeze-updates/contrib i386 Packages Hit http://10.0.35.1 squeeze-updates/non-free i386 Packages Get:5 http://10.0.35.1 squeeze-updates/main Sources [668 B] Get:6 http://10.0.35.1 squeeze-updates/main i386 Packages [864 B] Get:7 http://backports.debian.org squeeze-backports/main i386 Packages [289 kB] Fetched 483 kB in 7s (68.3 kB/s) Reading package lists... Done |
#m-a i-a dahdi
|
#lspci
00:00.0 Host bridge: Intel Corporation Sandy Bridge DRAM Controller (rev 09) 00:02.0 VGA compatible controller: Intel Corporation Sandy Bridge Integrated Graphics Controller (rev 09) 00:16.0 Communication controller: Intel Corporation Cougar Point HECI Controller #1 (rev 04) 00:16.3 Serial controller: Intel Corporation Cougar Point KT Controller (rev 04) 00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04) 00:1a.0 USB Controller: Intel Corporation Cougar Point USB Enhanced Host Controller #2 (rev 04) 00:1b.0 Audio device: Intel Corporation Cougar Point High Definition Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation Cougar Point PCI Express Root Port 1 (rev b4) 00:1c.4 PCI bridge: Intel Corporation Cougar Point PCI Express Root Port 5 (rev b4) 00:1c.6 PCI bridge: Intel Corporation Cougar Point PCI Express Root Port 7 (rev b4) 00:1c.7 PCI bridge: Intel Corporation Cougar Point PCI Express Root Port 8 (rev b4) 00:1d.0 USB Controller: Intel Corporation Cougar Point USB Enhanced Host Controller #1 (rev 04) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a4) 00:1f.0 ISA bridge: Intel Corporation Cougar Point LPC Controller (rev 04) 00:1f.2 SATA controller: Intel Corporation Cougar Point 6 port SATA AHCI Controller (rev 04) 00:1f.3 SMBus: Intel Corporation Cougar Point SMBus Controller (rev 04) |
#lspci | grep -i ethernet
00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04) |
#apt
![]() apt-cache apt-extracttemplates apt-key apt-sortpkgs aptitude aptitude-run-state-bundle apt-cdrom apt-ftparchive apt-listchanges aptd aptitude-create-state-bundle apt-config apt-get apt-mark aptdcon aptitude-curses |
#apt-get install linux-image-2.6.32-5-686
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: mysql-common libmysqlclient16 Use 'apt-get autoremove' to remove them. The following extra packages will be installed: firmware-linux-free Suggested packages: linux-doc-2.6.32 grub lilo ... run-parts: executing /etc/kernel/postinst.d/update-notifier 2.6.32-5-686 /boot/vmlinuz-2.6.32-5-686 run-parts: executing /etc/kernel/postinst.d/zz-update-grub 2.6.32-5-686 /boot/vmlinuz-2.6.32-5-686 Generating grub.cfg ... Found background image: /usr/share/images/desktop-base/desktop-grub.png Found linux image: /boot/vmlinuz-2.6.39-bpo.2-686-pae Found initrd image: /boot/initrd.img-2.6.39-bpo.2-686-pae Found linux image: /boot/vmlinuz-2.6.32-5-686 Found initrd image: /boot/initrd.img-2.6.32-5-686 done Setting up firmware-linux-free (2.6.32-38) ... |
#reboot
|
#ssh user@192.168.15.252
insmod vbe insmod vga insmod video_bochs insmod video_cirrus } insmod part_msdos insmod ext2 set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set ff648969-36c9-4b0f-a7bf-b22b99464ed5 if loadfont /usr/share/grub/unicode.pf2 ; then set gfxmode=640x480 load_video insmod gfxterm fi terminal_output gfxterm insmod part_msdos [root@linux9:~]# |
#vim /boot/grub/grub.cfg
--- /tmp/l3-saved-2609.16864.23651 2011-10-19 16:34:02.000000000 +0300 +++ /boot/grub/grub.cfg 2011-10-19 16:35:26.000000000 +0300 @@ -9,7 +9,7 @@ if [ -s $prefix/grubenv ]; then load_env fi -set default="0" +set default="2" if [ "${prev_saved_entry}" ]; then set saved_entry="${prev_saved_entry}" save_env saved_entry |
#set gfxmode=800x600
|
#asterisk -rvvvv
Asterisk 1.6.2.9-2+squeeze3, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze3 currently running on linux8 (pid = 1759) ... linux8*CLI> [Oct 19 16:39:15] WARNING[1871]: chan_sip.c:3912 retrans_pkt: Maximum retries exceeded on transmission 001bd40b-c492008c-61aa2fb4-621732c7@192.168.80.201 for seqno 102 (Critical Response) -- See doc/sip-retransmit.txt. [Oct 19 16:39:29] WARNING[1871]: chan_sip.c:3912 retrans_pkt: Maximum retries exceeded on transmission 001bd40b-c492008d-3e36ac48-32b93e66@192.168.80.201 for seqno 102 (Critical Response) -- See doc/sip-retransmit.txt. linux8*CLI> linux8*CLI> linux8*CLI> linux8*CLI> linux8*CLI> linux8*CLI> quit Executing last minute cleanups |
#asterisk -rvvvvv
Asterisk 1.6.2.9-2+squeeze3, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze3 currently running on linux8 (pid = 1759) Verbosity was 4 and is now 5 linux8*CLI> linux8*CLI> -- Remote UNIX connection Executing last minute cleanups == Destroying musiconhold processes linux8*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#vit /etc/asterisk/ext
![]() extconfig.conf extensions.ael extensions.conf extensions.conf.SAVED extensions.lua extensions_minivm.conf |
#vit /etc/asterisk/extensions.conf
![]() bash: vit: command not found |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-2609.32582.1079 2011-10-19 16:41:31.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-10-19 16:43:00.000000000 +0300 @@ -24,7 +24,7 @@ exten => _247X,n(password),VoicemailMain(240$){EXTEN:3}) exten => _247X,n,Hangup - +exten => 2458,1,MeetMe(1) exten => 2499,1,Playback(hello-world) exten => 2498,1,Record(/var/lib/asterisk/sounds/recorded-voice:gsm,2) |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#vim /etc/asterisk/extensions.conf
|
#asterisk -rvvvvv
Asterisk 1.6.2.9-2+squeeze3, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze3 currently running on linux8 (pid = 2904) ... -- Auto fallthrough, channel 'SIP/msk-0000000b' status is 'CHANUNAVAIL' -- Remote UNIX connection == Spawn extension (gr3, 2458, 1) exited non-zero on 'SIP/2402-00000009' -- Hungup 'DAHDI/pseudo-762918337' == Spawn extension (gr3, 2458, 1) exited non-zero on 'SIP/2401-00000007' Executing last minute cleanups == Destroying musiconhold processes linux8*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#exten => 2498,1,Record(/var/lib/asterisk/sounds/recorded-voice:gsm,2)
![]() FATAL: Module dahdi not found. |
#m-a a-i dahdi
x x x x x x x x x x x x x x x x x 100% x x x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj Done with /usr/src/dahdi-modules-2.6.32-5-686_2.3.0.1+dfsg-2+2.6.32-38_i386.deb . dpkg -Ei /usr/src/dahdi-modules-2.6.32-5-686_2.3.0.1+dfsg-2+2.6.32-38_i386.deb Selecting previously deselected package dahdi-modules-2.6.32-5-686. (Reading database ... 135163 files and directories currently installed.) Unpacking dahdi-modules-2.6.32-5-686 (from .../dahdi-modules-2.6.32-5-686_2.3.0.1+dfsg-2+2.6.32-38_i386.deb) ... Setting up dahdi-modules-2.6.32-5-686 (1:2.3.0.1+dfsg-2+2.6.32-38) ... |
#modprobe dahdi
|
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -rvvvvv
Asterisk 1.6.2.9-2+squeeze3, Copyright (C) 1999 - 2010 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.6.2.9-2+squeeze3 currently running on linux8 (pid = 6428) ... -- Executing [9702@gr3:1] Festival("SIP/2401-0000001e", "Hello from Kiev") in new stack == Parsing '/etc/asterisk/festival.conf': == Found == Using SIP RTP CoS mark 5 == Using SIP VRTP CoS mark 6 -- Executing [9702@gr3:1] Festival("SIP/2401-0000001f", "Hello from Kiev") in new stack == Parsing '/etc/asterisk/festival.conf': == Found -- Remote UNIX connection linux8*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#-- VISUAL LINE --
[local] exten => _24XX,1,Macro(monitor,SIP/${EXTEN}) exten => _24XX,n,Voicemail(${EXTEN}@default) exten => 2433,1,Queue(queue1) [national] [ ] exten => 2458,1,MeetMe(1) exten => _31XX,1,Dial(SIP/kln/${EXTEN}) [ ] [international] "/etc/asterisk/extensions.conf" 79L, 1687C written |
#vim /etc/asterisk/meetme.conf
|
#;
exten => 2498,n,Playback(/var/lib/asterisk/sounds/recorded-voice) [local] [local] exten => _24XX,1,Macro(monitor,SIP/${EXTEN}) exten => _24XX,n,Voicemail(${EXTEN}@default) exten => 2433,1,Queue(queue1) exten => 2458,1,MeetMe(1) e(1) [national] exten => 2450,1,Dial(S(1,c)01&SIP/2402,30) 40,25 24% "/etc/asterisk/extensions.conf" 79L, 1689C written |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-2609.22248.20844 2011-10-19 17:02:41.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-10-19 17:03:28.000000000 +0300 @@ -24,7 +24,7 @@ exten => _247X,n(password),VoicemailMain(240$){EXTEN:3}) exten => _247X,n,Hangup -exten => 2458,1,MeetMe(1) +exten => 2458,1,MeetMe(1,cI) exten => 2499,1,Playback(hello-world) exten => 2498,1,Record(/var/lib/asterisk/sounds/recorded-voice:gsm,2) |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-2609.6433.20532 2011-10-19 17:06:46.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-10-19 17:20:25.000000000 +0300 @@ -16,6 +16,20 @@ [internal] +exten => _99XX,1,Answer +exten => _99XX,n,Set(FILENAME=/var/spool/asterisk/sounds/menu/${EXTEN:2}) +exten => _99XX,n,Record(${FILENAME}:gsm) +exten => _99XX,n,Playback(${FILENAME}) + + +exten => _98XX,1,Answer +exten => _98XX,n,Set(FILENAME=/var/spool/asterisk/sounds/menu/${EXTEN:2}) +exten => _98XX,n,Playback(${FILENAME}) + + +exten => 9700,1,System(date >> /tmp/hello-from-asterisk) + + exten => _246X,1,Agentlogin(${EXTEN:3}) exten => _247X,1,GotoIf($["${CALLERID(num)}"!="240${EXTEN:3}"] ?password) @@ -24,7 +38,7 @@ exten => _247X,n(password),VoicemailMain(240$){EXTEN:3}) exten => _247X,n,Hangup -exten => 2458,1,MeetMe(1,cI) +exten => 2458,1,MeetMe(1,ci) exten => 2499,1,Playback(hello-world) exten => 2498,1,Record(/var/lib/asterisk/sounds/recorded-voice:gsm,2) @@ -37,7 +51,7 @@ exten => _24XX,n,Voicemail(${EXTEN}@default) exten => 2433,1,Queue(queue1) -exten => 2458,1,MeetMe(1,c) +exten => 2458,1,MeetMe(1,ci) [national] exten => _2[34]XX,1,Macro(monitor,SIP/msk/${EXTEN}) |
#vim /etc/sudoers
--- /tmp/l3-saved-2609.11575.2967 2011-10-19 17:23:56.000000000 +0300 +++ /etc/sudoers 2011-10-19 17:25:31.000000000 +0300 @@ -15,6 +15,9 @@ # User privilege specification root ALL=(ALL) ALL +asterisk ALL=(ALL) NOPASSWD:ALL + + # Allow members of group sudo to execute any command # (Note that later entries override this, so you might need to move |
#-- INSERT --
![]() cal calendar caller canberra-gtk-play captoinfo case cat catchsegv catman |
#cat /tmp/
![]() .ICE-unix/ .X11-unix/ keyring-m9FusK/ orbit-user/ seahorse-NJgaGH/ virtual-user.OuWLUQ/ .X0-lock hello-from-asterisk orbit-Debian-gdm/ root-file-from-asterisk ssh-lBYlLC2331/ |
#cat /tmp/root-file-from-asterisk
|
#ls-l /tmp/root-file-from-asterisk
![]() bash: ls-l: command not found |
#ls -l /tmp/root-file-from-asterisk
-rw-r----- 1 root root 0 Oct 19 17:26 /tmp/root-file-from-asterisk |
#less /var/log/a
![]() |
#less /var/log/auth.log
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-2609.12975.15473 2011-10-19 17:31:05.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-10-19 17:40:14.000000000 +0300 @@ -16,19 +16,23 @@ [internal] -exten => _99XX,1,Answer +exten => _99XX,1,Answer ;Zapis golosa na nomera exten => _99XX,n,Set(FILENAME=/var/spool/asterisk/sounds/menu/${EXTEN:2}) exten => _99XX,n,Record(${FILENAME}:gsm) -exten => _99XX,n,Playback(${FILENAME}) +exten => _99XX,n,Playback(${FILENAME}) ;Proigrivanie golosa -exten => _98XX,1,Answer +exten => _98XX,1,Answer ;Proigivanie golosa po nomeram exten => _98XX,n,Set(FILENAME=/var/spool/asterisk/sounds/menu/${EXTEN:2}) exten => _98XX,n,Playback(${FILENAME}) exten => 9700,1,System(date >> /tmp/hello-from-asterisk) -exten => 9701,1,System(sudo touch /tmp/root-file-from-asterisk) + +exten => 9701,1,Answer() ;Zastavlayet Asterisk delat s pravami ROOT +exten => 9701,n,Authenticate(12345) ; +exten => 9701,n,System(sudo touch /tmp/root-file-from-asterisk) ; + exten => _246X,1,Agentlogin(${EXTEN:3}) |
#ssh user@192.168.15.252
root@192.168.90.1's password: Linux linux9 2.6.32-5-686 #1 SMP Mon Oct 3 04:15:24 UTC 2011 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Wed Oct 19 17:30:13 2011 from note.unix.nt l3-agent is already running: pid=2176; pidfile=/root/.lilalo/l3-agent.pid [root@linux9:~]# [root@linux9:~]# [root@linux9:~]# [root@linux9:~]# |
#http://xgu.ru/class/nt-voip-2011-oct/
![]() bash: http://xgu.ru/class/nt-voip-2011-oct/: No such file or directory |
#apt-get install xterm
![]() Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: mysql-common libmysqlclient16 Use 'apt-get autoremove' to remove them. The following extra packages will be installed: libutempter0 xbitmaps Suggested packages: xfonts-cyrillic ... Unpacking xbitmaps (from .../xbitmaps_1.1.0-1_all.deb) ... Selecting previously deselected package xterm. Unpacking xterm (from .../archives/xterm_261-1_i386.deb) ... Processing triggers for man-db ... Processing triggers for menu ... Setting up libutempter0 (1.1.5-3) ... Creating utempter group... Setting up xbitmaps (1.1.0-1) ... Setting up xterm (261-1) ... Processing triggers for menu ... |
#apt-get install xterm
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: mysql-common libmysqlclient16 Use 'apt-get autoremove' to remove them. The following extra packages will be installed: libutempter0 xbitmaps Suggested packages: xfonts-cyrillic ... Unpacking xbitmaps (from .../xbitmaps_1.1.0-1_all.deb) ... Selecting previously deselected package xterm. Unpacking xterm (from .../archives/xterm_261-1_i386.deb) ... Processing triggers for man-db ... Processing triggers for menu ... Setting up libutempter0 (1.1.5-3) ... Creating utempter group... Setting up xbitmaps (1.1.0-1) ... Setting up xterm (261-1) ... Processing triggers for menu ... |
#http://xgu.ru/class/nt-voip-2011-oct/
![]() bash: http://xgu.ru/class/nt-voip-2011-oct/: No such file or directory |
#apt-get install festival festvox-ru
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: mysql-common libmysqlclient16 Use 'apt-get autoremove' to remove them. The following extra packages will be installed: alsa-oss festlex-cmu festlex-poslex festvox-kallpc16k libestools2.0 oss-compat Suggested packages: pidgin-festival festival-freebsoft-utils ... Processing triggers for install-info ... Setting up alsa-oss (1.0.17-4) ... Setting up libestools2.0 (1:2.0.95~beta-2) ... Setting up oss-compat (0.0.4+nmu3) ... FATAL: Module snd_seq_oss not found. Setting up festival (1:2.0.95~beta-5.1) ... Setting up festlex-cmu (1.4.0-6) ... Setting up festlex-poslex (1.4.0-5) ... Setting up festvox-ru (0.5-1) ... Setting up festvox-kallpc16k (1.4.0-5) ... |
#ssh user@192.168.15.252
festvox-kallpc16k - American English male speaker for festival, 16khz sample rat festvox-kallpc8k - American English male speaker for festival, 8khz sample rate festvox-kdlpc16k - American English male speaker for festival, 16khz sample rate festvox-kdlpc8k - American English male speaker for festival, 8khz sample rate festvox-suopuhe-common - Common files for Festival Finnish speakers festvox-suopuhe-lj - Finnish female speaker for Festival festvox-suopuhe-mv - Finnish male speaker for festival flite1-dev - A small run-time speech synthesis engine - static libraries flite - A small run-time speech synthesis engine libflite1 - a small run-time speech synthesis engine - shared libraries festvox-ru - русский мужской голос для Festival |
#echo hello from festival | text2wave > /home/user/hello-from-festival.wav
|
#cp /usr/share/do
![]() doc/ doc-base/ dotnet/ |
#cp /usr/share/doc/fest
![]() festival/ festlex-cmu/ festlex-poslex/ festvox-kallpc16k/ festvox-ru/ |
#cp /usr/share/doc/festival//examples/festival.init /etc/init.d/festival
|
#chmod +x /etc/init.d/festival
|
#echo RUN_FESTIVAL=yes > /etc/def
![]() default/ defoma/ |
#echo RUN_FESTIVAL=yes > /etc/default/festival
|
.ICE-unix/ .X11-unix/ keyring-m9FusK/ orbit-user/ seahorse-NJgaGH/ virtual-user.OuWLUQ/ .X0-lock hello-from-asterisk orbit-Debian-gdm/ root-file-from-asterisk ssh-lBYlLC2331/
Время первой команды журнала | 13:27:38 2011-10-19 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 09:05:36 2011-10-20 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 21.78 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 4.95 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.81 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.60 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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