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

Содержание

Журнал

Пятница (11/28/14)

/dev/pts/4
13:12:50
#ls -ls aster-tips/
total 16
12 -rw-r--r-- 1 root root 8773 Nov 28 14:12 analog_example
 4 -rw-r--r-- 1 root root 1039 Nov 28 10:23 mapping
13:14:02
#less /var/log/asterisk/cdr-cs
прошло 24 минуты
13:38:05
#less /var/log/asterisk/cdr-csv/Master.csv
13:38:37
#apt-cache search asterisk mysql
asterisk-mysql - MySQL database protocol support for the Asterisk PBX
13:44:28
#apt-get install mysql-server
Stopping MySQL database server: mysqld.
141128 14:46:20 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
141128 14:46:20 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
141128 14:46:20 [Note] Plugin 'FEDERATED' is disabled.
141128 14:46:20 InnoDB: The InnoDB memory heap is disabled
141128 14:46:20 InnoDB: Mutexes and rw_locks use GCC atomic builtins
141128 14:46:20 InnoDB: Compressed tables use zlib 1.2.7
141128 14:46:20 InnoDB: Using Linux native AIO
141128 14:46:20 InnoDB: Initializing buffer pool, size = 128.0M
141128 14:46:20 InnoDB: Completed initialization of buffer pool
141128 14:46:20 InnoDB: highest supported file format is Barracuda.
141128 14:46:21  InnoDB: Waiting for the background threads to start
141128 14:46:22 InnoDB: 5.5.40 started; log sequence number 1595675
141128 14:46:22  InnoDB: Starting shutdown...
141128 14:46:22  InnoDB: Shutdown completed; log sequence number 1595675
Starting MySQL database server: mysqld ..
Checking for tables which need an upgrade, are corrupt or were
not closed cleanly..
Setting up libhtml-template-perl (2.91-1) ...
Setting up mysql-server (5.5.40-0+wheezy1) ...
13:49:35
#apt-get install asterisk-mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  asterisk-mysql
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 658 kB of archives.
After this operation, 783 kB of additional disk space will be used.
Get:1 http://192.168.12.254/debian/ wheezy/main asterisk-mysql amd64 1:1.8.13.1~dfsg1-3+deb7u3 [658 kB]
Fetched 658 kB in 0s (25.8 MB/s)
Selecting previously unselected package asterisk-mysql.
(Reading database ... 145260 files and directories currently installed.)
Unpacking asterisk-mysql (from .../asterisk-mysql_1%3a1.8.13.1~dfsg1-3+deb7u3_amd64.deb) ...
Setting up asterisk-mysql (1:1.8.13.1~dfsg1-3+deb7u3) ...
13:50:07
#vi /tmp/1.sql
--- /dev/null	2014-11-28 09:38:33.641685563 +0200
+++ /tmp/1.sql	2014-11-28 14:54:51.758406101 +0200
@@ -0,0 +1,26 @@
+create database asterisk;
+
+ use asterisk;
+
+ CREATE TABLE cdr (
+ calldate datetime NOT NULL default ‘0000-00-00 00:00:00′,
+ clid varchar(80) NOT NULL default ”,
+ src varchar(80) NOT NULL default ”,
+ dst varchar(80) NOT NULL default ”,
+ dcontext varchar(80) NOT NULL default ”,
+ channel varchar(80) NOT NULL default ”,
+ dstchannel varchar(80) NOT NULL default ”,
+ lastapp varchar(80) NOT NULL default ”,
+ lastdata varchar(80) NOT NULL default ”,
+ duration int(11) NOT NULL default ‘0′,
+ billsec int(11) NOT NULL default ‘0′,
+ disposition varchar(45) NOT NULL default ”,
+ amaflags int(11) NOT NULL default ‘0′,
+ accountcode varchar(20) NOT NULL default ”,
+ userfield varchar(255) NOT NULL default ”,
+ uniqueid varchar(32) NOT NULL default ”
+ );
+
+ ALTER TABLE cdr ADD INDEX ( calldate );
+ ALTER TABLE cdr ADD INDEX ( dst );
+ ALTER TABLE cdr ADD INDEX ( uniqueid );
13:54:51
#vi /tmp/1.sql
13:57:14
# ALTER TABLE cdr ADD INDEX ( uniqueid );
Enter password:
ERROR 1008 (HY000) at line 2: Can't drop database 'asterisk'; database doesn't exist
13:57:48
# ALTER TABLE cdr ADD INDEX ( uniqueid );
Enter password:
ERROR 1008 (HY000) at line 2: Can't drop database 'asterisk'; database doesn't exist
13:58:12
#mysql -u root -p < /tmp/1.sql
Enter password:
ERROR 1008 (HY000) at line 2: Can't drop database 'asterisk'; database doesn't exist
13:58:23
#mysql -u root -p < /tmp/1.sql
Enter password:
ERROR 1008 (HY000) at line 2: Can't drop database 'asterisk'; database doesn't exist
13:59:17
## drop database asterisk;

14:01:48
#mysql -u root -p < /tmp/1.sql
Enter password:
14:01:57
#mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 49
Server version: 5.5.40-0+wheezy1 (Debian)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use asterisk;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
    ->  on asterisk.*
    ->  to 'asterisk'@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql> SET PASSWORD FOR 'asterisk'@'localhost' = PASSWORD('password');
Query OK, 0 rows affected (0.00 sec)
mysql> ^CCtrl-C -- exit!
Aborted
14:04:58
#mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 50
Server version: 5.5.40-0+wheezy1 (Debian)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> ?
...
status    (\s) Get status information from the server.
system    (\!) Execute a system shell command.
tee       (\T) Set outfile [to_outfile]. Append everything into given outfile.
use       (\u) Use another database. Takes database name as argument.
charset   (\C) Switch to another charset. Might be needed for processing binlog with multi-byte charsets.
warnings  (\W) Show warnings after every statement.
nowarning (\w) Don't show warnings after every statement.
For server side help, type 'help contents'
mysql> ^CCtrl-C -- exit!
Aborted
14:05:15
#mysql -u asterisk -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 51
Server version: 5.5.40-0+wheezy1 (Debian)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> ^CCtrl-C -- exit!
Aborted
14:05:39
#vi /etc/asterisk/cdr_mysql.conf
--- /tmp/l3-saved-3744.1065.15499	2014-11-28 15:06:08.766427609 +0200
+++ /etc/asterisk/cdr_mysql.conf	2014-11-28 15:07:13.770429673 +0200
@@ -12,12 +12,12 @@
 ;
 ;[global]
 ;hostname=database.host.name
-;dbname=asteriskcdrdb
-;table=cdr
-;password=password 
-;user=asteriskcdruser
+dbname=asterisk
+table=cdr
+password=password 
+user=asterisk
 ;port=3306
-;sock=/tmp/mysql.sock
+sock=/tmp/mysql.sock
 ;timezone=UTC ; Previously called usegmtime
 ;
 ; If your system's locale differs from mysql database character set,
14:07:13
#netstat -lnp | grep mysql
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      12043/mysqld
unix  2      [ ACC ]     STREAM     LISTENING     83362    12043/mysqld        /var/run/mysqld/mysqld.sock
14:07:19
#vi /etc/asterisk/cdr_mysql.conf
--- /tmp/l3-saved-3744.23985.18260	2014-11-28 15:07:35.502430365 +0200
+++ /etc/asterisk/cdr_mysql.conf	2014-11-28 15:09:39.722434311 +0200
@@ -10,15 +10,17 @@
 ; "localhost", then cdr_mysql will attempt to connect to the socket file 
 ; specified by sock or otherwise use the default socket file.
 ;
-;[global]
-;hostname=database.host.name
+[global]
+hostname=localhost
 dbname=asterisk
 table=cdr
 password=password 
 user=asterisk
-;port=3306
-sock=/tmp/mysql.sock
-;timezone=UTC ; Previously called usegmtime
+port=3306
+sock=/var/run/mysqld/mysqld.sock
+timezone=EET
+; Previously called usegmtime
+
 ;
 ; If your system's locale differs from mysql database character set,
 ; cdr_mysql can damage non-latin characters in CDR variables. Use this
14:09:39
#vi /etc/asterisk/cdr.conf
--- /tmp/l3-saved-3744.1279.10467	2014-11-28 15:09:45.290434488 +0200
+++ /etc/asterisk/cdr.conf	2014-11-28 15:10:06.234435153 +0200
@@ -11,7 +11,7 @@
 
 ; Define whether or not to use CDR logging.  Setting this to "no" will override
 ; any loading of backend CDR modules.  Default is "yes".
-;enable=yes
+enable=yes
 
 ; Define whether or not to log unanswered calls. Setting this to "yes" will
 ; report every attempt to ring a phone in dialing attempts, when it was not
14:10:06
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
14:12:20
#mysql -u asterisk -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 53
Server version: 5.5.40-0+wheezy1 (Debian)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use asterisk
...
| calldate            | clid | src  | dst  | dcontext | channel           | dstchannel        | lastapp    | lastdata                                                          | duration | billsec | disposition | amaflags | accountcode | userfield | uniqueid     |
+---------------------+------+------+------+----------+-------------------+-------------------+------------+-------------------------------------------------------------------+----------+---------+-------------+----------+-------------+-----------+--------------+
| 2014-11-28 15:13:13 | 3201 | 3201 | 2    | submenu  | SIP/3201-00000000 |                   | BackGround | /var/lib/asterisk/sounds/tts/tts-7726ca6e8145e83a1ac38cadb9e05613 |       14 |      14 | ANSWERED    |        3 |             |           | 1417180393.0 |
| 2014-11-28 15:14:10 | 3201 | 3201 | 5002 | gr1      | SIP/3201-00000001 | SIP/ny-00000002   | Dial       | SIP/ny/5002                                                       |       12 |       3 | ANSWERED    |        3 |             |           | 1417180450.1 |
| 2014-11-28 15:17:24 | 3201 | 3201 | 3202 | gr1      | SIP/3201-00000003 | SIP/3202-00000004 | Dial       | SIP/3202,20,tTkK                                                  |       17 |       8 | ANSWERED    |        3 |             |           | 1417180644.3 |
+---------------------+------+------+------+----------+-------------------+-------------------+------------+-------------------------------------------------------------------+----------+---------+-------------+----------+-------------+-----------+--------------+
3 rows in set (0.00 sec)
mysql> ^CCtrl-C -- exit!
Aborted
[1]+  Killed                  asterisk -rvvv
14:18:15
#mysql -u asterisk -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 55
Server version: 5.5.40-0+wheezy1 (Debian)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> ^CCtrl-C -- exit!
Aborted
прошло 80 минут
15:38:45
#mysql -u asterisk -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 69
Server version: 5.5.40-0+wheezy1 (Debian)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> select * from cdr;
...
+---------------------+---------------+------+------+----------+------------------------+------------------------+------------+-------------------------------------------------------------------+----------+---------+-------------+----------+-------------+-----------+--------------+
| 2014-11-28 15:13:13 | 3201          | 3201 | 2    | submenu  | SIP/3201-00000000      |                        | BackGround | /var/lib/asterisk/sounds/tts/tts-7726ca6e8145e83a1ac38cadb9e05613 |       14 |      14 | ANSWERED    |        3 |             |           | 1417180393.0 |
| 2014-11-28 15:14:10 | 3201          | 3201 | 5002 | gr1      | SIP/3201-00000001      | SIP/ny-00000002        | Dial       | SIP/ny/5002                                                       |       12 |       3 | ANSWERED    |        3 |             |           | 1417180450.1 |
| 2014-11-28 15:17:24 | 3201          | 3201 | 3202 | gr1      | SIP/3201-00000003      | SIP/3202-00000004      | Dial       | SIP/3202,20,tTkK                                                  |       17 |       8 | ANSWERED    |        3 |             |           | 1417180644.3 |
| 2014-11-28 15:33:36 | "2101" <2101> | 2101 | 3101 | gr4      | SIP/ny-00000005        | SIP/liverpool-00000006 | Dial       | SIP/liverpool/3101                                                |        6 |       2 | ANSWERED    |        3 |             |           | 1417181616.5 |
| 2014-11-28 16:06:00 | "3101" <3101> | 3101 | 1201 | gr4      | SIP/liverpool-00000007 | SIP/ny-00000008        | Dial       | SIP/ny/1201                                                       |        1 |       0 | NO ANSWER   |        3 |             |           | 1417183560.7 |
+---------------------+---------------+------+------+----------+------------------------+------------------------+------------+-------------------------------------------------------------------+----------+---------+-------------+----------+-------------+-----------+--------------+
5 rows in set (0.00 sec)
mysql> ^CCtrl-C -- exit!
Aborted
15:42:44
#wget http://192.168.12.254/asterisk-13-current.tar.gz
--2014-11-28 16:43:46--  http://192.168.12.254/asterisk-13-current.tar.gz
Connecting to 192.168.12.254:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 31832204 (30M) [application/octet-stream]
Saving to: `asterisk-13-current.tar.gz'
100%[==========================================================>] 31,832,204   111M/s   in 0.3s
2014-11-28 16:43:46 (111 MB/s) - `asterisk-13-current.tar.gz' saved [31832204/31832204]
15:43:46
#ls -ls
total 31116
    4 -rw-r--r-- 1 root root      811 Nov 26 12:03 \
31088 -rw-r--r-- 1 root root 31832204 Nov 20 22:55 asterisk-13-current.tar.gz
    4 drwxr-xr-x 2 root root     4096 Nov 28 14:12 aster-tips
    4 drwxr-xr-x 5 root root     4096 Nov 27 16:52 chan-datacard
    4 drwxr-xr-x 8 root root     4096 Nov 27 16:55 chan-dongle
    4 drwxr-xr-x 6 root root     4096 Nov 28 11:40 dahdi-linux
    4 -rw-r--r-- 1 root root        6 Nov 26 17:03 ert
    4 drwxr-xr-x 4 root root     4096 Nov 27 16:48 trunk
15:44:02
#ls -ls /usr/src/
total 37232
31088 -rw-r--r-- 1 root root 31832204 Nov 28 16:43 asterisk-13-current.tar.gz
 5240 -rw-r--r-- 1 root root  5364368 Nov 26 14:09 dahdi-modules-3.2.0-4-amd64_2.6.1+dfsg2-1+3.2.63-2+deb7u1_amd64.deb
  824 -rw-r--r-- 1 root root   843676 Jan 30  2013 dahdi.tar.bz2
    0 lrwxrwxrwx 1 root root       27 Nov 26 14:08 linux -> linux-headers-3.2.0-4-amd64
    4 drwxr-xr-x 4 root root     4096 Nov 26 14:08 linux-headers-3.2.0-4-amd64
    4 drwxr-xr-x 4 root root     4096 Nov 26 14:08 linux-headers-3.2.0-4-common
    0 lrwxrwxrwx 1 root root       23 Jun 24  2012 linux-kbuild-3.2 -> ../lib/linux-kbuild-3.2
    4 drwxr-xr-x 3 root root     4096 Jan 30  2013 modules
   68 -rw-r--r-- 1 root root    69129 May  9  2012 vpb-driver.tar.bz2
15:44:13
#cd /usr/src/

15:44:18
#tar xfz asterisk-13-current.tar.gz

15:44:41
#ls -ls
total 37236
    4 drwxr-xr-x 31 root root     4096 Nov 20 19:49 asterisk-13.0.1
31088 -rw-r--r--  1 root root 31832204 Nov 28 16:43 asterisk-13-current.tar.gz
 5240 -rw-r--r--  1 root root  5364368 Nov 26 14:09 dahdi-modules-3.2.0-4-amd64_2.6.1+dfsg2-1+3.2.63-2+deb7u1_amd64.deb
  824 -rw-r--r--  1 root root   843676 Jan 30  2013 dahdi.tar.bz2
    0 lrwxrwxrwx  1 root root       27 Nov 26 14:08 linux -> linux-headers-3.2.0-4-amd64
    4 drwxr-xr-x  4 root root     4096 Nov 26 14:08 linux-headers-3.2.0-4-amd64
    4 drwxr-xr-x  4 root root     4096 Nov 26 14:08 linux-headers-3.2.0-4-common
    0 lrwxrwxrwx  1 root root       23 Jun 24  2012 linux-kbuild-3.2 -> ../lib/linux-kbuild-3.2
    4 drwxr-xr-x  3 root root     4096 Jan 30  2013 modules
   68 -rw-r--r--  1 root root    69129 May  9  2012 vpb-driver.tar.bz2
15:44:45
#cd asterisk-13.0.1/

15:45:02
#./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
...
checking arpa/nameser.h presence... yes
checking for arpa/nameser.h... yes
checking sys/io.h usability... yes
checking sys/io.h presence... yes
checking for sys/io.h... yes
checking for tgetent in -ltermcap... no
checking for tgetent in -ltinfo... no
checking for initscr in -lcurses... no
checking for initscr in -lncurses... no
configure: error: *** termcap support not found (on modern systems, this typically means the ncurses development package is missing)
15:45:39
#apt-get install termcap
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package termcap
15:45:53
#apt-get install libncurses5-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libtinfo-dev
Suggested packages:
  ncurses-doc
The following NEW packages will be installed:
  libncurses5-dev libtinfo-dev
0 upgraded, 2 newly installed, 0 to remove and 5 not upgraded.
...
Get:1 http://192.168.12.254/debian/ wheezy/main libtinfo-dev amd64 5.9-10 [105 kB]
Get:2 http://192.168.12.254/debian/ wheezy/main libncurses5-dev amd64 5.9-10 [223 kB]
Fetched 328 kB in 0s (1,117 kB/s)
Selecting previously unselected package libtinfo-dev:amd64.
(Reading database ... 145268 files and directories currently installed.)
Unpacking libtinfo-dev:amd64 (from .../libtinfo-dev_5.9-10_amd64.deb) ...
Selecting previously unselected package libncurses5-dev.
Unpacking libncurses5-dev (from .../libncurses5-dev_5.9-10_amd64.deb) ...
Setting up libtinfo-dev:amd64 (5.9-10) ...
Setting up libncurses5-dev (5.9-10) ...
15:46:59
#apt-get install uuid-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  uuid-dev
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 72.4 kB of archives.
After this operation, 98.3 kB of additional disk space will be used.
Get:1 http://192.168.12.254/debian/ wheezy/main uuid-dev amd64 2.20.1-5.3 [72.4 kB]
Fetched 72.4 kB in 0s (5,196 kB/s)
Selecting previously unselected package uuid-dev.
(Reading database ... 145316 files and directories currently installed.)
Unpacking uuid-dev (from .../uuid-dev_2.20.1-5.3_amd64.deb) ...
Processing triggers for man-db ...
Setting up uuid-dev (2.20.1-5.3) ...
15:47:24
#./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
...
checking for initscr in -lncurses... yes
checking for curses.h... (cached) yes
checking for uuid_generate_random in -luuid... yes
checking uuid/uuid.h usability... yes
checking uuid/uuid.h presence... yes
checking for uuid/uuid.h... yes
checking for uuid_generate_random in -le2fs-uuid... no
checking for uuid_generate_random... no
checking for json_dumps in -ljansson... no
configure: error: *** JSON support not found (this typically means the libjansson development package is missing)
15:47:35
#apt-get install libjansson
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libjansson
15:48:02
#apt-get install libjansson-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libjansson4
The following NEW packages will be installed:
  libjansson-dev libjansson4
0 upgraded, 2 newly installed, 0 to remove and 5 not upgraded.
Need to get 66.2 kB of archives.
After this operation, 233 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://192.168.12.254/debian/ wheezy/main libjansson4 amd64 2.3.1-2 [31.6 kB]
Get:2 http://192.168.12.254/debian/ wheezy/main libjansson-dev amd64 2.3.1-2 [34.6 kB]
Fetched 66.2 kB in 0s (3,437 kB/s)
Selecting previously unselected package libjansson4:amd64.
(Reading database ... 145338 files and directories currently installed.)
Unpacking libjansson4:amd64 (from .../libjansson4_2.3.1-2_amd64.deb) ...
Selecting previously unselected package libjansson-dev:amd64.
Unpacking libjansson-dev:amd64 (from .../libjansson-dev_2.3.1-2_amd64.deb) ...
Setting up libjansson4:amd64 (2.3.1-2) ...
Setting up libjansson-dev:amd64 (2.3.1-2) ...
15:50:09
#apt-cache search libxml2
aolserver4-nsxml - Module for XML support in aolsever4
cpm - Curses based password manager using PGP-encryption
docbook-xml - standard XML documentation system for software and systems
docbook5-xml - standard XML documentation system for software and systems
libgdome2-0 - DOM level2 library for accessing XML files
libgdome2-dev - Development files for libgdome2
libglobus-common-dev - Globus Toolkit - Common Library Development Files
libglobus-common0 - Globus Toolkit - Common Library
libgdome2-cpp-smart-dev - C++ bindings for GDome2 DOM implementation
libgdome2-cpp-smart0c2a - C++ bindings for GDome2 DOM implementation
...
python-lxml-dbg - pythonic binding for the libxml2 and libxslt libraries (debug extension)
python-lxml-doc - pythonic binding for the libxml2 and libxslt libraries (documentation)
python3-lxml - pythonic binding for the libxml2 and libxslt libraries
python3-lxml-dbg - pythonic binding for the libxml2 and libxslt libraries (debug extension)
nd - small command line interface to WebDAV servers
python-pyxmpp - XMPP and Jabber implementation for Python
python-pyxmpp-doc - XMPP and Jabber implementation for Python (documentation)
ruby-libxml - Ruby Bindings for LibXML2
libsp-gxmlcpp-dev - S+P C++ wrapper for Gnome libxml2/libxslt
libsp-gxmlcpp1 - S+P C++ wrapper for Gnome libxml2/libxslt
15:50:23
#apt-get install libxml2-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  libxml2-dev
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 901 kB of archives.
After this operation, 2,798 kB of additional disk space will be used.
Get:1 http://security.debian.org/ wheezy/updates/main libxml2-dev amd64 2.8.0+dfsg1-7+wheezy2 [901 kB]
Fetched 901 kB in 0s (1,140 kB/s)
Selecting previously unselected package libxml2-dev:amd64.
(Reading database ... 145356 files and directories currently installed.)
Unpacking libxml2-dev:amd64 (from .../libxml2-dev_2.8.0+dfsg1-7+wheezy2_amd64.deb) ...
Processing triggers for man-db ...
Setting up libxml2-dev:amd64 (2.8.0+dfsg1-7+wheezy2) ...
15:51:07
#apt-get install libxml2
Reading package lists... Done
Building dependency tree
Reading state information... Done
libxml2 is already the newest version.
libxml2 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
15:51:13
#./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
...
checking for rc_read_config in -lradiusclient-ng... no
checking for cpg_join in -lcpg... no
checking for corosync_cfg_state_track in -lcfg... no
checking for speex_encode in -lspeex... no
checking for speex_preprocess_ctl in -lspeex... no
checking for speex_preprocess_ctl in -lspeexdsp... no
checking for sqlite_exec in -lsqlite... no
checking for sqlite3_open in -lsqlite3... no
configure: WARNING: *** Asterisk now uses SQLite3 for the internal Asterisk database.
configure: WARNING: *** Please install the SQLite3 development package.
15:51:30
#apt-get install libsqlite3-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  sqlite3-doc
The following NEW packages will be installed:
  libsqlite3-dev
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 578 kB of archives.
After this operation, 1,382 kB of additional disk space will be used.
Get:1 http://192.168.12.254/debian/ wheezy/main libsqlite3-dev amd64 3.7.13-1+deb7u1 [578 kB]
Fetched 578 kB in 0s (22.2 MB/s)
Selecting previously unselected package libsqlite3-dev.
(Reading database ... 145420 files and directories currently installed.)
Unpacking libsqlite3-dev (from .../libsqlite3-dev_3.7.13-1+deb7u1_amd64.deb) ...
Setting up libsqlite3-dev (3.7.13-1+deb7u1) ...
15:53:24
#./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
...
 $$$$$                        $$$
  $$$$7.                       $$  (TM)
   $$$$$$$.           .7$$$$$$  $$
     $$$$$$$$$$$$7$$$$$$$$$.$$$$$$
       $$$$$$$$$$$$$$$$.
configure: Package configured for:
configure: OS type  : linux-gnu
configure: Host CPU : x86_64
configure: build-cpu:vendor:os: x86_64 : unknown : linux-gnu :
configure: host-cpu:vendor:os: x86_64 : unknown : linux-gnu :
15:53:42
#make menuconfig
                         **************************************************
                             Asterisk Module and Build Option Selection
                         **************************************************
                                         Press 'h' for help.
                                            --- Core ---
                                        [*] res_adsi
                                        [*] res_agi
                                        [*] res_ari
                                        [*] res_ari_applications
                                        [*] res_ari_asterisk
...
                                        XXX res_calendar_exchange
                                        XXX res_calendar_icalendar
                                        [*] res_clialiases
                                        [*] res_clioriginate
                                        XXX res_config_curl
                                        XXX res_config_odbc
                                            ... More ...
                                  Realtime ODBC configuration
                                  Depends on: curl(E)E)
                                  Support Level: core
прошло 11 минут
16:05:22
#apt-get install libssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libssl-doc zlib1g-dev
The following NEW packages will be installed:
  libssl-dev libssl-doc zlib1g-dev
0 upgraded, 3 newly installed, 0 to remove and 5 not upgraded.
Need to get 3,168 kB of archives.
After this operation, 8,364 kB of additional disk space will be used.
...
(Reading database ... 145431 files and directories currently installed.)
Unpacking zlib1g-dev:amd64 (from .../zlib1g-dev_1%3a1.2.7.dfsg-13_amd64.deb) ...
Selecting previously unselected package libssl-dev.
Unpacking libssl-dev (from .../libssl-dev_1.0.1e-2+deb7u13_amd64.deb) ...
Selecting previously unselected package libssl-doc.
Unpacking libssl-doc (from .../libssl-doc_1.0.1e-2+deb7u13_all.deb) ...
Processing triggers for man-db ...
Setting up zlib1g-dev:amd64 (1:1.2.7.dfsg-13) ...
Setting up libssl-dev (1.0.1e-2+deb7u13) ...
Setting up libssl-doc (1.0.1e-2+deb7u13) ...
16:06:13
#./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
...
 $$$$$                        $$$
  $$$$7.                       $$  (TM)
   $$$$$$$.           .7$$$$$$  $$
     $$$$$$$$$$$$7$$$$$$$$$.$$$$$$
       $$$$$$$$$$$$$$$$.
configure: Package configured for:
configure: OS type  : linux-gnu
configure: Host CPU : x86_64
configure: build-cpu:vendor:os: x86_64 : unknown : linux-gnu :
configure: host-cpu:vendor:os: x86_64 : unknown : linux-gnu :
16:06:32
#make menuconfig
                                         Press 'h' for help.
                                         Add-ons (See README-addons.txt)
                                         Applications
                                         Bridging Modules
                                         Call Detail Recording
                                         Channel Event Logging
                                   --->  Channel Drivers
                                         Codec Translators
                                         Format Interpreters
                                         Dialplan Functions
...
                                         Compiler Flags
                                         Voicemail Build Options
                                         Utilities
                                         AGI Samples
                                         Module Embedding
                                         Core Sound Packages
                                         Music On Hold File Packages
                                         Extras Sound Packages
menuselect changes NOT saved!
make[1]: Leaving directory `/usr/src/asterisk-13.0.1'
16:07:59
#apt-get install libtonezone-dev dahdi-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package dahdi-dev
16:08:18
#apt-get install libtonezone-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  libtonezone-dev
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 50.2 kB of archives.
After this operation, 299 kB of additional disk space will be used.
Get:1 http://192.168.12.254/debian/ wheezy/main libtonezone-dev amd64 1:2.5.0.1-2 [50.2 kB]
Fetched 50.2 kB in 0s (3,388 kB/s)
Selecting previously unselected package libtonezone-dev.
(Reading database ... 146869 files and directories currently installed.)
Unpacking libtonezone-dev (from .../libtonezone-dev_1%3a2.5.0.1-2_amd64.deb) ...
Setting up libtonezone-dev (1:2.5.0.1-2) ...
16:08:25
#apt-get install libpri-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  libpri-dev
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 290 kB of archives.
After this operation, 987 kB of additional disk space will be used.
Get:1 http://192.168.12.254/debian/ wheezy/main libpri-dev amd64 1.4.12-2 [290 kB]
Fetched 290 kB in 0s (15.6 MB/s)
Selecting previously unselected package libpri-dev.
(Reading database ... 146876 files and directories currently installed.)
Unpacking libpri-dev (from .../libpri-dev_1.4.12-2_amd64.deb) ...
Setting up libpri-dev (1.4.12-2) ...
16:11:13
#apt-cache search srtp
libsrtp0 - Secure RTP (SRTP) and UST Reference Implementations - shared library
libsrtp0-dev - Secure RTP (SRTP) and UST Reference Implementations - development files
srtp-docs - Secure RTP (SRTP) and UST Reference Implementations - documentation
srtp-utils - Secure RTP (SRTP) and UST Reference Implementations - utilities
uanytun - tiny implementation of the secure anycast tunneling protocol
16:11:27
#apt-get install libsrtp0-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  libsrtp0-dev
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 117 kB of archives.
After this operation, 390 kB of additional disk space will be used.
Get:1 http://192.168.12.254/debian/ wheezy/main libsrtp0-dev amd64 1.4.4+20100615~dfsg-2+deb7u1 [117 kB]
Fetched 117 kB in 0s (836 kB/s)
Selecting previously unselected package libsrtp0-dev.
(Reading database ... 146884 files and directories currently installed.)
Unpacking libsrtp0-dev (from .../libsrtp0-dev_1.4.4+20100615~dfsg-2+deb7u1_amd64.deb) ...
Setting up libsrtp0-dev (1.4.4+20100615~dfsg-2+deb7u1) ...
16:11:39
#./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
...
 $$$$$                        $$$
  $$$$7.                       $$  (TM)
   $$$$$$$.           .7$$$$$$  $$
     $$$$$$$$$$$$7$$$$$$$$$.$$$$$$
       $$$$$$$$$$$$$$$$.
configure: Package configured for:
configure: OS type  : linux-gnu
configure: Host CPU : x86_64
configure: build-cpu:vendor:os: x86_64 : unknown : linux-gnu :
configure: host-cpu:vendor:os: x86_64 : unknown : linux-gnu :
16:12:06
#make menuconfig
                         **************************************************
                             Asterisk Module and Build Option Selection
                         **************************************************
                                         Press 'h' for help.
                                            --- Core ---
                                        [*] res_adsi
                                        [*] res_agi
                                        [*] res_ari
                                        [*] res_ari_applications
                                        [*] res_ari_asterisk
...
                                        [*] res_clialiases
                                        [*] res_clioriginate
                                        XXX res_config_curl
                                        XXX res_config_odbc
                                            ... More ...
                                  Realtime ODBC configuration
                                  Depends on: curl(E)E)
                                  Support Level: core
                                  ODBC CDR Backend
                                  Support Level: extended
16:19:18
#make -j
CC="cc" CXX="" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts
make[1]: Entering directory `/usr/src/asterisk-13.0.1/menuselect'
make[1]: `makeopts' is up to date.
make[1]: Leaving directory `/usr/src/asterisk-13.0.1/menuselect'
Building Documentation For: Generating embedded module rules ...
channels pbx apps codecs formats cdr cel bridges funcs tests main    [CC] astdb2bdb.c -> astdb2bdb.o
   [CC] astcanary.c -> astcanary.o
   [CC] astdb2sqlite3.c -> astdb2sqlite3.o
   [CC] hash/hash.c -> hash/hash.o
   [CC] hash/hash_bigkey.c -> hash/hash_bigkey.o
...
   [LD] app_voicemail.o -> app_voicemail.so
   [LD] chan_iax2.o iax2/codec_pref.o iax2/firmware.o iax2/format_compatibility.o iax2/parser.o iax2/provision.o -> chan_iax2.so
   [LD] chan_dahdi.o dahdi/bridge_native_dahdi.o sig_analog.o sig_pri.o sig_ss7.o -> chan_dahdi.so
   [LD] chan_sip.o sip/config_parser.o sip/dialplan_functions.o sip/reqresp_parser.o sip/route.o sip/security_events.o sip/utils.o -> chan_sip.so
 +--------- Asterisk Build Complete ---------+
 + Asterisk has successfully been built, and +
 + can be installed by running:              +
 +                                           +
 +                make install               +
 +-------------------------------------------+
16:21:23
#cp -R /etc/asterisk /etc/asterisk.bak

16:24:29
##apt-get remove asterisk asterisk-modules

16:24:54
#cp /etc/init.d/asterisk /tmp/

16:25:05
#apt-get remove asterisk asterisk-modules
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  asterisk asterisk-dahdi asterisk-modules asterisk-mysql asterisk-prompt-de asterisk-voicemail
0 upgraded, 0 newly installed, 6 to remove and 5 not upgraded.
After this operation, 15.3 MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 146930 files and directories currently installed.)
Removing asterisk-prompt-de ...
Removing asterisk-voicemail ...
Removing asterisk-mysql ...
Removing asterisk-dahdi ...
Removing asterisk ...
Stopping Asterisk PBX: asterisk.
Removing asterisk-modules ...
dpkg: warning: while removing asterisk-modules, directory '/usr/lib/asterisk/modules' not empty so not removed
Processing triggers for man-db ...
16:25:21
#make install
CC="cc" CXX="" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts
make[1]: Entering directory `/usr/src/asterisk-13.0.1/menuselect'
make[1]: `makeopts' is up to date.
make[1]: Leaving directory `/usr/src/asterisk-13.0.1/menuselect'
Installing modules from channels...
Installing modules from pbx...
Installing modules from apps...
Installing modules from codecs...
Installing modules from formats...
Installing modules from cdr...
...
 +-------------------------------------------+
 WARNING WARNING WARNING
 Your Asterisk modules directory, located at
 /usr/lib/asterisk/modules
 contains modules that were not installed by this
 version of Asterisk. Please ensure that these
 modules are compatible with this version before
 attempting to run Asterisk.
    chan_dongle.so
 WARNING WARNING WARNING
16:29:52
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
16:30:51
#asterisk -rvvv
Asterisk 13.0.1, Copyright (C) 1999 - 2014, 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 13.0.1 currently running on debian8 (pid = 8137)
[Nov 28 17:30:59] NOTICE[8180]: chan_sip.c:29193 sip_poke_noanswer: Peer 'ny' is now UNREACHABLE!  Last qualify: 0
[Nov 28 17:30:59] NOTICE[8180]: chan_sip.c:29193 sip_poke_noanswer: Peer 'atlanta' is now UNREACHABLE!  Last qualify: 0
...
edinburgh/london          192.168.12.254                           D  Auto (No)  No             5060     OK (1 ms)
liverpool/london          192.168.70.1                             D  Auto (No)  No             5060     OK (1 ms)
ny/london                 192.168.40.1                             D  Auto (No)  No             5060     OK (1 ms)
6 sip peers [Monitored: 5 online, 1 offline Unmonitored: 0 online, 0 offline]
[Nov 28 17:31:56] NOTICE[8180]: chan_sip.c:15251 sip_reg_timeout:    -- Registration for 'london@192.168.50.1' timed out, trying again (Attempt #4)
[Nov 28 17:32:16] NOTICE[8180]: chan_sip.c:15251 sip_reg_timeout:    -- Registration for 'london@192.168.50.1' timed out, trying again (Attempt #5)
debian8*CLI>
Disconnected from Asterisk server
Asterisk cleanly ending (0).
Executing last minute cleanups
16:32:32
#asterisk -rvvv
Asterisk 13.0.1, Copyright (C) 1999 - 2014, 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 13.0.1 currently running on debian8 (pid = 8137)
debian8*CLI> sip show peers
Name/username             Host                                    Dyn Forcerport Comedia    ACL Port     Status      Description
...
keys           local          logger         manager        meetme         minivm
mixmonitor     module         moh            no             originate      phoneprov
presencestate  pri            queue          realtime       reload         rtcp
rtp            say            sip            skinny         sla            stun
timing         transcoder     udptl          ulimit         unistim        voicemail
xmldoc
debian8*CLI>
Disconnected from Asterisk server
Asterisk cleanly ending (0).
Executing last minute cleanups
16:37:44
#vi /etc/asterisk/sip.conf
--- /tmp/l3-saved-3744.14119.5713	2014-11-28 17:37:50.554716767 +0200
+++ /etc/asterisk/sip.conf	2014-11-28 17:38:14.234717519 +0200
@@ -16,6 +16,7 @@
 language=ru
 callgroup=1
 pickupgroup=1
+encription=yes
 
 [3202]
 type=friend
16:38:14
#asterisk -rvvv
Asterisk 13.0.1, Copyright (C) 1999 - 2014, 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 13.0.1 currently running on debian8 (pid = 8137)
debian8*CLI> sip reload
 Reloading SIP
...
  == Using SIP RTP CoS mark 5
    -- Executing [2101@gr1:1] Dial("SIP/3201-0000000d", "SIP/ny/2101") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/ny/2101
    -- SIP/ny-0000000e is ringing
  == Spawn extension (gr1, 2101, 1) exited non-zero on 'SIP/3201-0000000d'
debian8*CLI>
Disconnected from Asterisk server
Asterisk cleanly ending (0).
Executing last minute cleanups
16:38:57
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3744.21649.3395	2014-11-28 17:39:04.074719103 +0200
+++ /etc/asterisk/extensions.conf	2014-11-28 17:40:37.350722066 +0200
@@ -97,7 +97,11 @@
 
  сначала создаём имя файла:
 ; кому звонили и время
-exten => _32XX,1,Set(CALLFILENAME=${EXTEN}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H:%M:%S")})
+
+exten => _33XX,1,NoOp(secure_signaling = ${CHANNEL(secure_signaling)}
+exten => _33XX,n,NoOp(secure_media = ${CHANNEL(secure_media)})
+
+exten => _32XX,n,Set(CALLFILENAME=${EXTEN}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H:%M:%S")})
 exten => _32XX,n,Monitor(wav,${CALLFILENAME},m)
 
 exten => _32XX,n,Dial(SIP/${EXTEN},20,tTkK)
/dev/pts/6
16:40:26
#asterisk -rvvvv
Asterisk 13.0.1, Copyright (C) 1999 - 2014, 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 13.0.1 currently running on debian8 (pid = 8137)
    -- Remote UNIX connection
 Reloading SIP
...
    -- Executing [3201@gr1:2] NoOp("SIP/3202-00000595", "secure_media = ") in new stack
    -- Executing [3201@gr1:3] Set("SIP/3202-00000595", "CALLFILENAME=3201-3202-"2014-11-28-17:45:30"") in new stack
    -- Executing [3201@gr1:4] Monitor("SIP/3202-00000595", "wav,3201-3202-"2014-11-28-17:45:30",m") in new stack
    -- Executing [3201@gr1:5] Dial("SIP/3202-00000595", "SIP/3201,20,tTkK") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/3201
    -- SIP/3201-00000596 is ringing
debian8*CLI> quit
Asterisk cleanly ending (0).
Executing last minute cleanups
/dev/pts/4
16:40:37
#asterisk -rvvv
Asterisk 13.0.1, Copyright (C) 1999 - 2014, 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 13.0.1 currently running on debian8 (pid = 8137)
debian8*CLI> sip reload
 Reloading SIP
...
[Nov 28 17:41:32] WARNING[8180][C-0000000c]: chan_sip.c:16552 check_auth: username mismatch, have <3201>, digest has <edinburgh>
[Nov 28 17:41:32] NOTICE[8180][C-0000000c]: chan_sip.c:25418 handle_request_invite: Failed to authenticate device <sip:3201@192.168.12.254>;tag=as67440c97
    -- Got SIP response 503 "Service Unavailable" back from 192.168.12.254:5060
    -- SIP/edinburgh-00000014 is circuit-busy
  == Everyone is busy/congested at this time (1:0/1/0)
    -- Auto fallthrough, channel 'SIP/3201-00000013' status is 'CONGESTION'
debian8*CLI>
Disconnected from Asterisk server
Asterisk cleanly ending (0).
Executing last minute cleanups
16:41:36
#vi /etc/asterisk/sip.conf
16:41:45
#[3201]

16:42:00
##softfon Ð#softfon Ð#softfon Ðasterisk -rvvv
Asterisk 13.0.1, Copyright (C) 1999 - 2014, 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 13.0.1 currently running on debian8 (pid = 8137)
  == Using SIP RTP CoS mark 5
    -- Executing [3202@gr1:1] Dial("SIP/3201-000000dd", "SIP/edinburgh/3202") in new stack
...
  == Everyone is busy/congested at this time (1:0/1/0)
    -- Auto fallthrough, channel 'SIP/edinburgh-000004c9' status is 'CONGESTION'
    -- Got SIP response 503 "Service Unavailable" back from 192.168.12.254:5060
    -- SIP/edinburgh-000004c8 is circuit-busy
  == Everyone is busy/congested at this time (1:0/1/0)
    -- Auto fallthrough, channel 'SIP/ny-000004c7' status is 'CONGESTION'
debian8*CLI>
Disconnected from Asterisk server
Asterisk cleanly ending (0).
Executing last minute cleanups
16:43:21
##softfon Ðvi /etc/asterisk/extensions.conf
exten => 3,1,Answer
exten => 0,1,Goto(s,start)
; неверный выбор
; i = invalid (extension)
exten => i,1,Playback(/var/tmp/asterisk/record06)
exten => i,n,WaitExten(2)
exten => i,n,Goto(s,start)
[internal]
[        ]
exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm)
...
; кому звонили и время
exten => _33XX,1,NoOp(secure_signaling = ${CHANNEL(secure_signaling)}
exten => _33XX,n,NoOp(secure_media = ${CHANNEL(secure_media)})
exten => _32XX,n,Set(CALLFILENAME=${EXTEN}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%%
d-%H:%M:%S")})
          32
exten => _32XX,n,Monitor(wav,${CALLFILENAME},m)
exten => _32XX,n,Dial(SIP/${EXTEN},20,tTkK)
exten => _32XX,n,VoiceMail(32${EXTEN:2}@default)
"/etc/asterisk/extensions.conf" 148L, 3695C written
16:44:00
#asterisk -rvvv
Asterisk 13.0.1, Copyright (C) 1999 - 2014, 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 13.0.1 currently running on debian8 (pid = 8137)
debian8*CLI> dialplan reload
Dialplan reloaded.
...
    -- Called SIP/ny/2101
    -- SIP/ny-000005a8 is ringing
  == Spawn extension (gr4, 2101, 1) exited non-zero on 'SIP/liverpool-000005a7'
    -- Remote UNIX connection disconnected
    -- Unregistered SIP '3202'
[Nov 28 18:08:02] NOTICE[8180]: chan_sip.c:29193 sip_poke_noanswer: Peer '3202' is now UNREACHABLE!  Last qualify: 88
debian8*CLI>
Disconnected from Asterisk server
Asterisk cleanly ending (0).
Executing last minute cleanups
/dev/pts/6
16:45:31
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-8522.21266.22752	2014-11-28 17:45:39.058731651 +0200
+++ /etc/asterisk/extensions.conf	2014-11-28 17:46:06.842732534 +0200
@@ -98,7 +98,7 @@
  сначала создаём имя файла:
 ; кому звонили и время
 
-exten => _32XX,1,NoOp(secure_signaling = ${CHANNEL(secure_signaling)}
+exten => _32XX,1,NoOp(secure_signaling = ${CHANNEL(secure_signaling)})
 exten => _32XX,n,NoOp(secure_media = ${CHANNEL(secure_media)})
 
 exten => _32XX,n,Set(CALLFILENAME=${EXTEN}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H:%M:%S")})

Статистика

Время первой команды журнала13:12:50 2014-11-28
Время последней команды журнала16:45:31 2014-11-28
Количество командных строк в журнале76
Процент команд с ненулевым кодом завершения, %18.42
Процент синтаксически неверно набранных команд, % 0.00
Суммарное время работы с терминалом *, час 2.20
Количество командных строк в единицу времени, команда/мин 0.57
Частота использования команд
apt-get16|====================| 20.00%
mysql9|===========| 11.25%
vi8|==========| 10.00%
asterisk6|=======| 7.50%
configure6|=======| 7.50%
make5|======| 6.25%
ls4|=====| 5.00%
1.sql3|===| 3.75%
apt-cache3|===| 3.75%
#softfon2|==| 2.50%
ALTER2|==| 2.50%
/etc/init.d/asterisk2|==| 2.50%
cp2|==| 2.50%
cd2|==| 2.50%
less2|==| 2.50%
wget1|=| 1.25%
#1|=| 1.25%
[3201]1|=| 1.25%
vim1|=| 1.25%
#apt-get1|=| 1.25%
netstat1|=| 1.25%
grep1|=| 1.25%
tar1|=| 1.25%
____
*) Интервалы неактивности длительностью 30 минут и более не учитываются

Справка

Для того чтобы использовать LiLaLo, не нужно знать ничего особенного: всё происходит само собой. Однако, чтобы ведение и последующее использование журналов было как можно более эффективным, желательно иметь в виду следующее:
  1. В журнал автоматически попадают все команды, данные в любом терминале системы.

  2. Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.

  3. Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
    $ l s-l
    bash: l: command not found
    

  4. Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
    $ test 5 -lt 4
    Обратите внимание на то, что код завершения команды может быть отличен от нуля не только в тех случаях, когда команда была выполнена с ошибкой. Многие команды используют код завершения, например, для того чтобы показать результаты проверки

  5. Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
    $ 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
    

  6. Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
    # id
    uid=0(root) gid=0(root) Gruppen=0(root)
    

  7. Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
    $ vi ~/.bashrc
    2a3,5
    >    if [ -f /usr/local/etc/bash_completion ]; then
    >         . /usr/local/etc/bash_completion
    >        fi
    

  8. Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
    $ patch ~/.bashrc
    В данном случае изменения применяются к файлу ~/.bashrc

  9. Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.

    Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.

  10. Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.

  11. Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора

  12. Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.

  13. Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.

  14. Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:

    $ whoami
    
    user
    
    $ #^ Интересно, кто я?
    
    в журнале это будет выглядеть так:
    $ whoami
    
    user
    
    Интересно, кто я?

  15. Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:

    $ whoami
    
    user
    
    $ cat > /dev/null #^ Интересно, кто я?
    
    Программа whoami выводит имя пользователя, под которым 
    мы зарегистрировались в системе.
    -
    Она не может ответить на вопрос о нашем назначении 
    в этом мире.
    
    В журнале это будет выглядеть так:
    $ whoami
    user
    
    Интересно, кто я?
    Программа whoami выводит имя пользователя, под которым
    мы зарегистрировались в системе.

    Она не может ответить на вопрос о нашем назначении
    в этом мире.
    Для разделения нескольких абзацев между собой используйте символ "-", один в строке.

  16. Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=

  17. Содержимое файла может быть показано в журнале. Для этого его нужно вывести с помощью программы cat. Если вывод команды отметить симоволами #!, содержимое файла будет показано в журнале в специально отведённой для этого секции.
  18. Для того чтобы вставить скриншот интересующего вас окна в журнал, нужно воспользоваться командой l3shot. После того как команда вызвана, нужно с помощью мыши выбрать окно, которое должно быть в журнале.
  19. Команды в журнале расположены в хронологическом порядке. Если две команды давались одна за другой, но на разных терминалах, в журнале они будут рядом, даже если они не имеют друг к другу никакого отношения.
    1
        2
    3   
        4
    
    Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.

О программе

LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008

$Id$