Журнал лабораторных работ

Содержание

Журнал

Понедельник (11/24/14)

/dev/pts/3
17:02:30
#all "asterisk -rx 'sip show peers'" | grep 02/.*192 | awk '{print $1}' | tr -d :
1
3
4
5
6
7
17:04:10
#_ +1 +4
+1 +4
17:04:49
#_ +5
+5
17:05:18
#vim /etc/asterisk/extensions.conf
--- /dev/null	2014-11-24 01:42:46.270560796 -0500
+++ /etc/asterisk/extensions.conf	2014-11-24 11:06:12.768871522 -0500
@@ -0,0 +1,5 @@
+
+[general]
+
+exten => _11XX,1,Dial(${EXTEN})
+
17:06:12
#cat /etc/asterisk/extensions.conf
[general]
exten => _11XX,1,Dial(${EXTEN})
17:06:29
#grep default /etc/asterisk/sip.conf
context=default
17:07:09
#asterisk -rvv
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 debian0 (pid = 17209)
...
ael-trunklocal                   ael-trunktollfree                app_dial_gosub_virtual_context
app_queue_gosub_virtual_context  chanvar                          demo
globals                          local                            parkedcalls
default
debian0*CLI> dialplan show default
[ Context 'default' created by 'pbx_config' ]
  '_11XX' =>        1. Dial(SIP/${EXTEN})                         [pbx_config]
-= 1 extension (1 priority) in 1 context. =-
debian0*CLI> quit
Executing last minute cleanups
17:08:39
#all "asterisk -rx 'sip show peers'" | grep 02/.*192 | awk '{print $1}' | tr -d :
1
3
4
5
6
7
17:10:02
#sterisk -rvv

17:10:02
#sterisk -rvv

17:10:53
#sterisk -rvv

17:11:20
#_ +6 +7 +8

17:11:20
#sterisk -rvv

17:11:20
#sterisk -rvv
 :                   ll "asterisk -rx 'dialplan show default'" | grep SIP/ | awk '{print $1}' | tr -d
6
7
8
17:13:22
#фÐall cat /etc/default/extensions.conf
1: cat: /etc/default/extensions.conf: No such file or directory
2: cat: /etc/default/extensions.conf: No such file or directory
3: cat: /etc/default/extensions.conf: No such file or directory
4: cat: /etc/default/extensions.conf: No such file or directory
5: cat: /etc/default/extensions.conf: No such file or directory
6: cat: /etc/default/extensions.conf: No such file or directory
7: cat: /etc/default/extensions.conf: No such file or directory
8: cat: /etc/default/extensions.conf: No such file or directory
17:13:41
#all cat /etc/asterisk/extensions.conf
1: cat: /etc/asterisk/extensions.conf: No such file or directory
2: cat: /etc/asterisk/extensions.conf: No such file or directory
3: aasd
4: cat: /etc/asterisk/extensions.conf: No such file or directory
5: cat: /etc/asterisk/extensions.conf: No such file or directory
6: [default]
6:
6: exten => _23XX,1,Dial(SIP/${EXTEN})
7: [default]
7:
7: exten => _31XX,1,Dial(SIP/${EXTEN})
8: [default]
8:
8: exten => _32XX,1,Dial(SIP/${EXTEN})
8:
17:13:50
#cat /etc/asterisk/extensions.conf
[default]
exten => _11XX,1,Dial(SIP/${EXTEN})
17:15:49
#cat /etc/asterisk/extensions.conf
[default]
exten => _11XX,1,Dial(SIP/${EXTEN})
17:16:55
#all cat /etc/asterisk/extensions.conf
1: [default]
1:
1: exten => _11XX,1,Dial(SIP/${EXTEN})
2: cat: /etc/asterisk/extensions.conf: No such file or directory
3: exten => _13XX,1,Dial(SIP/${EXTEN})
4: cat: /etc/asterisk/extensions.conf: No such file or directory
5: cat: /etc/asterisk/extensions.conf: No such file or directory
6: [default]
6:
6: exten => _23XX,1,Dial(SIP/${EXTEN})
7: [default]
7:
7: exten => _31XX,1,Dial(SIP/${EXTEN})
8: [default]
8:
8: exten => _32XX,1,Dial(SIP/${EXTEN})
8:
17:17:27
#all cat /etc/asterisk/extensions.conf
1: [default]
1:
1: exten => _11XX,1,Dial(SIP/${EXTEN})
2: cat: /etc/asterisk/extensions.conf: No such file or directory
3: [default]
3:
3:
3: exten => _13XX,1,Dial(SIP/${EXTEN})
4: cat: /etc/asterisk/extensions.conf: No such file or directory
5: cat: /etc/asterisk/extensions.conf: No such file or directory
6: [default]
6:
6: exten => _23XX,1,Dial(SIP/${EXTEN})
7: [default]
7:
7: exten => _31XX,1,Dial(SIP/${EXTEN})
8: [default]
8:
8: exten => _32XX,1,Dial(SIP/${EXTEN})
8:
17:18:21
#_ +1
+1
17:18:28
#cat /etc/asterisk/extensions.conf

17:18:28
#_ +1

17:21:55
#_ +1
                       2
+2
17:22:00
#_ +3
+3
17:22:05
#_ +5
+5
17:22:21
##cat /etc/default/isc-dhcp-server

17:22:47
#all cat /etc/asterisk/extensions.conf
1: [default]
1:
1: exten => _11XX,1,Dial(SIP/${EXTEN})
2: [default]
2:
2: exten => _12XX,1,Dial(SIP/${EXTEN})
3: [default]
3:
3:
3: exten => _13XX,1,Dial(SIP/${EXTEN})
...
6: [default]
6:
6: exten => _23XX,1,Dial(SIP/${EXTEN})
7: [default]
7:
7: exten => _31XX,1,Dial(SIP/${EXTEN})
8: [default]
8:
8: exten => _32XX,1,Dial(SIP/${EXTEN})
8:
17:22:59
#cat /etc/asterisk/extensions.conf

17:22:59
#_ +5
                       4
+4
17:23:05
#_ done

прошло 12 минут
17:36:00
#all init 0
3: ssh: connect to host m3 port 22: Connection timed out
5: ssh: connect to host m5 port 22: Connection timed out
6: ssh: connect to host m6 port 22: Connection timed out
7: ssh: connect to host m7 port 22: Connection timed out

Вторник (11/25/14)

08:43:52
#ssh m1
l3-agent is already running: pid=4022; pidfile=/root/.lilalo/l3-agent.pid
08:49:13
#cat /etc/asterisk/sip.conf
[general]
context=default
[1101]
type=friend
secret=1234
host=dynamic
[1102]
type=friend
secret=1234
host=dynamic
08:49:19
#asterisk -rv
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.
=========================================================================
Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian1 (pid = 2476)
Verbosity was 0 and is now 1
debian1*CLI> sip show peers
Name/username              Host                                    Dyn Forcerport ACL Port     Status
1101/1101                  192.168.10.100                           D   N             5060     Unmonitored
1102/1102                  192.168.10.101                           D   N             35840    Unmonitored
2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline]
debian1*CLI> quit
Executing last minute cleanups
08:51:27
#exit
exit
Connection to m1 closed.
08:51:39
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-9664.1390.10554	2014-11-25 02:51:44.750585825 -0500
+++ /etc/asterisk/sip.conf	2014-11-25 02:51:54.402586101 -0500
@@ -1,5 +1,6 @@
 [general]
 context=default
+qualify=yes
 
 [3301]
 type=friend
08:51:54
#cat /etc/asterisk/sip.conf
[general]
context=default
qualify=yes
[3301]
type=friend
secret=1234
host=dynamic
[3302]
type=friend
secret=1234
host=dynamic
08:51:56
#asterisk -rv
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.
=========================================================================
Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian0 (pid = 17209)
Verbosity is at least 2
debian0*CLI> sip reload
 Reloading SIP
  == Parsing '/etc/asterisk/sip.conf':   == Found
  == Parsing '/etc/asterisk/users.conf':   == Found
[Nov 25 02:52:24] ERROR[17246]: netsock2.c:263 ast_sockaddr_resolve: getaddrinfo("debian0", "(null)", ...): Name or service not known
[Nov 25 02:52:24] WARNING[17246]: acl.c:582 resolve_first: Unable to lookup 'debian0'
  == Using SIP CoS mark 4
  == Parsing '/etc/asterisk/sip_notify.conf':   == Found
debian0*CLI> quit
Executing last minute cleanups
08:52:44
#cat /etc/asterisk/extensions.conf

08:52:44
#_ +4
                    vim
прошло 17 минут
09:10:33
#_ +4
                    ^C
/dev/pts/22
09:11:00
#cat /etc/asterisk/sip.conf
[general]
context=default
qualify=yes
[3301]
type=friend
secret=1234
host=dynamic
[3302]
type=friend
secret=1234
host=dynamic
09:11:26
#all 'asterisk -rx "sip show peers"'
1: Name/username              Host                                    Dyn Forcerport ACL Port     Status
1