/l3/users/igor-public/asterisk/debian2.net.nt/root :1 :2 |
|
#pkill -1 l3_agent
|
#pkill -1 l3-agent
|
#ls -l
total 0 |
#ls -l
total 0 |
#pkill -1 l3-agent
|
#l3pwd
/users/igor-public/asterisk/debian2.net.nt/root |
#ps aux | grep l3
root 3669 15.4 0.6 15988 12712 ? Rs 04:26 1:19 l3-agent root 5096 0.0 0.0 3120 736 pts/2 S+ 04:34 0:00 grep l3 |
#kill -9 3669
|
#l3-agent
Removing stale pidfile |
#apt-get install asterisk
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: asterisk-config asterisk-sounds-main debhelper gettext html2text intltool-debian libc-client2007b libcompress-raw-zlib-perl libcompress-zlib-perl libdigest-hmac-perl libdigest-sha1-perl libfile-remove-perl libiksemel3 libio-compress-base-perl libio-compress-zlib-perl libio-stringy-perl libmail-box-perl libmail-sendmail-perl libmailtools-perl libmime-types-perl ... Setting up libio-stringy-perl (2.110-4) ... Setting up libmime-types-perl (1.24-1) ... Setting up libmailtools-perl (2.03-1) ... Setting up libobject-realize-later-perl (0.18-1) ... Setting up libuser-identity-perl (0.92-2) ... Setting up libmail-box-perl (2.082-2) ... Setting up libsys-hostname-long-perl (1.4-2) ... Setting up libmail-sendmail-perl (0.79-5) ... Setting up module-assistant (0.10.11.0) ... Setting up vpb-driver-source (4.2.38-1) ... |
#vim /etc/sudoers
--- /tmp/l3-saved-5555.15077.14252 2009-11-28 04:37:16.000000000 -0500 +++ /etc/sudoers 2009-11-28 04:37:23.000000000 -0500 @@ -15,3 +15,4 @@ # User privilege specification root ALL=(ALL) ALL +user ALL=(ALL) ALL |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:07:e9:3c:2a:3d inet addr:192.168.7.2 Bcast:192.168.7.255 Mask:255.255.255.0 inet6 addr: fe80::207:e9ff:fe3c:2a3d/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:31621 errors:0 dropped:0 overruns:0 frame:0 TX packets:10915 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:44941633 (42.8 MiB) TX bytes:922510 (900.8 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:8 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:560 (560.0 B) TX bytes:560 (560.0 B) |
#sudo ps aux | grep netw
root 6947 0.0 0.0 3116 732 pts/11 S+ 04:46 0:00 grep netw |
#sudo ps aux | grep -i netw
root 2850 0.0 0.0 3508 1340 ? Ss 04:23 0:00 /usr/sbin/NetworkManagerDispatcher --pid-file /var/run/NetworkManager/NetworkManagerDispatcher.pid root 6956 0.0 0.0 3120 796 pts/11 S+ 04:46 0:00 grep -i netw |
#sudo ps auxw | grep netw
root 6965 0.0 0.0 3116 732 pts/11 S+ 04:46 0:00 grep netw |
#sudo ps aux | grep -i netw
root 2850 0.0 0.0 3508 1340 ? Ss 04:23 0:00 /usr/sbin/NetworkManagerDispatcher --pid-file /var/run/NetworkManager/NetworkManagerDispatcher.pid root 6974 0.0 0.0 3120 800 pts/11 S+ 04:46 0:00 grep -i netw |
#kill -9 2850
|
#ls
README S12dbus S20cpufrequtils S20openbsd-inetd S26network-manager S89atd S05loadcpufreq S14avahi-daemon S20cups S20policycoreutils S26network-manager-dispatcher S89cron S10sysklogd S16ssh S20exim4 S21asterisk S30gdm S99rc.local S11klogd S18portmap S20hotkey-setup S24dhcdbd S30system-tools-backends S99rmnologin S12acpid S20bittorrent S20nfs-common S24hal S89anacron S99stop-bootlogd |
#mv S26network-manager Dis_S26network-manager
|
#mv S26network-manager-dispatcher DIS_S26network-manager-dispatcher
|
#dpkg -L asterisk | grep etc
/etc /etc/asterisk /etc/logrotate.d /etc/logrotate.d/asterisk /etc/default /etc/default/asterisk /etc/init.d /etc/init.d/asterisk /usr/lib/asterisk/modules/app_getcpeid.so /usr/lib/asterisk/modules/app_setcallerid.so /usr/lib/asterisk/modules/app_setcdruserfield.so |
#dpkg -L
dpkg-query: --listfiles needs at least one package name argument Use --help for help about querying packages; Use --license for copyright license and lack of warranty (GNU GPL). |
#dpkg -L asterisk
/. /etc /etc/asterisk /etc/logrotate.d /etc/logrotate.d/asterisk /etc/default /etc/default/asterisk /etc/init.d /etc/init.d/asterisk /usr ... /var/lib/asterisk /var/lib/asterisk/moh /var/lib/asterisk/sounds /var/lib/asterisk/sounds/custom /var/run /var/run/asterisk /usr/share/asterisk/sounds/recordings /usr/share/asterisk/sounds/custom /usr/share/man/man8/rasterisk.8.gz /usr/sbin/rasterisk |
#dpkg -L asterisk | grep etc
/etc /etc/asterisk /etc/logrotate.d /etc/logrotate.d/asterisk /etc/default /etc/default/asterisk /etc/init.d /etc/init.d/asterisk /usr/lib/asterisk/modules/app_getcpeid.so /usr/lib/asterisk/modules/app_setcallerid.so /usr/lib/asterisk/modules/app_setcdruserfield.so |
#ls -l /etc/rc2.d/*asterisk
lrwxrwxrwx 1 root root 18 2009-11-28 04:37 /etc/rc2.d/S21asterisk -> ../init.d/asterisk |
#vim /etc/default/asterisk
|
#sudo apt-get install vim-full
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libruby1.8 tcl8.4 vim-gnome vim-gui-common vim-runtime Suggested packages: tclreadline cscope vim-doc The following NEW packages will be installed: libruby1.8 tcl8.4 vim-full vim-gnome vim-gui-common vim-runtime 0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded. ... Processing triggers for man-db ... Processing triggers for menu ... Setting up libruby1.8 (1.8.7.72-3lenny1) ... Setting up tcl8.4 (8.4.19-2) ... Setting up vim-gui-common (1:7.1.314-3+lenny2) ... Setting up vim-runtime (1:7.1.314-3+lenny2) ... Processing /usr/share/vim/addons/doc Setting up vim-gnome (1:7.1.314-3+lenny2) ... Setting up vim-full (1:7.1.314-3+lenny2) ... Processing triggers for menu ... |
#vim .vimrc
--- /dev/null 2009-11-28 06:23:21.511039492 -0500 +++ .vimrc 2009-11-28 04:57:39.000000000 -0500 @@ -0,0 +1,2 @@ +syn on +set number |
#~
|
#mv .vimrc ~
|
#to produce meaningful backtraces from the core file.
|
#vim /etc/asterisk/sip.conf
|
#402 ; address. This is to be polite and
asterisk-config: /etc/asterisk/sip.conf |
#pkill dhclient3
|
#ping 192.168.7.4
PING 192.168.7.4 (192.168.7.4) 56(84) bytes of data. ^C --- 192.168.7.4 ping statistics --- 1 packets transmitted, 0 received, 100% packet loss, time 0ms |
#dpkg -l | grep asterisk
ii asterisk 1:1.4.21.2~dfsg-3 Open Source Private Branch Exchange (PBX) ii asterisk-config 1:1.4.21.2~dfsg-3 Configuration files for Asterisk ii asterisk-sounds-main 1:1.4.21.2~dfsg-3 Core Sound files for Asterisk (English) |
#dpkg -L asterisk-sound*
Package `asterisk-sound*' is not installed. Use dpkg --info (= dpkg-deb --info) to examine archive files, and dpkg --contents (= dpkg-deb --contents) to list their contents. |
#dpkg -L asterisk-sound\*
Package `asterisk-sound*' is not installed. Use dpkg --info (= dpkg-deb --info) to examine archive files, and dpkg --contents (= dpkg-deb --contents) to list their contents. |
#dpkg -L asterisk-sounds-main
/. /usr /usr/share /usr/share/asterisk /usr/share/asterisk/sounds /usr/share/asterisk/sounds/es /usr/share/asterisk/sounds/fr /usr/share/asterisk/sounds/CHANGES-asterisk-core-en-1.4.9 /usr/share/asterisk/sounds/CREDITS-asterisk-core-en-1.4.9 /usr/share/asterisk/sounds/agent-alreadyon.gsm ... /usr/share/asterisk/moh /usr/share/lintian /usr/share/lintian/overrides /usr/share/lintian/overrides/asterisk-sounds-main /usr/share/doc /usr/share/doc/asterisk-sounds-main /usr/share/doc/asterisk-sounds-main/copyright /usr/share/doc/asterisk-sounds-main/NEWS.Debian.gz /usr/share/doc/asterisk-sounds-main/changelog.gz /usr/share/doc/asterisk-sounds-main/changelog.Debian.gz |
#dpkg -L asterisk-sounds-main | less
|
#file /usr/share/asterisk/sounds/vm-youhave.gsm
/usr/share/asterisk/sounds/vm-youhave.gsm: data |
#vim /usr/share/asterisk/sounds/vm-youhave.gsm
|
#. /etc/bash_completion
|
#ls -lt /var/lgo
ls: cannot access /var/lgo: No such file or directory |
#ls -lt /var/log
total 2382 drwxr-xr-x 2 root root 72 2009-11-28 06:25 apt drwxr-xr-x 2 root root 144 2009-11-28 06:23 gdm -rw-r----- 1 root adm 26249 2009-11-28 06:23 dmesg -rw-r--r-- 1 root root 33825 2009-11-28 06:08 Xorg.0.log.old -rw-r----- 1 root adm 95359 2009-11-28 05:33 daemon.log -rw-r----- 1 root adm 3940 2009-11-28 05:33 syslog -rw-r----- 1 root adm 44421 2009-11-28 05:33 kern.log -rw-r----- 1 root adm 43560 2009-11-28 05:33 messages -rw-r----- 1 root adm 11672 2009-11-28 05:17 auth.log ... -rw-r--r-- 1 root root 0 2009-11-27 16:59 uucp.log drwxr-xr-x 3 root root 208 2009-11-27 16:57 installer -rw-r--r-- 1 root root 0 2009-11-27 16:51 pycentral.log -rw-r--r-- 1 root root 23869 2009-11-27 16:47 aptitude -rw-r----- 1 root adm 31 2009-11-27 16:34 boot -rw-r----- 1 root adm 59 2009-11-27 16:34 dmesg.1.gz drwxr-xr-x 2 root root 104 2009-11-27 16:34 fsck drwxr-xr-x 2 root root 48 2009-05-25 10:45 cups drwxr-xr-x 2 root root 48 2008-06-14 09:46 unattended-upgrades drwxr-xr-x 2 root root 48 2006-10-18 09:57 bittorrent |
#ls -lt /var/log | haed
bash: haed: command not found |
#ls -lt /var/log | head
total 2382 drwxr-xr-x 2 root root 72 2009-11-28 06:25 apt drwxr-xr-x 2 root root 144 2009-11-28 06:23 gdm -rw-r----- 1 root adm 26249 2009-11-28 06:23 dmesg -rw-r--r-- 1 root root 33825 2009-11-28 06:08 Xorg.0.log.old -rw-r----- 1 root adm 95359 2009-11-28 05:33 daemon.log -rw-r----- 1 root adm 3940 2009-11-28 05:33 syslog -rw-r----- 1 root adm 44421 2009-11-28 05:33 kern.log -rw-r----- 1 root adm 43560 2009-11-28 05:33 messages -rw-r----- 1 root adm 11672 2009-11-28 05:17 auth.log |
#less /var/log/daemon.log
|
#vim /etc/logrotate.d/a
|
#vim /etc/logrotate.d/asterisk
|
#~
total 8 drwxr-xr-x 2 asterisk asterisk 48 2009-01-04 14:27 cdr-csv drwxr-xr-x 2 asterisk asterisk 48 2009-01-04 14:27 cdr-custom -rw-rw---- 1 asterisk asterisk 0 2009-11-28 04:37 event_log -rw-rw---- 1 asterisk asterisk 2896 2009-11-28 05:33 messages -rw-rw---- 1 asterisk asterisk 76 2009-11-28 05:33 queue_log |
#less /var/log/asterisk/messages
|
#grep -v ^\; /etc/asterisk/ext
extconfig.conf extensions.ael extensions.conf |
#grep -v ^\; /etc/asterisk/extensions.conf
[general] static=yes writeprotect=no clearglobalvars=no [globals] CONSOLE=Console/dsp ; Console interface for demo IAXINFO=guest ; IAXtel username/password TRUNK=Zap/G2 ; Trunk interface TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0) [dundi-e164-canonical] ... exten => 76245,1,Macro(page,SIP/Grandstream1) exten => _7XXX,1,Macro(page,SIP/${EXTEN}) exten => 7999,1,Set(TIMEOUT(absolute)=60) exten => 7999,2,Page(Local/Grandstream1@page&Local/Xlite1@page&Local/1234@page/n|d) exten => 8500,1,VoicemailMain exten => 8500,n,Goto(s,6) [page] exten => _X.,1,Macro(page,SIP/${EXTEN}) [default] include => demo |
#egrep -v "^\;|^\ *$" /etc/asterisk/extensions.conf
[general] static=yes writeprotect=no clearglobalvars=no [globals] CONSOLE=Console/dsp ; Console interface for demo IAXINFO=guest ; IAXtel username/password TRUNK=Zap/G2 ; Trunk interface TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0) [dundi-e164-canonical] ... exten => 76245,1,Macro(page,SIP/Grandstream1) exten => _7XXX,1,Macro(page,SIP/${EXTEN}) exten => 7999,1,Set(TIMEOUT(absolute)=60) exten => 7999,2,Page(Local/Grandstream1@page&Local/Xlite1@page&Local/1234@page/n|d) exten => 8500,1,VoicemailMain exten => 8500,n,Goto(s,6) [page] exten => _X.,1,Macro(page,SIP/${EXTEN}) [default] include => demo |
#egrep -v "^\;|^\ *$" /etc/asterisk/extensions.conf | less
|
#egrep -v "^\;|^\ *$" /etc/asterisk/sip.conf
[general] context=default ; Default context for incoming calls allowoverlap=no ; Disable overlap dialing support. (Default is yes) ; Default is enabled ; defaults to "asterisk". If you set a system name in ; asterisk.conf, it defaults to that system name ; Realms MUST be globally unique according to RFC 3261 ; Set this to your host name or domain name bindport=5060 ; UDP Port to bind to (SIP standard port is 5060) ; bindport is the local UDP port that Asterisk will listen on ... ; received from instead of trusting SIP headers ; RTP media stream (audio) to go directly from ; the caller to the callee. Some devices do not ; support this (especially if one of them is ; behind a NAT). ; Normally you do NOT need to set this parameter ; You must have this turned on or DTMF reception will work improperly. ; if the nat option is enabled. If a single RTP packet is received Asterisk will know the ; external IP address of the remote device. If port forwarding is done at the client side ; then UDPTL will flow to the remote device. |
#ping 192.168.7.1
PING 192.168.7.1 (192.168.7.1) 56(84) bytes of data. ^C --- 192.168.7.1 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1012ms |
#ping 192.168.7.1
PING 192.168.7.1 (192.168.7.1) 56(84) bytes of data. ^C --- 192.168.7.1 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1013ms |
#ping 192.168.7.2
PING 192.168.7.2 (192.168.7.2) 56(84) bytes of data. 64 bytes from 192.168.7.2: icmp_seq=1 ttl=64 time=0.043 ms ^C --- 192.168.7.2 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.043/0.043/0.043/0.000 ms |
#ping 192.168.7.4
PING 192.168.7.4 (192.168.7.4) 56(84) bytes of data. 64 bytes from 192.168.7.4: icmp_seq=1 ttl=64 time=2.84 ms ^C^V --- 192.168.7.4 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 2.844/2.844/2.844/0.000 ms |
#ping 192.168.7.1
PING 192.168.7.1 (192.168.7.1) 56(84) bytes of data. From 192.168.7.2 icmp_seq=1 Destination Host Unreachable From 192.168.7.2 icmp_seq=2 Destination Host Unreachable From 192.168.7.2 icmp_seq=3 Destination Host Unreachable From 192.168.7.2 icmp_seq=5 Destination Host Unreachable From 192.168.7.2 icmp_seq=6 Destination Host Unreachable From 192.168.7.2 icmp_seq=7 Destination Host Unreachable From 192.168.7.2 icmp_seq=9 Destination Host Unreachable From 192.168.7.2 icmp_seq=10 Destination Host Unreachable From 192.168.7.2 icmp_seq=11 Destination Host Unreachable ... 64 bytes from 192.168.7.1: icmp_seq=141 ttl=64 time=0.147 ms 64 bytes from 192.168.7.1: icmp_seq=142 ttl=64 time=0.261 ms 64 bytes from 192.168.7.1: icmp_seq=143 ttl=64 time=0.353 ms 64 bytes from 192.168.7.1: icmp_seq=144 ttl=64 time=0.231 ms 64 bytes from 192.168.7.1: icmp_seq=145 ttl=64 time=0.328 ms 64 bytes from 192.168.7.1: icmp_seq=146 ttl=64 time=0.202 ms ^C --- 192.168.7.1 ping statistics --- 146 packets transmitted, 29 received, +84 errors, 80% packet loss, time 145133ms rtt min/avg/max/mdev = 0.147/0.418/4.458/0.766 ms, pipe 3 |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-5555.21267.32681 2009-11-28 05:59:40.000000000 -0500 +++ /etc/asterisk/extensions.conf 2009-11-28 06:06:13.000000000 -0500 @@ -612,3 +612,8 @@ ; "core show functions" will list all dialplan functions ; "core show function <COMMAND>" will show you more information about ; one function. Remember that function names are UPPER CASE. + +[demo1] +exten => 2000,1,Answer +exten => 2000,1,Playback(demo-thanks) +exten => 2000,n,Hungup |
#asterisk -rvv
Asterisk 1.4.21.2~dfsg-3, 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 ========================================================================= ... Dialplan reloaded. == Parsing '/etc/asterisk/extensions.conf': Found == Setting global variable 'CONSOLE' to 'Console/dsp' == Setting global variable 'IAXINFO' to 'guest' == Setting global variable 'TRUNK' to 'Zap/G2' == Setting global variable 'TRUNKMSD' to '1' [Nov 28 06:07:09] WARNING[9062]: pbx.c:4702 add_pri: Unable to register extension '2000', priority 1 in 'demo1', already in use == Parsing '/etc/asterisk/users.conf': Found debian2*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-5555.4201.7666 2009-11-28 06:07:33.000000000 -0500 +++ /etc/asterisk/extensions.conf 2009-11-28 06:07:45.000000000 -0500 @@ -615,5 +615,5 @@ [demo1] exten => 2000,1,Answer -exten => 2000,1,Playback(demo-thanks) +exten => 2000,n,Playback(demo-thanks) exten => 2000,n,Hungup |
#vim sip.conf
|
#vim sip.conf
--- /tmp/l3-saved-10166.2220.32003 2009-11-28 08:36:42.000000000 -0500 +++ sip.conf 2009-11-28 08:39:31.000000000 -0500 @@ -571,7 +571,7 @@ ; See doc/callingpres.txt for more information -[xlite1] +[2222] ; Turn off silence suppression in X-Lite ("Transmit Silence"=YES)! ; Note that Xlite sends NAT keep-alive packets, so qualify=yes is not needed type=friend @@ -588,6 +588,41 @@ ;mailbox=1234@default,1233@default ; Subscribe to status of multiple mailboxes + +[1xxx] +; Turn off silence suppression in X-Lite ("Transmit Silence"=YES)! +; Note that Xlite sends NAT keep-alive packets, so qualify=yes is not needed +type=friend +context=demo1 +regexten=1xxx +host=192.168.7.1 +;callerid="cherep" +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 + + + + +[4xxx] +; Turn off silence suppression in X-Lite ("Transmit Silence"=YES)! +; Note that Xlite sends NAT keep-alive packets, so qualify=yes is not needed +type=friend +context=demo1 +regexten=4xxx +host=192.168.7.4 +;callerid="cherep" +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 ;[snom] ;type=friend ; Friends place calls and receive calls ;context=from-sip ; Context for incoming calls from this user |
#vi extensions.conf
|
# 58 ; If priorityjumping is set to 'yes', then applications that support
62 ; by passing a 'j' option in their arguments. 63 ; 64 ;priorityjumping=yes 65 ; 66 ; User context is where entries from users.conf are registered. The 67 ; default value is 'default' 68 ; 69 ;userscontext=default 70 ; 71 ; You can include other config files, use the #include command ... 328 ignorepat => 9 329 include => local 330 include => trunkld 331 332 [local] 333 ; 334 ; Master context for local, toll-free, and iaxtel calls only 335 ; 336 ignorepat => 9 337 include => default |
#245 [dundi-e164-lookup]
|
#vim extensions.conf
--- /tmp/l3-saved-10166.19551.28894 2009-11-28 08:45:08.000000000 -0500 +++ extensions.conf 2009-11-28 08:47:08.000000000 -0500 @@ -228,11 +228,13 @@ ;exten => _1256325XXXX,1,Dial(Zap/G2/${EXTEN:7}) ; Ditto for 256-325 [demo1] -exten => 4xxx,1,Dial(SIP/4xxx/${exten},60) -exten => 4xxx,n,Hangup +exten => _4xxx,1,Dial(SIP/4xxx/${exten},60) +exten => _4xxx,n,Hangup +exten => _2xxx,1,Dial(SIP/${exten},60) +exten => _2xxx,n,Hangup -[demo1] -exten => 1xxx,1,Dial(SIP/1xxx/${exten},60) -exten => 1xxx,n,Hangup + +exten => _1xxx,1,Dial(SIP/1xxx/${exten},60) +exten => _1xxx,n,Hangup |
#vim /var/log/asterisk/
|
#vim /var/log/asterisk/event_log
|
#~
1 1259401052|NONE|NONE|NONE|QUEUESTART| 2 1259404416|NONE|NONE|NONE|QUEUESTART| 3 1259404763|NONE|NONE|NONE|QUEUESTART| "/var/log/asterisk/queue_log" 3L, 114C |
#~
19 [Nov 28 05:33:36] NOTICE[8638] res_odbc.c: Adding ENV var: INFORMIXSERVER=my_special_database 20 [Nov 28 05:33:36] NOTICE[8638] res_odbc.c: Adding ENV var: INFORMIXDIR=/opt/informix 21 [Nov 28 05:33:36] NOTICE[8638] res_odbc.c: res_odbc loaded. 22 [Nov 28 05:33:36] ERROR[8638] chan_vpb.cc: No Voicetronix cards detected 23 [Nov 28 05:33:36] NOTICE[8638] pbx_ael.c: Starting AEL load process. 24 [Nov 28 05:33:36] NOTICE[8638] pbx_ael.c: AEL load process: calculated config file name '/etc/asterisk/extensions.ael'. 25 [Nov 28 05:33:36] NOTICE[8638] pbx_ael.c: AEL load process: parsed config file name '/etc/asterisk/extensions.ael'. 26 [Nov 28 05:33:36] NOTICE[8638] pbx_ael.c: AEL load process: checked config file name '/etc/asterisk/extensions.ael'. 27 [Nov 28 05:33:36] NOTICE[8638] pbx_ael.c: AEL load process: compiled config file name '/etc/asterisk/extensions.ael'. 28 [Nov 28 05:33:36] NOTICE[8638] pbx_ael.c: AEL load process: merged config file name '/etc/asterisk/extensions.ael'. ... 38 [Nov 28 05:39:24] NOTICE[8906] pbx_ael.c: Starting AEL load process. 39 [Nov 28 05:39:24] NOTICE[8906] pbx_ael.c: AEL load process: calculated config file name '/etc/asterisk/extensions.ael'. 40 [Nov 28 05:39:24] NOTICE[8906] pbx_ael.c: AEL load process: parsed config file name '/etc/asterisk/extensions.ael'. 41 [Nov 28 05:39:24] NOTICE[8906] pbx_ael.c: AEL load process: checked config file name '/etc/asterisk/extensions.ael'. 42 [Nov 28 05:39:24] NOTICE[8906] pbx_ael.c: AEL load process: compiled config file name '/etc/asterisk/extensions.ael'. 43 [Nov 28 05:39:24] NOTICE[8906] pbx_ael.c: AEL load process: merged config file name '/etc/asterisk/extensions.ael'. 44 [Nov 28 05:39:24] NOTICE[8906] pbx_ael.c: AEL load process: verified config file name '/etc/asterisk/extensions.ael'. 45 [Nov 28 05:39:24] WARNING[8906] chan_iax2.c: Unable to open IAX timing interface: No such file or directory 46 [Nov 28 06:07:09] WARNING[9062] pbx.c: Unable to register extension '2000', priority 1 in 'demo1', already in use 47 [Nov 28 08:48:45] NOTICE[8937] chan_sip.c: Registration from '"2222"<sip:2222@192.168.7.2>' failed for '192.168.7.215' - No matching peer found |
#~
Asterisk 1.4.21.2~dfsg-3, 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 ========================================================================= ... == Parsing '/etc/asterisk/extensions.conf': Found == Setting global variable 'CONSOLE' to 'Console/dsp' == Setting global variable 'IAXINFO' to 'guest' == Setting global variable 'TRUNK' to 'Zap/G2' == Setting global variable 'TRUNKMSD' to '1' == Parsing '/etc/asterisk/users.conf': Found debian2*CLI> [Nov 28 08:51:38] NOTICE[8937]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 2222 debian2*CLI> quit Executing last minute cleanups |
#vim /var/log/asterisk/messages
|
#~
00:00.0 Host bridge: Intel Corporation 82865G/PE/P DRAM Controller/Host-Hub Interface (rev 02) 00:02.0 VGA compatible controller: Intel Corporation 82865G Integrated Graphics Controller (rev 02) 00:03.0 PCI bridge: Intel Corporation 82865G/PE/P PCI to CSA Bridge (rev 02) 00:1d.0 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 (rev 02) 00:1d.1 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2 (rev 02) 00:1d.2 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #3 (rev 02) 00:1d.3 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4 (rev 02) 00:1d.7 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev c2) 00:1f.0 ISA bridge: Intel Corporation 82801EB/ER (ICH5/ICH5R) LPC Interface Bridge (rev 02) 00:1f.1 IDE interface: Intel Corporation 82801EB/ER (ICH5/ICH5R) IDE Controller (rev 02) 00:1f.2 IDE interface: Intel Corporation 82801EB (ICH5) SATA Controller (rev 02) 00:1f.3 SMBus: Intel Corporation 82801EB/ER (ICH5/ICH5R) SMBus Controller (rev 02) 00:1f.5 Multimedia audio controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02) 01:01.0 Ethernet controller: Intel Corporation 82547EI Gigabit Ethernet Controller |
#lspci
00:00.0 Host bridge: Intel Corporation 82865G/PE/P DRAM Controller/Host-Hub Interface (rev 02) 00:02.0 VGA compatible controller: Intel Corporation 82865G Integrated Graphics Controller (rev 02) 00:03.0 PCI bridge: Intel Corporation 82865G/PE/P PCI to CSA Bridge (rev 02) 00:1d.0 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 (rev 02) 00:1d.1 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2 (rev 02) 00:1d.2 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #3 (rev 02) 00:1d.3 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4 (rev 02) 00:1d.7 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev c2) 00:1f.0 ISA bridge: Intel Corporation 82801EB/ER (ICH5/ICH5R) LPC Interface Bridge (rev 02) 00:1f.1 IDE interface: Intel Corporation 82801EB/ER (ICH5/ICH5R) IDE Controller (rev 02) 00:1f.2 IDE interface: Intel Corporation 82801EB (ICH5) SATA Controller (rev 02) 00:1f.3 SMBus: Intel Corporation 82801EB/ER (ICH5/ICH5R) SMBus Controller (rev 02) 00:1f.5 Multimedia audio controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02) 01:01.0 Ethernet controller: Intel Corporation 82547EI Gigabit Ethernet Controller 02:02.0 Ethernet controller: Digium, Inc. Device 8001 (rev 11) |
#. /etc/bash_completion
|
#apt-cache search zapata
asterisk - Open Source Private Branch Exchange (PBX) zaptel - zapata telephony utilities zaptel-source - Zapata telephony interface (source code for kernel driver) |
#apt-get install zaptel
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: fxload The following NEW packages will be installed: fxload zaptel 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 314kB of archives. After this operation, 1159kB of additional disk space will be used. ... Fetched 314kB in 0s (3704kB/s) Selecting previously deselected package fxload. (Reading database ... 103664 files and directories currently installed.) Unpacking fxload (from .../fxload_0.0.20020411-1.1_i386.deb) ... Selecting previously deselected package zaptel. Unpacking zaptel (from .../zaptel_1%3a1.4.11~dfsg-3_i386.deb) ... Processing triggers for man-db ... Setting up fxload (0.0.20020411-1.1) ... Setting up zaptel (1:1.4.11~dfsg-3) ... Zaptel telephony kernel driver: FATAL: Module ztdummy not found. |
#dpkg -L zaptel
/. /usr /usr/share /usr/share/doc-base /usr/share/doc-base/zaptel /usr/share/doc-base/zaptel.conf /usr/share/doc-base/zaptel.astribank /usr/share/man /usr/share/man/man8 /usr/share/man/man8/ztscan.8.gz ... /etc/modprobe.d /etc/hotplug /etc/hotplug/usb /etc/hotplug/usb/xpp_fxloader.usermap /etc/udev /etc/udev/rules.d /etc/udev/rules.d/xpp.rules /etc/init.d /etc/init.d/zaptel /etc/hotplug/usb/xpp_fxloader |
#dpkg -L zaptel | less
|
#man zttol
|
#man zttool
|
#zttool
Unable to open /dev/zap/ctl: No such file or directory |
#apt-get install zaptel-source
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: zaptel-source 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 1146kB of archives. After this operation, 1360kB of additional disk space will be used. Get:1 http://10.0.35.1 lenny/main zaptel-source 1:1.4.11~dfsg-3 [1146kB] Fetched 1146kB in 1s (603kB/s) Selecting previously deselected package zaptel-source. (Reading database ... 103756 files and directories currently installed.) Unpacking zaptel-source (from .../zaptel-source_1%3a1.4.11~dfsg-3_all.deb) ... Setting up zaptel-source (1:1.4.11~dfsg-3) ... |
#m-a a-i zaptel
After this operation, 35.6MB of additional disk space will be used. Do you want to continue [Y/n]? Get:1 http://10.0.35.1 lenny/main gcc-4.1 4.1.2-25 [417kB] Get:2 http://10.0.35.1 lenny/main linux-headers-2.6.26-2-common 2.6.26-19 [3718kB] Get:3 http://10.0.35.1 lenny/main linux-kbuild-2.6.26 2.6.26-3 [194kB] Get:4 http://10.0.35.1 lenny/main linux-headers-2.6.26-2-686 2.6.26-19 [398kB] Fetched 4727kB in 4s (1031kB/s) Selecting previously deselected package gcc-4.1. (Reading database ... 103790 files and directories currently installed.) Unpacking gcc-4.1 (from .../gcc-4.1_4.1.2-25_i386.deb) ... ... │ │ │ 100% │ │ │ └─────────────────────────────────────────────────────────────────────────┘ Done with /usr/src/zaptel-modules-2.6.26-2-686_1.4.11~dfsg-3+2.6.26-19_i386.deb . dpkg -Ei /usr/src/zaptel-modules-2.6.26-2-686_1.4.11~dfsg-3+2.6.26-19_i386.deb Selecting previously deselected package zaptel-modules-2.6.26-2-686. (Reading database ... 112926 files and directories currently installed.) Unpacking zaptel-modules-2.6.26-2-686 (from .../zaptel-modules-2.6.26-2-686_1.4.11~dfsg-3+2.6.26-19_i386.deb) ... Setting up zaptel-modules-2.6.26-2-686 (1:1.4.11~dfsg-3+2.6.26-19) ... |
#asterisk -rvv
Asterisk 1.4.21.2~dfsg-3, 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 ========================================================================= ... debian2*CLI> sip show peers Name/username Host Dyn Nat ACL Port Status 4xxx (Unspecified) D 0 Unmonitored 1xxx (Unspecified) D 0 Unmonitored 2222/2222 192.168.7.218 D 60068 Unmonitored 3 sip peers [Monitored: 0 online, 0 offline Unmonitored: 1 online, 2 offline] debian2*CLI> debian2*CLI> debian2*CLI> exit Executing last minute cleanups |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-2942.21873.4851 2009-11-28 09:15:41.000000000 -0500 +++ /etc/asterisk/sip.conf 2009-11-28 09:16:24.000000000 -0500 @@ -594,7 +594,6 @@ ; Note that Xlite sends NAT keep-alive packets, so qualify=yes is not needed type=friend context=demo1 -regexten=1xxx host=192.168.7.1 ;callerid="cherep" host=dynamic ; This device needs to register @@ -613,7 +612,6 @@ ; Note that Xlite sends NAT keep-alive packets, so qualify=yes is not needed type=friend context=demo1 -regexten=4xxx host=192.168.7.4 ;callerid="cherep" host=dynamic ; This device needs to register |
#vim /etc/asterisk/sip.conf
|
Время первой команды журнала | 10:33:39 2009-11-28 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 15:16:42 2009-11-28 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 99 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 22.22 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 1.01 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.24 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.74 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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