/l3/users/Ive/asterisk/linux4.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 |
|
#iptables -nvL
Chain INPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination |
#vim
|
#vim sip.conf
--- /tmp/l3-saved-14304.17084.10910 2010-05-25 16:47:14.000000000 +0300 +++ sip.conf 2010-05-25 16:47:27.000000000 +0300 @@ -5,11 +5,11 @@ type=friend secret=password host=dynamic -callerid="LinkSys phone + русский" +callerid="LinkSys phone" [402] type=friend secret=password host=dynamic -callerid="Soft_Win + русс" +callerid="Softphone Win" |
#vim sip.conf
--- /tmp/l3-saved-14304.21764.30995 2010-05-25 16:50:33.000000000 +0300 +++ sip.conf 2010-05-25 16:50:54.000000000 +0300 @@ -13,3 +13,8 @@ host=dynamic callerid="Softphone Win" +[403] +type=friend +secret=password +host=dynamic +callerid="Analog phone" |
#tail -f /var/log/d
daemon.log debug dmesg dmesg.0 dmesg.1.gz dpkg.log |
#tail -f /var/log/
|
#tail -f /var/lib/dhcp3/dhcpd.leases
} lease 192.168.4.11 { starts 2 2010/05/25 13:51:16; ends 2 2010/05/25 14:01:16; cltt 2 2010/05/25 13:51:16; binding state active; next binding state free; hardware ethernet 00:0e:08:dd:77:9f; uid "\001\000\016\010\335w\237"; } ... starts 2 2010/05/25 13:54:50; ends 2 2010/05/25 14:04:50; cltt 2 2010/05/25 13:54:50; binding state active; next binding state free; hardware ethernet 00:0e:08:ca:72:01; uid "\001\000\016\010\312r\001"; client-hostname "SipuraSPA"; } ^C |
#vim sip.conf
|
#tail -f /var/lib/dhcp3/dhcpd.leases
lease 192.168.4.10 { starts 2 2010/05/25 13:55:45; ends 2 2010/05/25 14:05:45; cltt 2 2010/05/25 13:55:45; binding state active; next binding state free; hardware ethernet 00:1d:60:4a:e6:0b; uid "\001\000\035`J\346\013"; client-hostname "UC-08"; } lease 192.168.4.11 { starts 2 2010/05/25 13:56:16; ends 2 2010/05/25 14:06:16; cltt 2 2010/05/25 13:56:16; binding state active; next binding state free; hardware ethernet 00:0e:08:dd:77:9f; uid "\001\000\016\010\335w\237"; } ^C |
#vim sip.conf
--- /tmp/l3-saved-14304.25439.14281 2010-05-25 16:57:09.000000000 +0300 +++ sip.conf 2010-05-25 17:00:33.000000000 +0300 @@ -1,5 +1,6 @@ [general] context=default +register=>crimea:password@192.168.5.1/crimea [401] type=friend @@ -18,3 +19,8 @@ secret=password host=dynamic callerid="Analog phone" + +[crimea] +type=friend +secret=password +host=192.168.5.1 |
#t
[general] context=default context=default register=>crimea:password@192.168.5.1/crimea [401] type=friend secret=password host=dynamic callerid="LinkSys phone" [402] ... ~ ~ ~ ~ ~ ~ ~ ~ n fo.: Warning: File "sip.conf" has changed since editing startedSee ":help W11" for more i Press ENTER or type command to continue |
#context=default
|
#vim extensions.
|
#cat sip.conf
[general] context=default register => dnepr:password@192.168.1.1/dnepr [401] type=friend secret=password host=dynamic callerid="LinkSys phone" [402] type=friend ... secret=password host=dynamic [kiev] type=friend secret=password host=192.168.2.1 [odessa] type=friend secret=password host=dynamic |
#vim sip.conf
--- /tmp/l3-saved-14304.15932.15148 2010-05-25 17:24:11.000000000 +0300 +++ sip.conf 2010-05-25 17:24:27.000000000 +0300 @@ -23,7 +23,7 @@ [crimea] type=friend secret=password -host=dynamic +host=192.168.5.1 [kiev] type=friend |
#vim sip.conf
--- /tmp/l3-saved-14304.20619.12226 2010-05-25 17:29:50.000000000 +0300 +++ sip.conf 2010-05-25 17:34:53.000000000 +0300 @@ -1,6 +1,8 @@ [general] context=default -register => dnepr:password@192.168.1.1/dnepr +register => kharkov:password@192.168.1.1/kharkov +register => kharkov:password@192.168.3.1/kharkov +register => kharkov:password@192.168.5.1/kharkov [401] type=friend @@ -33,4 +35,5 @@ [odessa] type=friend secret=password -host=192.168.3.1 +host=dynamic + |
#vim sip.conf
--- /tmp/l3-saved-14304.27562.26378 2010-05-25 17:34:56.000000000 +0300 +++ sip.conf 2010-05-25 17:36:16.000000000 +0300 @@ -25,7 +25,7 @@ [crimea] type=friend secret=password -host=192.168.5.1 +host=dynamic [kiev] type=friend |
#vim sip.conf
--- /tmp/l3-saved-14304.12815.2456 2010-05-25 17:37:04.000000000 +0300 +++ sip.conf 2010-05-25 17:41:15.000000000 +0300 @@ -1,7 +1,7 @@ [general] context=default register => kharkov:password@192.168.1.1/kharkov -register => kharkov:password@192.168.3.1/kharkov +register => kharkov-in:password@192.168.3.1/kharkov-in register => kharkov:password@192.168.5.1/kharkov [401] @@ -16,24 +16,19 @@ host=dynamic callerid="Softphone Win" -[403] +[kiev] type=friend secret=password -host=dynamic -callerid="Analog phone" +host=192.168.2.1 [crimea] type=friend secret=password host=dynamic -[kiev] -type=friend -secret=password -host=192.168.2.1 - [odessa] type=friend secret=password host=dynamic +canreinvite=no |
#asterisk -rvv
Asterisk 1.4.21.2~dfsg-3+lenny1, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... [May 25 17:46:05] NOTICE[14127]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 402 -- Executing [501@default:1] Dial("SIP/401-081d79b0", "SIP/crimea/501") in new stack -- Called crimea/501 [May 25 17:46:06] WARNING[14127]: chan_sip.c:12424 handle_response_invite: Received response: "Forbidden" from '"LinkSys phone" <sip:401@192.168.4.1>;tag=as2574d165' -- SIP/crimea-b7303aa8 is circuit-busy == Everyone is busy/congested at this time (1:0/1/0) == Auto fallthrough, channel 'SIP/401-081d79b0' status is 'CONGESTION' linux4*CLI> linux4*CLI> quit Executing last minute cleanups |
#~
context=default register => kharkov:password@192.168.1.1/kharkov register => kharkov:password@192.168.1.1/kharkov register => kharkov:password@192.168.3.1/kharkov register => kharkov:password@192.168.5.1/kharkov [401] type=friend secret=password host=dynamic callerid="LinkSys phone" ... ~ ~ ~ ~ type=friend secret=password host=192.168.2.1 "sip.conf" 34L, 496C written "sip.conf" 34L, 496C Press ENTER or type command to continue |
#fg
[general] context=defakharkov:password@192.168.1.1/kharkov register => kharkov-in:password@192.168.3.1/kharkov-in [401] type=friend secret=password host=dynamic [401] [402] type=friend ... Press ENTER or type command to continue [kiev] type=friend secret=password host=192.168.2.1 [odessa] type=friend secret=password host=dynamic ~ |
#canreinvite=no
bash: fg: current: no such job |
#vim sip.conf
|
#asterisk -rvvvvvvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... zap restart Fully restart zaptel channels zap show cadences List cadences zap show channels Show active zapata channels zap show channel Show information on a channel zap show status Show all Zaptel cards status [May 26 09:34:54] NOTICE[14127]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 402 linux4*CLI> quit|less No such command 'quit|less' (type 'help quit|less' for other possible commands) linux4*CLI> quit zip Executing last minute cleanups |
#:q
[general] context=default register => kharkov:password@192.168.1.1/kharkov register => kharkov-in:password@192.168.3.1/kharkov-in register => kharkov:password@192.168.5.1/kharkov E325: ATTENTION Found a swap file by the name ".sip.conf.swp" owned by: root dated: Tue May 25 17:56:23 2010 file name: /etc/asterisk/sip.conf modified: no ... ~ ~ ~ ~ ~ ~ ~ ~ canreinvite=no ~ |
#fg
[general] context=default register => kharkov:password@192.168.1.1/kharkov register => kharkov-in:password@192.168.3.1/kharkov-in register => kharkov:password@192.168.5.1/kharkov [401] type=friend secret=password host=dynamic callerid="LinkSys phone" ... host=192.168.2.1 [crimea] type=friend secret=password host=dynamic [odessa] type=friend secret=password host=dynamic canreinvite=no |
#~
bash: fg: current: no such job |
#vim sip.conf.bak
|
#;t38pt_usertpsource=yes ; Use the source IP address of RTP as the destination IP aa
|
#vim sip.
|
#fg
bash: fg: current: no such job |
#vim sip.conf
--- /tmp/l3-saved-14304.775.9616 2010-05-25 17:59:34.000000000 +0300 +++ sip.conf 2010-05-25 18:05:34.000000000 +0300 @@ -1,8 +1,9 @@ [general] context=default -register => kharkov:password@192.168.1.1/kharkov -register => kharkov-in:password@192.168.3.1/kharkov-in -register => kharkov:password@192.168.5.1/kharkov +register => kharkov:password@192.168.1.1/dnepr +register => kharkov:password@192.168.1.1/kiev +register => kharkov:password@192.168.3.1/odessa +register => kharkov:password@192.168.5.1/crimea [401] type=friend @@ -19,16 +20,25 @@ [kiev] type=friend secret=password -host=192.168.2.1 +host=dynamic +username=kharkov + +[dnepr] +type=friend +secret=password +host=dynamic +username=kharkov [crimea] type=friend secret=password host=dynamic +username=kharkov [odessa] type=friend secret=password host=dynamic canreinvite=no +username=kharkov |
#~
|
#fgf
bash: fgf: command not found |
#fg
bash: fg: current: no such job |
#vim sip
|
#screen -x
|
#u
adsi.conf enum.conf logger.conf rpt.conf adtranvofr.conf esel.conf manager.conf rtp.conf agents.conf extconfig.conf manager.d say.conf alarmreceiver.conf extensions.ael meetme.conf sip.conf alsa.conf extensions.conf mgcp.conf sip.conf.bak amd.conf extensions.conf.bak misdn.conf sip_notify.conf asterisk.adsi features.conf modules.conf skinny.conf asterisk.conf festival.conf musiconhold.conf sla.conf cdr.conf followme.conf muted.conf smdi.conf cdr_custom.conf func_odbc.conf osp.conf telcordia-1.adsi cdr_manager.conf gtalk.conf oss.conf udptl.conf cdr_odbc.conf h323.conf phone.conf users.conf cdr_pgsql.conf http.conf privacy.conf voicemail.conf cdr_tds.conf iax.conf queues.conf vpb.conf codecs.conf iaxprov.conf res_odbc.conf watchdog.conf dnsmgr.conf indications.conf res_pgsql.conf zapata.conf dundi.conf jabber.conf res_snmp.conf |
#ls -la
total 323 drwxr-xr-x 3 asterisk asterisk 4096 2010-05-26 09:19 . drwxr-xr-x 67 root root 5120 2010-05-25 14:25 .. -rw-r----- 1 asterisk asterisk 140 2009-12-14 21:08 adsi.conf -rw-r----- 1 asterisk asterisk 840 2009-12-14 21:08 adtranvofr.conf -rw-r----- 1 asterisk asterisk 2724 2009-12-14 21:08 agents.conf -rw-r----- 1 asterisk asterisk 2227 2009-12-14 21:08 alarmreceiver.conf -rw-r----- 1 asterisk asterisk 2675 2009-12-14 21:08 alsa.conf -rw-r----- 1 asterisk asterisk 767 2009-12-14 21:08 amd.conf -rw-r----- 1 asterisk asterisk 3260 2009-12-14 21:08 asterisk.adsi ... -rw-r----- 1 asterisk asterisk 4044 2009-12-14 21:08 skinny.conf -rw-r----- 1 asterisk asterisk 6691 2009-12-14 21:08 sla.conf -rw-r----- 1 asterisk asterisk 2665 2009-12-14 21:08 smdi.conf -rw-r----- 1 asterisk asterisk 1384 2009-12-14 21:08 telcordia-1.adsi -rw-r----- 1 asterisk asterisk 598 2009-12-14 21:08 udptl.conf -rw-r----- 1 asterisk asterisk 1804 2009-12-14 21:08 users.conf -rw-r----- 1 asterisk asterisk 11723 2009-12-14 21:08 voicemail.conf -rw-r----- 1 asterisk asterisk 2772 2009-12-14 21:08 vpb.conf -rw-r----- 1 asterisk asterisk 393 2009-12-14 21:08 watchdog.conf -rw-r----- 1 asterisk asterisk 24193 2009-12-14 21:08 zapata.conf |
#pwd
/etc/asterisk |
#ls
adsi.conf enum.conf logger.conf rpt.conf adtranvofr.conf esel.conf manager.conf rtp.conf agents.conf extconfig.conf manager.d say.conf alarmreceiver.conf extensions.ael meetme.conf sip.conf alsa.conf extensions.conf mgcp.conf sip.conf.bak amd.conf extensions.conf.bak misdn.conf sip_notify.conf asterisk.adsi features.conf modules.conf skinny.conf asterisk.conf festival.conf musiconhold.conf sla.conf cdr.conf followme.conf muted.conf smdi.conf cdr_custom.conf func_odbc.conf osp.conf telcordia-1.adsi cdr_manager.conf gtalk.conf oss.conf udptl.conf cdr_odbc.conf h323.conf phone.conf users.conf cdr_pgsql.conf http.conf privacy.conf voicemail.conf cdr_tds.conf iax.conf queues.conf vpb.conf codecs.conf iaxprov.conf res_odbc.conf watchdog.conf dnsmgr.conf indications.conf res_pgsql.conf zapata.conf dundi.conf jabber.conf res_snmp.conf |
#asterisk -rvvvvvvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... core show translation Display translation matrix core show uptime Show uptime information core show version Display version info core show video codecs Displays a list of video codecs core show warranty Show the warranty (if any) for this copy of Asterisk linux4*CLI> linux4*CLI> linux4*CLI> linux4*CLI> quit Executing last minute cleanups |
#asterisk -rvvvvvvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... [May 26 09:40:54] NOTICE[14127]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 402 [May 26 09:43:54] NOTICE[14127]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 402 -- Registered SIP '402' at 192.168.4.12 port 5060 expires 3600 -- Saved useragent "Sipura/SPA3000-2.0.13(GWg)" for peer 402 [May 26 09:46:54] NOTICE[14127]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 402 -- Remote UNIX connection Executing last minute cleanups == Destroying musiconhold processes Disconnected from Asterisk server Executing last minute cleanups |
#w
09:41:17 up 22:36, 4 users, load average: 0.07, 0.06, 0.01 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT user tty1 - Tue11 7:21 0.68s 0.02s /bin/login -- root pts/0 192.168.4.204 09:12 0.00s 0.00s 0.00s script -f -c bash -q /roo root pts/2 :pts/1:S.0 Tue16 3:22 0.54s 0.10s script -f -c /bin/bash -q root pts/4 :pts/1:S.1 Tue16 0.00s 0.88s 0.54s script -f -c /bin/bash -q |
#ls
adsi.conf enum.conf logger.conf rpt.conf adtranvofr.conf esel.conf manager.conf rtp.conf agents.conf extconfig.conf manager.d say.conf alarmreceiver.conf extensions.ael meetme.conf sip.conf alsa.conf extensions.conf mgcp.conf sip.conf.bak amd.conf extensions.conf.bak misdn.conf sip_notify.conf asterisk.adsi features.conf modules.conf skinny.conf asterisk.conf festival.conf musiconhold.conf sla.conf cdr.conf followme.conf muted.conf smdi.conf cdr_custom.conf func_odbc.conf osp.conf telcordia-1.adsi cdr_manager.conf gtalk.conf oss.conf udptl.conf cdr_odbc.conf h323.conf phone.conf users.conf cdr_pgsql.conf http.conf privacy.conf voicemail.conf cdr_tds.conf iax.conf queues.conf vpb.conf codecs.conf iaxprov.conf res_odbc.conf watchdog.conf dnsmgr.conf indications.conf res_pgsql.conf zapata.conf dundi.conf jabber.conf res_snmp.conf |
#cat sip.conf
[general] context=default register => kharkov:password@192.168.1.1/dnepr ;register => kharkov:password@192.168.2.1/kiev ;register => kharkov:password@192.168.3.1/odessa register => kharkov:password@192.168.5.1/crimea [401] type=friend secret=password host=dynamic ... type=friend secret=password host=dynamic username=kharkov [odessa] type=friend secret=password host=192.168.3.1 canreinvite=no username=kharkov |
#dpkg -h
Usage: dpkg [<option> ...] <command> Commands: -i|--install <.deb file name> ... | -R|--recursive <directory> ... --unpack <.deb file name> ... | -R|--recursive <directory> ... -A|--record-avail <.deb file name> ... | -R|--recursive <directory> ... --configure <package> ... | -a|--pending --triggers-only <package> ... | -a|--pending -r|--remove <package> ... | -a|--pending -P|--purge <package> ... | -a|--pending --get-selections [<pattern> ...] Get list of selections to stdout. ... Ignore dependencies involving <package>. --force-... Override problems (see --force-help). --no-force-...|--refuse-... Stop when problems encountered. --abort-after <n> Abort after encountering <n> errors. Comparison operators for --compare-versions are: lt le eq ne ge gt (treat empty version as earlier than any version); lt-nl le-nl ge-nl gt-nl (treat empty version as later than any version); < << <= = >= >> > (only for compatibility with control file syntax). Use `dselect' or `aptitude' for user-friendly package management. |
#dpkg -h |grep P
-P|--purge <package> ... | -a|--pending --update-avail <Packages-file> Replace available packages info. --merge-avail <Packages-file> Merge with info from file. --print-architecture Print dpkg architecture. |
#pwd
/etc/asterisk |
#ls
|
#apt-get install asterisk asterisk-sounds-extra
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: asterisk-config asterisk-sounds-main Suggested packages: ekiga ohphone twinkle kphone asterisk-doc asterisk-dev asterisk-h323 The following NEW packages will be installed: asterisk asterisk-config asterisk-sounds-extra asterisk-sounds-main 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. ... Setting up asterisk (1:1.4.21.2~dfsg-3+lenny1) ... Adding system user for Asterisk Adding user `asterisk' to group `dialout' ... Adding user asterisk to group dialout Done. Adding user `asterisk' to group `audio' ... Adding user asterisk to group audio Done. Starting Asterisk PBX: asterisk. Setting up asterisk-sounds-extra (1.4.7-1) ... |
#ls
|
#cd ..
|
#ls
acpi groff mailname rc6.d adduser.conf group mail.rc rc.local adjtime group- manpath.config rcS.d aliases gshadow mime.types reportbug.conf alternatives gshadow- mke2fs.conf resolv.conf apparmor.d gssapi_mech.conf modprobe.d rmt apt host.conf modules rpc asterisk hostname motd rsyslog.conf at.deny hosts motd.tail rsyslog.d bash.bashrc hosts.allow mtab screenrc ... deluser.conf localtime protocols udev dhcp3 logcheck python ufw dictionaries-common login.defs python2.5 updatedb.conf dpkg logrotate.conf radiusclient-ng vim emacs logrotate.d rc0.d w3m email-addresses lsb-base rc1.d wgetrc environment magic rc2.d X11 exim4 magic.mime rc3.d fstab mailcap rc4.d gai.conf mailcap.order rc5.d |
#cd asterisk/
|
#ls
adsi.conf cdr_tds.conf gtalk.conf modules.conf say.conf adtranvofr.conf codecs.conf h323.conf musiconhold.conf sip.conf agents.conf dnsmgr.conf http.conf muted.conf sip_notify.conf alarmreceiver.conf dundi.conf iax.conf osp.conf skinny.conf alsa.conf enum.conf iaxprov.conf oss.conf sla.conf amd.conf esel.conf indications.conf phone.conf smdi.conf asterisk.adsi extconfig.conf jabber.conf privacy.conf telcordia-1.adsi asterisk.conf extensions.ael logger.conf queues.conf udptl.conf cdr.conf extensions.conf manager.conf res_odbc.conf users.conf cdr_custom.conf features.conf manager.d res_pgsql.conf voicemail.conf cdr_manager.conf festival.conf meetme.conf res_snmp.conf vpb.conf cdr_odbc.conf followme.conf mgcp.conf rpt.conf watchdog.conf cdr_pgsql.conf func_odbc.conf misdn.conf rtp.conf zapata.conf |
#vim sip.conf
|
#:q
|
#vim sip.conf.bak
|
#mv extensions.conf extensions.conf.bak
|
#vim extensions.conf
--- /dev/null 2010-05-25 11:05:19.504073302 +0300 +++ extensions.conf 2010-05-26 09:56:16.000000000 +0300 @@ -0,0 +1,3 @@ +[default] + +exten => _4XX,1,Dial(SIP/${EXTEN}) |
#asterisk -rvvvvvvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... 401/401 192.168.4.11 D 5060 Unmonitored 7 sip peers [Monitored: 0 online, 0 offline Unmonitored: 7 online, 0 offline] linux4*CLI> linux4*CLI> [May 26 11:54:30] NOTICE[17269]: chan_sip.c:14441 handle_request_invite: Call from '401' to extension '402' rejected because extension not found. -- Remote UNIX connection Executing last minute cleanups == Destroying musiconhold processes Disconnected from Asterisk server Executing last minute cleanups |
#{EXTEN})
lease 192.168.4.11 { starts 3 2010/05/26 07:08:26; ends 3 2010/05/26 07:18:26; cltt 3 2010/05/26 07:08:26; binding state active; next binding state free; hardware ethernet 00:0e:08:dd:77:9f; uid "\001\000\016\010\335w\237"; client-hostname "SipuraSPA"; } ... starts 3 2010/05/26 07:10:23; ends 3 2010/05/26 07:20:23; cltt 3 2010/05/26 07:10:23; binding state active; next binding state free; hardware ethernet 00:1d:60:4a:e6:0b; uid "\001\000\035`J\346\013"; client-hostname "UC-08"; } ^C |
#fg
bash: fg: current: no such job |
#vim ext
|
#vim sip.conf
--- /tmp/l3-saved-14304.4474.27678 2010-05-26 10:11:53.000000000 +0300 +++ sip.conf 2010-05-26 10:23:57.000000000 +0300 @@ -1,7 +1,8 @@ [general] context=default ; Default context for incoming calls register => kharkov:password@192.168.1.1/dnepr -register => kharkov:password@192.168.2.1/kiev +;register => kharkov:password@192.168.2.1/kiev +register => kharkov:password@192.168.5.1/crimea [401] type=friend @@ -27,7 +28,8 @@ [kiev] type=friend secret=password -host=dynamic +;host=dynamic +host=192.168.2.1 username=kharkov [odessa] @@ -39,5 +41,5 @@ [crimea] type=friend secret=password -host=192.168.5.1 +host=dynamic username=kharkov |
#netstat -nalp
Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:40704 0.0.0.0:* LISTEN 1890/rpc.statd tcp 0 0 127.0.0.1:5038 0.0.0.0:* LISTEN 17246/asterisk tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1879/portmap tcp 0 0 0.0.0.0:2000 0.0.0.0:* LISTEN 17246/asterisk tcp 0 0 192.168.4.1:53 0.0.0.0:* LISTEN 2088/named tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 2088/named tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 12895/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2375/exim4 ... unix 3 [ ] STREAM CONNECTED 49661 17246/asterisk unix 3 [ ] STREAM CONNECTED 49660 17246/asterisk unix 3 [ ] STREAM CONNECTED 49659 17246/asterisk /var/run/asterisk/asterisk.ctl unix 3 [ ] STREAM CONNECTED 49658 17506/rasterisk unix 2 [ ] DGRAM 45014 16569/0 unix 2 [ ] DGRAM 18873 6944/dhcpd3 unix 2 [ ] DGRAM 6153 2430/login unix 2 [ ] DGRAM 5755 2104/lwresd unix 2 [ ] DGRAM 5708 2088/named unix 2 [ ] DGRAM 5685 2073/acpid |
#netstat -nalp|grep aster
tcp 0 0 127.0.0.1:5038 0.0.0.0:* LISTEN 17246/asterisk tcp 0 0 0.0.0.0:2000 0.0.0.0:* LISTEN 17246/asterisk udp 0 0 0.0.0.0:2727 0.0.0.0:* 17246/asterisk udp 0 0 0.0.0.0:4520 0.0.0.0:* 17246/asterisk udp 0 0 0.0.0.0:5060 0.0.0.0:* 17246/asterisk udp 0 0 0.0.0.0:4569 0.0.0.0:* 17246/asterisk unix 2 [ ACC ] STREAM LISTENING 49185 17246/asterisk /var/run/asterisk/asterisk.ctl unix 2 [ ] DGRAM 49713 17246/asterisk unix 3 [ ] STREAM CONNECTED 49661 17246/asterisk unix 3 [ ] STREAM CONNECTED 49660 17246/asterisk unix 3 [ ] STREAM CONNECTED 49659 17246/asterisk /var/run/asterisk/asterisk.ctl unix 3 [ ] STREAM CONNECTED 49658 17506/rasterisk |
#apt-get install asterisk-doc
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: asterisk-doc 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 32.5MB of archives. After this operation, 139MB of additional disk space will be used. Get:1 http://10.0.35.1 lenny/main asterisk-doc 1:1.4.21.2~dfsg-3+lenny1 [32.5MB] 73% [1 asterisk-doc 23752704/32.5MB 73%] 330kB/s 26s 79% [1 asterisk-doc 25698304/32.5MB 79%] 362kB/s 18s 81% [1 asterisk-doc 26537984/32.5MB 81%] 362kB/s 16s^Z [1]+ Stopped apt-get install asterisk-doc |
#bg
[1]+ apt-get install asterisk-doc & |
#fg
apt-get install asterisk-doc Selecting previously deselected package asterisk-doc. (Reading database ... 26268 files and directories currently installed.) Unpacking asterisk-doc (from .../asterisk-doc_1%3a1.4.21.2~dfsg-3+lenny1_all.deb) ... Setting up asterisk-doc (1:1.4.21.2~dfsg-3+lenny1) ... |
#ls
adsi.conf enum.conf logger.conf rpt.conf adtranvofr.conf esel.conf manager.conf rtp.conf agents.conf extconfig.conf manager.d say.conf alarmreceiver.conf extensions.ael meetme.conf sip.conf alsa.conf extensions.conf mgcp.conf sip.conf.bak amd.conf extensions.conf.bak misdn.conf sip_notify.conf asterisk.adsi features.conf modules.conf skinny.conf asterisk.conf festival.conf musiconhold.conf sla.conf cdr.conf followme.conf muted.conf smdi.conf cdr_custom.conf func_odbc.conf osp.conf telcordia-1.adsi cdr_manager.conf gtalk.conf oss.conf udptl.conf cdr_odbc.conf h323.conf phone.conf users.conf cdr_pgsql.conf http.conf privacy.conf voicemail.conf cdr_tds.conf iax.conf queues.conf vpb.conf codecs.conf iaxprov.conf res_odbc.conf watchdog.conf dnsmgr.conf indications.conf res_pgsql.conf zapata.conf dundi.conf jabber.conf res_snmp.conf |
#vim sip.conf
--- /tmp/l3-saved-14304.7382.7902 2010-05-26 10:46:58.000000000 +0300 +++ sip.conf 2010-05-26 10:47:14.000000000 +0300 @@ -43,3 +43,4 @@ secret=password host=dynamic username=kharkov + |
#{EXTEN})
adsi.conf enum.conf logger.conf rpt.conf adtranvofr.conf esel.conf manager.conf rtp.conf agents.conf extconfig.conf manager.d/ say.conf alarmreceiver.conf extensions.ael meetme.conf sip.conf alsa.conf extensions.conf mgcp.conf sip.conf.bak amd.conf extensions.conf.bak misdn.conf sip_notify.conf asterisk.adsi features.conf modules.conf skinny.conf asterisk.conf festival.conf musiconhold.conf sla.conf cdr.conf followme.conf muted.conf smdi.conf cdr_custom.conf func_odbc.conf osp.conf telcordia-1.adsi cdr_manager.conf gtalk.conf oss.conf udptl.conf cdr_odbc.conf h323.conf phone.conf users.conf cdr_pgsql.conf http.conf privacy.conf voicemail.conf cdr_tds.conf iax.conf queues.conf vpb.conf codecs.conf iaxprov.conf res_odbc.conf watchdog.conf dnsmgr.conf indications.conf res_pgsql.conf zapata.conf dundi.conf jabber.conf res_snmp.conf |
#vim sip.conf
--- /tmp/l3-saved-14304.6226.14611 2010-05-26 11:06:54.000000000 +0300 +++ sip.conf 2010-05-26 11:07:26.000000000 +0300 @@ -24,6 +24,8 @@ secret=password host=dynamic username=kharkov +limitonpeers=yes +call-limit=1 [kiev] type=friend |
#vim extensions.conf
|
#asterisk -rvvvvvvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... -- Executing [401@group1:1] Macro("SIP/kharkov-081deb40", "call_in") in new stack -- Executing [s@macro-call_in:1] GotoIf("SIP/kharkov-081deb40", "0?end") in new stack -- Executing [s@macro-call_in:2] Dial("SIP/kharkov-081deb40", "SIP/401|4") in new stack -- Called 401 -- SIP/401-081dadb8 is ringing -- Nobody picked up in 4000 ms -- Executing [s@macro-call_in:3] Goto("SIP/kharkov-081deb40", "group3||1") in new stack -- Goto (group3,s,1) == Channel 'SIP/kharkov-081deb40' jumping out of macro 'call_in' [May 26 17:01:25] WARNING[19449]: pbx.c:2483 __ast_pbx_run: Channel 'SIP/kharkov-081deb40' sent into invalid extension 's' in context 'group3', but no invalid handler |
#vim sip.conf
--- /tmp/l3-saved-14304.7115.18576 2010-05-26 11:56:49.000000000 +0300 +++ sip.conf 2010-05-26 11:57:17.000000000 +0300 @@ -8,19 +8,19 @@ type=friend secret=password host=dynamic -context=gr1 +context=group1 [402] type=friend secret=password host=dynamic -context=gr2 +context=group2 [403] type=friend secret=password host=dynamic -context=gr3 +context=group3 [dnepr] type=friend |
#[402
;register => kharkov:password@192.168.2.1/kiev register => kharkov:password@192.168.5.1/crimea [401] type=friend secret=password host=dynamic context=group3 [402] type=friend secret=password ... host=192.168.3.1 username=kharkov [crimea] type=friend secret=password host=dynamic username=kharkov context=group1 username=kharkov context=group1 |
#"sip.conf" 53L, 748C written
[local] exten => _4XX,1,Dial(SIP/${EXTEN}) [corp] exten => _2XX,1,Dial(SIP/kiev/${EXTEN}) exten => _3XX,1,Dial(SIP/odessa/${EXTEN}) exten => _5XX,1,Dial(SIP/crimea/${EXTEN}) exten => _7XX,1,Dial(SIP/dnepr/${EXTEN}) [world] exten => _380XXXXXXXXX,1,Dial(SIP/odessa/${EXTEN}) [group1] ... ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ |
#vim sip.conf
|
#vim extensions.conf
--- /tmp/l3-saved-14304.1461.21554 2010-05-26 12:25:16.000000000 +0300 +++ extensions.conf 2010-05-26 12:27:02.000000000 +0300 @@ -8,6 +8,7 @@ exten => _3XX,1,Dial(SIP/crimea/${EXTEN}) exten => _5XX,1,Dial(SIP/crimea/${EXTEN}) exten => _7XX,1,Dial(SIP/dnepr/${EXTEN}) +exten => _3XXX,1,Dial(SIP/odessa/${EXTEN:1}) [world] exten => _380XXXXXXXXX,1,Dial(SIP/odessa/${EXTEN}) |
#E492: Not an editor command: Q
[default] [local] exten => _4XX,1,Dial(SIP/${EXTEN}) [corp] exten => _2XX,1,Dial(SIP/kiev/${EXTEN}) exten => _3XX,1,Dial(SIP/crimea/${EXTEN}) exten => _5XX,1,Dial(SIP/crimea/${EXTEN}) exten => _7XX,1,Dial(SIP/dnepr/${EXTEN}) exten => _3XXX,1,Dial(SIP/odessa/${EXTEN:1}) [world] ... ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ |
#vim extensions.conf
--- /tmp/l3-saved-14304.3312.2627 2010-05-26 12:35:02.000000000 +0300 +++ extensions.conf 2010-05-26 12:37:06.000000000 +0300 @@ -5,13 +5,17 @@ exten => 800,n,Wait(1) exten => 800,n,Playback(demo-thanks) +exten => 801,1,Answer +exten => 801,n,Wait(1) +exten => 801,n,Record(/var/tmp/kharkov-hello) + exten => _4XX,1,Dial(SIP/${EXTEN}) [corp] exten => _2XX,1,Dial(SIP/kiev/${EXTEN}) exten => _2800,1,Dial(SIP/kiev/${EXTEN:1}) exten => _3XX,1,Dial(SIP/crimea/${EXTEN}) -exten => _2800,1,Dial(SIP/odessa/${EXTEN:1}) +exten => _3800,1,Dial(SIP/odessa/${EXTEN:1}) exten => _5XX,1,Dial(SIP/crimea/${EXTEN}) exten => _5800,1,Dial(SIP/crimea/${EXTEN:1}) exten => _7XX,1,Dial(SIP/dnepr/${EXTEN}) |
search test.intranet nameserver 10.0.35.1
[general] context=default register => kharkov:password@192.168.1.1/dnepr ;register => kharkov:password@192.168.2.1/kiev ;register => kharkov:password@192.168.3.1/odessa register => kharkov:password@192.168.5.1/crimea [401] type=friend secret=password host=dynamic callerid="LinkSys phone" [402] type=friend secret=password host=dynamic callerid="Softphone Win" [kiev] type=friend secret=password host=192.168.2.1 username=kharkov [dnepr] type=friend secret=password host=dynamic username=kharkov [crimea] type=friend secret=password host=dynamic username=kharkov [odessa] type=friend secret=password host=192.168.3.1 canreinvite=no username=kharkov
Время первой команды журнала | 15:45:23 2010- 5-25 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 11:34:45 2010- 5-26 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 48.51 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 3.96 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 4.11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.41 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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