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

Содержание

Журнал

Суббота (04/26/14)

/dev/pts/2
15:23:12
#ls -al /usr/include/asterisk/
total 132
drwxr-xr-x  2 root root  4096 Apr 26 16:23 .
drwxr-xr-x 43 root root  4096 Apr 26 16:23 ..
-rw-r--r--  1 root root  1103 Apr 26 15:23 celt.h
-rw-r--r--  1 root root  1052 Apr 26 15:23 channel_internal.h
-rw-r--r--  1 root root 29161 Apr 26 15:23 config_options.h
-rw-r--r--  1 root root 10575 Apr 26 15:23 format_cap.h
-rw-r--r--  1 root root 17538 Apr 26 15:23 format.h
-rw-r--r--  1 root root  4525 Apr 26 15:23 format_pref.h
-rw-r--r--  1 root root  6884 Apr 26 15:23 http_websocket.h
-rw-r--r--  1 root root  7784 Apr 26 15:23 message.h
-rw-r--r--  1 root root  4836 Apr 26 15:23 presencestate.h
-rw-r--r--  1 root root  1450 Apr 26 15:23 silk.h
-rw-r--r--  1 root root  2081 Apr 26 15:23 sip_api.h
-rw-r--r--  1 root root  8398 Apr 26 15:23 xmpp.h
15:23:45
#cd /var/src/
l3script: cd: /var/src/: No such file or directory
15:23:59
#cd /usr/src/

15:24:05
#ls
asterisk-11.9.0                                               linux
asterisk-11-current.tar.gz                                    linux-headers-3.2.0-4-amd64
dahdi-linux-complete-current.tar.gz                           linux-headers-3.2.0-4-common
dahdi-modules-3.2.0-4-amd64_2.6.1+dfsg2-1+3.2.54-2_amd64.deb  linux-kbuild-3.2
dahdi.tar.bz2                                                 modules
15:24:07
#cd asterisk-11.9.0

15:24:14
#dir
addons                        config.guess     install-sh             phoneprov
agi                           config.log       keys                   README
apps                          configs          LICENSE                README-addons.txt
asterisk-11.9.0-summary.html  config.status    main                   README-SERIOUSLY.bestpractices.txt
asterisk-11.9.0-summary.txt   config.sub       Makefile               res
autoconf                      configure        Makefile.moddir_rules  sample.call
bootstrap.sh                  configure.ac     Makefile.rules         sounds
bridges                       contrib          makeopts               static-http
BSDmakefile                   COPYING          makeopts.embed_rules   tests
BUGS                          CREDITS          makeopts.in            UPGRADE-10.txt
build_tools                   default.exports  menuselect             UPGRADE-1.2.txt
cdr                           defaults.h       menuselect.makedeps    UPGRADE-1.4.txt
cel                           doc              menuselect.makeopts    UPGRADE-1.6.txt
ChangeLog                     formats          menuselect-tree        UPGRADE-1.8.txt
CHANGES                       funcs            missing                UPGRADE.txt
channels                      images           mkinstalldirs          utils
codecs                        include          pbx                    Zaptel-to-DAHDI.txt
15:24:17
#make install
CC="cc" CXX="" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts
make[1]: Entering directory `/usr/src/asterisk-11.9.0/menuselect'
make[1]: `makeopts' is up to date.
make[1]: Leaving directory `/usr/src/asterisk-11.9.0/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_datacard.so
 WARNING WARNING WARNING
15:24:27
#ls -al /usr/include/asterisk/
total 1880
drwxr-xr-x  3 root root   4096 Apr 26 16:24 .
drwxr-xr-x 43 root root   4096 Apr 26 16:24 ..
-rw-r--r--  1 root root   8683 Apr 26 16:24 abstract_jb.h
-rw-r--r--  1 root root  14023 Apr 26 16:24 acl.h
-rw-r--r--  1 root root  15140 Apr 26 16:24 adsi.h
-rw-r--r--  1 root root   3291 Apr 26 16:24 ael_structs.h
-rw-r--r--  1 root root   5301 Apr 26 16:24 agi.h
-rw-r--r--  1 root root   2320 Apr 26 16:24 alaw.h
-rw-r--r--  1 root root  17604 Apr 26 16:24 aoc.h
...
-rw-r--r--  1 root root   1398 Apr 26 16:24 transcap.h
-rw-r--r--  1 root root  13710 Apr 26 16:24 translate.h
-rw-r--r--  1 root root   4693 Apr 26 16:24 udptl.h
-rw-r--r--  1 root root   2388 Apr 26 16:24 ulaw.h
-rw-r--r--  1 root root   3708 Apr 26 16:24 unaligned.h
-rw-r--r--  1 root root  28698 Apr 26 16:24 utils.h
-rw-r--r--  1 root root     84 Apr 26 16:24 version.h
-rw-r--r--  1 root root   4941 Apr 26 16:24 xmldoc.h
-rw-r--r--  1 root root   6482 Apr 26 16:24 xml.h
-rw-r--r--  1 root root   8398 Apr 26 16:24 xmpp.h
15:24:38
#ls -al /usr/include/asterisk/ | wc -l
146
15:24:44
#cd /root/src
l3script: cd: /root/src: No such file or directory
15:24:53
#cd /root/datacard/

15:24:56
#./configure
configure complete, now type 'make'
15:24:59
#make
gcc -Wextra -fPIC -DAST_MODULE=\"chan_datacard\" -D_THREAD_SAFE -I. -I/usr/include -O2 -DICONV_CONST="" -D__DEBUG__ -D__MANAGER__ -D__APP__ -c chan_datacard.c
In file included from chan_datacard.c:66:0:
/usr/include/asterisk/version.h:1:2: error: #error "Do not include 'asterisk/version.h'; use 'asterisk/ast_version.h' instead."
In file included from chan_datacard.c:73:0:
chan_datacard.h:251:2: warning: initialization makes pointer from integer without a cast [enabled by default]
chan_datacard.h:251:2: warning: (near initialization for ‘channel_tech.capabilities’) [enabled by default]
chan_datacard.h:252:2: warning: initialization from incompatible pointer type [enabled by default]
chan_datacard.h:252:2: warning: (near initialization for ‘channel_tech.requester’) [enabled by default]
chan_datacard.h:253:2: warning: initialization from incompatible pointer type [enabled by default]
chan_datacard.h:253:2: warning: (near initialization for ‘channel_tech.call’) [enabled by default]
...
chan_datacard.c:738:2: error: too few arguments to function ‘ast_manager_register2’
In file included from chan_datacard.c:59:0:
/usr/include/asterisk/manager.h:195:5: note: declared here
chan_datacard.c:746:2: warning: passing argument 4 of ‘ast_manager_register2’ from incompatible pointer type [enabled by default]
In file included from chan_datacard.c:59:0:
/usr/include/asterisk/manager.h:195:5: note: expected ‘struct ast_module *’ but argument is of type ‘char *’
chan_datacard.c:746:2: error: too few arguments to function ‘ast_manager_register2’
In file included from chan_datacard.c:59:0:
/usr/include/asterisk/manager.h:195:5: note: declared here
make: *** [chan_datacard.o] Error 1
15:25:01
#св ёгыкёыкс
l3script: $'\321\201\320\262': command not found
прошло 15 минут
15:40:30
#св ёгÑ/usr/src
l3script: /usr/src: Is a directory
15:40:36
#cd /usr/src

15:40:39
#cd asterisk-11.9.0

15:40:44
#make menuconfig
                           **************************************************
                               Asterisk Module and Build Option Selection
                           **************************************************
                                           Press 'h' for help.
                                              --- core ---
                                          [*] func_aes
                                          [*] func_audiohookinherit
                                          [*] func_base64
                                          [*] func_blacklist
                                          [*] func_callcompletion
                                          [*] func_callerid
                                          [*] func_cdr
                                          [*] func_channel
                                          [*] func_config
                                          XXX func_curl
                                          [*] func_cut
                                              ... More ...
                                    Audiohook inheritance function
                                    Can use: crypto(E)
                                    Support Level: core
15:44:09
#./con
config.guess   configs/       config.status  config.sub     configure      contrib/
15:44:09
#./configure --disable-xmldoc
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:44:45
#make -j32
CC="cc" CXX="" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts
make[1]: Entering directory `/usr/src/asterisk-11.9.0/menuselect'
make[1]: `makeopts' is up to date.
make[1]: Leaving directory `/usr/src/asterisk-11.9.0/menuselect'
Generating input for menuselect ...
Building Documentation For: channels pbx apps codecs formats cdr cel bridges funcs tests main res addons
menuselect/menuselect --check-deps menuselect.makeopts
menuselect/menuselect --check-deps menuselect.makeopts
Generating embedded module rules ...
   [CC] app_meetme.c -> app_meetme.o
   [LD] abstract_jb.o acl.o adsi.o alaw.o aoc.o app.o ast_expr2.o ast_expr2f.o asterisk.o astfd.o astmm.o astobj2.o audiohook.o autochan.o autoservice.o bridging.o callerid.o ccss.o cdr.o cel.o channel.o channel_internal_api.o chanvars.o cli.o config.o config_options.o data.o datastore.o db.o devicestate.o dial.o dns.o dnsmgr.o dsp.o enum.o event.o features.o file.o fixedjitterbuf.o format.o forma
   [LD] app_meetme.o -> app_meetme.so
 +--------- Asterisk Build Complete ---------+
 + Asterisk has successfully been built, and +
 + can be installed by running:              +
 +                                           +
 +                make install               +
 +-------------------------------------------+
15:44:55
#make install
CC="cc" CXX="" LD="" AR="" RANLIB="" CFLAGS="" LDFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts
make[1]: Entering directory `/usr/src/asterisk-11.9.0/menuselect'
make[1]: `makeopts' is up to date.
make[1]: Leaving directory `/usr/src/asterisk-11.9.0/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_datacard.so
 WARNING WARNING WARNING
15:45:01
#vi /etc/asterisk/extensions.conf.local
--- /tmp/l3-saved-10581.24761.20084	2014-04-26 16:45:32.525813513 +0300
+++ /etc/asterisk/extensions.conf.local	2014-04-26 16:46:22.349814450 +0300
@@ -10,6 +10,9 @@
 exten => _22XX,1,Macro(localcall,${EXTEN})
 
 ; 
+exten => 2288,1,Answer   
+exten => 2288,n,MeetMe(100)
+
 ;exten => _22XX,1,Macro(localcall,${EXTEN}) 
 ; 
 ; 
15:46:22
#vi /etc/asterisk/meetme.conf
--- /tmp/l3-saved-10581.12564.21951	2014-04-26 16:46:28.277814560 +0300
+++ /etc/asterisk/meetme.conf	2014-04-26 16:47:10.221815347 +0300
@@ -43,3 +43,6 @@
 ;
 ;conf => 1234
 ;conf => 2345,9938
+
+
+conf => 100,,1234
15:47:10
#uname
Linux
15:56:24
#uname -v
#1 SMP Debian 3.2.54-2
15:56:26
#modprobe
Error: missing parameters. See -h.
15:57:10
#modprobe -h
Usage:
        modprobe [options] [-i] [-b] modulename
        modprobe [options] -a [-i] [-b] modulename [modulename...]
        modprobe [options] -r [-i] modulename
        modprobe [options] -r -a [-i] modulename [modulename...]
        modprobe [options] -c
        modprobe [options] --dump-modversions filename
Management Options:
        -a, --all                   Consider every non-argument to
                                    be a module name to be inserted
...
        -n, --dry-run               Do not execute operations, just print out
        -n, --show                  Same as --dry-run
        -C, --config=FILE           Use FILE instead of default search paths
        -d, --dirname=DIR           Use DIR as filesystem root for /lib/modules
        -S, --set-version=VERSION   Use VERSION instead of `uname -r`
        -s, --syslog                print to syslog, not stderr
        -q, --quiet                 disable messages
        -v, --verbose               enables more messages
        -V, --version               show version
        -h, --help                  show this help
15:57:12
#modprobe -l
modprobe: invalid option -- 'l'
15:57:22
#modprobe -h
Usage:
        modprobe [options] [-i] [-b] modulename
        modprobe [options] -a [-i] [-b] modulename [modulename...]
        modprobe [options] -r [-i] modulename
        modprobe [options] -r -a [-i] modulename [modulename...]
        modprobe [options] -c
        modprobe [options] --dump-modversions filename
Management Options:
        -a, --all                   Consider every non-argument to
                                    be a module name to be inserted
...
        -n, --dry-run               Do not execute operations, just print out
        -n, --show                  Same as --dry-run
        -C, --config=FILE           Use FILE instead of default search paths
        -d, --dirname=DIR           Use DIR as filesystem root for /lib/modules
        -S, --set-version=VERSION   Use VERSION instead of `uname -r`
        -s, --syslog                print to syslog, not stderr
        -q, --quiet                 disable messages
        -v, --verbose               enables more messages
        -V, --version               show version
        -h, --help                  show this help
15:57:25
#modprobe -h | less
15:57:30
#modprobe dahdi

15:57:37
#modprobe l
FATAL: Module l not found.
15:57:41
#lsmod
Module                  Size  Used by
dahdi                 191056  0
crc_ccitt              12347  1 dahdi
option                 37168  0
usb_wwan               17278  1 option
usbserial              32061  2 usb_wwan,option
usb_storage            43870  0
bnep                   17567  2
rfcomm                 33700  0
bluetooth             119455  10 rfcomm,bnep
...
cdrom                  35401  1 sr_mod
crc_t10dif             12348  1 sd_mod
ahci                   24997  2
libahci                22941  1 ahci
libata                140630  2 libahci,ahci
scsi_mod              162269  5 libata,sd_mod,sr_mod,sg,usb_storage
ehci_hcd               40215  0
usbcore               128741  9 ehci_hcd,usbhid,snd_usbmidi_lib,snd_usb_audio,usb_storage,usbserial,usb_wwan,option
usb_common             12354  1 usbcore
e1000e                120822  0
15:57:48
#lsmod | grep dahdi
dahdi                 191056  0
crc_ccitt              12347  1 dahdi
15:57:54
#vi /etc/asterisk/meetme.conf
16:00:55
#;

16:07:10
#ls -al
total 16308
drwx------ 13 root root     4096 Apr 26 17:00 .
drwxr-xr-x 24 root root     4096 Apr 22 13:34 ..
-rwxr--r--  1 root root      143 Apr 22 15:07 all
drwx------  2 root root     4096 Apr 22 13:12 .aptitude
-rw-r--r--  1 root root 16543475 Apr 24 14:13 asterisk-core-sounds-ru-wav-current.tar.gz
-rw-------  1 root root     1664 Apr 26 16:47 .asterisk_history
-rw-------  1 root root    11486 Apr 26 16:05 .bash_history
-rw-r--r--  1 root root       10 Apr 22 13:55 .bash_profile
-rw-r--r--  1 root root      630 Apr 22 13:55 .bashrc
...
drwxr-xr-x  2 root root    28672 Apr 26 17:00 .lilalo
drwx------  3 root root     4096 Apr 22 14:03 .local
-rw-r--r--  1 root root      140 Nov 19  2007 .profile
drwx------  2 root root     4096 Apr 24 13:45 .pulse
-rw-------  1 root root      256 Apr 24 13:45 .pulse-cookie
-rw-r--r--  1 root root       74 Apr 26 12:28 q
drwx------  2 root root     4096 Apr 22 14:09 .ssh
drwxr-xr-x  3 root root     4096 Apr 26 12:29 .subversion
drwxr-xr-x  2 root root     4096 Apr 26 09:57 .vim
-rw-------  1 root root    10062 Apr 26 17:00 .viminfo
16:07:13
#ls
all  asterisk-core-sounds-ru-wav-current.tar.gz  copy_ssh  datacard  dfdfadf  install  q
16:07:28
#ls -al /usr/lib/as
aspell/   asterisk/
16:07:28
#ls -al /usr/lib/as
aspell/   asterisk/
16:07:28
#ls -al /usr/lib/asterisk/
total 56
drwxr-xr-x   3 root root  4096 Apr 22 14:33 .
drwxr-xr-x 174 root root 36864 Apr 26 16:45 ..
drwxr-xr-x   2 root root 12288 Apr 26 16:45 modules
16:07:50
#ls -al /usr/lib/asterisk/modules/
Display all 200 possibilities? (y or n)
16:07:50
#ls -al /var/spool/asterisk/
dictate/   meetme/    monitor/   outgoing/  system/    tmp/       voicemail/
16:07:50
#ls -al /var/l
lib/   local/ lock/  log/
16:07:50
#ls -al /var/lib/
AccountsService/     exim4/               NetworkManager/      ucf/
alsa/                gconf/               nfs/                 udisks/
apt/                 gdm3/                ntpdate/             update-rc.d/
aptitude/            ghostscript/         os-prober/           upower/
apt-xapian-index/    initramfs-tools/     PackageKit/          urandom/
aspell/              initscripts/         pam/                 usb_modeswitch/
asterisk/            insserv/             polkit-1/            usbutils/
binfmts/             ispell/              python-support/      vim/
colord/              libreoffice/         samba/               xfonts/
dbus/                libuuid/             sgml-base/           xkb/
dhcp/                logrotate/           sudo/                xml-core/
dictionaries-common/ misc/                synaptic/
dpkg/                mlocate/             tex-common/
16:07:50
#ls -al /var/lib/asterisk/
total 1152
drwxr-xr-x 11 asterisk asterisk    4096 Apr 26 17:07 .
drwxr-xr-x 51 root     root        4096 Apr 26 15:22 ..
drwxr-xr-x  2 root     root        4096 Apr 26 15:23 agi-bin
-rw-rw----  1 asterisk asterisk    8192 Apr 26 15:19 astdb
-rw-r-----  1 asterisk asterisk    3072 Apr 26 17:07 astdb.sqlite3
drwxr-xr-x  3 root     root        4096 Apr 26 16:45 documentation
drwxr-xr-x  3 root     root        4096 Apr 26 15:23 firmware
drwxr-xr-x  2 root     root        4096 Apr 26 16:45 images
drwxr-xr-x  2 root     root        4096 Apr 26 15:23 keys
drwxr-xr-x  2 asterisk asterisk    4096 Apr 26 15:23 moh
drwxr-xr-x  2 root     root        4096 Apr 26 15:23 phoneprov
-rw-------  1 asterisk asterisk      28 Apr 25 10:55 .sendxmpprc
drwxr-xr-x  3 root     root        4096 Apr 26 15:23 sounds
-rw-r-----  1 asterisk asterisk 1113088 Apr 26 12:16 sqlite.db
drwxr-xr-x  2 root     root        4096 Apr 26 16:45 static-http
16:08:33
#ls -al /var/lib/asterisk/s
sounds/      sqlite.db    static-http/
16:08:33
#ls -al /var/lib/asterisk/sounds
total 24
drwxr-xr-x  3 root     root      4096 Apr 26 15:23 .
drwxr-xr-x 11 asterisk asterisk  4096 Apr 26 17:07 ..
drwxr-xr-x  8 root     root     16384 Apr 26 15:23 en
16:10:49
#vi /etc/asterisk/meetme.conf
16:11:40
#vi /etc/asterisk/extensions.conf.local
--- /tmp/l3-saved-10581.416.27475	2014-04-26 17:14:43.141846378 +0300
+++ /etc/asterisk/extensions.conf.local	2014-04-26 17:14:48.241846474 +0300
@@ -16,7 +16,7 @@
 ;exten => _22XX,1,Macro(localcall,${EXTEN}) 
 
 exten => 2287,1,Answer   
-exten => 2287,n,MeetMe(100,a)
+exten => 2287,n,MeetMe(100,as)
 ; 
 ; 
 ;
16:14:48
#cd /usr/src/asterisk-11.9.0

16:18:08
#cd co
codecs/        config.log     config.status  configure      contrib/
config.guess   configs/       config.sub     configure.ac
16:18:08
#cd configs/

16:18:20
#ls -al
total 884
drwxr-xr-x  2 root root  4096 Apr 23 17:05 .
drwxr-xr-x 29 root root  4096 Apr 26 16:45 ..
-rw-r--r--  1 root root  2816 Jul 19  2012 acl.conf.sample
-rw-r--r--  1 root root   140 Feb 14  2006 adsi.conf.sample
-rw-r--r--  1 root root  2531 Feb 14 03:24 agents.conf.sample
-rw-r--r--  1 root root  2084 May 28  2009 alarmreceiver.conf.sample
-rw-r--r--  1 root root  3498 Mar  2  2010 alsa.conf.sample
-rw-r--r--  1 root root   767 May 28  2009 amd.conf.sample
-rw-r--r--  1 root root  1044 Jun 30  2009 app_mysql.conf.sample
...
-rw-r--r--  1 root root  9185 Apr 21  2011 skinny.conf.sample
-rw-r--r--  1 root root  7092 Jul 10  2013 sla.conf.sample
-rw-r--r--  1 root root  2669 May 27  2009 smdi.conf.sample
-rw-r--r--  1 root root  1384 May 28  2009 telcordia-1.adsi
-rw-r--r--  1 root root   656 Oct  5  2009 udptl.conf.sample
-rw-r--r--  1 root root  5621 Jul 18  2012 unistim.conf.sample
-rw-r--r--  1 root root  2571 Apr 13  2011 users.conf.sample
-rw-r--r--  1 root root 23819 Feb 25 19:43 voicemail.conf.sample
-rw-r--r--  1 root root  5938 Dec 12  2011 vpb.conf.sample
-rw-r--r--  1 root root  2150 Jul  2  2012 xmpp.conf.sample
16:18:22
#cp confbridge.conf.sample /etc/asterisk/confbridge.conf

16:19:41
#vi /etc/asterisk/confbridge.conf
прошло 17 минут
16:37:20
#/usr/src/asterisk-11.9.0/con
config.guess   configs/       config.status  config.sub     configure      contrib/
16:37:20
#/usr/src/asterisk-11.9.0/make menuconfig
l3script: /usr/src/asterisk-11.9.0/make: No such file or directory
16:37:43