/l3/users/alexp/nt-voip/linux4.univ.nt/root :1 :2 :3 :4 :5 :6 :7 |
|
#[default]
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-13288.16461.12514 2011-10-18 17:22:52.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-10-18 17:23:17.000000000 +0300 @@ -6,7 +6,7 @@ [internal] -exten => _148X,1,GotoIf($["${CALLERID(num)}"!="140${EXTEN:3}"] ?password) +exten => _148X,1,GotoIf($["${CALLERID(num)}"!="140${EXTEN:3}"]?password) exten => _148X,n,VoicemailMain(140${EXTEN:3},s) exten => _148X,n,Hangup exten => _148X,n(password),VoicemailMain(140${EXTEN:3}) |
#asterisk -rvvvv
Asterisk 1.6.2.9-2+squeeze3, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze3 currently running on linux4 (pid = 10544) ... -- Total time merge_contexts_delete: 0.000316 sec -- Remote UNIX connection disconnected == Using SIP RTP CoS mark 5 -- Executing [1480@gr3:1] GotoIf("SIP/1401-00000041", "1?password") in new stack -- Goto (gr3,1480,4) -- Executing [1480@gr3:4] VoiceMailMain("SIP/1401-00000041", "1400") in new stack -- <SIP/1401-00000041> Playing 'vm-login.gsm' (language 'ru') -- <SIP/1401-00000041> Playing 'vm-password.gsm' (language 'ru') linux4*CLI> quit Executing last minute cleanups |
#dpkg -l asterisk
Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Description +++-=================================-=================================-================================================================================== ii asterisk 1:1.6.2.9-2+squeeze3 Open Source Private Branch Exchange (PBX) |
#vim /etc/asterisk/voicemail.conf
--- /tmp/l3-saved-13288.18413.22296 2011-10-18 17:25:07.000000000 +0300 +++ /etc/asterisk/voicemail.conf 2011-10-18 17:25:46.000000000 +0300 @@ -93,6 +93,7 @@ ;directoryintro=dir-intro ; The character set for voicemail messages can be specified here ;charset=ISO-8859-1 +charset=UTF-8 ; The ADSI feature descriptor number to download to ;adsifdn=0000000F ; The ADSI security lock code |
#; unless you are _VERY_ sure that you know what you are doing and are
Cannot open display "default display" |
#;
adsi.conf console.conf iaxprov.conf res_odbc.conf adtranvofr.conf dbsep.conf indications.conf res_pgsql.conf agents.conf dnsmgr.conf jabber.conf res_snmp.conf ais.conf dsp.conf jingle.conf rpt.conf alarmreceiver.conf dundi.conf logger.conf rtp.conf alsa.conf enum.conf manager.conf say.conf amd.conf extconfig.conf manager.d/ sip.conf asterisk.adsi extensions.ael meetme.conf sip.conf.SAVED asterisk.conf extensions.conf mgcp.conf sip_notify.conf cdr_adaptive_odbc.conf extensions.conf.save minivm.conf skinny.conf ... cdr_manager.conf extensions.lua musiconhold.conf telcordia-1.adsi cdr_odbc.conf extensions_minivm.conf muted.conf udptl.conf cdr_pgsql.conf features.conf osp.conf unistim.conf cdr_sqlite3_custom.conf festival.conf oss.conf usbradio.conf cdr_tds.conf followme.conf phone.conf users.conf chan_dahdi.conf func_odbc.conf phoneprov.conf voicemail.conf cli_aliases.conf gtalk.conf queuerules.conf vpb.conf cli.conf h323.conf queues.conf cli_permissions.conf http.conf res_config_sqlite.conf codecs.conf iax.conf res_ldap.conf |
#; The value of odbcstorage is the database connection configured
![]() exit There are stopped jobs. |
#history
1 cd etc 2 ls 3 cd gnome 4 ls 5 cd .. 6 cd init.d 7 ls 8 gdm3 9 -fg 10 dkpg-reconfigure console-cyrillic ... 483 nano /etc/asterisk/voicemail.conf 484 asterisk -rx 'voicemail reload' 485 nano /etc/asterisk/voicemail.conf 486 asterisk -rx 'voicemail restart' 487 asterisk -rx 'voicemail reload' 488 nano /etc/asterisk/voicemail.conf 489 asterisk -rx 'voicemail reload' 490 nano /etc/asterisk/voicemail.conf 491 halt 492 history |
#apt-get install tcpdump
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: tcpdump 0 upgraded, 1 newly installed, 0 to remove and 14 not upgraded. Need to get 376 kB of archives. After this operation, 901 kB of additional disk space will be used. WARNING: The following packages cannot be authenticated! tcpdump Install these packages without verification [y/N]? y Get:1 http://10.0.35.1/debian/ squeeze/main tcpdump i386 4.1.1-1 [376 kB] Fetched 376 kB in 0s (9,539 kB/s) Selecting previously deselected package tcpdump. (Reading database ... 111300 files and directories currently installed.) Unpacking tcpdump (from .../tcpdump_4.1.1-1_i386.deb) ... Processing triggers for man-db ... Setting up tcpdump (4.1.1-1) ... |
#man tcpdump
|
#tcpdump -i
![]() tcpdump version 4.1.1 libpcap version 1.1.1 Usage: tcpdump [-aAbdDefIKlLnNOpqRStuUvxX] [ -B size ] [ -c count ] [ -C file_size ] [ -E algo:secret ] [ -F file ] [ -G seconds ] [ -i interface ] [ -M secret ] [ -r file ] [ -s snaplen ] [ -T type ] [ -w file ] [ -W filecount ] [ -y datalinktype ] [ -z command ] [ -Z user ] [ expression ] |
#man tcpdump
|
#fg
tcpdump -i eth0 not port 22 ^C09:44:08.583815 IP 192.168.40.200.netbios-dgm > 192.168.40.255.netbios-dgm: NBT UDP PACKET(138) 39 packets captured 56 packets received by filter 0 packets dropped by kernel |
#tcpdump -i eth0 -C
![]() tcpdump version 4.1.1 libpcap version 1.1.1 Usage: tcpdump [-aAbdDefIKlLnNOpqRStuUvxX] [ -B size ] [ -c count ] [ -C file_size ] [ -E algo:secret ] [ -F file ] [ -G seconds ] [ -i interface ] [ -M secret ] [ -r file ] [ -s snaplen ] [ -T type ] [ -w file ] [ -W filecount ] [ -y datalinktype ] [ -z command ] [ -Z user ] [ expression ] |
#apt-get install wireshark
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libc-ares2 libcap2-bin libsmi2ldbl wireshark-common Suggested packages: libcap-dev snmp-mibs-downloader The following NEW packages will be installed: libc-ares2 libcap2-bin libsmi2ldbl wireshark wireshark-common 0 upgraded, 5 newly installed, 0 to remove and 14 not upgraded. ... Processing triggers for man-db ... Processing triggers for desktop-file-utils ... Processing triggers for gnome-menus ... Processing triggers for menu ... Setting up libcap2-bin (1:2.19-3) ... Setting up libsmi2ldbl (0.4.8+dfsg2-3) ... Setting up libc-ares2 (1.7.3-1) ... Setting up wireshark-common (1.2.11-6+squeeze2) ... Setting up wireshark (1.2.11-6+squeeze2) ... Processing triggers for menu ... |
#traffshow
![]() bash: traffshow: command not found |
#trafshow
![]() |
#apt-cache search traf
4g8 - Packet Capture and Interception for Switched Networks apache2-mpm-event - Apache HTTP Server - event driven model apache2-mpm-worker - Apache HTTP Server - high speed threaded model apf-firewall - easy iptables based firewall system argus-client - IP network transaction auditing tool autossh - Automatically restart SSH sessions and tunnels ax25-apps - AX.25 ham radio applications ax25spyd - AX.25 traffic analyzer, dumper and spy daemon bubblefishymon - system load dockapp with a duck gkrellm-bfm - system load plugin for gkrellm with a duck ... xchat-xsys - x-chat plugin that can display your current system statistics yardradius - YARD Radius Authorization and Accounting Server libzorp0-dev - Development files needed to compile Zorp modules libzorp0 - The runtime library of Zorp python-kzorp - Python bindings for kzorp. zorp-doc - Zorp documentation zorp-modules - Default proxy modules for Zorp zorp - An advanced protocol analyzing firewall conserver-client - connect to a console server conserver-server - connect multiple user to a serial console with logging |
#apt-cache search traffshow
|
#apt-cache search traffshow
|
#apt-cache search trafshow
netdiag - Net-Diagnostics (trafshow,strobe,netwatch,statnet,tcpspray,tcpblast) |
#hping3 192.168.30.1
HPING 192.168.30.1 (eth0 192.168.30.1): NO FLAGS are set, 40 headers + 0 data bytes len=46 ip=192.168.30.1 ttl=63 DF id=0 sport=0 flags=RA seq=0 win=0 rtt=0.2 ms len=46 ip=192.168.30.1 ttl=63 DF id=0 sport=0 flags=RA seq=1 win=0 rtt=0.2 ms len=46 ip=192.168.30.1 ttl=63 DF id=0 sport=0 flags=RA seq=2 win=0 rtt=0.2 ms len=46 ip=192.168.30.1 ttl=63 DF id=0 sport=0 flags=RA seq=3 win=0 rtt=0.3 ms ^C --- 192.168.30.1 hping statistic --- 4 packets transmitted, 4 packets received, 0% packet loss round-trip min/avg/max = 0.2/0.2/0.3 ms |
#hping3
hping3> ? invalid command name "?" hping3> help invalid command name "help" hping3> exit |
#hping3 -S -p 80 www.microsoft.com
HPING www.microsoft.com (eth0 65.55.12.249): S set, 40 headers + 0 data bytes len=46 ip=65.55.12.249 ttl=240 id=10378 sport=80 flags=SA seq=0 win=8190 rtt=186.1 ms len=46 ip=65.55.12.249 ttl=240 id=23292 sport=80 flags=SA seq=1 win=8190 rtt=186.2 ms len=46 ip=65.55.12.249 ttl=240 id=26469 sport=80 flags=SA seq=2 win=8190 rtt=186.1 ms len=46 ip=65.55.12.249 ttl=240 id=20178 sport=80 flags=SA seq=3 win=8190 rtt=186.3 ms len=46 ip=65.55.12.249 ttl=240 id=33071 sport=80 flags=SA seq=4 win=8190 rtt=186.1 ms len=46 ip=65.55.12.249 ttl=240 id=57214 sport=80 flags=SA seq=5 win=8190 rtt=186.2 ms len=46 ip=65.55.12.249 ttl=240 id=40653 sport=80 flags=SA seq=6 win=8190 rtt=186.1 ms len=46 ip=65.55.12.249 ttl=240 id=24868 sport=80 flags=SA seq=7 win=8190 rtt=186.3 ms len=46 ip=65.55.12.249 ttl=240 id=13173 sport=80 flags=SA seq=8 win=8190 rtt=186.2 ms ... len=46 ip=65.55.12.249 ttl=240 id=8240 sport=80 flags=SA seq=23 win=8190 rtt=186.2 ms len=46 ip=65.55.12.249 ttl=240 id=42119 sport=80 flags=SA seq=24 win=8190 rtt=186.6 ms len=46 ip=65.55.12.249 ttl=240 id=58588 sport=80 flags=SA seq=25 win=8190 rtt=186.1 ms len=46 ip=65.55.12.249 ttl=240 id=38195 sport=80 flags=SA seq=26 win=8190 rtt=186.1 ms len=46 ip=65.55.12.249 ttl=240 id=51078 sport=80 flags=SA seq=27 win=8190 rtt=186.1 ms len=46 ip=65.55.12.249 ttl=240 id=27872 sport=80 flags=SA seq=28 win=8190 rtt=186.1 ms x^C --- www.microsoft.com hping statistic --- 29 packets transmitted, 29 packets received, 0% packet loss round-trip min/avg/max = 186.1/186.2/187.0 ms |
#hping3 -S -p 25 farmak.ua
![]() HPING farmak.ua (eth0 62.149.25.175): S set, 40 headers + 0 data bytes ^C --- farmak.ua hping statistic --- 4 packets transmitted, 0 packets received, 100% packet loss round-trip min/avg/max = 0.0/0.0/0.0 ms |
#apt-cache search icmp tunnel
icmptx - Tunnel IP over ICMP ptunnel - Tunnel TCP connections over ICMP packets |
#ping -l 5000 192.168.200.1
![]() WARNING: probably, rcvbuf is not enough to hold preload. PING 192.168.200.1 (192.168.200.1) 56(84) bytes of data. ^C --- 192.168.200.1 ping statistics --- 5003 packets transmitted, 0 received, 100% packet loss, time 3012ms |
#ping
![]() Usage: ping [-LRUbdfnqrvVaAD] [-c count] [-i interval] [-w deadline] [-p pattern] [-s packetsize] [-t ttl] [-I interface] [-M pmtudisc-hint] [-m mark] [-S sndbuf] [-T tstamp-options] [-Q tos] [hop1 ...] destination |
#apt-cache search iperf
iperf - Internet Protocol bandwidth measuring tool |
#ping -s 5000 192.168.30.1
PING 192.168.30.1 (192.168.30.1) 5000(5028) bytes of data. 5008 bytes from 192.168.30.1: icmp_req=1 ttl=63 time=0.359 ms 5008 bytes from 192.168.30.1: icmp_req=2 ttl=63 time=0.357 ms 5008 bytes from 192.168.30.1: icmp_req=3 ttl=63 time=0.381 ms 5008 bytes from 192.168.30.1: icmp_req=4 ttl=63 time=0.339 ms ^[[A5008 bytes from 192.168.30.1: icmp_req=5 ttl=63 time=0.393 ms ^C --- 192.168.30.1 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 3998ms rtt min/avg/max/mdev = 0.339/0.365/0.393/0.030 ms |
#ping -s 65000 192.168.30.1
PING 192.168.30.1 (192.168.30.1) 65000(65028) bytes of data. 65008 bytes from 192.168.30.1: icmp_req=1 ttl=63 time=1.77 ms 65008 bytes from 192.168.30.1: icmp_req=2 ttl=63 time=1.47 ms 65008 bytes from 192.168.30.1: icmp_req=3 ttl=63 time=1.34 ms 65008 bytes from 192.168.30.1: icmp_req=4 ttl=63 time=1.60 ms ^C --- 192.168.30.1 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3004ms rtt min/avg/max/mdev = 1.348/1.549/1.772/0.157 ms |
#apt-get install iperf
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: iperf 0 upgraded, 1 newly installed, 0 to remove and 14 not upgraded. Need to get 52.5 kB of archives. After this operation, 143 kB of additional disk space will be used. Get:1 http://10.0.35.1/debian/ squeeze/main iperf i386 2.0.4-5 [52.5 kB] Fetched 52.5 kB in 0s (0 B/s) Selecting previously deselected package iperf. (Reading database ... 111597 files and directories currently installed.) Unpacking iperf (from .../iperf_2.0.4-5_i386.deb) ... Processing triggers for man-db ... Setting up iperf (2.0.4-5) ... |
#iperf -c 192.168.30.1
------------------------------------------------------------ Client connecting to 192.168.30.1, TCP port 5001 TCP window size: 16.0 KByte (default) ------------------------------------------------------------ [ 3] local 192.168.40.1 port 47166 connected with 192.168.30.1 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0-10.0 sec 958 MBytes 803 Mbits/sec |
#iperf -s
------------------------------------------------------------ Server listening on TCP port 5001 TCP window size: 85.3 KByte (default) ------------------------------------------------------------ [ 4] local 192.168.40.1 port 5001 connected with 192.168.30.1 port 34589 [ ID] Interval Transfer Bandwidth [ 4] 0.0-10.0 sec 969 MBytes 810 Mbits/sec |
#apt-cache search jperf
|
#apt-cache search perf
abinit-doc - A package for electronic structure calculations abinit - A package for electronic structure calculations abiword - efficient, featureful word processor with collaboration ace-gperf - ACE perfect hash function generator gperf-ace - ACE perfect hash function generator (transitional package) acidbase - Basic Analysis and Security Engine acovea - analysis of compiler options via evolutionary algorithms acpidump - utilities to dump system's ACPI tables to an ASCII file afbackup-client - Client-Server Backup System (Client side) afbackup-common - Client-Server Backup System (common files) ... igv - Integrative Genomics Viewer iozone3 - Filesystem and Disk Benchmarking Tool libmath-random-perl - Random Number Generators netperf - Network performance benchmark nikto - web server security scanner pcx - primal-dual interior-point code for linear programming python-profiler - deterministic profiling of any Python programs python3-profiler - deterministic profiling of any Python programs (Python 3.x) sisu-markup-samples - document markup examples for sisu, publish and search framework zeroc-ice-manual - Ice documentation in pdf |
#nc 192.168.30.1 3000 | dd of=/def/null
![]() dd: opening `/def/null': No such file or directory (UNKNOWN) [192.168.30.1] 3000 (?) : Connection refused |
#nc 192.168.30.1 3000 | dd of=/dev/null
(UNKNOWN) [192.168.30.1] 3000 (?) : Connection refused 0+0 records in 0+0 records out 0 bytes (0 B) copied, 0.000646561 s, 0.0 kB/s |
#nc 192.168.30.1 3000 | dd of=/dev/null
(UNKNOWN) [192.168.30.1] 3000 (?) : Connection refused 0+0 records in 0+0 records out 0 bytes (0 B) copied, 0.0010502 s, 0.0 kB/s |
#nc 192.168.30.1 3000 | dd of=/dev/null
(UNKNOWN) [192.168.30.1] 3000 (?) : Connection refused 0+0 records in 0+0 records out 0 bytes (0 B) copied, 0.00109797 s, 0.0 kB/s |
#nc 192.168.30.1 3000 | dd of=/dev/null
(UNKNOWN) [192.168.30.1] 3000 (?) : Connection refused 0+0 records in 0+0 records out 0 bytes (0 B) copied, 0.00120676 s, 0.0 kB/s |
#nc 192.168.30.1 3000 | dd of=/dev/null
(UNKNOWN) [192.168.30.1] 3000 (?) : Connection refused 0+0 records in 0+0 records out 0 bytes (0 B) copied, 0.00104156 s, 0.0 kB/s |
#cat /dev/zero | nc -p 3000
![]() no destination |
#cat /dev/zero | nc -l -p 3000
^[[A^[[A^C |
#nc 192.168.30.1 3000 | dd of=/dev/null
![]() ^C 2039837+41547 records in 2061011+0 records out 1055237632 bytes (1.1 GB) copied, 10.4167 s, 101 MB/s |
#fg
/usr/bin/nano "$@" |
#[default]
|
#ls /var/spool/asterisk/monitor/
|
#ls /var/spool/asterisk/monitor/
|
#ls /var/spool/asterisk/monitor/
|
#ls /var/spool/asterisk/monitor/
|
#apt-get install samba
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: samba-common samba-common-bin Suggested packages: smbldap-tools ldb-tools ctdb The following NEW packages will be installed: samba samba-common samba-common-bin account_policy_get: tdb_fetch_uint32 failed for type 6 (lockout duration), returning 0 ... Importing account for user...ok Importing account for alexp...ok Adding group `sambashare' (GID 115) ... Done. update-alternatives: using /usr/bin/smbstatus.samba3 to provide /usr/bin/smbstatus (smbstatus) in auto mode. Starting Samba daemons: nmbd smbd. Setting up samba-common-bin (2:3.5.6~dfsg-3squeeze4) ... update-alternatives: using /usr/bin/nmblookup.samba3 to provide /usr/bin/nmblookup (nmblookup) in auto mode. update-alternatives: using /usr/bin/net.samba3 to provide /usr/bin/net (net) in auto mode. update-alternatives: using /usr/bin/testparm.samba3 to provide /usr/bin/testparm (testparm) in auto mode. |
#ambpas
![]() bash: ambpas: command not found |
#smbpasswd -a user
New SMB password: Retype new SMB password: |
#nano /etc/samba/smb.conf
![]() --- /tmp/l3-saved-2054.8936.27800 2011-10-19 10:29:03.000000000 +0300 +++ /etc/samba/smb.conf 2011-10-19 10:32:18.000000000 +0300 @@ -302,12 +302,12 @@ ; write list = root, @lpadmin # A sample share for sharing your CD-ROM with others. -;[cdrom] -; comment = Samba server's CD-ROM -; read only = yes -; locking = no -; path = /cdrom -; guest ok = yes +[monitor] + comment = Asterisk monitor files + read only = yes + locking = no + path = /var/spool/asterisk/monitor/ + guest ok = yes # The next two parameters show how to auto-mount a CD-ROM when the # cdrom share is accesed. For this to work /etc/fstab must contain |
#/etc/init.d/samba restart
Stopping Samba daemons: nmbd smbd. Starting Samba daemons: nmbd smbd. |
#nano /etc/group
![]() --- /tmp/l3-saved-2054.1546.9748 2011-10-19 10:33:43.000000000 +0300 +++ /etc/group 2011-10-19 10:34:04.000000000 +0300 @@ -50,7 +50,7 @@ Debian-gdm:x:109: scanner:x:110:saned saned:x:111: -asterisk:x:112: +asterisk:x:112:user smmta:x:113: smmsp:x:114: sambashare:x:115: |
#asterisk -rx 'dialplan reload'
Dialplan reloaded. |
#asterisk -rx 'dialplan reload'
Dialplan reloaded. |
#[default]
|
#apt-get install
Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 14 not upgraded. |
#apt-get install libsox-fmt-gsm libsox-fmt-base
![]() Reading package lists... Done Building dependency tree Reading state information... Done Package libsox-fmt-gsm is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: libsox-fmt-base E: Package 'libsox-fmt-gsm' has no installation candidate |
#apt-get install libsox-fmt-gsm
![]() Reading package lists... Done Building dependency tree Reading state information... Done Package libsox-fmt-gsm is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: libsox-fmt-base E: Package 'libsox-fmt-gsm' has no installation candidate |
#cd /home
|
#ls
lost+found user |
#cs user/
![]() bash: cs: command not found |
#cd user/
|
#apt-get install libsox-fmt-base
Reading package lists... Done Building dependency tree Reading state information... Done libsox-fmt-base is already the newest version. libsox-fmt-base set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 14 not upgraded. |
#sox -t mp3
![]() 11 Desktop/ .gconfd/ letters.txt ru.txt 123.mp3 dictate.txt .gksu.lock .lilalo/ Templates/ .bash_history digits.txt .gnome2/ Music/ .update-notifier/ .bash_logout .dmrc .gnupg/ .nautilus/ Videos/ .bash_profile Documents/ .gstreamer-0.10/ pbdirectory.txt .xsession-errors .bashrc Downloads/ .gtk-bookmarks phonetic.txt .xsession-errors.old .config/ followme.txt .gvfs/ Pictures/ convert.py .fontconfig/ .ICEauthority .profile .dbus/ .gconf/ .l3rc Public/ |
#sox -t mp3 123.mp3 -t gsm -c1 -r8000 123.gsm rate -ql
|
#cp 123.gsm /var/lib/asterisk/moh/
|
#less /etc/asterisk/m
![]() |
#less /etc/asterisk/musiconhold.conf
|
#less /etc/asterisk/musiconhold.conf
|
#asterisk -rvvvv
Asterisk 1.6.2.9-2+squeeze3, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze3 currently running on linux4 (pid = 1257) Verbosity was 0 and is now 4 linux4*CLI> moh show classes files linux4*CLI> moh show files linux4*CLI> quit Executing last minute cleanups |
#sox -t mp3 jsmailo.mp3 -t gsm -c1 -r8000 jsmailo.gsm rate -ql
sox WARN rate: rate clipped 992 samples; decrease volume? sox WARN dither: dither clipped 858 samples; decrease volume? |
#cd /
|
#; without transcoding (same as Playback would do in the dialplan).
|
#mv /home/user/jsmailo.gsm /var/lib/asterisk/moh2
|
#[default]
|
#exten => 1499,1,Playback(demo-thanks)
![]() |
#nano /etc/asterisk/extensions.conf
![]() --- /tmp/l3-saved-2054.27809.23893 2011-10-19 12:43:02.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-10-19 12:43:12.000000000 +0300 @@ -7,7 +7,7 @@ [macro-monitor] exten => s,1,Set(CALLFILENAME=${EPOCH}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H-%M-%S")}-${MACRO_EXTEN}-${CALLERID(num)}) -exten => s,n,Monitor(.wav,${CALLFILENAME},m) +exten => s,n,Monitor(wav,${CALLFILENAME},m) exten => s,n,GotoIf($[ "${CALLERID(num):0:2}" != "14" ]?dial) exten => s,n,SetMusicOnHold(class2) exten => s,n,Dial(${ARG1},10) |
#nano /etc/asterisk/extensions.conf
|
#nano /etc/asterisk/extensions.conf
![]() --- /tmp/l3-saved-2054.21567.8064 2011-10-19 12:48:24.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-10-19 12:48:44.000000000 +0300 @@ -10,7 +10,7 @@ exten => s,n,MixMonitor(wav,${CALLFILENAME}) exten => s,n,GotoIf($[ "${CALLERID(num):0:2}" != "14" ]?dial) exten => s,n,SetMusicOnHold(class2) -exten => s,n,(dial),Dial(${ARG1},10) +exten => s,n(dial),Dial(${ARG1},10) [internal] |
#[default]
![]() |
#asterisk -rx 'sip reload peers'
|
#[general]
|
#asterisk -rx 'sip reload peers'
|
#nano /etc/asterisk/sip.conf
|
#[general]
[general] Global settings for call queues Persistent Members Store each dynamic member in each queue in the astdb so that when asterisk is restarted, each member will be automatically read into their recorded queues. Default is 'yes'. persistentmembers = yes AutoFill Behavior The old/current behavior of the queue has a serial type behavior in that the queue will make all waiting callers wait in the queue ... member => Agent/1001 member => Agent/1002 member => Local/1000@default,0,John Smith,SIP/1000 Note that using agent groups is probably not what you want. Strategies do not propagate down to the Agent system so if you want round robin, least recent, etc, you should list all the agents in this file individually and not use agent groups. member => Agent/@1 ; Any agent in group 1 member => Agent/:1,1 ; Any agent in group 1, wait for first available, but consider with penalty |
#history
175 startx 176 xstart 177 mc 178 ipconfig 179 ifconfig 180 ping 10.0.35.1 181 ping google.com 182 gnome 183 man gnome 184 cls ... 665 asterisk -rvvvv 666 nano /etc/asterisk/sip.conf 667 cat /etc/asterisk/queues.conf | sed 's/;,*//' | expand | grep -xv ' *' 668 nano /etc/asterisk/queues.conf 669 nano /etc/asterisk/queues.conf 670 nano /etc/asterisk/extensions.conf 671 nano /etc/asterisk/queues.conf 672 asterisk -rx 'sip reload peers' 673 asterisk -rx 'dialplan reload' 674 history |
#^C
![]() |
#asterisk -rx 'queue reload'
No such command 'queue reload' (type 'core show help queue reload' for other possible commands) |
#asterisk -rx 'queues reload'
No such command 'queues reload' (type 'core show help queues reload' for other possible commands) |
Время первой команды журнала | 15:56:20 2011-10-18 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 13:36:24 2011-10-19 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 17.82 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 3.96 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 3.69 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.46 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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