/l3/users/mvi/asterisk/linux1.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 |
|
$/usr/local/bin/notify 601
^C |
$/usr/local/bin/notify
^C |
$cat /usr/local/bin/notify
#!/bin/sh export HOME=/var/lib/asterisk /usr/bin/sendxmpp "`grep ^\$1\ /etc/asterisk/notify.conf | awk '{print $2}'`" |
$echo 111 | /usr/local/bin/notify 601
|
$exit
exit |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-10292.2380.11000 2010-03-17 17:11:36.000000000 +0200 +++ /etc/asterisk/extensions.conf 2010-03-17 17:12:38.000000000 +0200 @@ -6,7 +6,7 @@ exten => 4000,n,Hangup exten => _6XX,1,Answer -exten => _6XX,n,System(echo "${CALLERID(all)} звонит" | /usr/local/bin/notify ${EXTEN}) +exten => _6XX,n,System(echo "звонит ${CALLERID(all)}" | /usr/local/bin/notify ${EXTEN}) exten => _6XX,n,Dial(SIP/${EXTEN},30) exten => _6XX,n,GotoIf($["{DIALSTATUS}" == "BUSY"]?busy:unavail) exten => _6XX,n,(busy),Playback(vm-isunavail) |
#whereis sendsmpp
sendsmpp: |
#whereis sendxmpp
sendxmpp: /usr/bin/sendxmpp /usr/share/man/man1/sendxmpp.1.gz |
#vim `which sendxmpp`
--- /tmp/l3-saved-10292.5060.17162 2010-03-17 17:13:21.000000000 +0200 +++ /usr/bin/sendxmpp 2010-03-17 17:14:04.000000000 +0200 @@ -370,12 +370,12 @@ # # xmpp_send_message: send a message to some xmpp user # input: connection,recipient,subject,msg -# +#Тут меняли тип сообщения с message на chat---------------------------------<<<<<<<<<<<<<<<<<<<<<<<<< sub xmpp_send_message ($$$$$$) { my ($cnx,$rcpt,$comp,$subject,$headline,$msg) = @_; - my $type = 'message'; + my $type = 'chat'; if ($headline) { $type='headline'; } |
#vim /etc/passwd
--- /tmp/l3-saved-10292.26852.10323 2010-03-17 17:15:16.000000000 +0200 +++ /etc/passwd 2010-03-17 17:15:26.000000000 +0200 @@ -21,7 +21,7 @@ statd:x:102:65534::/var/lib/nfs:/bin/false user:x:1000:1000:User,,,:/home/user:/bin/bash sshd:x:103:65534::/var/run/sshd:/usr/sbin/nologin -asterisk:x:104:106:Asterisk PBX daemon,,,:/var/lib/asterisk:/bin/sh +asterisk:x:104:106:Asterisk PBX daemon,,,:/var/lib/asterisk:/bin/false messagebus:x:105:107::/var/run/dbus:/bin/false bind:x:106:108::/var/cache/bind:/bin/false smmta:x:107:109:Mail Transfer Agent,,,:/var/lib/sendmail:/bin/false |
#!/bin/sh
|
#601 mvi@linux1.unix.nt
|
#[ ]
type=friend context=world regexten=602 ; When they register, create extension 1234 username=602 secret=602 callerid="X-Lite" <602> [602]dynamic ; This device needs to register [602] ;nat=yes ; X-Lite is behind a NAT router ;canreinvite=no ; Typically set to NO if behind NAT ... allow=gsm allow=ulaw allow=alaw [khm] [khm] context=company ;defaultip=192.168.15.2 ;regexten=khm username=odessa type=peer ;входящий 69,1 20% |
#exten => 4000,1,Answer
register => odessa:pass@192.168.15.2/khm register => odessa:pass@192.168.16.3/khr register => odessa:pass@192.168.17.4/kv ;register => nt:pass@212.26.146.51/nt [601] context=company type=friend regexten=601 ; When they register, create extension 1234 username=601 secret=601 ... allow=ulaw allow=alaw ;mailbox=1234@default,1233@default ; Subscribe to status of multiple mailboxes [602] -----====== на хмельницк ======-------- [602] [khm] [khm] ;context=company ;defaultip=192.168.15.2 type=user ;входящий 50,1 3% |
#; -----====== на хмельницк ======--------
include => localxtensions.conf" 50L, 1493C exten => _2XX,1,Answer ;------------- exten => _2XX,n,Set(Cm(LERID"звонит ${CALLERID(all)}" | /usr/local/bin/notify ${EXTEN}) exten => _2XX,n,Dial(SIP/khm/${EXTEN},30) ; хмель exten => _2XX,n,Playba()(vm-isunavail) ;------------- {EXTEN} () () exten => _3XX,1,Answer ;------------- exten => _3XX,n,Set(CALLERID(name)="${CALLERID(name)}(ODESSA)") ; [ ] [xten =>]_3XX,n,Dial(SIP/khr/${EXTEN},30) ; харьков exten => _3XX,n,Playback(vm-isunavail) ;------------- exten => _2XX,n,Set(CALLERID(name)="${CALLERID(name)}(ODESSA)") ; exten => _4XX,1,Answer ;------------- exten => _4XX,n,Set(CALLERID(name)="${CALLERID(name)}(ODESSA)") ; exten => _4XX,n,Dit((SIP/kv/${EXTEN},30) ) ; киев [world] include => local include => company "/etc/asterisk/extensions.conf" 50L, 1493C written |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-10292.20802.30478 2010-03-17 17:38:37.000000000 +0200 +++ /etc/asterisk/extensions.conf 2010-03-17 17:46:07.000000000 +0200 @@ -6,7 +6,8 @@ exten => 4000,n,Hangup exten => _6XX,1,Answer -exten => _6XX,n,System(echo "звонит ${CALLERID(all)}" | /usr/local/bin/notify ${EXTEN}) +exten => _6XX,n,Set(ENV(CALLERID)=${CALLERID(all)}) +exten => _6XX,n,System(/usr/local/bin/notify ${EXTEN}) exten => _6XX,n,Dial(SIP/${EXTEN},30) exten => _6XX,n,GotoIf($["{DIALSTATUS}" == "BUSY"]?busy:unavail) exten => _6XX,n,(busy),Playback(vm-isunavail) |
#vim /usr/local/bin/notify
|
#lspci
00:00.0 Host bridge: Intel Corporation 82Q35 Express DRAM Controller (rev 02) 00:02.0 VGA compatible controller: Intel Corporation 82Q35 Express Integrated Graphics Controller (rev 02) 00:03.0 Communication controller: Intel Corporation 82Q35 Express MEI Controller (rev 02) 00:03.2 IDE interface: Intel Corporation 82Q35 Express PT IDER Controller (rev 02) 00:03.3 Serial controller: Intel Corporation 82Q35 Express Serial KT Controller (rev 02) 00:19.0 Ethernet controller: Intel Corporation 82566DM-2 Gigabit Network Connection (rev 02) 00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 02) 00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 02) 00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 02) 00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02) 00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 02) 00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 (rev 02) 00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 02) 00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 02) 00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 02) 00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 02) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92) 00:1f.0 ISA bridge: Intel Corporation 82801IO (ICH9DO) LPC Interface Controller (rev 02) 00:1f.2 RAID bus controller: Intel Corporation 82801 SATA RAID Controller (rev 02) 30:00.0 PCI bridge: Texas Instruments XIO2000(A)/XIO2200(A) PCI Express-to-PCI Bridge (rev 03) 31:08.0 Communication controller: Digium, Inc. Device 0220 (rev 02) |
#vim /etc/asterisk/extensions.conf
|
#~
exten => 4000,n,Wait(1) exten => 4000,n,PlayBack(demo-thanks) exten => 4000,n,Hangup exten => _6XX,1,Answer exten => _6XX,n,Set(ENV(CALLERID)=${CALLERID(all)}) exten => _6XX,n,System(/usr/local/bin/notify ${EXTEN}) ;пример как отрезать exten => _6XX,n,Dial(SIP/${EXTEN},30) ;цифры ;exten => _6662XX,n,Dial(SIP/khm/${EXTEN:3},30) exten => _6XX,n,GotoIf($["{DIALSTATUS}" == "BUSY"]?busy:unavail) ... exten => _3XX,n,Set(CALLERID(name)="${CALLERID(name)}(ODESSA)") ; харьков exten => _3XX,n,Dial(SIP/khr/${EXTEN},30) ;------------- exten => _3XX,n,Playback(vm-isunavail) ;------------- ;exten => _6662XX,1,Answer ; exten => _4XX,n,Set(CALLERID(name)="${CALLERID(name)}(ODESSA)") ; киев exten => _4XX,n,Dial(SIP/kv/${EXTEN},30) [world] include => localxtensions.conf" 51L, 1506C include => company |
#[local]> _380XXXXXXXXX,1,Answer
context=default ; Default context for incoming calls allowoverlap=no ; Disable overlap dialing support. (Default is yes) bindport=5060 ; UDP Port to bind to (SIP standard port is 5060) bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all) srvlookup=yes ; Enable DNS SRV lookups on outbound calls register => odessa:pass@192.168.15.2/khm register => odessa:pass@192.168.16.3/khr register => odessa:pass@192.168.17.4/kv ;register => nt:pass@212.26.146.51/nt [601] ... context=company ;defaultip=192.168.15.2 ;regexten=khm username=odessa secret=pass ;callerid="ХмелÑниÑкий" host=dynamic ;nat=yes ;canreinvite=no 91,1 34% |
#ping ya.ru
PING ya.ru (213.180.204.8) 56(84) bytes of data. 64 bytes from ya.ru (213.180.204.8): icmp_seq=1 ttl=49 time=49.4 ms 64 bytes from ya.ru (213.180.204.8): icmp_seq=2 ttl=49 time=49.6 ms 64 bytes from ya.ru (213.180.204.8): icmp_seq=3 ttl=49 time=49.0 ms ^C --- ya.ru ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2006ms rtt min/avg/max/mdev = 49.000/49.383/49.675/0.282 ms |
#lspci
00:00.0 Host bridge: Intel Corporation 82Q35 Express DRAM Controller (rev 02) 00:02.0 VGA compatible controller: Intel Corporation 82Q35 Express Integrated Graphics Controller (rev 02) 00:03.0 Communication controller: Intel Corporation 82Q35 Express MEI Controller (rev 02) 00:03.2 IDE interface: Intel Corporation 82Q35 Express PT IDER Controller (rev 02) 00:03.3 Serial controller: Intel Corporation 82Q35 Express Serial KT Controller (rev 02) 00:19.0 Ethernet controller: Intel Corporation 82566DM-2 Gigabit Network Connection (rev 02) 00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 02) 00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 02) 00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 02) 00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02) 00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 02) 00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 (rev 02) 00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 02) 00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 02) 00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 02) 00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 02) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92) 00:1f.0 ISA bridge: Intel Corporation 82801IO (ICH9DO) LPC Interface Controller (rev 02) 00:1f.2 RAID bus controller: Intel Corporation 82801 SATA RAID Controller (rev 02) 30:00.0 PCI bridge: Texas Instruments XIO2000(A)/XIO2200(A) PCI Express-to-PCI Bridge (rev 03) 31:08.0 Communication controller: Digium, Inc. Device 0220 (rev 02) |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-2570.28539.32068 2010-03-18 09:45:30.000000000 +0200 +++ /etc/asterisk/sip.conf 2010-03-18 09:49:54.000000000 +0200 @@ -60,21 +60,21 @@ allow=ulaw allow=alaw -[khm] -type=user ;туда-сюда -;context=company -;defaultip=192.168.15.2 -;regexten=khm -username=khm -secret=pass -;callerid="Хмельницкий" -host=dynamic -;nat=yes -;canreinvite=no -disallow=all -allow=gsm -allow=ulaw -allow=alaw +;[khm] +;type=user ;туда-сюда +;;context=company +;;defaultip=192.168.15.2 +;;regexten=khm +;username=khm +;secret=pass +;;callerid="Хмельницкий" +;host=dynamic +;;nat=yes +;;canreinvite=no +;disallow=all +;allow=gsm +;allow=ulaw +;allow=alaw |
#ssh 192.168.15.2
root@192.168.15.2's password: Linux linux2 2.6.26-2-686 #1 SMP Tue Mar 9 17:35:51 UTC 2010 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: Thu Mar 18 09:49:27 2010 from linux8.unix.nt l3-agent is already running: pid=3097; pidfile=/root/.lilalo/l3-agent.pid |
#screen -x
|
#lspci
00:00.0 Host bridge: Intel Corporation 82Q35 Express DRAM Controller (rev 02) 00:02.0 VGA compatible controller: Intel Corporation 82Q35 Express Integrated Graphics Controller (rev 02) 00:03.0 Communication controller: Intel Corporation 82Q35 Express MEI Controller (rev 02) 00:03.2 IDE interface: Intel Corporation 82Q35 Express PT IDER Controller (rev 02) 00:03.3 Serial controller: Intel Corporation 82Q35 Express Serial KT Controller (rev 02) 00:19.0 Ethernet controller: Intel Corporation 82566DM-2 Gigabit Network Connection (rev 02) 00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 02) 00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 02) 00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 02) 00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02) 00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 02) 00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 (rev 02) 00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 02) 00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 02) 00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 02) 00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 02) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92) 00:1f.0 ISA bridge: Intel Corporation 82801IO (ICH9DO) LPC Interface Controller (rev 02) 00:1f.2 RAID bus controller: Intel Corporation 82801 SATA RAID Controller (rev 02) 30:00.0 PCI bridge: Texas Instruments XIO2000(A)/XIO2200(A) PCI Express-to-PCI Bridge (rev 03) 31:08.0 Communication controller: Digium, Inc. Device 0220 (rev 02) |
#apt-cache search vim
bicyclerepair - A refactoring tool for python cernlib-base - CERNLIB data analysis suite - common files colordiff - tool to colorize 'diff' output cream - VIM macros that make the VIM easier to use for beginners editmoin - edit MoinMoin wiki pages with your favourite editor elvis-tiny - Tiny vi compatible editor for the base system exuberant-ctags - build tag file indexes of source code definitions global - Source code search and browse tools gramadoir - Irish language grammar checker (integration scripts) gspca-source - source for the gspca v4l kernel module ... vim-ruby - Vi IMproved - enhanced vi editor (transitional package) vim-runtime - Vi IMproved - Runtime files vim-tcl - Vi IMproved - enhanced vi editor (transitional package) vim-tiny - Vi IMproved - enhanced vi editor - compact version vim - Vi IMproved - enhanced vi editor vimhelp-de - Vi IMproved - Documentation files (German translation) vim-vimoutliner - script for building an outline editor on top of Vim iceweasel-vimperator - Iceweasel extension to make it have vim look and feel zope-externaleditor - Zope External Editor zopeedit - Helper Application for Zope External Editor |
#apt-get install vim-full
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: aspell aspell-en esound-clients esound-common fam gnome-keyring gnome-mime-data gnome-mount hal hal-info libart-2.0-2 libaspell15 libaudiofile0 libbonobo2-0 libbonobo2-common libbonoboui2-0 libbonoboui2-common libdirectfb-extra libeel2-2.20 libeel2-data libenchant1c2a libesd0 libfam0 libgail-common libgail18 libglade2-0 libgnome-keyring0 libgnome-menu2 libgnome2-0 libgnome2-common libgnomecanvas2-0 libgnomecanvas2-common libgnomeui-0 libgnomeui-common libgnomevfs2-0 libgnomevfs2-common libgnomevfs2-extra libhal-storage1 libhunspell-1.2-0 liblzo2-2 libmalaga7 libnautilus-extension1 libnotify1 libpam-gnome-keyring libsexy2 libsmbclient libsmbios-bin libsmbios2 libsplashy1 libstartup-notification0 ... notification-daemon: no process killed Setting up radeontool (1.5-5) ... Setting up uswsusp (0.7-1.2) ... update-initramfs: deferring update (trigger activated) Setting up vbetool (1.0-3) ... Setting up vim-gui-common (1:7.1.314-3+lenny2) ... Setting up vim-gnome (1:7.1.314-3+lenny2) ... Setting up vim-full (1:7.1.314-3+lenny2) ... Processing triggers for initramfs-tools ... update-initramfs: Generating /boot/initrd.img-2.6.26-2-686 |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-2570.19111.27025 2010-03-18 09:56:22.000000000 +0200 +++ /etc/asterisk/extensions.conf 2010-03-18 09:59:11.000000000 +0200 @@ -5,6 +5,11 @@ exten => 4000,n,PlayBack(demo-thanks) exten => 4000,n,Hangup +exten => _41XX,1,Answer +exten => _41XX,n,Wait(1) +exten => _41XX,n,Record(/tmp/mess${EXTEN:2}:gsm,2) +exten => _41XX,n,Playback(/tmp/mess${EXTEN:2}:gsm) + exten => _6XX,1,Answer exten => _6XX,n,Set(ENV(CALLERID)=${CALLERID(all)}) exten => _6XX,n,System(/usr/local/bin/notify ${EXTEN}) |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-7611.19670.19059 2010-03-18 10:00:25.000000000 +0200 +++ /etc/asterisk/extensions.conf 2010-03-18 10:00:35.000000000 +0200 @@ -8,7 +8,7 @@ exten => _41XX,1,Answer exten => _41XX,n,Wait(1) exten => _41XX,n,Record(/tmp/mess${EXTEN:2}:gsm,2) -exten => _41XX,n,Playback(/tmp/mess${EXTEN:2}:gsm) +exten => _41XX,n,Playback(/tmp/mess${EXTEN:2}) exten => _6XX,1,Answer exten => _6XX,n,Set(ENV(CALLERID)=${CALLERID(all)}) |
#asterisk -vvvr
Asterisk 1.4.21.2~dfsg-3+lenny1, Copyright (C) 1999 - 2008 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. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... -- Called 601 -- SIP/601-081f0028 is ringing -- SIP/601-081f0028 answered SIP/602-081eea98 [Mar 18 12:18:58] WARNING[15957]: res_musiconhold.c:660 get_mohbyname: Music on Hold class 'default' not found [Mar 18 12:18:58] WARNING[15957]: res_musiconhold.c:660 get_mohbyname: Music on Hold class 'default' not found [Mar 18 12:19:08] NOTICE[15957]: rtp.c:1285 ast_rtp_read: Unknown RTP codec 126 received from '0.0.0.0' == Spawn extension (world, 601, 6) exited non-zero on 'SIP/602-081eea98' [Mar 18 12:19:08] NOTICE[15957]: res_monitor.c:339 ast_monitor_stop: monitor executing ( nice -n 19 sox -m "/tmp/601-2010-03-18-12:18:53-in.wav" "/tmp/601-2010-03-18-12:18:53-out.wav" "/tmp/601-2010-03-18-12:18:53.wav" && rm -f "/tmp/601-2010-03-18-12:18:53-"* ) & -- Remote UNIX connection linux1*CLI> Terminated |
#ls -l /tmp/mess88.gsm
-rw-r----- 1 asterisk asterisk 16401 2010-03-18 10:00 /tmp/mess88.gsm |
#~
[local] exten => 4000,1,Answer exten => 4000,n,Wait(1) exten => 4000,n,PlayBack(demo-thanks) exten => 4000,n,Hangup exten => _41XX,1,Answer exten => _41XX,n,Wait(1) exten => _41XX,n,Record(/tmp/mess${EXTEN:2}:gsm,2) exten => _41XX,n,Playback(/tmp/mess${EXTEN:2}) exten => _6XX,1,Answer ... exten => _2XX,n,Set(CALLERID(name)="${CALLERID(name)}(ODESSA)") ; exten => _2XX,n,Dial(SIP/khm/${EXTEN},30) ; хмель exten => _2XX,n,Playback(vm-isunavail) ;------------- "/etc/asterisk/extensions.conf" 57L, 1680C written 28,0-1 Top exten => _3XX,n,Set(CALLERID(name)="${CALLERID(name)}(ODESSA)") ; exten => _3XX,n,Dial(SIP/khr/${EXTEN},30) ; харьков exten => _3XX,n,Playback(vm-isunavail) ;------------- exten => _4XX,1,Answer ;------------- exten => _4XX,n,Set(CALLERID(name)="${CALLERID(name)}(ODESSA)") ; exten => _4XX,n,Dial(SIP/kv/${EXTEN},30) ; киев |
#[ ]
[nat=yes] ; X-Lite is behind a NAT router ;canreinvite=no ; Typically set to NO if behind NAT disallow=allsk/sip.conf" 174L, 3361C allow=gsm ; GSM consumes far less bandwidth than ulaw allow=ulaw allow=alaw [601] [601] type=friend context=world ... callerid="X-Lite" <602> host=dynamic ; This device needs to register ;nat=yes ; X-Lite is behind a NAT router ;canreinvite=no ; Typically set to NO if behind NAT disallow=all allow=gsm ; GSM consumes far less bandwidth than ulaw allow=ulaw allow=alaw ;mailbox=1234@default,1233@default ; Subscribe to status of multiple mailboxes ; -----====== на хмельницк ======-------- 28,0-1 Top |
#[602]
[local] exten => 4000,1,Answer exten => 4000,n,Wait(1) exten => 4000,n,PlayBack(demo-thanks) exten => 4000,n,Hangup exten => _41XX,1,Answer "/etc/asterisk/extensions.conf" 57L, 1680C [local]> _41XX,n,Wait(1) exten => _41XX,n,Record(/tmp/mess${EXTEN:2}:gsm,2) exten => _41XX,n,Playback(/tmp/mess${EXTEN:2}) ... exten => _2XX,n,Set(CALLERID(name)="${CALLERID(name)}(ODESSA)") ; exten => _2XX,n,Dial(SIP/khm/${EXTEN},30) ; хмель exten => _2XX,n,Playback(vm-isunavail) ;------------- exten => _3XX,1,Answer ;------------- exten => _3XX,n,Set(CALLERID(name)="${CALLERID(name)}(ODESSA)") ; exten => _3XX,n,Dial(SIP/khr/${EXTEN},30) ; харьков exten => _3XX,n,Playback(vm-isunavail) ;------------- exten => _4XX,1,Answer ;------------- exten => _4XX,n,Set(CALLERID(name)="${CALLERID(name)}(ODESSA)") ; exten => _4XX,n,Dial(SIP/kv/${EXTEN},30) ; киев |
#exten => 4000,n,Hangup
;canreinvite=no ; Typically set to NO if behind NAT disallow=allsk/sip.conf" 174L, 3361C allow=gsm ; GSM consumes far less bandwidth than ulaw allow=ulaw allow=alaw [601] [601] type=friend context=world regexten=602 ; When they register, create extension 1234 ... [602]dynamic ; This device needs to register [602] ;nat=yes ; X-Lite is behind a NAT router ;canreinvite=no ; Typically set to NO if behind NAT disallow=all allow=gsm ; GSM consumes far less bandwidth than ulaw allow=ulaw allow=alaw mailbox=602 ; Subscribe to status of multiple mailboxes "/etc/asterisk/sip.conf" 175L, 3352C written |
#vim /etc/asterisk/sip.conf
|
#apt-cache search mpg321
cplay - A front-end for various audio players irmp3 - A Multimedia Audio Jukebox application mpg321 - mpg123 clone that doesn't use floating point mserv - local centralised multiuser music server pytone - Music jukebox with advanced features for DJs and a text-mode user interface |
#apt-cache search mpg123
juice - playlist editor / player frontend mpg123-el - a front-end program to mpg123 audio player on Emacsen libmpg123-0 - MPEG layer 1/2/3 audio decoder -- runtime library libmpg123-dev - MPEG layer 1/2/3 audio decoder -- development files mpg123-alsa - MPEG layer 1/2/3 audio player with ALSA support - dummy package mpg123-esd - MPEG layer 1/2/3 audio player with Esound support - dummy package mpg123-nas - MPEG layer 1/2/3 audio player with NAS support - dummy package mpg123-oss-3dnow - MPEG layer 1/2/3 audio player for 3DNow! machines - dummy package mpg123-oss-i486 - MPEG layer 1/2/3 audio player for i486 machines - dummy package mpg123 - MPEG layer 1/2/3 audio player mpg321 - mpg123 clone that doesn't use floating point mserv - local centralised multiuser music server music123 - A command-line shell for sound-file players playmp3list - Another front-end to mpg123 with theme support somaplayer - player audio for the soma suite |
#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: libartsc0 libjack0 libpulse0 The following NEW packages will be installed: libmpg123-0 mpg123 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. ... Get:2 http://ftp.ua.debian.org lenny/main mpg123 1.4.3-4 [130kB] Fetched 476kB in 0s (865kB/s) Selecting previously deselected package libmpg123-0. (Reading database ... 37115 files and directories currently installed.) Unpacking libmpg123-0 (from .../libmpg123-0_1.4.3-4_i386.deb) ... Selecting previously deselected package mpg123. Unpacking mpg123 (from .../mpg123_1.4.3-4_i386.deb) ... Processing triggers for man-db ... Setting up libmpg123-0 (1.4.3-4) ... Setting up mpg123 (1.4.3-4) ... |
#mpg123 /tmp/
601-NaVM.wav l3-saved-7611.14240.9939 mess55.gsm .X11-unix/ .ICE-unix/ mess01.gsm mess88.gsm |
#mpg123 /tmp/
601-NaVM.wav l3-saved-7611.14240.9939 mess55.gsm .X11-unix/ .ICE-unix/ mess01.gsm mess88.gsm |
#mpg123 /tmp/601-NaVM.wav
[module.c:110] error: Failed to open module alsa: file not found [module.c:110] error: Failed to open module oss: file not found [module.c:110] error: Failed to open module esd: file not found [module.c:110] error: Failed to open module jack: file not found [module.c:110] error: Failed to open module pulse: file not found [module.c:110] error: Failed to open module nas: file not found [module.c:110] error: Failed to open module arts: file not found [audio.c:179] error: Unable to find a working output module in this list: alsa,oss,esd,jack,pulse,nas,arts [audio.c:463] error: Failed to open audio output module [mpg123.c:757] error: Failed to initialize output, goodbye. |
#lspci
00:00.0 Host bridge: Intel Corporation 82Q35 Express DRAM Controller (rev 02) 00:02.0 VGA compatible controller: Intel Corporation 82Q35 Express Integrated Graphics Controller (rev 02) 00:03.0 Communication controller: Intel Corporation 82Q35 Express MEI Controller (rev 02) 00:03.2 IDE interface: Intel Corporation 82Q35 Express PT IDER Controller (rev 02) 00:03.3 Serial controller: Intel Corporation 82Q35 Express Serial KT Controller (rev 02) 00:19.0 Ethernet controller: Intel Corporation 82566DM-2 Gigabit Network Connection (rev 02) 00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 02) 00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 02) 00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 02) 00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02) 00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 02) 00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 (rev 02) 00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 02) 00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 02) 00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 02) 00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 02) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92) 00:1f.0 ISA bridge: Intel Corporation 82801IO (ICH9DO) LPC Interface Controller (rev 02) 00:1f.2 RAID bus controller: Intel Corporation 82801 SATA RAID Controller (rev 02) 30:00.0 PCI bridge: Texas Instruments XIO2000(A)/XIO2200(A) PCI Express-to-PCI Bridge (rev 03) 31:08.0 Communication controller: Digium, Inc. Device 0220 (rev 02) |
#apt-cache search alsa
2vcard - perl script to convert an addressbook to VCARD file format aconnectgui - graphical ALSA sequencer connection manager alsa-base - ALSA driver configuration files alsa-source - ALSA driver sources linux-sound-base - base package for ALSA and OSS sound systems lib64asound2-dev - ALSA library development files (64 bit) lib64asound2 - ALSA library (64 bit) libasound2-dev - ALSA library development files libasound2-doc - ALSA library developer documentation libasound2 - ALSA library ... vdr-plugin-bitstreamout - Plugin for VDR to play AC3 sound over a sound card vkeybd - Virtual MIDI Keyboard libwine-alsa - Windows API implementation - ALSA sound module xfce4-mixer-alsa - Xfce4 Mixer ALSA backend xmms2-plugin-alsa - XMMS2 - ALSA output yate-alsa - ALSA module for yate liby-dev - Y Sound Server Library Header Files liby2-14 - Y Sound Server Library yiff-server - Y Sound Server vlc-plugin-alsa - dummy transitional package |
#apt-cache search lso
a2ps - GNU a2ps - 'Anything to PostScript' converter and pretty-printer liba52-0.7.4-dev - library for decoding ATSC A/52 streams (development) liba52-0.7.4 - library for decoding ATSC A/52 streams abakus - calculator for KDE abcde - A Better CD Encoder abcmidi-yaps - yet another ABC to PostScript converter abcmidi - converter from ABC to MIDI format and back abinit-doc - A package for electronic structure calculations abinit - A package for electronic structure calculations abiword - efficient, featureful word processor with collaboration ... delo - The DECstation boot loader denyhosts - a utility to help sys admins thwart ssh crackers r-cran-design - GNU R regression modeling strategies tools by Frank Harrell desktop-profiles - framework for setting up desktop profiles detox - utility to replace problematic characters in filenames devhelp-common - common files for devhelp and its library devhelp - A GNOME developers help program libdevil-dev - Cross-platform image loading and manipulation toolkit devscripts - scripts to make the life of a Debian Package maintainer easier dfsbuild - Build Debian From Scrat^C |
#apt-cache search lsas
|
#apt-cache search sound
abuse-frabs - levels and graphics for Abuse abuse-lib - original levels for Abuse acfax - Receive faxes using your radio and sound card adplug-utils - free AdLib sound library (utils) libadplug-dev - free AdLib sound library (development) libadplug0c2a - free AdLib sound library alarm-clock - Alarm Clock for GNOME Desktop liballegro4.2-plugin-arts - aRts audio plugin for the Allegro library liballegro4.2-plugin-esd - esd audio plugin for the Allegro library liballegro4.2-plugin-jack - JACK audio plugin for the Allegro library ... yatm - Command line audio file player with time stretching capabilities liby-dev - Y Sound Server Library Header Files liby2-14 - Y Sound Server Library yiff-server - Y Sound Server zblast-data - sound files for zblast game zblast-svgalib - svgalib version of zblast, shoot 'em up space game zblast-x11 - X11 version of zblast, shoot 'em up space game zynaddsubfx - Realtime software synthesizer for Linux python2.4 - An interactive high-level object-oriented language (version 2.4) python2.5 - An interactive high-level object-oriented language (version 2.5) |
#apt-cache search alsa-mixer
|
#apt-cache search alsa
2vcard - perl script to convert an addressbook to VCARD file format aconnectgui - graphical ALSA sequencer connection manager alsa-base - ALSA driver configuration files alsa-source - ALSA driver sources linux-sound-base - base package for ALSA and OSS sound systems lib64asound2-dev - ALSA library development files (64 bit) lib64asound2 - ALSA library (64 bit) libasound2-dev - ALSA library development files libasound2-doc - ALSA library developer documentation libasound2 - ALSA library ... vdr-plugin-bitstreamout - Plugin for VDR to play AC3 sound over a sound card vkeybd - Virtual MIDI Keyboard libwine-alsa - Windows API implementation - ALSA sound module xfce4-mixer-alsa - Xfce4 Mixer ALSA backend xmms2-plugin-alsa - XMMS2 - ALSA output yate-alsa - ALSA module for yate liby-dev - Y Sound Server Library Header Files liby2-14 - Y Sound Server Library yiff-server - Y Sound Server vlc-plugin-alsa - dummy transitional package |
#apt-cache search alsa
2vcard - perl script to convert an addressbook to VCARD file format aconnectgui - graphical ALSA sequencer connection manager alsa-base - ALSA driver configuration files alsa-source - ALSA driver sources linux-sound-base - base package for ALSA and OSS sound systems lib64asound2-dev - ALSA library development files (64 bit) lib64asound2 - ALSA library (64 bit) libasound2-dev - ALSA library development files libasound2-doc - ALSA library developer documentation libasound2 - ALSA library ... vdr-plugin-bitstreamout - Plugin for VDR to play AC3 sound over a sound card vkeybd - Virtual MIDI Keyboard libwine-alsa - Windows API implementation - ALSA sound module xfce4-mixer-alsa - Xfce4 Mixer ALSA backend xmms2-plugin-alsa - XMMS2 - ALSA output yate-alsa - ALSA module for yate liby-dev - Y Sound Server Library Header Files liby2-14 - Y Sound Server Library yiff-server - Y Sound Server vlc-plugin-alsa - dummy transitional package |
#apt-cache search alsa | less
|
#apt-get install alsa
Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting alsa-base instead of alsa The following extra packages will be installed: alsa-base alsa-utils linux-sound-base Suggested packages: apmd alsa-oss The following NEW packages will be installed: alsa-base alsa-utils linux-sound-base ... (Reading database ... 37163 files and directories currently installed.) Unpacking linux-sound-base (from .../linux-sound-base_1.0.17.dfsg-4_all.deb) ... Selecting previously deselected package alsa-base. Unpacking alsa-base (from .../alsa-base_1.0.17.dfsg-4_all.deb) ... Selecting previously deselected package alsa-utils. Unpacking alsa-utils (from .../alsa-utils_1.0.16-2_i386.deb) ... Processing triggers for man-db ... Setting up linux-sound-base (1.0.17.dfsg-4) ... Setting up alsa-base (1.0.17.dfsg-4) ... Setting up alsa-utils (1.0.16-2) ... |
#alsa
alsa alsaconf alsactl alsamixer |
#alsamixer
|
#mpg123 /tmp/601-NaVM.wav
[module.c:110] error: Failed to open module alsa: file not found [module.c:110] error: Failed to open module oss: file not found [module.c:110] error: Failed to open module esd: file not found [module.c:110] error: Failed to open module jack: file not found [module.c:110] error: Failed to open module pulse: file not found [module.c:110] error: Failed to open module nas: file not found [module.c:110] error: Failed to open module arts: file not found [audio.c:179] error: Unable to find a working output module in this list: alsa,oss,esd,jack,pulse,nas,arts [audio.c:463] error: Failed to open audio output module [mpg123.c:757] error: Failed to initialize output, goodbye. |
#ls -l /tmp/
total 552 -rw-rw---- 1 asterisk asterisk 347884 2010-03-18 10:23 601-NaVM.wav -rw-rw---- 1 asterisk asterisk 143084 2010-03-18 10:29 601-Thu Mar 18 10:29:35 2010.wav -rw-r--r-- 1 root root 1680 2010-03-18 10:16 l3-saved-7611.14240.9939 -rw-r----- 1 asterisk asterisk 21021 2010-03-18 10:00 mess01.gsm -rw-r----- 1 asterisk asterisk 14421 2010-03-18 10:02 mess55.gsm -rw-r----- 1 asterisk asterisk 16401 2010-03-18 10:00 mess88.gsm |
#apt-get install festival
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: festlex-cmu festlex-poslex festvox-kallpc16k libestools1.2 sgml-base Suggested packages: festival-freebsoft-utils festival-gaim pidgin-festival sgml-base-doc The following NEW packages will be installed: festival festlex-cmu festlex-poslex festvox-kallpc16k libestools1.2 sgml-base 0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded. ... Unpacking festlex-poslex (from .../festlex-poslex_1.4.0-5_all.deb) ... Selecting previously deselected package festvox-kallpc16k. Unpacking festvox-kallpc16k (from .../festvox-kallpc16k_1.4.0-5_all.deb) ... Processing triggers for man-db ... Setting up libestools1.2 (1:1.2.96~beta-2) ... Setting up sgml-base (1.26) ... Setting up festival (1.96~beta-7) ... Setting up festlex-cmu (1.4.0-6) ... Setting up festlex-poslex (1.4.0-5) ... Setting up festvox-kallpc16k (1.4.0-5) ... |
#exten => _4XX,1,Answer ;-------------
-rw-r----- 1 asterisk asterisk 929 2009-12-14 21:08 /etc/asterisk/festival.conf |
#whereis festival
festival: /usr/bin/festival /usr/lib/festival /usr/share/festival /usr/share/man/man1/festival.1.gz |
#/usr/share/festival/
dicts/ voices/ |
#find / -name festival
/usr/bin/festival /usr/share/sgml/festival /usr/share/doc/festival /usr/share/festival /usr/share/lintian/overrides/festival /usr/lib/festival ^C |
#/usr/share/doc/fest
festival/ festlex-cmu/ festlex-poslex/ festvox-kallpc16k/ |
#/usr/share/doc/festival/examples/
benchmark songs/ text2pos |
#/usr/share/doc/festival/examples/
benchmark songs/ text2pos |
#/usr/share/doc/festival/examples/
benchmark songs/ text2pos |
#cp /usr/share/doc/festival/examples/festival.init /etc/init.d/festival
|
#scp 192.168.15.2:/etc/festival.scm /etc/festival.scm
root@192.168.15.2's password: festival.scm 100% 1460 1.4KB/s 00:00 |
#cat /etc/festival.scm
;; WARNING: It is inherently insecure to run a festival instance as a ;; server, mainly because it exposes the whole system to exploits which ;; can be easily used by attackers to gain access to your ;; computer. This is because of the inherent design of the festival ;; server. Please use it only in a situation where you are sure that ;; you will not be subjected to such an attack, or have adequate ;; security precautions. ;; This file has been provided as an example file for your use, should ;; you wish to run festival as a server. ; Maximum number of clients on the server ... ; Server deny list (hosts) (define (tts_textasterisk string mode) "(tts_textasterisk STRING MODE) Apply tts to STRING. This function is specifically designed for use in server mode so a single function call may synthesize the string. This function name may be added to the server safe functions." (let ((wholeutt (utt.synth (eval (list 'Utterance 'Text string))))) (utt.wave.resample wholeutt 8000) (utt.wave.rescale wholeutt 5) (utt.send.wave.client wholeutt))) |
#chmod +x /etc/init.d/festival
|
#/etc/init.d/festival start
Not starting festival server, as /etc/default/festival does not have RUN_FESTIVAL=yes. |
#ps axw | grep fest
8872 ? S 0:00 /usr/bin/festival --server -b /etc/festival.scm 8882 pts/7 S+ 0:00 grep fest |
#ls -la /root/
total 1596 drwxr-xr-x 10 root root 4096 2010-03-18 10:52 . drwxr-xr-x 21 root root 4096 2010-03-15 11:57 .. drwx------ 2 root root 4096 2010-03-15 12:04 .aptitude -rw------- 1 root root 1353 2010-03-17 17:48 .asterisk_history -rw-r--r-- 1 root root 1484800 2010-03-17 12:41 asterisk-sounds-ru-gsm.tar -rw------- 1 root root 12104 2010-03-18 09:36 .bash_history -rw-r--r-- 1 root root 21 2010-03-15 14:38 .bash_profile -rw-r--r-- 1 root root 511 2010-03-17 11:59 .bashrc drwxr-xr-x 2 root root 4096 2010-03-15 12:05 .debtags ... drwx------ 4 root root 4096 2010-03-16 09:56 .licq drwxr-xr-x 2 root root 36864 2010-03-18 11:10 .lilalo -rw-r--r-- 1 root root 169 2010-03-17 13:51 .profile drwx------ 4 root root 4096 2010-03-16 12:04 .purple -rw------- 1 root root 1024 2010-03-17 14:52 .rnd drwxr-xr-x 4 user user 12288 2009-05-11 07:29 ru -rw-r--r-- 1 root root 200 2010-03-15 12:38 .screenrc -rw------- 1 root root 33 2010-03-17 16:20 .sendxmpprc drwx------ 2 root root 4096 2010-03-15 12:22 .ssh -rw------- 1 root root 5498 2010-03-18 10:52 .viminfo |
#ls -la /etc/init.d/
total 376 drwxr-xr-x 2 root root 4096 2010-03-18 11:07 . drwxr-xr-x 90 root root 4096 2010-03-18 11:05 .. -rwxr-xr-x 1 root root 2344 2009-12-16 13:17 acpid -rwxr-xr-x 1 root root 8820 2008-06-25 11:24 alsa-utils -rwxr-xr-x 1 root root 5833 2009-12-14 20:58 asterisk -rwxr-xr-x 1 root root 946 2008-10-20 08:34 atd -rwxr-xr-x 1 root root 2877 2009-12-20 22:16 bind9 -rwxr-xr-x 1 root root 2155 2008-01-05 01:05 bootlogd -rwxr-xr-x 1 root root 1988 2008-07-16 20:45 bootmisc.sh ... -rwxr-xr-x 1 root root 3710 2009-01-14 02:40 ssh -rwxr-xr-x 1 root root 525 2008-01-02 02:26 stop-bootlogd -rwxr-xr-x 1 root root 1096 2008-01-02 02:27 stop-bootlogd-single -rwxr-xr-x 1 root root 7473 2009-04-19 05:10 udev -rwxr-xr-x 1 root root 1001 2009-04-19 05:10 udev-mtab -rwxr-xr-x 1 root root 3175 2008-03-02 01:14 umountfs -rwxr-xr-x 1 root root 2140 2007-12-30 11:19 umountnfs.sh -rwxr-xr-x 1 root root 1456 2008-05-29 20:50 umountroot -rwxr-xr-x 1 root root 1815 2006-09-13 00:30 urandom -rwxr-xr-x 1 root root 1777 2008-03-24 01:26 x11-common |
#ls /etc/
acpi dbus-1 gtk-2.0 logrotate.d pam.conf rsyslog.d adduser.conf debconf.conf hal lsb-base pam.d screenrc adjtime debian_version hesiod.conf lvm pango scsi_id.config aliases default host.conf lynx-cur passwd securetty alsa defoma hostname magic passwd- security alternatives deluser.conf hosts magic.mime perl sensors.conf apm dhcp3 hosts.allow mail pm services apparmor.d dictionaries-common hosts.deny mailcap ppp sgml apt dpkg idmapd.conf mailcap.order profile shadow asterisk ejabberd inetd.conf mailname protocols shadow- ... console gconf ld.so.cache Muttrc.d rc5.d ts.conf console-cyrillic gnome-vfs-2.0 ld.so.conf nanorc rc6.d ucf.conf console-tools gnome-vfs-mime-magic ld.so.conf.d network rc.local udev cron.d gpm.conf lilalo networks rcS.d ufw cron.daily groff locale.alias nsswitch.conf reportbug.conf updatedb.conf cron.hourly group locale.gen ODBCDataSources resolvconf uswsusp.conf cron.monthly group- localtime odbc.ini resolv.conf vim crontab gshadow logcheck odbcinst.ini rmt w3m cron.weekly gshadow- login.defs openoffice rpc wgetrc cups gssapi_mech.conf logrotate.conf opt rsyslog.conf X11 |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-7846.24118.10729 2010-03-18 11:14:12.000000000 +0200 +++ /etc/asterisk/extensions.conf 2010-03-18 11:19:32.000000000 +0200 @@ -5,6 +5,12 @@ exten => 4000,n,PlayBack(demo-thanks) exten => 4000,n,Hangup +exten => 4001,1,Answer +exten => 4001,n,Wait(1) +exten => 4001,n,Festival(Hi man, you are in ass) +exten => 4001,n,Hangup + + exten => _41XX,1,Answer exten => _41XX,n,Wait(1) exten => _41XX,n,Record(/tmp/mess${EXTEN:2}:gsm,2) |
#vim /etc/asterisk/extensions.conf
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-7611.25286.26456 2010-03-18 11:20:11.000000000 +0200 +++ /etc/asterisk/extensions.conf 2010-03-18 11:20:21.000000000 +0200 @@ -7,7 +7,7 @@ exten => 4001,1,Answer exten => 4001,n,Wait(1) -exten => 4001,n,Festival(Hi man, you are in ass) +exten => 4001,n,Festival(Hi man you are in ass) exten => 4001,n,Hangup |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-7611.23664.24519 2010-03-18 11:20:47.000000000 +0200 +++ /etc/asterisk/extensions.conf 2010-03-18 11:21:17.000000000 +0200 @@ -7,7 +7,7 @@ exten => 4001,1,Answer exten => 4001,n,Wait(1) -exten => 4001,n,Festival(Hi man you are in ass) +exten => 4001,n,Festival(Kak dela chyvak chto novogo) exten => 4001,n,Hangup |
#sysunfo(loadavg)
bash: syntax error near unexpected token `loadavg' |
#sysunfo(loadavr)
bash: syntax error near unexpected token `loadavr' |
#sysunfo()
> > > > ; bash: syntax error near unexpected token `;' |
#man sysunfo
|
#man sysunfo()
|
#man sysunfo ()
|
#loadavg
bash: loadavg: command not found |
#loadavg
bash: loadavg: command not found |
#loadavg
bash: loadavg: command not found |
;; WARNING: It is inherently insecure to run a festival instance as a ;; server, mainly because it exposes the whole system to exploits which ;; can be easily used by attackers to gain access to your ;; computer. This is because of the inherent design of the festival ;; server. Please use it only in a situation where you are sure that ;; you will not be subjected to such an attack, or have adequate ;; security precautions. ;; This file has been provided as an example file for your use, should ;; you wish to run festival as a server. ; Maximum number of clients on the server (set! server_max_clients 10) ; Server port (set! server_port 1314) ; Server password: ;(set! server_passwd "password") ; Log file location (set! server_log_file "/var/log/festival/festival.log") ; Server access list (hosts) ; Example: ; (set! server_access_list '("[^.]+" "127.0.0.1" "localhost.*" "192.168.*")) ; Secure default: (set! server_access_list '("[^.]+" "127.0.0.1" "localhost")) ; Server deny list (hosts) (define (tts_textasterisk string mode) "(tts_textasterisk STRING MODE) Apply tts to STRING. This function is specifically designed for use in server mode so a single function call may synthesize the string. This function name may be added to the server safe functions." (let ((wholeutt (utt.synth (eval (list 'Utterance 'Text string))))) (utt.wave.resample wholeutt 8000) (utt.wave.rescale wholeutt 5) (utt.send.wave.client wholeutt)))
#!/bin/sh export HOME=/var/lib/asterisk /usr/bin/sendxmpp "`grep ^\$1\ /etc/asterisk/notify.conf | awk '{print $2}'`"
Время первой команды журнала | 16:09:52 2010- 3-17 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 10:36:01 2010- 3-18 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 11.88 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 2.97 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.78 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.61 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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