/l3/users/oleglevitskiy/lab-nt-voip/aster-3/root :1 :2 :3 :4 :5 :6 :7 |
|
#ls -al
total 60 drwx------ 9 root root 4096 Apr 22 13:54 . drwxr-xr-x 24 root root 4096 Apr 22 12:54 .. drwx------ 2 root root 4096 Apr 22 12:16 .aptitude -rw-r--r-- 1 root root 10 Apr 22 13:54 .bash_profile -rw-r--r-- 1 root root 630 Apr 22 13:54 .bashrc drwx------ 3 root root 4096 Apr 22 13:18 .cache drwx------ 3 root root 4096 Apr 22 13:18 .config drwx------ 2 root root 4096 Apr 22 12:38 .gconf -rw-r--r-- 1 root root 5275 Apr 22 13:53 install -rw-r--r-- 1 root root 51 Apr 22 13:54 .l3rc drwxr-xr-x 2 root root 4096 Apr 22 13:59 .lilalo drwx------ 3 root root 4096 Apr 22 13:18 .local -rw-r--r-- 1 root root 140 Nov 19 2007 .profile drwx------ 2 root root 4096 Apr 22 13:32 .ssh |
#nano install
|
#!/bin/sh
112 3381 0.0 0.0 245432 9488 ? Sl 12:54 0:00 /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 root 10292 0.1 0.0 47036 9960 ? Ss 13:58 0:01 l3-agent root 10465 0.0 0.0 7832 872 pts/2 S+ 14:12 0:00 grep agent |
#apt-cache search asterisk
asterisk - Open Source Private Branch Exchange (PBX) asterisk-config - Configuration files for Asterisk asterisk-dahdi - DAHDI devices support for the Asterisk PBX asterisk-dbg - Debugging symbols for Asterisk asterisk-dev - Development files for Asterisk asterisk-doc - Source code documentation for Asterisk asterisk-mobile - Bluetooth phone support for the Asterisk PBX asterisk-modules - loadable modules for the Asterisk PBX asterisk-mp3 - MP3 playback support for the Asterisk PBX asterisk-mysql - MySQL database protocol support for the Asterisk PBX ... linphone-dbg - Debugging symbols for linphone and its libraries op-panel - switchboard type application for the Asterisk PBX libopenr2-3 - MFC/R2 (telephony) call setup library python-asterisk - Asterisk Manager API interface module for Python libsipwitch-dev - secure peer-to-peer SIP VoIP server - development files libsipwitch1 - secure peer-to-peer SIP VoIP server - development files libsipwitch1-dbg - secure peer-to-peer SIP VoIP server - development files sipwitch - secure peer-to-peer VoIP server for the SIP protocol sipwitch-cgi - secure peer-to-peer SIP VoIP server - CGI XML-RPC interface python-starpy - Asterisk (AMI) protocols for Twisted Python |
#apt-get install asterisk
Selecting previously unselected package libsybdb5:amd64. Unpacking libsybdb5:amd64 (from .../libsybdb5_0.91-2+deb7u1_amd64.deb) ... Selecting previously unselected package asterisk-config. Unpacking asterisk-config (from .../asterisk-config_1%3a1.8.13.1~dfsg1-3+deb7u3_all.deb) ... Selecting previously unselected package libiksemel3. Unpacking libiksemel3 (from .../libiksemel3_1.2-4_amd64.deb) ... Selecting previously unselected package libpq5. Unpacking libpq5 (from .../libpq5_9.1.11-0wheezy1_amd64.deb) ... Selecting previously unselected package libradiusclient-ng2. Unpacking libradiusclient-ng2 (from .../libradiusclient-ng2_0.5.6-1.1_amd64.deb) ... ... Setting up libmail-sendmail-perl (0.79.16-1) ... Setting up libsox2 (14.4.0-3) ... Setting up libsox-fmt-alsa (14.4.0-3) ... Setting up libsox-fmt-base (14.4.0-3) ... Setting up module-assistant (0.11.4) ... Setting up rsync (3.0.9-4) ... update-rc.d: using dependency based boot sequencing Setting up sox (14.4.0-3) ... Setting up vpb-driver-source (4.2.55-1) ... Setting up asterisk-moh-opsound-gsm (2.03-1) ... |
#asterisk -rcvvvvvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on aster-3 (pid = 15080) Verbosity was 0 and is now 8 aster-3*CLI> q No such command 'q' (type 'core show help q' for other possible commands) aster-3*CLI> exit Executing last minute cleanups Asterisk cleanly ending (0). |
#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 Architecture Description +++-==============-============-============-================================= ii asterisk 1:1.8.13.1~d amd64 Open Source Private Branch Exchan |
#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 Architecture Description +++-==============-============-============-================================= ii asterisk 1:1.8.13.1~d amd64 Open Source Private Branch Exchan |
#dpkg -L asterisk | less
|
#dpkg -L asterisk-module | less
|
#dpkg -L asterisk-modules | less
|
#mc
|
#mc
|
#mc
|
#mc
|
#cd /usr/sbin/
|
#ls -al?grep aster
ls: invalid option -- '?' Try `ls --help' for more information. |
#ls -al|grep aster
-rwxr-xr-x 1 root root 1844320 Jan 4 03:07 asterisk lrwxrwxrwx 1 root root 8 Jan 4 03:07 rasterisk -> asterisk -rwxr-xr-x 1 root root 5553 Jan 4 03:07 safe_asterisk |
#ifconfig
eth0 Link encap:Ethernet HWaddr 70:71:bc:cc:70:24 inet addr:192.168.12.3 Bcast:192.168.12.255 Mask:255.255.255.0 inet6 addr: fe80::7271:bcff:fecc:7024/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:59538 errors:0 dropped:0 overruns:0 frame:0 TX packets:25706 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:69140964 (65.9 MiB) TX bytes:2680740 (2.5 MiB) Interrupt:20 Memory:fe200000-fe220000 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:5 errors:0 dropped:0 overruns:0 frame:0 TX packets:5 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:319 (319.0 B) TX bytes:319 (319.0 B) |
#asrterisk -rvvvvvvvvvv
l3script: asrterisk: command not found |
#asterisk -rvvvvvvvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on aster-3 (pid = 15080) ... voicemail show users List defined voicemail boxes voicemail show zones List zone message formats -- Remote UNIX connection -- Remote UNIX connection disconnected -- Remote UNIX connection -- Remote UNIX connection disconnected aster-3*CLI> q No such command 'q' (type 'core show help q' for other possible commands) aster-3*CLI> exit Executing last minute cleanups |
#cd /etc/asterisk/
|
#ls
adsi.conf cli_permissions.conf modules.conf agents.conf codecs.conf musiconhold.conf ais.conf console.conf muted.conf alarmreceiver.conf dbsep.conf osp.conf alsa.conf dnsmgr.conf oss.conf amd.conf dsp.conf phone.conf app_mysql.conf dundi.conf phoneprov.conf asterisk.adsi enum.conf queuerules.conf asterisk.conf extconfig.conf queues.conf calendar.conf extensions.ael res_config_mysql.conf ... cel_custom.conf indications.conf sip_notify.conf cel_odbc.conf jabber.conf skinny.conf cel_pgsql.conf jingle.conf sla.conf cel_sqlite3_custom.conf logger.conf smdi.conf cel_tds.conf manager.conf telcordia-1.adsi chan_dahdi.conf manager.d udptl.conf chan_mobile.conf meetme.conf unistim.conf chan_ooh323.conf mgcp.conf users.conf cli_aliases.conf minivm.conf voicemail.conf cli.conf misdn.conf vpb.conf |
#mv sip.conf sip.conf.old
|
#nano sip.conf
--- /dev/null 2014-04-22 12:54:05.875188577 +0300 +++ sip.conf 2014-04-22 15:37:31.070500758 +0300 @@ -0,0 +1 @@ +#sip |
#sip
|
#sip
|
#sip
|
#sip
|
#sip
|
#nano sip.conf
|
#nano sip.conf
--- /tmp/l3-saved-10329.15061.4412 2014-04-22 15:54:53.126534095 +0300 +++ sip.conf 2014-04-22 15:55:04.886534472 +0300 @@ -1,4 +1,4 @@ - +[general] #sip context=default |
#[general]
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on aster-3 (pid = 15676) Verbosity was 0 and is now 15 aster-3*CLI> sip reload No such command 'sip reload' (type 'core show help sip reload' for other possible commands) aster-3*CLI> sip reload No such command 'sip reload' (type 'core show help sip reload' for other possible commands) aster-3*CLI> exit Executing last minute cleanups Asterisk cleanly ending (0). |
#nano sip.conf
|
#[general]
Reloading Asterisk PBX configuration files. |
#asterisk -rcvvvvvvvvvvvvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on aster-3 (pid = 15676) ... voicemail reload Reload voicemail configuration voicemail show users List defined voicemail boxes voicemail show zones List zone message formats aster-3*CLI> sip show peers No such command 'sip show peers' (type 'core show help sip show' for other possible commands) aster-3*CLI> sip reload No such command 'sip reload' (type 'core show help sip reload' for other possible commands) aster-3*CLI> exit Executing last minute cleanups Asterisk cleanly ending (0). |
#service asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -rcvvvvvvvvvvvvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on aster-3 (pid = 15846) Verbosity was 0 and is now 15 aster-3*CLI> sip show peeers No such command 'sip show peeers' (type 'core show help sip show peeers' for other possible commands) aster-3*CLI> exit Executing last minute cleanups Asterisk cleanly ending (0). |
#ls -al
total 804 drwxr-xr-x 3 asterisk asterisk 4096 Apr 22 15:37 . drwxr-xr-x 131 root root 12288 Apr 22 14:27 .. -rw-r----- 1 asterisk asterisk 140 Jan 4 03:07 adsi.conf -rw-r----- 1 asterisk asterisk 2760 Jan 4 03:07 agents.conf -rw-r----- 1 asterisk asterisk 2904 Jan 4 03:07 ais.conf -rw-r----- 1 asterisk asterisk 2084 Jan 4 03:07 alarmreceiver.conf -rw-r----- 1 asterisk asterisk 3498 Jan 4 03:07 alsa.conf -rw-r----- 1 asterisk asterisk 767 Jan 4 03:07 amd.conf -rw-r----- 1 asterisk asterisk 1044 Jan 4 03:07 app_mysql.conf ... -rw-r----- 1 asterisk asterisk 742 Jan 4 03:07 sip_notify.conf -rw-r----- 1 asterisk asterisk 9185 Jan 4 03:07 skinny.conf -rw-r----- 1 asterisk asterisk 6774 Jan 4 03:07 sla.conf -rw-r----- 1 asterisk asterisk 2669 Jan 4 03:07 smdi.conf -rw-r----- 1 asterisk asterisk 1384 Jan 4 03:07 telcordia-1.adsi -rw-r----- 1 asterisk asterisk 656 Jan 4 03:07 udptl.conf -rw-r----- 1 asterisk asterisk 5096 Jan 4 03:07 unistim.conf -rw-r----- 1 asterisk asterisk 2423 Jan 4 03:07 users.conf -rw-r----- 1 asterisk asterisk 21238 Jan 4 03:07 voicemail.conf -rw-r----- 1 asterisk asterisk 5939 Jan 4 03:07 vpb.conf |
#mv sip.conf.old sip.conf.OLDFILE
|
#chown asterisk:asterisk sip.conf
|
#ls -al
total 804 drwxr-xr-x 3 asterisk asterisk 4096 Apr 22 16:02 . drwxr-xr-x 131 root root 12288 Apr 22 14:27 .. -rw-r----- 1 asterisk asterisk 140 Jan 4 03:07 adsi.conf -rw-r----- 1 asterisk asterisk 2760 Jan 4 03:07 agents.conf -rw-r----- 1 asterisk asterisk 2904 Jan 4 03:07 ais.conf -rw-r----- 1 asterisk asterisk 2084 Jan 4 03:07 alarmreceiver.conf -rw-r----- 1 asterisk asterisk 3498 Jan 4 03:07 alsa.conf -rw-r----- 1 asterisk asterisk 767 Jan 4 03:07 amd.conf -rw-r----- 1 asterisk asterisk 1044 Jan 4 03:07 app_mysql.conf ... -rw-r----- 1 asterisk asterisk 742 Jan 4 03:07 sip_notify.conf -rw-r----- 1 asterisk asterisk 9185 Jan 4 03:07 skinny.conf -rw-r----- 1 asterisk asterisk 6774 Jan 4 03:07 sla.conf -rw-r----- 1 asterisk asterisk 2669 Jan 4 03:07 smdi.conf -rw-r----- 1 asterisk asterisk 1384 Jan 4 03:07 telcordia-1.adsi -rw-r----- 1 asterisk asterisk 656 Jan 4 03:07 udptl.conf -rw-r----- 1 asterisk asterisk 5096 Jan 4 03:07 unistim.conf -rw-r----- 1 asterisk asterisk 2423 Jan 4 03:07 users.conf -rw-r----- 1 asterisk asterisk 21238 Jan 4 03:07 voicemail.conf -rw-r----- 1 asterisk asterisk 5939 Jan 4 03:07 vpb.conf |
#service asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -rcvvvvvvvvvvvvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on aster-3 (pid = 15970) ... 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline] aster-3*CLI> sip show peers Name/username Host Dyn Forcerport ACL Port Status 1301/1301 192.168.12.103 D N 5060 Unmonitored 1302/1302 192.168.12.33 D N 5060 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline] aster-3*CLI> exitip addr show Disconnected from Asterisk server Executing last minute cleanups Asterisk cleanly ending (0). |
#ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 70:71:bc:cc:70:24 brd ff:ff:ff:ff:ff:ff inet 192.168.12.3/24 brd 192.168.12.255 scope global eth0 inet6 fe80::7271:bcff:fecc:7024/64 scope link valid_lft forever preferred_lft forever |
#asterisk -rcvvvvvvvvvvvvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on aster-3 (pid = 15970) ... aster-3*CLI> sip show peers Name/username Host Dyn Forcerport ACL Port Status 1301/1301 192.168.12.103 D N 5060 Unmonitored 1302/1302 192.168.12.206 D N 5060 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline] -- Remote UNIX connection -- Remote UNIX connection disconnected aster-3*CLI> exit Executing last minute cleanups Asterisk cleanly ending (0). |
#pwd
/etc/asterisk |
#mv extensions.conf extensions.conf.OLDFILE
|
#touch extensions.conf
|
#nano extensions.conf
--- /tmp/l3-saved-10329.7849.3044 2014-04-22 17:13:47.670685604 +0300 +++ extensions.conf 2014-04-22 17:15:00.566687857 +0300 @@ -0,0 +1,7 @@ +[default] + + + + + + |
#[default]
|
#mv extensions.ael extensions.ael.OLDFILE
|
#mc
|
#[default]
|
#service asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -rcvvvvvvvvvvvvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on aster-3 (pid = 16344) ... '700' => 1. Park() [features] [ Context 'app_dial_gosub_virtual_context' created by 'app_dial' ] 's' => 1. NoOp() [app_dial] [ Context 'default' created by 'pbx_config' ] '_13XX' => 1. Dial(SIP/${EXTEN}) [pbx_config] -= 4 extensions (4 priorities) in 4 contexts. =- aster-3*CLI> '700' => 1. Park() Disconnected from Asterisk server Executing last minute cleanups Asterisk cleanly ending (0). |
#mc
|
#ls -al|grep sip
-rw-r--r-- 1 asterisk asterisk 152 Apr 22 16:00 sip.conf -rw-r----- 1 asterisk asterisk 79163 Jan 4 03:07 sip.conf.OLDFILE -rw-r----- 1 asterisk asterisk 742 Jan 4 03:07 sip_notify.conf |
#mc
|
#ls -al|grep ext
-rw-r----- 1 asterisk asterisk 3397 Jan 4 03:07 extconfig.conf -rw-r--r-- 1 root root 132 Apr 22 17:21 extensions.conf -rw-r----- 1 asterisk asterisk 7480 Jan 4 03:07 extensions_minivm.conf |
#chown asterisk:asterisk extensions.conf
|
#nano extensions_minivm.conf
|
#; MINI-VOICEMAIL dialplan example
|
#l3-agent
l3-agent is already running: pid=3488; pidfile=/root/.lilalo/l3-agent.pid |
#сcat /etc/asterisk/sip.conf
[general] context=default ; peer ; 1301 - 1399 всё моё [1301] type=friend secret=1234 host=dynamic [1302] type=friend secret=1234 host=dynamic |
#cat /etc/asterisk/extensions.conf
[default] ;exten => 1301,1,Answer ;exten => 1301,n,Dial(SIP/1301) ;exten => 1301,n,Hangup exten => _13XX,1,Dial(SIP/${EXTEN}) |
#nano /etc/asterisk/sip.conf
--- /tmp/l3-saved-3577.11800.17060 2014-04-23 09:49:07.584571641 +0300 +++ /etc/asterisk/sip.conf 2014-04-23 09:49:42.384572416 +0300 @@ -13,3 +13,8 @@ secret=1234 host=dynamic +[1303] +type=friend +secret=1234 +host=dynamic + |
#clear
|
#asterisk -rcvvvvvvvvvvvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on aster-3 (pid = 2628) ... refcount: 3 name: 1301 type: peer objflags: 0 refcount: 3 -= Registry objects: 0 =- -= Dialog objects: aster-3*CLI> exit Executing last minute cleanups Asterisk cleanly ending (0). |
#asterisk -rcvvvvvvvvvvvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on aster-3 (pid = 2628) ... unistim reload Reload UNISTIM configuration unistim send packet Send packet (for reverse engineering) unistim set debug {on|off} Toggle UNITSTIM debugging unistim show info Show UNISTIM info voicemail reload Reload voicemail configuration voicemail show users List defined voicemail boxes voicemail show zones List zone message formats aster-3*CLI> exit Executing last minute cleanups Asterisk cleanly ending (0). |
#cd /etc/asterisk/
|
#ls\
> ^C |
#nano extensions.conf
--- /tmp/l3-saved-3577.8542.15143 2014-04-23 11:31:33.836707062 +0300 +++ extensions.conf 2014-04-23 11:31:51.784707454 +0300 @@ -9,3 +9,5 @@ + + |
#[default]
GNU nano 2.2.6 File: sip.conf Modified secret=1234 host=dynamic [1303] type=friend secret=1234 host=dynamic [frankfurt] type=friend secret=1234 host=dynamic ^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos ^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text ^T To Spell |
#[general]
|
#[general]
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on aster-3 (pid = 2628) ... == Parsing '/etc/asterisk/cel_odbc.conf': == Found -- Reloading module 'func_odbc.so' (ODBC lookups) aster-3*CLI> [Apr 23 11:52:12] WARNING[2717]: chan_sip.c:20720 handle_response_register: Forb aster-3*CLI> idden - wrong password on authentication for REGISTER for 'berlin' to '192.168.1 No such command '[Apr 23 11:52:12] WARNING[2717]: chan_sip.c:20720 handle_response_register: Forb' (type 'core show help [Apr 23' for other possible commands) No such command 'idden - wrong password on authentication for REGISTER for 'berlin' to '192.168.1' (type 'core show help idden -' for other possible commands) aster-3*CLI> 2.6' Disconnected from Asterisk server Executing last minute cleanups Asterisk cleanly ending (0). |
#asterisk -rcvvvvvvvvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on aster-3 (pid = 2628) ... [ Context 'default' created by 'pbx_config' ] '_13XX' => 1. Dial(SIP/${EXTEN}) [pbx_config] -= 4 extensions (4 priorities) in 4 contexts. =- -- Remote UNIX connection -- Remote UNIX connection disconnected aster-3*CLI> sip reload Reloading SIP aster-3*CLI> exit Executing last minute cleanups Asterisk cleanly ending (0). |
#nano extensions.conf
--- /tmp/l3-saved-3577.9348.27416 2014-04-23 12:05:42.752752204 +0300 +++ extensions.conf 2014-04-23 12:08:40.976756132 +0300 @@ -6,6 +6,7 @@ exten => _13XX,1,Dial(SIP/${EXTEN}) +exten => _23XX,1,Dial(SIP/frankfurt/${EXTEN}) |
#[default]
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on aster-3 (pid = 2628) ... -- SIP/1302-0000000d is ringing -- SIP/1302-0000000d answered SIP/frankfurt-0000000c -- Locally bridging SIP/frankfurt-0000000c and SIP/1302-0000000d == Spawn extension (default, 1302, 1) exited non-zero on 'SIP/frankfurt-0000000c' -- Remote UNIX connection -- Remote UNIX connection disconnected aster-3*CLI> Disconnected from Asterisk server Executing last minute cleanups Asterisk cleanly ending (0). |
#nano extensions.conf
|
#[default]
|
#[general]
|
#[general]
|
#[general]
|
#host=dynamic
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on aster-3 (pid = 2628) ... [Apr 23 12:19:14] NOTICE[2717]: chan_sip.c:25030 handle_request_register: Registration from '<sip:vienna@192.168.12.3>' failed for '192.168.12.5:5060' - Wrong password [Apr 23 12:19:14] NOTICE[2717]: chan_sip.c:25030 handle_request_register: Registration from '<sip:vienna@192.168.12.3>' failed for '192.168.12.5:5060' - Wrong password [Apr 23 12:19:15] NOTICE[2717]: chan_sip.c:25030 handle_request_register: Registration from '<sip:vienna@192.168.12.3>' failed for '192.168.12.5:5060' - Wrong password [Apr 23 12:19:17] NOTICE[2717]: chan_sip.c:25030 handle_request_register: Registration from '<sip:vienna@192.168.12.3>' failed for '192.168.12.5:5060' - Wrong password [Apr 23 12:19:18] NOTICE[2717]: chan_sip.c:25030 handle_request_register: Registration from '<sip:vienna@192.168.12.3>' failed for '192.168.12.5:5060' - Wrong password [Apr 23 12:19:19] NOTICE[2717]: chan_sip.c:25030 handle_request_register: Registration from '<sip:vienna@192.168.12.3>' failed for '192.168.12.5:5060' - Wrong password [Apr 23 12:19:20] NOTICE[2717]: chan_sip.c:25030 handle_request_register: Registration from '<sip:vienna@192.168.12.3>' failed for '192.168.12.5:5060' - Wrong password aster-3*CLI> exit Executing last minute cleanups Asterisk cleanly ending (0). |
#nano extensions.conf
--- /tmp/l3-saved-3577.196.26233 2014-04-23 12:19:34.104770522 +0300 +++ extensions.conf 2014-04-23 12:20:41.272772000 +0300 @@ -8,7 +8,9 @@ exten => _23XX,1,Dial(SIP/frankfurt/${EXTEN}) +exten => _12XX,1,Dial(SIP/kiev/${EXTEN}) +exten => _22XX,1,Dial(SIP/viena/${EXTEN}) |
#[default]
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on aster-3 (pid = 2628) ... -- Executing [1302@default:1] Dial("SIP/192.168.12.5-00000010", "SIP/1302") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/1302 -- SIP/1302-00000011 is ringing -- SIP/1302-00000011 answered SIP/192.168.12.5-00000010 -- Locally bridging SIP/192.168.12.5-00000010 and SIP/1302-00000011 == Spawn extension (default, 1302, 1) exited non-zero on 'SIP/192.168.12.5-00000010' aster-3*CLI> exit Executing last minute cleanups Asterisk cleanly ending (0). |
#nano sip.conf
|
#host=dynamic
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on aster-3 (pid = 2628) ... frankfurt/berlin 192.168.12.6 D N 5060 Unmonitored 4 sip peers [Monitored: 0 online, 0 offline Unmonitored: 3 online, 1 offline] [Apr 23 12:24:31] NOTICE[2717]: chan_sip.c:25030 handle_request_register: Registration from '<sip:vaduz@192.168.12.3>' failed for '192.168.12.9:5060' - Wrong password [Apr 23 12:24:42] NOTICE[2717]: chan_sip.c:25030 handle_request_register: Registration from '<sip:vaduz@192.168.12.3>' failed for '192.168.12.9:5060' - Wrong password [Apr 23 12:24:55] NOTICE[2717]: chan_sip.c:25030 handle_request_register: Registration from '<sip:kiev@192.168.12.3>' failed for '192.168.12.2:5060' - Wrong password [Apr 23 12:24:57] NOTICE[2717]: chan_sip.c:25030 handle_request_register: Registration from '<sip:vaduz@192.168.12.3>' failed for '192.168.12.9:5060' - Wrong password [Apr 23 12:25:04] NOTICE[2717]: chan_sip.c:25030 handle_request_register: Registration from '<sip:vienna@192.168.12.3>' failed for '192.168.12.5:5060' - Wrong password aster-3*CLI> exit Executing last minute cleanups Asterisk cleanly ending (0). |
#nano sip.conf
|
#asterisk -rcvvvvvvvvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on aster-3 (pid = 2628) Verbosity is at least 16 aster-3*CLI> exit Executing last minute cleanups Asterisk cleanly ending (0). |
#nano sip.conf
--- /tmp/l3-saved-3577.4744.11681 2014-04-23 12:27:02.532780403 +0300 +++ sip.conf 2014-04-23 12:28:38.948782529 +0300 @@ -31,13 +31,14 @@ host=dynamic username=berlin -[kiev] | -type=friend | -secret=1234 | +[kiev] + +type=friend +secret=1234 | host=dynamic | username=berlin -[viena] | | +[viena] | type=friend $| secret=1234 $| host=dynamic $| |
#nano sip.conf
--- /tmp/l3-saved-3577.15561.15101 2014-04-23 12:28:54.408782864 +0300 +++ sip.conf 2014-04-23 12:30:08.380784498 +0300 @@ -31,18 +31,14 @@ host=dynamic username=berlin -[kiev] - +[kiev] type=friend -secret=1234 | -host=dynamic | +secret=1234 +host=dynamic username=berlin -[viena] | -type=friend $| -secret=1234 $| -host=dynamic $| -username=berlin - - - +[viena] +type=friend +secret=1234 +host=dynamic +username=berlin |
#nano sip.conf
|
#host=dynamic
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on aster-3 (pid = 2628) ... 1303 (Unspecified) D N 0 Unmonitored frankfurt/berlin 192.168.12.6 D N 5060 Unmonitored kiev/berlin (Unspecified) D N 0 Unmonitored viena/berlin (Unspecified) D N 0 Unmonitored 6 sip peers [Monitored: 0 online, 0 offline Unmonitored: 3 online, 3 offline] == Using SIP RTP CoS mark 5 [Apr 23 12:31:20] NOTICE[2717]: chan_sip.c:22753 handle_request_invite: Call from '' (192.168.12.2:5060) to extension '4101' rejected because extension not found in context 'default'. aster-3*CLI> exit Executing last minute cleanups Asterisk cleanly ending (0). |
#nano sip.conf
|
#host=dynamic
sip.conf sip_notify.conf |
#cat sip.conf
[general] context=default directmedia=no register => berlin:1234@192.168.12.6/frankfurt register => berlin:1234@192.168.12.2/kiev register => berlin:1234@192.168.12.5/viena ; peer ; 1301 - 1399 всё моё [1301] type=friend ... [kiev] type=friend secret=1234 host=dynamic username=berlin [viena] type=friend secret=1234 host=dynamic username=berlin |
#asterisk -rcvvvvvvvvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on aster-3 (pid = 2628) ... 1301/1301 192.168.12.103 D N 5060 Unmonitored 1302/1302 192.168.12.206 D N 5060 Unmonitored 1303 (Unspecified) D N 0 Unmonitored frankfurt/berlin 192.168.12.6 D N 5060 Unmonitored kiev/berlin (Unspecified) D N 0 Unmonitored viena/berlin (Unspecified) D N 0 Unmonitored 6 sip peers [Monitored: 0 online, 0 offline Unmonitored: 3 online, 3 offline] aster-3*CLI> exit Executing last minute cleanups Asterisk cleanly ending (0). |
[default] ;exten => 1301,1,Answer ;exten => 1301,n,Dial(SIP/1301) ;exten => 1301,n,Hangup exten => _13XX,1,Dial(SIP/${EXTEN})
[general] context=default directmedia=no register => berlin:1234@192.168.12.6/frankfurt register => berlin:1234@192.168.12.2/kiev register => berlin:1234@192.168.12.5/viena ; peer ; 1301 - 1399 всё моё [1301] type=friend secret=1234 host=dynamic [1302] type=friend secret=1234 host=dynamic [1303] type=friend secret=1234 host=dynamic [frankfurt] type=friend secret=1234 host=dynamic username=berlin [kiev] type=friend secret=1234 host=dynamic username=berlin [viena] type=friend secret=1234 host=dynamic username=berlin
Время первой команды журнала | 12:59:38 2014- 4-22 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 11:31:53 2014- 4-23 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 100 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 2.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 2.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 4.32 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.39 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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