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

Содержание

Журнал

Четверг (11/27/14)

/dev/pts/3
16:02:34
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
16:02:50
#less /var/log/messages ^C
16:03:00
#less /var/log/messages
16:04:43
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
16:04:52
#asterisk -rvvvv
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 debian2 (pid = 11564)
Verbosity was 0 and is now 4
debian2*CLI> dongle show devic
device   devices
debian2*CLI> dongle show devices
ID           Group State      RSSI Mode Submode Provider Name  Model      Firmware          IMEI             IMSI             Number
dongle0      0     Not connec 0    0    0       NONE                                                                          Unknown
debian2*CLI> quit
Executing last minute cleanups
16:05:06
#/etc/init.d/asterisk stop
Stopping Asterisk PBX: asterisk.
16:05:12
#lsmod | head
Module                  Size  Used by
option                 37168  0
usb_wwan               17320  1 option
usbserial              32061  2 usb_wwan,option
usb_storage            43870  0
bnep                   17567  2
rfcomm                 33700  0
bluetooth             119455  10 rfcomm,bnep
binfmt_misc            12957  1
nfsd                  216181  2
16:05:20
#modprobe -r option

16:05:26
#lsmod | head
Module                  Size  Used by
usb_storage            43870  0
bnep                   17567  2
rfcomm                 33700  0
bluetooth             119455  10 rfcomm,bnep
binfmt_misc            12957  1
nfsd                  216181  2
nfs                   308353  0
nfs_acl                12511  2 nfs,nfsd
auth_rpcgss            37143  2 nfs,nfsd
16:05:28
#modprobe usb_wwan

16:05:40
#lsmod
Module                  Size  Used by
usb_wwan               17320  0
usbserial              32061  1 usb_wwan
usb_storage            43870  0
bnep                   17567  2
rfcomm                 33700  0
bluetooth             119455  10 rfcomm,bnep
binfmt_misc            12957  1
nfsd                  216181  2
nfs                   308353  0
...
xhci_hcd               73413  0
ahci                   24997  3
libahci                22941  1 ahci
ehci_hcd               40249  0
libata                140630  2 libahci,ahci
scsi_mod              162321  5 libata,sd_mod,sg,sr_mod,usb_storage
tg3                   119064  0
libphy                 19057  1 tg3
usbcore               128741  8 ehci_hcd,xhci_hcd,ohci_hcd,usbhid,usb_storage,usbserial,usb_wwan
usb_common             12354  1 usbcore
16:05:41
#lsmod | head
Module                  Size  Used by
usb_wwan               17320  0
usbserial              32061  1 usb_wwan
usb_storage            43870  0
bnep                   17567  2
rfcomm                 33700  0
bluetooth             119455  10 rfcomm,bnep
binfmt_misc            12957  1
nfsd                  216181  2
nfs                   308353  0
16:05:44
#/etc/init.d/asterisk start
Starting Asterisk PBX: asterisk.
16:05:51
#asterisk -rvvvv
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 debian2 (pid = 11717)
Verbosity was 0 and is now 4
debian2*CLI> dongle show devices
ID           Group State      RSSI Mode Submode Provider Name  Model      Firmware          IMEI             IMSI             Number
dongle0      0     Not connec 0    0    0       NONE                                                                          Unknown
debian2*CLI> quit
Executing last minute cleanups
16:05:57
#less /var/log/messages
16:06:31
#less /var/log/messages
прошло 10 минут
/dev/pts/3
16:16:56
#ls chan-dongle
aclocal.m4    at_parse.c  at_read.h       chan_dongle.c   char_conv.c   config.h       contrib        dc_config.o  install-sh   memmem.c     mutils.h      README.txt    test
app.c         at_parse.h  at_read.o       chan_dongle.h   char_conv.h   config.h.in    COPYRIGHT.txt  etc          LICENSE.txt  memmem.h     pdiscovery.c  ringbuffer.c  TODO.txt
app.h         at_parse.o  at_response.c   chan_dongle.o   char_conv.o   config.log     cpvt.c         export.h     Makefile     memmem.o     pdiscovery.h  ringbuffer.h  tools
app.o         at_queue.c  at_response.h   chan_dongle.so  cli.c         config.status  cpvt.h         helpers.c    Makefile.in  missing      pdiscovery.o  ringbuffer.o
at_command.c  at_queue.h  at_response.o   channel.c       cli.h         config.sub     cpvt.o         helpers.h    manager.c    mixbuffer.c  pdu.c         single.c
at_command.h  at_queue.o  autom4te.cache  channel.h       cli.o         configure      dc_config.c    helpers.o    manager.h    mixbuffer.h  pdu.h         stamp-h1
at_command.o  at_read.c   BUGS            channel.o       config.guess  configure.in   dc_config.h    INSTALL      manager.o    mixbuffer.o  pdu.o         stamp-h.in
16:17:01
#less chan-dongle/etc/

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

/dev/pts/0
09:05:24
#ls /var/tmp/asterisk/
                  lspci
00:00.0 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Root Complex
00:00.2 IOMMU: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) I/O Memory Management Unit
00:01.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Trinity [Radeon HD 7660D]
00:01.1 Audio device: Advanced Micro Devices [AMD] nee ATI Trinity HDMI Audio Controller
00:10.0 USB controller: Advanced Micro Devices [AMD] FCH USB XHCI Controller (rev 03)
00:10.1 USB controller: Advanced Micro Devices [AMD] FCH USB XHCI Controller (rev 03)
00:11.0 RAID bus controller: Advanced Micro Devices [AMD] FCH SATA Controller [RAID mode] (rev 40)
00:12.0 USB controller: Advanced Micro Devices [AMD] FCH USB OHCI Controller (rev 11)
00:12.2 USB controller: Advanced Micro Devices [AMD] FCH USB EHCI Controller (rev 11)
...
00:14.5 USB controller: Advanced Micro Devices [AMD] FCH USB OHCI Controller (rev 11)
00:15.0 PCI bridge: Advanced Micro Devices [AMD] Hudson PCI to PCI bridge (PCIE port 0)
00:15.2 PCI bridge: Advanced Micro Devices [AMD] Hudson PCI to PCI bridge (PCIE port 2)
00:18.0 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 0
00:18.1 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 1
00:18.2 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 2
00:18.3 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 3
00:18.4 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 4
00:18.5 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 5
03:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5761 Gigabit Ethernet PCIe (rev 10)
/dev/pts/1
09:05:24
#ls /var/tmp/asterisk/
                  lspci
00:00.0 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Root Complex
00:00.2 IOMMU: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) I/O Memory Management Unit
00:01.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Trinity [Radeon HD 7660D]
00:01.1 Audio device: Advanced Micro Devices [AMD] nee ATI Trinity HDMI Audio Controller
00:10.0 USB controller: Advanced Micro Devices [AMD] FCH USB XHCI Controller (rev 03)
00:10.1 USB controller: Advanced Micro Devices [AMD] FCH USB XHCI Controller (rev 03)
00:11.0 RAID bus controller: Advanced Micro Devices [AMD] FCH SATA Controller [RAID mode] (rev 40)
00:12.0 USB controller: Advanced Micro Devices [AMD] FCH USB OHCI Controller (rev 11)
00:12.2 USB controller: Advanced Micro Devices [AMD] FCH USB EHCI Controller (rev 11)
...
00:14.5 USB controller: Advanced Micro Devices [AMD] FCH USB OHCI Controller (rev 11)
00:15.0 PCI bridge: Advanced Micro Devices [AMD] Hudson PCI to PCI bridge (PCIE port 0)
00:15.2 PCI bridge: Advanced Micro Devices [AMD] Hudson PCI to PCI bridge (PCIE port 2)
00:18.0 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 0
00:18.1 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 1
00:18.2 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 2
00:18.3 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 3
00:18.4 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 4
00:18.5 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 5
03:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5761 Gigabit Ethernet PCIe (rev 10)
/dev/pts/4
09:11:50
#cd
.aptitude/                                  .cache/                                     .gconf/                                     .pulse-cookie
asterisk-core-sounds-ru-gsm-current.tar.gz  chan-datacard/                              .l3rc                                       .rnd
.asterisk_history                           chan-dongle/                                .lilalo/                                    .ssh/
.bash_history                               chan-dongle-installation.txt                Mail/                                       .subversion/
.bash_profile                               .config/                                    .profile                                    .viminfo
.bashrc                                     .dbus/                                      .pulse/
09:11:50
#cd chan-dongle

09:11:55
#ls
aclocal.m4    at_parse.c  at_read.h       chan_dongle.c   char_conv.c   config.h       contrib        dc_config.o  install-sh   memmem.c     mutils.h      README.txt    test
app.c         at_parse.h  at_read.o       chan_dongle.h   char_conv.h   config.h.in    COPYRIGHT.txt  etc          LICENSE.txt  memmem.h     pdiscovery.c  ringbuffer.c  TODO.txt
app.h         at_parse.o  at_response.c   chan_dongle.o   char_conv.o   config.log     cpvt.c         export.h     Makefile     memmem.o     pdiscovery.h  ringbuffer.h  tools
app.o         at_queue.c  at_response.h   chan_dongle.so  cli.c         config.status  cpvt.h         helpers.c    Makefile.in  missing      pdiscovery.o  ringbuffer.o
at_command.c  at_queue.h  at_response.o   channel.c       cli.h         config.sub     cpvt.o         helpers.h    manager.c    mixbuffer.c  pdu.c         single.c
at_command.h  at_queue.o  autom4te.cache  channel.h       cli.o         configure      dc_config.c    helpers.o    manager.h    mixbuffer.h  pdu.h         stamp-h1
at_command.o  at_read.c   BUGS            channel.o       config.guess  configure.in   dc_config.h    INSTALL      manager.o    mixbuffer.o  pdu.o         stamp-h.in
09:11:57
#ls etc/
dongle.conf  extensions.conf
09:12:02
#less etc/extensions.conf
прошло 13 минут
/dev/pts/0
09:25:57
#grep -i broadcom
^C
/dev/pts/1
09:25:57
#grep -i broadcom
^C
/dev/pts/0
09:27:03
#lspci | grep -i broadcom
03:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5761 Gigabit Ethernet PCIe (rev 10)
/dev/pts/1
09:27:03
#lspci | grep -i broadcom
03:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5761 Gigabit Ethernet PCIe (rev 10)
/dev/pts/0
09:27:58
#lspci
00:00.0 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Root Complex
00:00.2 IOMMU: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) I/O Memory Management Unit
00:01.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Trinity [Radeon HD 7660D]
00:01.1 Audio device: Advanced Micro Devices [AMD] nee ATI Trinity HDMI Audio Controller
00:10.0 USB controller: Advanced Micro Devices [AMD] FCH USB XHCI Controller (rev 03)
00:10.1 USB controller: Advanced Micro Devices [AMD] FCH USB XHCI Controller (rev 03)
00:11.0 RAID bus controller: Advanced Micro Devices [AMD] FCH SATA Controller [RAID mode] (rev 40)
00:12.0 USB controller: Advanced Micro Devices [AMD] FCH USB OHCI Controller (rev 11)
00:12.2 USB controller: Advanced Micro Devices [AMD] FCH USB EHCI Controller (rev 11)
00:13.0 USB controller: Advanced Micro Devices [AMD] FCH USB OHCI Controller (rev 11)
...
00:14.5 USB controller: Advanced Micro Devices [AMD] FCH USB OHCI Controller (rev 11)
00:15.0 PCI bridge: Advanced Micro Devices [AMD] Hudson PCI to PCI bridge (PCIE port 0)
00:15.2 PCI bridge: Advanced Micro Devices [AMD] Hudson PCI to PCI bridge (PCIE port 2)
00:18.0 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 0
00:18.1 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 1
00:18.2 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 2
00:18.3 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 3
00:18.4 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 4
00:18.5 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 5
03:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5761 Gigabit Ethernet PCIe (rev 10)
/dev/pts/1
09:27:58
#lspci
00:00.0 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Root Complex
00:00.2 IOMMU: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) I/O Memory Management Unit
00:01.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Trinity [Radeon HD 7660D]
00:01.1 Audio device: Advanced Micro Devices [AMD] nee ATI Trinity HDMI Audio Controller
00:10.0 USB controller: Advanced Micro Devices [AMD] FCH USB XHCI Controller (rev 03)
00:10.1 USB controller: Advanced Micro Devices [AMD] FCH USB XHCI Controller (rev 03)
00:11.0 RAID bus controller: Advanced Micro Devices [AMD] FCH SATA Controller [RAID mode] (rev 40)
00:12.0 USB controller: Advanced Micro Devices [AMD] FCH USB OHCI Controller (rev 11)
00:12.2 USB controller: Advanced Micro Devices [AMD] FCH USB EHCI Controller (rev 11)
00:13.0 USB controller: Advanced Micro Devices [AMD] FCH USB OHCI Controller (rev 11)
...
00:14.5 USB controller: Advanced Micro Devices [AMD] FCH USB OHCI Controller (rev 11)
00:15.0 PCI bridge: Advanced Micro Devices [AMD] Hudson PCI to PCI bridge (PCIE port 0)
00:15.2 PCI bridge: Advanced Micro Devices [AMD] Hudson PCI to PCI bridge (PCIE port 2)
00:18.0 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 0
00:18.1 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 1
00:18.2 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 2
00:18.3 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 3
00:18.4 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 4
00:18.5 Host bridge: Advanced Micro Devices [AMD] Family 15h (Models 10h-1fh) Processor Function 5
03:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5761 Gigabit Ethernet PCIe (rev 10)
прошло >2 часов
/dev/pts/4
11:39:03
#ls
asterisk-core-sounds-ru-gsm-current.tar.gz  chan-datacard  chan-dongle  chan-dongle-installation.txt  Mail
11:39:05
#cat chan-dongle-installation.txt
# url на котором лежит исходный код dongle:
# http://asterisk-chan-dongle.googlecode.com/svn/trunk/
# находится через google за одно нажате
# тип репозитория subversion
apt-get install subversion
# для сборки из исходников всегда нужны заголовочные файлы
# asterisk-dev
apt-get install asterisk-dev
# нам ещё потребуется autoconf
apt-get install autoconf
...
# подготовка файла ./configure
aclocal
autoconf
automake
automake -a
# непосредственная сборка
./configure
make -j
make install
# всё отработало
прошла 81 минута
/dev/pts/0
13:00:14
#vim /etc/asterisk/extensions.conf
/dev/pts/1
13:00:14
#vim /etc/asterisk/extensions.conf
/dev/pts/0
13:03:46
#vim /etc/asterisk/extensions.conf
/dev/pts/1
13:03:46
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3618.21197.7189	2014-11-28 14:03:51.870921555 +0200
+++ /etc/asterisk/extensions.conf	2014-11-28 14:05:44.738922888 +0200
@@ -85,13 +85,14 @@
 exten => _5XXX,1,Dial(SIP/kiev/${EXTEN})
 
 [gr1]
-
+include=>to pstn external
 include=>internal
 include=>local
 include=>national
 include=>international
 
 [gr2]
+include=>to pstn external
 include=>internal
 include=>local
 include=>national
/dev/pts/0
13:08:34
#vim /etc/asterisk/extensions.conf
/dev/pts/1
13:08:34
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3618.10772.3101	2014-11-28 14:08:36.958924936 +0200
+++ /etc/asterisk/extensions.conf	2014-11-28 14:18:06.134931671 +0200
@@ -76,6 +76,19 @@
 exten => _12XX,n,Dial(SIP/${EXTEN},30,tTkK)
 exten => _12XX,n,VoiceMail(${EXTEN}@default)
 
+[to-pstn-external]
+include=>internal
+include=>local
+include=>national
+include=>international
+
+
+
+[to-pstn]
+include=>internal
+include=>local
+include=>national
+include=>international
 
 [national]
 exten=> _11XX,1,Dial(SIP/kiev/${EXTEN})
@@ -85,14 +98,14 @@
 exten => _5XXX,1,Dial(SIP/kiev/${EXTEN})
 
 [gr1]
-include=>to pstn external
+include=>to-pstn 
 include=>internal
 include=>local
 include=>national
 include=>international
 
 [gr2]
-include=>to pstn external
+include=>to-pstn 
 include=>internal
 include=>local
 include=>national
@@ -102,9 +115,14 @@
 include=>local
 
 [gr4]
+include => to-pstn-external
 include => internal
 include => local
 include => national
 include => international
 
+[from pstn]
+
+
+
 
прошло 10 минут
/dev/pts/0
13:19:18
#vim /etc/asterisk/extensions.conf
/dev/pts/1
13:19:18
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3618.21269.10180	2014-11-28 14:20:02.182933044 +0200
+++ /etc/asterisk/extensions.conf	2014-11-28 14:21:03.870933768 +0200
@@ -95,7 +95,7 @@
 
 [international]
 exten=> _[123][123]XX,1,Dial(SIP/kiev/${EXTEN}) 
-exten => _5XXX,1,Dial(SIP/kiev/${EXTEN})
+exten => _5XXX,1,Dial(DAHDI/g1/${EXTEN})
 
 [gr1]
 include=>to-pstn 
/dev/pts/0
13:21:51
#vim /etc/asterisk/extensions.conf
/dev/pts/1
13:21:51
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3618.22446.7902	2014-11-28 14:21:55.166934386 +0200
+++ /etc/asterisk/extensions.conf	2014-11-28 14:22:26.406934742 +0200
@@ -95,7 +95,7 @@
 
 [international]
 exten=> _[123][123]XX,1,Dial(SIP/kiev/${EXTEN}) 
-exten => _5XXX,1,Dial(DAHDI/g1/${EXTEN})
+exten => _5XXX,1,Dial(SIP/kiev/${EXTEN})
 
 [gr1]
 include=>to-pstn 
прошло 17 минут
/dev/pts/0
13:39:19
#apt -get install mysql-server
bash: apt: command not found
/dev/pts/1
13:39:19
#apt -get install mysql-server
bash: apt: command not found
/dev/pts/0
13:45:45
#apt -get install mysql-server
bash: apt: command not found
/dev/pts/1
13:45:45
#apt -get install mysql-server
bash: apt: command not found
/dev/pts/0
13:46:07
#ls /var/tmp/asterisk/

/dev/pts/1
13:46:07
#ls /var/tmp/asterisk/

/dev/pts/0
13:46:07
#asterisk -rx 'database get order 6'
                  asterisk -rx 'database get order 6'
RANDOM%2+9]" ; d; asterisk -rvvvv
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 debian2 (pid = 2571)
Verbosity was 3 and is now 4
debian2*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
/dev/pts/1
13:46:07
#asterisk -rx 'database get order 6'
                  asterisk -rx 'database get order 6'
RANDOM%2+9]" ; d; asterisk -rvvvv
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 debian2 (pid = 2571)
Verbosity was 3 and is now 4
debian2*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
/dev/pts/0
13:47:30
#apt -get install mysql-server
bash: apt: command not found
/dev/pts/1
13:47:30
#apt -get install mysql-server
bash: apt: command not found
/dev/pts/0
13:47:53
#apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18
  mysql-client-5.5 mysql-common mysql-server-5.5 mysql-server-core-5.5
Suggested packages:
  libipc-sharedcache-perl libterm-readkey-perl tinyca
The following NEW packages will be installed:
  libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18
...
Need to get 9,309 kB of archives.
After this operation, 97.0 MB 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 libaio1 amd64 0.3.109-3 [9,150 B]
Get:2 http://192.168.12.254/debian/ wheezy/main libdbi-perl amd64 1.622-1+deb7u1 [892 kB]
Get:3 http://192.168.12.254/debian/ wheezy/main libdbd-mysql-perl amd64 4.021-1+b1 [126 kB]
Get:4 http://192.168.12.254/debian/ wheezy/main libhtml-template-perl all 2.91-1 [72.0 kB]
Get:5 http://security.debian.org/ wheezy/updates/main mysql-common all 5.5.40-0+wheezy1 [75.5 kB]
Get:6 http://security.debian.org/ wheezy/updates/main libmysqlclient18 amd64 5.5.40-0+wheezy1 [678 kB]
13% [6 libmysqlclient18 27.1 kB/678 kB 4%]^C
/dev/pts/1
13:47:53
#apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18
  mysql-client-5.5 mysql-common mysql-server-5.5 mysql-server-core-5.5
Suggested packages:
  libipc-sharedcache-perl libterm-readkey-perl tinyca
The following NEW packages will be installed:
  libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18
...
Need to get 9,309 kB of archives.
After this operation, 97.0 MB 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 libaio1 amd64 0.3.109-3 [9,150 B]
Get:2 http://192.168.12.254/debian/ wheezy/main libdbi-perl amd64 1.622-1+deb7u1 [892 kB]
Get:3 http://192.168.12.254/debian/ wheezy/main libdbd-mysql-perl amd64 4.021-1+b1 [126 kB]
Get:4 http://192.168.12.254/debian/ wheezy/main libhtml-template-perl all 2.91-1 [72.0 kB]
Get:5 http://security.debian.org/ wheezy/updates/main mysql-common all 5.5.40-0+wheezy1 [75.5 kB]
Get:6 http://security.debian.org/ wheezy/updates/main libmysqlclient18 amd64 5.5.40-0+wheezy1 [678 kB]
13% [6 libmysqlclient18 27.1 kB/678 kB 4%]^C
/dev/pts/0
13:49:33
#apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18
  mysql-client-5.5 mysql-common mysql-server-5.5 mysql-server-core-5.5
Suggested packages:
  libipc-sharedcache-perl libterm-readkey-perl tinyca
The following NEW packages will be installed:
  libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18
  mysql-client-5.5 mysql-common mysql-server mysql-server-5.5
  mysql-server-core-5.5
0 upgraded, 10 newly installed, 0 to remove and 5 not upgraded.
Need to get 8,135 kB/9,309 kB of archives.
After this operation, 97.0 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://security.debian.org/ wheezy/updates/main libmysqlclient18 amd64 5.5.40-0+wheezy1 [678 kB]
6% [1 libmysqlclient18 494 kB/678 kB 73%]                 1,446 B/s 1h 28min 3s^C
/dev/pts/1
13:49:33
#apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18
  mysql-client-5.5 mysql-common mysql-server-5.5 mysql-server-core-5.5
Suggested packages:
  libipc-sharedcache-perl libterm-readkey-perl tinyca
The following NEW packages will be installed:
  libaio1 libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18
  mysql-client-5.5 mysql-common mysql-server mysql-server-5.5
  mysql-server-core-5.5
0 upgraded, 10 newly installed, 0 to remove and 5 not upgraded.
Need to get 8,135 kB/9,309 kB of archives.
After this operation, 97.0 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://security.debian.org/ wheezy/updates/main libmysqlclient18 amd64 5.5.40-0+wheezy1 [678 kB]
6% [1 libmysqlclient18 494 kB/678 kB 73%]                 1,446 B/s 1h 28min 3s^C
/dev/pts/4
13:52:48
#screen -x
13:52:50
#cat /etc/apt/sources.list
deb http://192.168.12.254:9999/debian/ wheezy main
deb http://security.debian.org/ wheezy/updates main
#deb http://192.168.12.254:9999/debian/ wheezy-updates main
deb http://ftp.ua.debian.org/debian/ wheezy-updates main
/dev/pts/0
13:53:07
#screen
/dev/pts/1
13:53:07
#screen
/dev/pts/4
13:53:16
#top
top - 14:53:29 up  5:23,  5 users,  load average: 0.26, 0.15, 0.14
Tasks: 157 total,   2 running, 155 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.8 us,  0.2 sy,  0.0 ni, 99.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem:  15903388 total,  1062832 used, 14840556 free,    53168 buffers
KiB Swap: 16201724 total,        0 used, 16201724 free,   434348 cached
  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
 3698 user      20   0 1136m 238m  43m S   2.3  1.5  11:03.30 iceweasel
 2899 root      20   0  221m  64m 7136 S   1.3  0.4   9:01.87 Xorg
 3440 user      20   0  372m  18m  11m S   0.7  0.1   0:44.22 gnome-terminal
 5919 root      20   0 23284 1668 1192 R   0.3  0.0   0:00.02 top
...
   13 root      rt   0     0    0    0 S   0.0  0.0   0:00.00 migration/2
   15 root      20   0     0    0    0 S   0.0  0.0   0:00.18 ksoftirqd/2
   16 root      rt   0     0    0    0 S   0.0  0.0   0:00.08 watchdog/2
   17 root      rt   0     0    0    0 S   0.0  0.0   0:00.01 migration/3
   19 root      20   0     0    0    0 S   0.0  0.0   0:00.12 ksoftirqd/3
   20 root      rt   0     0    0    0 S   0.0  0.0   0:00.08 watchdog/3
   21 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 cpuset
   22 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 khelper
   23 root      20   0     0    0    0 S   0.0  0.0   0:00.00 kdevtmpfs
   24 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 netns
/dev/pts/6
13:56:09
#apt-get install mysql-client
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  mysql-client
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 73.8 kB of archives.
After this operation, 121 kB of additional disk space will be used.
Get:1 http://security.debian.org/ wheezy/updates/main mysql-client all 5.5.40-0+wheezy1 [73.8 kB]
Fetched 73.8 kB in 1s (64.7 kB/s)
Selecting previously unselected package mysql-client.
(Reading database ... 145609 files and directories currently installed.)
Unpacking mysql-client (from .../mysql-client_5.5.40-0+wheezy1_all.deb) ...
Setting up mysql-client (5.5.40-0+wheezy1) ...
13:56:34
#dpkg -l asterisk-mysql
dpkg-query: no packages found matching asterisk-mysql
13:57:02
#mysql - root -p < /tmp/1.sql
mysql  Ver 14.14 Distrib 5.5.40, for debian-linux-gnu (x86_64) using readline 6.2
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.
Usage: mysql [OPTIONS] [database]
  -?, --help          Display this help and exit.
  -I, --help          Synonym for -?
  --auto-rehash       Enable automatic rehashing. One doesn't need to use
                      'rehash' to get table and field completion, but startup
...
i-am-a-dummy                      FALSE
connect-timeout                   0
max-allowed-packet                16777216
net-buffer-length                 16384
select-limit                      1000
max-join-size                     1000000
secure-auth                       FALSE
show-warnings                     FALSE
plugin-dir                        (No default value)
default-auth                      (No default value)
13:58:07
#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:52
#cpall /tmp/1.sql /tmp/
bash: cpall: command not found
13:59:34
#cpall /tmp/1.sql /tmp
bash: cpall: command not found
14:00:05
#cp
cp                cpanp             cpio              cpp-4.7
cpan              cpanp-run-perl    cpp               cppw
cpan2dist         cpgr              cpp-4.6           cpufreq-selector
14:00:05
#cat /tmp/1.sql
 drop database if exists asterisk;
 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 '',
...
 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 );
14:02:04
#mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 44
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>
mysql> use asterisk;
ERROR 1049 (42000): Unknown database 'asterisk'
mysql> use asterisk
ERROR 1049 (42000): Unknown database 'asterisk'
mysql> use asterisk
ERROR 1049 (42000): Unknown database 'asterisk'
mysql> ^CCtrl-C -- exit!
Aborted
прошло 14 минут
14:16:26
#mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
14:18:05
#mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
14:18:38
#mysql -u root -p
sm                mv /var/tmp/asterisk/record09.gsm  /var/tmp/asterisk/record9.gs
mv: cannot stat `/var/tmp/asterisk/record09.gsm': No such file or directory
14:23:54
#vi /etc/asterisk/cdr.conf
--- /tmp/l3-saved-5889.1787.23731	2014-11-28 15:23:58.578978445 +0200
+++ /etc/asterisk/cdr.conf	2014-11-28 15:25:21.046979414 +0200
@@ -9,6 +9,8 @@
 
 [general]
 
+enable=yes
+
 ; 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
14:25:21
#vi /etc/asterisk/cdr_mysql.conf
--- /tmp/l3-saved-5889.5554.28160	2014-11-28 15:25:27.194979494 +0200
+++ /etc/asterisk/cdr_mysql.conf	2014-11-28 15:25:58.814979867 +0200
@@ -11,6 +11,13 @@
 ; specified by sock or otherwise use the default socket file.
 ;
 ;[global]
+
+hostname=localhost
+dbname=asterisk
+table=cdr
+password=password
+user=asterisk
+port=3306
 ;hostname=database.host.name
 ;dbname=asteriskcdrdb
 ;table=cdr
14:25:58
#ysql -u root -p

14:25:58
#mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
14:26:58
#mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 52
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> 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> quit
Bye
14:28:39
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
14:29:32
#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> use asterisk
ERROR 1049 (42000): Unknown database 'asterisk'
mysql> ^CCtrl-C -- exit!
Aborted
14:29:57
#mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 56
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> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
    ->  on asterisk.*
    ->  to 'asterisk'@'localhost';
Query OK, 0 rows affected (0.00 sec)
        to 'asterisk'@'localhost';
k'@'locSET PASSWORD FOR 'asterisk'@'localhost' = PASSWORD('password');
Query OK, 0 rows affected (0.00 sec)
mysql> ^CCtrl-C -- exit!
Aborted
14:30:20
#mysql -u asterisk -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 57
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.
        to 'asterisk'@'localhost';
k'@'locuse asterisk;
ERROR 1049 (42000): Unknown database 'asterisk'
mysql> ^CCtrl-C -- exit!
Aborted
14:31:06
#mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 58
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.
k'@'localhost';LECT,INSERT,UPDATE,DELETE,CREATE,DROP  on asterisk.*  to 'asteris
Query OK, 0 rows affected (0.00 sec)
       use asterisk;
k'@'locSET PASSWORD FOR 'asterisk'@'localhost' = PASSWORD('password');o 'asterisk
Query OK, 0 rows affected (0.00 sec)
mysql> ^CCtrl-C -- exit!
Aborted
14:31:24
#mysql -u asterisk -p <