/l3/users/Ive/asterisk/linux4.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 |
|
#uname -a
Linux linux4.unix.nt 2.6.26-2-686 #1 SMP Wed May 12 21:56:10 UTC 2010 i686 GNU/Linux |
#view /etc/init.d/asterisk
AST_REALTIME="yes" RUNASTERISK="yes" echo "Asterisk not yet configured. Edit /etc/default/asterisk first." AST_DUMPexit 0no" fiT_DUMPCORE_DIR="/var/spool/asterisk" # only used if AST_DUMPCORE != no # core_pattern. See: http://lxr.linux.no/source/Documentation/sysctl/kernel.txt if [ "$AST_REALTIME" != "no" ] then -r /etc/default/$NAME ]; then . /etc/default/$NAME; fi PARAMSPARAMS="$PARAMS -g" if [ "$CORE_PATTERN" != '' ] ... fi if [ "x$USER" = "x" ] then echo "Error: empty USER name" exit 1 fi if [ `id -u "$USER"` = 0 ] then echo "Starting as root not supported." exit 1 |
#tail -f /var/lib/dhcp3/dhcpd.leases
lease 192.168.4.10 { starts 2 2010/05/25 11:20:36; ends 2 2010/05/25 11:30:36; cltt 2 2010/05/25 11:20:36; binding state active; next binding state free; hardware ethernet 00:1d:60:4a:e6:0b; uid "\001\000\035`J\346\013"; client-hostname "UC-08"; } lease 192.168.4.11 { starts 2 2010/05/25 11:21:12; ends 2 2010/05/25 11:31:12; cltt 2 2010/05/25 11:21:12; binding state active; next binding state free; hardware ethernet 00:0e:08:dd:77:9f; uid "\001\000\016\010\335w\237"; client-hostname "SipuraSPA"; } ^C |
#tail -f /var/lib/dhcp3/dhcpd.leases
lease 192.168.4.11 { starts 2 2010/05/25 11:21:12; ends 2 2010/05/25 11:31:12; cltt 2 2010/05/25 11:21:12; binding state active; next binding state free; hardware ethernet 00:0e:08:dd:77:9f; uid "\001\000\016\010\335w\237"; client-hostname "SipuraSPA"; } ^C |
#apt-cache search aster
ace-of-penguins - Solitaire-games with penguin-look aegis-doc - documentation for aegis aegis-tk - aegis Tk user interface aegis-web - aegis web based user interface aegis - transaction-based software configuration management aircrack-ng - wireless WEP/WPA cracking utilities alienblaster-data - Game data for Alien Blaster alienblaster - Classic 2D shoot 'em up ld10k1 - ALSA emu10k1/2 patch loader liblo10k1-0 - ALSA emu10k1/2 patch-loader library ... apache2-mpm-worker - Apache HTTP Server - high speed threaded model finch - text-based multi-protocol instant messaging client krb5-admin-server - MIT Kerberos master server (kadmind) krb5-kdc - MIT Kerberos key server (KDC) krb5-kdc-ldap - MIT Kerberos key server (KDC) LDAP plugin libcupsimage2 - Common UNIX Printing System(tm) - image libs libcupsimage2-dev - Common UNIX Printing System(tm) - image development files libimlib2 - powerful image loading and rendering library libimlib2-dev - Imlib2 development files openoffice.org-gcj - OpenOffice.orgs Java libraries (native for use with GIJ) |
#apt-cache search asterisk
asterisk-mp3 - MP3 format support (format_mp3) for the Asterisk PBX asterisk-mysql - MySQL support for the Asterisk PBX (cdr mainly) asterisk-ooh323c - H.323 protocol support for Asterisk (ooh323c stack) asterisk-chan-capi - Common ISDN API 2.0 implementation for Asterisk asterisk-oh323 - H.323 protocol support for Asterisk asterisk-prompt-de - German voice prompts for the Asterisk PBX asterisk-prompt-es-co - Colombian Spanish voice prompts for Asterisk asterisk-prompt-fr-armelle - French voice prompts for Asterisk by Armelle Desjardins asterisk-prompt-fr-proformatique - French voice prompts for Asterisk asterisk-prompt-fr - French voice prompts for Asterisk ... asterisk-dev - Development files for Asterisk asterisk-doc - Source code documentation for Asterisk asterisk-h323 - H.323 protocol support for Asterisk asterisk-sounds-main - Core Sound files for Asterisk (English) asterisk - Open Source Private Branch Exchange (PBX) libiax-dev - implementation of the Inter-Asterisk eXchange protocol (devel) libiax0 - implementation of the Inter-Asterisk eXchange protocol iaxmodem - software modem with IAX2 connectivity libasterisk-agi-perl - Collections of Perl modules to be used with Asterisk PBX AGI python-asterisk - Asterisk Manager API interface module for Python |
#apt-get install asterisk asterisk-sounds-extra
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: asterisk-config asterisk-sounds-main ca-certificates debhelper gettext html2text intltool-debian libasound2 libc-client2007b libcompress-raw-zlib-perl libcompress-zlib-perl libcurl3 libdigest-hmac-perl libdigest-sha1-perl libfile-remove-perl libgsm1 libiksemel3 libio-compress-base-perl libio-compress-zlib-perl libio-stringy-perl libltdl3 libmail-box-perl libmail-sendmail-perl libmailtools-perl libmime-types-perl libobject-realize-later-perl libogg0 libperl5.10 libpq5 libpri1.0 libradiusclient-ng2 libsensors3 libsnmp-base libsnmp15 ... 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 liburi-perl (1.35.dfsg.1-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-1) ... |
#ls /etc/asterisk/
adsi.conf cdr_tds.conf gtalk.conf modules.conf say.conf adtranvofr.conf codecs.conf h323.conf musiconhold.conf sip.conf agents.conf dnsmgr.conf http.conf muted.conf sip_notify.conf alarmreceiver.conf dundi.conf iax.conf osp.conf skinny.conf alsa.conf enum.conf iaxprov.conf oss.conf sla.conf amd.conf esel.conf indications.conf phone.conf smdi.conf asterisk.adsi extconfig.conf jabber.conf privacy.conf telcordia-1.adsi asterisk.conf extensions.ael logger.conf queues.conf udptl.conf cdr.conf extensions.conf manager.conf res_odbc.conf users.conf cdr_custom.conf features.conf manager.d res_pgsql.conf voicemail.conf cdr_manager.conf festival.conf meetme.conf res_snmp.conf vpb.conf cdr_odbc.conf followme.conf mgcp.conf rpt.conf watchdog.conf cdr_pgsql.conf func_odbc.conf misdn.conf rtp.conf zapata.conf |
#cd /etc/asterisk/
|
#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 |
#/usr/sbin/invoke-rc.d help
invoke-rc.d: syntax error: missing required parameter |
#/usr/sbin/invoke-rc.d
invoke-rc.d: syntax error: missing required parameter, --help assumed invoke-rc.d, Debian/SysVinit (/etc/rc?.d) initscript subsystem. Copyright (c) 2000,2001 Henrique de Moraes Holschuh <hmh@debian.org> Usage: invoke-rc.d [options] <basename> <action> [extra parameters] basename - Initscript ID, as per update-rc.d(8) action - Initscript action. Known actions are: start, [force-]stop, restart, [force-]reload, status WARNING: not all initscripts implement all of the above actions. ... runlevel constrains. --query Returns one of status codes 100-106, does not run the initscript. Implies --disclose-deny and --no-fallback. --no-fallback Ignores any fallback action requests by the policy layer. Warning: this is usually a very *bad* idea for any actions other than "start". --help Outputs help message to stdout |
#ls /var/log/asterisk/cdr-csv/
|
#ls -l /etc/asterisk/extensions.conf
-rw-r----- 1 asterisk asterisk 22516 2009-12-14 21:08 /etc/asterisk/extensions.conf |
#grep -i iax /etc/services
iax 4569/tcp # Inter-Asterisk eXchange iax 4569/udp |
#w
15:32:13 up 4:26, 10 users, load average: 0.24, 0.27, 0.16 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT user tty1 - 11:05 2:36m 0.42s 0.02s /bin/login -- root pts/0 192.168.1.10 14:10 1:21m 0.02s 0.00s script -f -c bash -q /root/.lilalo//123669669743925544-1274785801.script root pts/1 192.168.2.1 12:40 2:52m 0.14s 0.00s script -f -c bash -q /root/.lilalo//10582167502763316915-1274780403.script root pts/2 192.168.3.10 12:56 2:35m 0.00s 0.00s script -f -c bash -q /root/.lilalo//1025514351265228103-1274781379.script root pts/3 192.168.15.100:S 11:38 3:18 0.60s 0.34s script -f -c /bin/bash -q /root/.lilalo//3143732656116602239-1274778623.script root pts/7 192.168.15.100 14:28 27:47 0.00s 0.00s script -f -c bash -q /root/.lilalo//13356222121790618630-1274786887.script root pts/8 192.168.1.1 12:39 59:08 0.04s 0.00s script -f -c bash -q /root/.lilalo//293534900101561164-1274780384.script root pts/11 192.168.4.204 12:42 0.00s 0.00s 0.00s script -f -c bash -q /root/.lilalo//3169393961123414647-1274780536.script user pts/15 192.168.4.204 12:41 3:18 0.18s 0.12s script -f -c bash -q /home/user/.lilalo//2883216059260971277-1274780502.script root pts/19 192.168.5.1 12:42 1:06m 0.06s 0.00s script -f -c bash -q /root/.lilalo//20848101703193130408-1274780527.script |
#vim .lilalo/
|
#vim .lilalo/3143732656116602239-1274778623.script
|
# inet 127.0.0.1/8 scope host lo^M
|
#ls -la .ssh/
total 4 drwx------ 2 root root 1024 2010-05-25 15:37 . drwxr-xr-x 6 root root 1024 2010-05-25 12:14 .. -rw------- 1 root root 408 2010-05-25 15:37 authorized_keys -rw-r--r-- 1 root root 692 2010-05-25 12:28 known_hosts |
#cat .ssh/authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAljO3wMqcXnAejvYUyBYQNjFFYWm8Xu/WQAvgFZJjt/jNy3u9os+30k3akfV4/w2W1UADNoqkZ9KFn5e7NZ0BtUFcm911zaWQV1oTOgTAdY+5EY2pKQxDbLOK4jG24J+LbBR1diJHFhFkotew09YjnwxRwHqlviwJ+ZtcZNb1vBiAggpZAQCPPzo+/ygEsNynaYkbCNVLM04c9/Y6BI3ka3ZWWHCwCPR2BxsoxidFmrkuFW7a13tJ81BjcY1qC7YvZfBgodkpwAi4KUpsnKGhYlTI+XpcxHniNb/6KMQr/CaFu9k6jSrCiKGdcksl1UPcN+KA0ysntBgESe6dqdH/Qw== /data/home/ive/.ssh |
#tail -f /var/log/messages
May 25 07:26:12 linux4 dhcpd: DHCPREQUEST for 192.168.4.11 from 00:0e:08:dd:77:9f via eth0 May 25 07:26:12 linux4 dhcpd: DHCPACK on 192.168.4.11 to 00:0e:08:dd:77:9f via eth0 May 25 07:30:35 linux4 dhcpd: DHCPREQUEST for 192.168.4.10 from 00:1d:60:4a:e6:0b (UC-08) via eth0 May 25 07:30:35 linux4 dhcpd: DHCPACK on 192.168.4.10 to 00:1d:60:4a:e6:0b (UC-08) via eth0 May 25 07:31:12 linux4 dhcpd: DHCPREQUEST for 192.168.4.11 from 00:0e:08:dd:77:9f via eth0 May 25 07:31:12 linux4 dhcpd: DHCPACK on 192.168.4.11 to 00:0e:08:dd:77:9f via eth0 May 25 07:35:36 linux4 dhcpd: DHCPREQUEST for 192.168.4.10 from 00:1d:60:4a:e6:0b (UC-08) via eth0 May 25 07:35:36 linux4 dhcpd: DHCPACK on 192.168.4.10 to 00:1d:60:4a:e6:0b (UC-08) via eth0 May 25 07:36:12 linux4 dhcpd: DHCPREQUEST for 192.168.4.11 from 00:0e:08:dd:77:9f via eth0 May 25 07:36:12 linux4 dhcpd: DHCPACK on 192.168.4.11 to 00:0e:08:dd:77:9f via eth0 ^C |
#tail -f /var/log/
apt/ auth.log daemon.log dmesg.0 exim4/ installer/ lpr.log mail.log news/ user.log aptitude boot debug dmesg.1.gz faillog kern.log mail.err mail.warn pycentral.log wtmp asterisk/ btmp dmesg dpkg.log fsck/ lastlog mail.info messages syslog |
#tail -f /var/log/auth.log
May 25 07:37:35 linux4 sshd[12518]: pam_unix(sshd:session): session opened for user root by (uid=0) May 25 07:37:35 linux4 sshd[12518]: Received disconnect from 192.168.4.204: 11: disconnected by user May 25 07:37:35 linux4 sshd[12518]: pam_unix(sshd:session): session closed for user root May 25 07:37:39 linux4 sshd[12524]: Public key 89:e8:11:6c:3b:b9:1a:8f:94:ff:73:f9:3a:90:49:f6 from 192.168.4.204 blacklisted (see ssh-vulnkey(1)) May 25 07:37:56 linux4 sshd[12526]: Public key 89:e8:11:6c:3b:b9:1a:8f:94:ff:73:f9:3a:90:49:f6 from 192.168.4.204 blacklisted (see ssh-vulnkey(1)) May 25 07:37:58 linux4 sshd[12526]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.4.204 user=root May 25 07:38:00 linux4 sshd[12526]: Failed password for root from 192.168.4.204 port 33049 ssh2 May 25 07:38:02 linux4 sshd[12526]: Accepted password for root from 192.168.4.204 port 33049 ssh2 May 25 07:38:02 linux4 sshd[12526]: pam_unix(sshd:session): session opened for user root by (uid=0) May 25 07:38:35 linux4 sshd[12639]: Public key 89:e8:11:6c:3b:b9:1a:8f:94:ff:73:f9:3a:90:49:f6 from 192.168.4.204 blacklisted (see ssh-vulnkey(1)) ^C |
#man ssh-vulnkey
|
#vim /etc/ssh/sshd_config
|
#man sshd.conf
|
#man sshd_conf
|
#man sshd
|
#dpkg -L openssh-server
/. /usr /usr/sbin /usr/sbin/sshd /usr/lib /usr/lib/openssh /usr/lib/openssh/sftp-server /usr/share /usr/share/man /usr/share/man/man5 ... /etc/network /etc/network/if-up.d /etc/network/if-up.d/openssh-server /etc/pam.d /etc/pam.d/sshd /etc/default /etc/default/ssh /usr/lib/sftp-server /usr/share/man/man5/authorized_keys.5.gz /usr/share/doc/openssh-server |
#dpkg -L openssh-server |grep man
/usr/share/man /usr/share/man/man5 /usr/share/man/man5/sshd_config.5.gz /usr/share/man/man8 /usr/share/man/man8/sftp-server.8.gz /usr/share/man/man8/sshd.8.gz /usr/share/man/man5/authorized_keys.5.gz |
#man /usr/share/man/man5/sshd_config.5.gz
|
#vim /etc/ssh/sshd_config
--- /tmp/l3-saved-12566.26591.4497 2010-05-25 15:42:34.000000000 +0300 +++ /etc/ssh/sshd_config 2010-05-25 15:42:46.000000000 +0300 @@ -75,3 +75,6 @@ Subsystem sftp /usr/lib/openssh/sftp-server UsePAM yes + +# +PermitBlacklistedKeys yes |
#/etc/init.d/ssh restart
Restarting OpenBSD Secure Shell server: sshd. |
#ls
adsi.conf cdr_tds.conf gtalk.conf modules.conf say.conf adtranvofr.conf codecs.conf h323.conf musiconhold.conf sip.conf agents.conf dnsmgr.conf http.conf muted.conf sip_notify.conf alarmreceiver.conf dundi.conf iax.conf osp.conf skinny.conf alsa.conf enum.conf iaxprov.conf oss.conf sla.conf amd.conf esel.conf indications.conf phone.conf smdi.conf asterisk.adsi extconfig.conf jabber.conf privacy.conf telcordia-1.adsi asterisk.conf extensions.ael logger.conf queues.conf udptl.conf cdr.conf extensions.conf manager.conf res_odbc.conf users.conf cdr_custom.conf features.conf manager.d res_pgsql.conf voicemail.conf cdr_manager.conf festival.conf meetme.conf res_snmp.conf vpb.conf cdr_odbc.conf followme.conf mgcp.conf rpt.conf watchdog.conf cdr_pgsql.conf func_odbc.conf misdn.conf rtp.conf zapata.conf |
#vim s
|
#vim sip
|
#vim sip.conf
|
#:q!
|
#ls
adsi.conf cdr_tds.conf gtalk.conf modules.conf say.conf adtranvofr.conf codecs.conf h323.conf musiconhold.conf sip.conf agents.conf dnsmgr.conf http.conf muted.conf sip_notify.conf alarmreceiver.conf dundi.conf iax.conf osp.conf skinny.conf alsa.conf enum.conf iaxprov.conf oss.conf sla.conf amd.conf esel.conf indications.conf phone.conf smdi.conf asterisk.adsi extconfig.conf jabber.conf privacy.conf telcordia-1.adsi asterisk.conf extensions.ael logger.conf queues.conf udptl.conf cdr.conf extensions.conf manager.conf res_odbc.conf users.conf cdr_custom.conf features.conf manager.d res_pgsql.conf voicemail.conf cdr_manager.conf festival.conf meetme.conf res_snmp.conf vpb.conf cdr_odbc.conf followme.conf mgcp.conf rpt.conf watchdog.conf cdr_pgsql.conf func_odbc.conf misdn.conf rtp.conf zapata.conf |
#ls
adsi.conf cdr.conf dundi.conf followme.conf jabber.conf musiconhold.conf res_pgsql.conf sla.conf zapata.conf adtranvofr.conf cdr_custom.conf enum.conf func_odbc.conf logger.conf muted.conf res_snmp.conf smdi.conf agents.conf cdr_manager.conf esel.conf gtalk.conf manager.conf osp.conf rpt.conf telcordia-1.adsi alarmreceiver.conf cdr_odbc.conf extconfig.conf h323.conf manager.d oss.conf rtp.conf udptl.conf alsa.conf cdr_pgsql.conf extensions.ael http.conf meetme.conf phone.conf say.conf users.conf amd.conf cdr_tds.conf extensions.conf iax.conf mgcp.conf privacy.conf sip.conf voicemail.conf asterisk.adsi codecs.conf features.conf iaxprov.conf misdn.conf queues.conf sip_notify.conf vpb.conf asterisk.conf dnsmgr.conf festival.conf indications.conf modules.conf res_odbc.conf skinny.conf watchdog.conf |
#cp sip.conf sip.conf.bak
|
#vim sip.conf
|
#;mohsuggest=default
adsi.conf cdr.conf dundi.conf followme.conf jabber.conf musiconhold.conf res_pgsql.conf skinny.conf watchdog.conf adtranvofr.conf cdr_custom.conf enum.conf func_odbc.conf logger.conf muted.conf res_snmp.conf sla.conf zapata.conf agents.conf cdr_manager.conf esel.conf gtalk.conf manager.conf osp.conf rpt.conf smdi.conf alarmreceiver.conf cdr_odbc.conf extconfig.conf h323.conf manager.d oss.conf rtp.conf telcordia-1.adsi alsa.conf cdr_pgsql.conf extensions.ael http.conf meetme.conf phone.conf say.conf udptl.conf amd.conf cdr_tds.conf extensions.conf iax.conf mgcp.conf privacy.conf sip.conf users.conf asterisk.adsi codecs.conf features.conf iaxprov.conf misdn.conf queues.conf sip.conf.bak voicemail.conf asterisk.conf dnsmgr.conf festival.conf indications.conf modules.conf res_odbc.conf sip_notify.conf vpb.conf |
#>sip.conf
|
#vim sip.conf
--- /tmp/l3-saved-12965.15423.26919 2010-05-25 15:58:37.000000000 +0300 +++ sip.conf 2010-05-25 16:05:08.000000000 +0300 @@ -0,0 +1,12 @@ +context=default + +[401] +type=friend +secret=password +host=dynamic + +[402] +type=friend +secret=password +host=dynamic + |
#/etc/init.d/asterisk start
Asterisk PBX is already running. Use restart. |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -r
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 ========================================================================= Connected to Asterisk 1.4.21.2~dfsg-3+lenny1 currently running on linux4 (pid = 13388) linux4*CLI> quit |
#asterisk -rvv
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 ========================================================================= ... zap destroy channel Destroy a channel zap restart Fully restart zaptel channels zap show cadences List cadences zap show channels Show active zapata channels zap show channel Show information on a channel zap show status Show all Zaptel cards status linux4*CLI> sip show peers No such command 'sip show peers' (type 'help sip show' for other possible commands) linux4*CLI> quit Executing last minute cleanups |
#less /var/log/asterisk/
|
#less /var/log/asterisk/messages
|
#vim sip
|
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -rvv
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 ========================================================================= ... Verbosity was 0 and is now 2 linux4*CLI> sip show peers Name/username Host Dyn Nat ACL Port Status 402 (Unspecified) D 0 Unmonitored 401 (Unspecified) D 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] linux4*CLI> linux4*CLI> linux4*CLI> quit Executing last minute cleanups |
#asterisk -rvx 'sip show'
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 ========================================================================= Connected to Asterisk 1.4.21.2~dfsg-3+lenny1 currently running on linux4 (pid = 13553) No such command 'sip show' (type 'help sip show' for other possible commands) Executing last minute cleanups |
#asterisk -rvx 'sip show peers'
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 ========================================================================= Connected to Asterisk 1.4.21.2~dfsg-3+lenny1 currently running on linux4 (pid = 13553) Name/username Host Dyn Nat ACL Port Status 402 (Unspecified) D 0 Unmonitored 401 (Unspecified) D 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] Executing last minute cleanups |
#asterisk -rvx 'sip show peers'
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 ========================================================================= Connected to Asterisk 1.4.21.2~dfsg-3+lenny1 currently running on linux4 (pid = 13553) Name/username Host Dyn Nat ACL Port Status 402 (Unspecified) D 0 Unmonitored 401 (Unspecified) D 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] Executing last minute cleanups |
#asterisk -rvx 'sip show peers'
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 ========================================================================= Connected to Asterisk 1.4.21.2~dfsg-3+lenny1 currently running on linux4 (pid = 13553) Name/username Host Dyn Nat ACL Port Status 402 (Unspecified) D 0 Unmonitored 401 (Unspecified) D 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] Executing last minute cleanups |
#asterisk -rvx 'sip show peers'
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 ========================================================================= Connected to Asterisk 1.4.21.2~dfsg-3+lenny1 currently running on linux4 (pid = 13553) Name/username Host Dyn Nat ACL Port Status 402 (Unspecified) D 0 Unmonitored 401/401 192.168.4.11 D 5060 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 1 online, 1 offline] Executing last minute cleanups |
#vim extensions.conf.bak
|
#; the AEL file, instead of the extensions.conf file. With clearglobalvars
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-13799.28132.12600 2010-05-25 16:15:20.000000000 +0300 +++ /etc/asterisk/extensions.conf 2010-05-25 16:19:24.000000000 +0300 @@ -0,0 +1,6 @@ +[default] + +exten =>8000,1,Answer +exten =>8000,n,Wait(1) +exten =>8000,n,Playback(demo_thanks) + |
#asterisk -rvv
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 ========================================================================= ... Connected to Asterisk 1.4.21.2~dfsg-3+lenny1 currently running on linux4 (pid = 13553) Verbosity is at least 2 linux4*CLI> dialplan reload Dialplan reloaded. == Parsing '/etc/asterisk/extensions.conf': Found == Parsing '/etc/asterisk/users.conf': Found linux4*CLI> linux4*CLI> linux4*CLI> quit Executing last minute cleanups |
#les /var/log/asterisk/messages
bash: les: command not found |
#date
Tue May 25 16:22:26 EEST 2010 |
#asterisk -rvv
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 ========================================================================= ... linux4*CLI> linux4*CLI> linux4*CLI> linux4*CLI> [May 25 16:23:14] WARNING[13969]: file.c:602 ast_openstream_full: File demo_thanks does not exist in any format [May 25 16:23:14] WARNING[13969]: file.c:912 ast_streamfile: Unable to open demo_thanks (format 0x4 (ulaw)): No such file or directory [May 25 16:23:14] WARNING[13969]: app_playback.c:439 playback_exec: ast_streamfile failed on SIP/401-0818b1e8 for demo_thanks linux4*CLI> linux4*CLI> quit Executing last minute cleanups |
#locate demo
locate: can not open `/var/lib/mlocate/mlocate.db': No such file or directory |
#update
update-alternatives update-inetd update-ca-certificates update-initramfs updatedb update-ispell-dictionary updatedb.mlocate update-locale update-default-aspell update-mime update-default-ispell update-modules update-default-wordlist update-openoffice-dicts update-dictcommon-aspell update-passwd update-exim4.conf update-pciids update-exim4.conf.template update-rc.d update-exim4defaults update-usbids update-grub |
#updatedb &
[1] 13986 |
#viccd /
[1]+ Done updatedb |
#cd /etc/asterisk/
|
#vim extensions.
|
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -rvv
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 ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': Found == Parsing '/etc/asterisk/extconfig.conf': Found Connected to Asterisk 1.4.21.2~dfsg-3+lenny1 currently running on linux4 (pid = 14104) Verbosity was 0 and is now 2 linux4*CLI> linux4*CLI> linux4*CLI> linux4*CLI> linux4*CLI> linux4*CLI> quit Executing last minute cleanups |
#asterisk -rvvv
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 ========================================================================= ... -- Executing [8000@default:2] Wait("SIP/401-081cb5a8", "1") in new stack -- Executing [8000@default:3] Playback("SIP/401-081cb5a8", "demo-thanks") in new stack -- <SIP/401-081cb5a8> Playing 'demo-thanks' (language 'en') == Auto fallthrough, channel 'SIP/401-081cb5a8' status is 'UNKNOWN' linux4*CLI> locate thanks No such command 'locate thanks' (type 'help locate thanks' for other possible commands) linux4*CLI> slocate thanks No such command 'slocate thanks' (type 'help slocate thanks' for other possible commands) linux4*CLI> quit Executing last minute cleanups |
#screen -ls
|
#screen
|
#asterisk -rvv
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 ========================================================================= ... [May 25 17:41:26] WARNING[14127]: chan_sip.c:8505 check_auth: username mismatch, have <crimea>, digest has <kharkov> [May 25 17:41:26] NOTICE[14127]: chan_sip.c:14377 handle_request_invite: Failed to authenticate user "VoIP phone" <sip:501@192.168.5.1>;tag=as38633c07 linux4*CLI> sip reload Reloading SIP == Parsing '/etc/asterisk/sip.conf': Found == Parsing '/etc/asterisk/users.conf': Found == Parsing '/etc/asterisk/sip_notify.conf': Found [May 25 17:41:28] WARNING[14127]: chan_sip.c:12627 handle_response_register: Got 404 Not found on SIP register to service kharkov-in@192.168.3.1, giving up [May 25 17:41:28] WARNING[14127]: chan_sip.c:12627 handle_response_register: Got 404 Not found on SIP register to service kharkov@192.168.1.1, giving up linux4*CLI> sip reload |
#vim extensions.conf
--- /tmp/l3-saved-14304.11275.20369 2010-05-25 16:35:18.000000000 +0300 +++ extensions.conf 2010-05-25 16:38:50.000000000 +0300 @@ -1,6 +1,8 @@ [default] -exten =>8000,1,Answer -exten =>8000,n,Wait(1) -exten =>8000,n,Playback(demo-thanks) +exten => 8000,1,Answer +exten => 8000,n,Wait(1) +exten => 8000,n,Playback(demo-thanks) +#exten => 401,1,Dial(SIP/401) +exten => _4XX,1,Dial(SIP/${EXTEN}) _ - подчеркивание означает начало шаблона |
#ls e*
enum.conf esel.conf extconfig.conf extensions.ael extensions.conf extensions.conf.bak |
#vim sip.conf
--- /tmp/l3-saved-14304.16667.16026 2010-05-25 16:41:24.000000000 +0300 +++ sip.conf 2010-05-25 16:42:02.000000000 +0300 @@ -5,9 +5,11 @@ type=friend secret=password host=dynamic +callerid="LinkSys phone" [402] type=friend secret=password host=dynamic +callerid="Softphone Windows" |
#vim sip.conf
--- /tmp/l3-saved-14304.17612.23858 2010-05-25 16:43:08.000000000 +0300 +++ sip.conf 2010-05-25 16:43:19.000000000 +0300 @@ -5,7 +5,7 @@ type=friend secret=password host=dynamic -callerid="LinkSys phone" +callerid="LinkSys phone + русский" [402] type=friend |
#vim sip.conf
--- /tmp/l3-saved-14304.21479.9072 2010-05-25 16:44:04.000000000 +0300 +++ sip.conf 2010-05-25 16:44:15.000000000 +0300 @@ -11,5 +11,5 @@ type=friend secret=password host=dynamic -callerid="Softphone Windows" +callerid="Softphone Windows + русс" |
#vim sip.conf
--- /tmp/l3-saved-14304.28925.6688 2010-05-25 16:44:34.000000000 +0300 +++ sip.conf 2010-05-25 16:44:50.000000000 +0300 @@ -11,5 +11,5 @@ type=friend secret=password host=dynamic -callerid="Softphone Windows + ÑÑÑÑ" +callerid="Soft_Win + ÑÑÑÑ" |
#jobs
|
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAljO3wMqcXnAejvYUyBYQNjFFYWm8Xu/WQAvgFZJjt/jNy3u9os+30k3akfV4/w2W1UADNoqkZ9KFn5e7NZ0BtUFcm911zaWQV1oTOgTAdY+5EY2pKQxDbLOK4jG24J+LbBR1diJHFhFkotew09YjnwxRwHqlviwJ+ZtcZNb1vBiAggpZAQCPPzo+/ygEsNynaYkbCNVLM04c9/Y6BI3ka3ZWWHCwCPR2BxsoxidFmrkuFW7a13tJ81BjcY1qC7YvZfBgodkpwAi4KUpsnKGhYlTI+XpcxHniNb/6KMQr/CaFu9k6jSrCiKGdcksl1UPcN+KA0ysntBgESe6dqdH/Qw== /data/home/ive/.ssh
Время первой команды журнала | 11:56:19 2010- 5-25 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 15:45:23 2010- 5-25 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 100 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 18.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.85 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.90 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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