/l3/users/sidar/nt-voip-sidar/linux5.unix.nt/root :1 :2 :3 :4 |
|
#l3 -agent
l3 [command]: cd new_context - change current lilalo context pwd - show current lilalo context on - switch writing on (NOT IMPLEMENTED YET) off - switch writing off (NOT IMPLEMENTED YET) |
#l3-agent
|
#date
Mon Nov 18 14:20:42 EET 2013 |
#time
real 0m0.000s user 0m0.000s sys 0m0.000s |
#dpkg -l | wc -l
1461 |
#apt-get cache search asterisk
E: Invalid operation cache |
#apt-get cache search asterisk
E: Invalid operation cache |
#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 |
#. /etc/bash_completion
|
#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~dfsg amd64 Open Source Private Branch Exchange (PBX) |
#dpkg -l asterisk | less
|
#dpkg -L asterisk | less
|
#dpkg -l asterisk | less
|
#dpkg -l asterisk | grep less
|
#dpkg -l | grep asterisk
ii asterisk 1:1.8.13.1~dfsg-3+deb7u1 amd64 Open Source Private Branch Exchange (PBX) ii asterisk-config 1:1.8.13.1~dfsg-3+deb7u1 all Configuration files for Asterisk ii asterisk-core-sounds-en 1.4.22-1 all asterisk PBX sound files - US English ii asterisk-core-sounds-en-gsm 1.4.22-1 all asterisk PBX sound files - en-us/gsm ii asterisk-modules 1:1.8.13.1~dfsg-3+deb7u1 amd64 loadable modules for the Asterisk PBX ii asterisk-moh-opsound-gsm 2.03-1 all asterisk extra sound files - English/gsm ii asterisk-voicemail 1:1.8.13.1~dfsg-3+deb7u1 amd64 simple voicemail support for the Asterisk PBX |
#cd /etc/asterisk/
|
#runlevel
N 2 |
#ls /etc/init.d/asterisk
/etc/init.d/asterisk |
#/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. |
#ps aux | grep asterisk
root 485 0.0 0.0 7828 884 pts/1 S+ 15:38 0:00 grep asterisk asterisk 563 0.1 0.1 748336 30048 ? Ssl 15:29 0:00 /usr/sbin/asterisk -p -U asterisk asterisk 565 0.0 0.0 13908 772 ? S 15:29 0:00 astcanary /var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet 563 |
#pst
pstoedit pstopnm pstops pstree pstree.x11 pstruct |
#pst
pstoedit pstopnm pstops pstree pstree.x11 pstruct |
#pstree | less
|
#netstat -lnp | grep asterisk
tcp 0 0 127.0.0.1:5038 0.0.0.0:* LISTEN 563/asterisk tcp 0 0 0.0.0.0:2000 0.0.0.0:* LISTEN 563/asterisk udp 0 0 0.0.0.0:4520 0.0.0.0:* 563/asterisk udp 0 0 0.0.0.0:4569 0.0.0.0:* 563/asterisk udp 0 0 0.0.0.0:5000 0.0.0.0:* 563/asterisk udp 0 0 0.0.0.0:5060 0.0.0.0:* 563/asterisk unix 2 [ ACC ] STREAM LISTENING 7057656 563/asterisk /var/run/asterisk/asterisk.ctl |
#sterisk -r
l3script: sterisk: command not found |
#asterisk -r
Asterisk 1.8.13.1~dfsg-3+deb7u1, 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. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg-3+deb7u1 currently running on linux5 (pid = 563) linux5*CLI> exit |
#/etc/init.d/asterisk stop
Stopping Asterisk PBX: asterisk. |
#asterisk -r
Asterisk 1.8.13.1~dfsg-3+deb7u1, 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. ========================================================================= Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?) |
#dpkg -L asterisk-modules | sort | less
|
#dpkg -L asterisk-modules | sort | less
|
#dpkg -L asterisk-modules | sort | less
|
#asterisk -r
Asterisk 1.8.13.1~dfsg-3+deb7u1, 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. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg-3+deb7u1 currently running on linux5 (pid = 15950) linux5*CLI> exit |
#mv /etc/asterisk/sip
sip.conf sip_notify.conf |
#mv /etc/asterisk/sip
sip.conf sip_notify.conf |
#mv /etc/asterisk/sip.conf /etc/asterisk/sip.conf.SAVED
|
#cd /etc/asterisk/
|
#ls
adsi.conf cel_pgsql.conf func_odbc.conf queues.conf agents.conf cel_sqlite3_custom.conf gtalk.conf res_config_mysql.conf ais.conf cel_tds.conf h323.conf res_config_sqlite.conf alarmreceiver.conf chan_dahdi.conf http.conf res_curl.conf alsa.conf chan_mobile.conf iax.conf res_fax.conf amd.conf chan_ooh323.conf iaxprov.conf res_ldap.conf app_mysql.conf cli_aliases.conf indications.conf res_odbc.conf asterisk.adsi cli.conf jabber.conf res_pgsql.conf asterisk.conf cli_permissions.conf jingle.conf res_pktccops.conf calendar.conf codecs.conf logger.conf res_snmp.conf ... cdr_manager.conf dundi.conf minivm.conf sip_notify.conf cdr_mysql.conf enum.conf misdn.conf skinny.conf cdr_odbc.conf extconfig.conf modules.conf sla.conf cdr_pgsql.conf extensions.ael musiconhold.conf smdi.conf cdr_sqlite3_custom.conf extensions.conf muted.conf telcordia-1.adsi cdr_syslog.conf extensions.lua osp.conf udptl.conf cdr_tds.conf extensions_minivm.conf oss.conf unistim.conf cel.conf features.conf phone.conf users.conf cel_custom.conf festival.conf phoneprov.conf voicemail.conf cel_odbc.conf followme.conf queuerules.conf vpb.conf |
#vi sip.conf
--- /dev/null 2013-11-18 12:32:55.014712869 +0200 +++ sip.conf 2013-11-18 16:53:25.385799982 +0200 @@ -0,0 +1,15 @@ +context=default + + +[2201] + +type=friend +secret=2201 +host=dynamic + + +[2202] + +type=friend +secret=2202 +host=dynamic |
#vi sip.conf
|
#~
context=default [2201] type=friend secret=2201 host=dynamic [2202] type=friend secret=2202 host=dynamic |
#asterisk -r
Asterisk 1.8.13.1~dfsg-3+deb7u1, 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. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg-3+deb7u1 currently running on linux5 (pid = 15950) linux5*CLI> sip reload [Nov 18 16:55:40] WARNING[16025]: config.c:1291 process_text_line: parse error: No category context for line 1 of /etc/asterisk/sip.conf [Nov 18 16:55:40] ERROR[16025]: chan_sip.c:28034 reload_config: Contents of sip.conf are invalid and cannot be parsed linux5*CLI> exit |
#ls il /etc/asterisk/sip.conf
ls: cannot access il: No such file or directory /etc/asterisk/sip.conf |
#ls -l /etc/asterisk/sip.conf
-rw-r--r-- 1 root root 110 Nov 18 16:53 /etc/asterisk/sip.conf |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#/etc/init.d/asterisk stop
Stopping Asterisk PBX: asterisk. |
#/etc/init.d/asterisk start
Starting Asterisk PBX: asterisk. |
#asterisk -r
Asterisk 1.8.13.1~dfsg-3+deb7u1, 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. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg-3+deb7u1 currently running on linux5 (pid = 850) linux5*CLI> sip show peers No such command 'sip show peers' (type 'core show help sip show' for other possible commands) linux5*CLI> exit |
#/etc/init.d/asterisk stop
Stopping Asterisk PBX: asterisk. |
#/etc/init.d/asterisk start
Starting Asterisk PBX: asterisk. |
#asterisk -r
Asterisk 1.8.13.1~dfsg-3+deb7u1, 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. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg-3+deb7u1 currently running on linux5 (pid = 8674) linux5*CLI> sip show peers Name/username Host Dyn Forcerport ACL Port Status 2201 (Unspecified) D N 0 Unmonitored 2202 (Unspecified) D N 0 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 2 offline] linux5*CLI> exit |
#asterisk -rvvv
Asterisk 1.8.13.1~dfsg-3+deb7u1, 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~dfsg-3+deb7u1 currently running on linux5 (pid = 8674) ... Name/username Host Dyn Forcerport ACL Port Status 2201/2201 192.168.15.213 D N 5060 Unmonitored 2202/2202 192.168.15.202 D N 5060 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline] == Using SIP RTP CoS mark 5 [Nov 18 17:17:39] NOTICE[8697]: chan_sip.c:22753 handle_request_invite: Call from '2202' (192.168.15.202:5060) to extension '2201' rejected because extension not found in context 'default'. == Using SIP RTP CoS mark 5 [Nov 18 17:18:26] NOTICE[8697]: chan_sip.c:22753 handle_request_invite: Call from '2201' (192.168.15.213:5060) to extension '2202' rejected because extension not found in context 'default'. linux5*CLI> exit Executing last minute cleanups |
#ls
adsi.conf cel_sqlite3_custom.conf h323.conf res_curl.conf agents.conf cel_tds.conf http.conf res_fax.conf ais.conf chan_dahdi.conf iax.conf res_ldap.conf alarmreceiver.conf chan_mobile.conf iaxprov.conf res_odbc.conf alsa.conf chan_ooh323.conf indications.conf res_pgsql.conf amd.conf cli_aliases.conf jabber.conf res_pktccops.conf app_mysql.conf cli.conf jingle.conf res_snmp.conf asterisk.adsi cli_permissions.conf logger.conf res_stun_monitor.conf asterisk.conf codecs.conf manager.conf rtp.conf calendar.conf console.conf manager.d say.conf ... cdr_mysql.conf extconfig.conf musiconhold.conf smdi.conf cdr_odbc.conf extensions.ael muted.conf telcordia-1.adsi cdr_pgsql.conf extensions.conf osp.conf udptl.conf cdr_sqlite3_custom.conf extensions.lua oss.conf unistim.conf cdr_syslog.conf extensions_minivm.conf phone.conf users.conf cdr_tds.conf features.conf phoneprov.conf voicemail.conf cel.conf festival.conf queuerules.conf vpb.conf cel_custom.conf followme.conf queues.conf cel_odbc.conf func_odbc.conf res_config_mysql.conf cel_pgsql.conf gtalk.conf res_config_sqlite.conf |
#mv e
enum.conf extensions.ael extensions.lua extconfig.conf extensions.conf extensions_minivm.conf |
#mv extensions.conf{,.SAVES}
|
#mv extensions.conf{,.SAVED}
mv: cannot stat `extensions.conf': No such file or directory |
#vi extensions.conf
--- /tmp/l3-saved-26259.9867.131 2013-11-18 17:32:05.953817089 +0200 +++ extensions.conf 2013-11-18 17:32:41.213817348 +0200 @@ -1,4 +1,4 @@ [default] exten => 4000,1,Answer -exten => 4000,n,Playback (demo-thanks) +exten => 4000,n,Playback demo-thanks) |
#asterisk -rvvv
Asterisk 1.8.13.1~dfsg-3+deb7u1, 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~dfsg-3+deb7u1 currently running on linux5 (pid = 8674) ... -- Executing [2255@default:2] Playback("SIP/2202-00000009", "demo-thanks") in new stack -- <SIP/2202-00000009> Playing 'demo-thanks.gsm' (language 'en') [Nov 18 17:42:57] NOTICE[28627]: channel.c:4170 __ast_read: Dropping incompatible voice frame on SIP/2202-00000009 of format ulaw since our native format has changed to 0x2 (gsm) -- Auto fallthrough, channel 'SIP/2202-00000009' status is 'UNKNOWN' -- Remote UNIX connection Executing last minute cleanups == Destroying musiconhold processes linux5*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#asterisk -rvvv
Asterisk 1.8.13.1~dfsg-3+deb7u1, 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~dfsg-3+deb7u1 currently running on linux5 (pid = 30816) ... -- Time to scan old dialplan and merge leftovers back into the new: 0.000821 sec -- Time to restore hints and swap in new dialplan: 0.000003 sec -- Time to delete the old dialplan: 0.000043 sec -- Total time merge_contexts_delete: 0.000867 sec -- Remote UNIX connection Executing last minute cleanups == Destroying musiconhold processes linux5*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#l3-agent
l3-agent is already running: pid=5507; pidfile=/root/.lilalo/l3-agent.pid |
#vi extensions.conf
|
#vi extensions.conf
|
#[ ]
[general] context=default ; canreinvite=no "sip.conf" 39L, 466C secret=1234 host=dynamic username=manchester canreivnvite=no [liverpool] [ ] secret=1234 host=dynamic username=manchester type=friend 38,1 93% type=friend secret=2202 host=dynamic [2203] type=friend |
#directmedia=no
secret=1234 host=dynamic username=manchester canreivnvite=no [liverpool] [ ] secret=1234 host=dynamic username=manchester type=friend 38,1 93% |
#vi extensions.conf
--- /tmp/l3-saved-29382.10695.21543 2013-11-19 11:08:42.714284443 +0200 +++ extensions.conf 2013-11-19 11:09:36.218284838 +0200 @@ -3,7 +3,7 @@ exten => 2255,1,Answer exten => 2255,n,Playback(demo-thanks) -exten => _2XXX,1,Dial(SIP/S{EXTEN}) +exten => _2XXX,1,Dial(SIP/liverpool/${EXTEN}) exten => 2201,1,Dial(SIP/2201) exten => 2202,1,Dial(SIP/2202) |
#vi extensions.conf
--- /tmp/l3-saved-29382.807.8823 2013-11-19 11:09:53.934284968 +0200 +++ extensions.conf 2013-11-19 11:11:29.674285674 +0200 @@ -3,7 +3,8 @@ exten => 2255,1,Answer exten => 2255,n,Playback(demo-thanks) -exten => _2XXX,1,Dial(SIP/liverpool/${EXTEN}) +exten => _23XX,1,Answer +exten => _23XX,n,Dial(SIP/liverpool/${EXTEN}) exten => 2201,1,Dial(SIP/2201) exten => 2202,1,Dial(SIP/2202) |
#vi sip.conf
|
#[2202]
exten => 2255,n,Playback(demo-thanks) exten => _22XX,1,Answer exten => _22XX,n,Dial(SIP/${EXTEN}) exten => _23XX,1,Answer ( ${EXTEN}) exten => _21XX,1,Answer exten => _21XX,n,Dial(SIP/london/${EXTEN}) exten => _[13]XXX,1,Answer exten => _[13]XXX,n,Dial(SIP/london/${EXTEN}) exten => _23XX,1,Answer exten => _23XX,n,Dial(SIP/liverpool/${EXTEN}) exten => 2201,1,Dial(SIP/2201) "extensions.conf" 22L, 486C written |
#vi extensions.conf
|
#[ ]
|
#ftp 212.26.136.73
ftp: connect: No route to host ftp> ^C |
#ftp 172.16.12.84 2221
ftp: connect: Connection timed out |
#vi extensions.conf
--- /tmp/l3-saved-31579.27763.3294 2013-11-19 11:56:21.586305519 +0200 +++ extensions.conf 2013-11-19 12:04:11.534308983 +0200 @@ -20,3 +20,19 @@ exten => _22XX,1,Dial(SIP/${EXTEN}) exten => _44XX,1,Dial(SIP/22${EXTEN:2}) + + +[local] +exten => _22XX,1,Answer +exten => _22XX,n,Dial(SIP/${EXTEN}) + +[national] +exten => _23XX,1,Answer +exten => _23XX,n,Dial(SIP/liverpool/${EXTEN}) + +exten => _21XX,1,Answer +exten => _21XX,n,Dial(SIP/london/${EXTEN}) + +[international] +exten => _[13]XXX,1,Answer +exten => _[13]XXX,n,Dial(SIP/london/${EXTEN}) |
#vi extensions.conf
--- /tmp/l3-saved-31579.29037.24923 2013-11-19 12:35:26.394322804 +0200 +++ extensions.conf 2013-11-19 12:36:24.110323229 +0200 @@ -3,30 +3,32 @@ exten => 2255,1,Answer exten => 2255,n,Playback(demo-thanks) -exten => _22XX,1,Answer -exten => _22XX,n,Dial(SIP/${EXTEN}) - -exten => _23XX,1,Answer -exten => _23XX,n,Dial(SIP/liverpool/${EXTEN}) - -exten => _21XX,1,Answer -exten => _21XX,n,Dial(SIP/london/${EXTEN}) - -exten => _[13]XXX,1,Answer -exten => _[13]XXX,n,Dial(SIP/london/${EXTEN}) - -exten => 2201,1,Dial(SIP/2201) -exten => 2202,1,Dial(SIP/2202) - -exten => _22XX,1,Dial(SIP/${EXTEN}) -exten => _44XX,1,Dial(SIP/22${EXTEN:2}) +;exten => _22XX,1,Answer +;exten => _22XX,n,Dial(SIP/${EXTEN}) +; +;exten => _23XX,1,Answer +;exten => _23XX,n,Dial(SIP/liverpool/${EXTEN}) +; +;exten => _21XX,1,Answer +;exten => _21XX,n,Dial(SIP/london/${EXTEN}) +; +;exten => _[13]XXX,1,Answer +;exten => _[13]XXX,n,Dial(SIP/london/${EXTEN}) +; +;exten => 2201,1,Dial(SIP/2201) +;exten => 2202,1,Dial(SIP/2202) +; +;exten => _22XX,1,Dial(SIP/${EXTEN}) +;exten => _44XX,1,Dial(SIP/22${EXTEN:2}) [local] + exten => _22XX,1,Answer exten => _22XX,n,Dial(SIP/${EXTEN}) [national] + exten => _23XX,1,Answer exten => _23XX,n,Dial(SIP/liverpool/${EXTEN}) @@ -34,5 +36,6 @@ exten => _21XX,n,Dial(SIP/london/${EXTEN}) [international] + exten => _[13]XXX,1,Answer exten => _[13]XXX,n,Dial(SIP/london/${EXTEN}) |
#vi sip.conf
--- /tmp/l3-saved-31579.16239.7755 2013-11-19 12:37:19.306323637 +0200 +++ sip.conf 2013-11-19 12:37:55.402323903 +0200 @@ -11,7 +11,7 @@ type=friend secret=2201 host=dynamic - +context=local [2202] type=friend |
#vi sip.conf
--- /tmp/l3-saved-31579.1340.16903 2013-11-19 12:38:17.402324065 +0200 +++ sip.conf 2013-11-19 12:38:32.774324186 +0200 @@ -1,6 +1,6 @@ [general] -context=default +;context=default ; canreinvite=no directmedia=no |
#vi extensions.conf
|
#exten => 2255,1,Answer
secret=1234 host=dynamic username=manchester canreivnvite=no [liverpool] [ ] secret=1234 host=dynamic username=manchester type=friend 38,1 93% |
#exten => 2255,1,Answer
context=local "sip.conf" 39L, 480C host=dynamic context=local [2202] type=friend secret=2202 host=dynamic [2203] "sip.conf" 40L, 494C written |
#vi sip.conf
--- /tmp/l3-saved-31579.10420.31527 2013-11-19 12:51:39.922329981 +0200 +++ sip.conf 2013-11-19 12:51:49.022330047 +0200 @@ -1,6 +1,6 @@ [general] -context=local + ;context=default ; canreinvite=no directmedia=no |
#vi users.conf
|
#;managerread = system,call,log,verbose,command,agent,user,config
context=local secret=2201 host=dynamic context=local [2202] type=friend secret=2202 host=dynamic "sip.conf" 40L, 494C written |
#vi sip.conf
--- /tmp/l3-saved-31579.13459.15601 2013-11-19 12:54:17.510331143 +0200 +++ sip.conf 2013-11-19 12:54:23.938331190 +0200 @@ -1,7 +1,7 @@ [general] context=local -;context=default +context=default ; canreinvite=no directmedia=no |
#vi sip.conf
--- /tmp/l3-saved-31579.8463.3557 2013-11-19 12:54:45.330331348 +0200 +++ sip.conf 2013-11-19 12:54:57.174331435 +0200 @@ -1,7 +1,5 @@ [general] -context=local -context=default ; canreinvite=no directmedia=no |
#vi sip.conf
--- /tmp/l3-saved-31579.29160.21778 2013-11-19 12:55:41.398331761 +0200 +++ sip.conf 2013-11-19 12:56:01.674331911 +0200 @@ -1,5 +1,6 @@ [general] +context=local ; canreinvite=no directmedia=no |
#vi sip.conf
|
#[2202]
"sip.conf" 39L, 477C host=dynamic context=local [2201] [2201] type=friend secret=2202 [2202]ynamic [2202] context=local [2203] [2203] "sip.conf" 39L, 490C written |
#vi sip.conf
|
#[london]
[local] [local] exten => _22XX,1,Answer exten => _22XX,n,Dial(SIP/${EXTEN}) [national] [ ] exten => _23XX,1,Answer exten => _23XX,n,Dial(SIP/liverpool/${EXTEN}) 33,1 55% |
#exten => 2255,1,Answer
[2203] [2203] secret=2203 host=dynamic [2203] [2203]n] [london] context=national [london]234 [london] host=dynamic "sip.conf" 40L, 507C written |
#vi extensions.conf
--- /tmp/l3-saved-31579.14119.32127 2013-11-19 13:02:36.246334821 +0200 +++ extensions.conf 2013-11-19 13:04:38.766335723 +0200 @@ -39,3 +39,16 @@ exten => _[13]XXX,1,Answer exten => _[13]XXX,n,Dial(SIP/london/${EXTEN}) + +[g1] +include => local +include => national +include => international + +[g2] +include => local +include => national + +[g3] +include => local + |
#vi sip.conf
--- /tmp/l3-saved-31579.17986.15418 2013-11-19 13:04:40.246335731 +0200 +++ sip.conf 2013-11-19 13:04:56.726335854 +0200 @@ -11,7 +11,7 @@ type=friend secret=2201 host=dynamic -context=local +context=g1 [2202] type=friend |
#vi sip.conf
--- /tmp/l3-saved-31579.11959.6995 2013-11-19 13:09:11.950337736 +0200 +++ sip.conf 2013-11-19 13:11:32.946338776 +0200 @@ -23,7 +23,7 @@ type=friend secret=2203 host=dynamic -context=national +context=international [london] type=friend |
#vi sip.conf
|
#[london]
[g1] [g1] include => national include => international [g2] [g1] [g1] include => national [g2] [g2] [g3] [g3] [g3] include => local 51,0-1 Bot |
#[g3]
ftp: connect: Connection timed out |
#tftp 192.168.15.202
l3script: tftp: command not found |
Время первой команды журнала | 13:19:45 2013-11-18 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 12:33:01 2013-11-19 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 100 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 6.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 2.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 4.89 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.34 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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