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

Содержание

Журнал

Понедельник (12/07/09)

/dev/pts/12
15:48:10
#apt-get install alsa-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  alsa-base linux-sound-base
Suggested packages:
  apmd alsa-oss oss-compat
The following NEW packages will be installed:
  alsa-base alsa-utils linux-sound-base
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
...
(Reading database ... 43082 files and directories currently installed.)
Unpacking linux-sound-base (from .../linux-sound-base_1.0.17.dfsg-4_all.deb) ...
Selecting previously deselected package alsa-base.
Unpacking alsa-base (from .../alsa-base_1.0.17.dfsg-4_all.deb) ...
Selecting previously deselected package alsa-utils.
Unpacking alsa-utils (from .../alsa-utils_1.0.16-2_i386.deb) ...
Processing triggers for man-db ...
Setting up linux-sound-base (1.0.17.dfsg-4) ...
Setting up alsa-base (1.0.17.dfsg-4) ...
Setting up alsa-utils (1.0.16-2) ...
15:48:21
#alsamixer
      | Master [dB gain=0.00]         |  |       |  |                           |
      |::|       |  |                 |  |       |  |                           |
      |::|       |  |                 |  |       |  |                           |
     +--+               +--+     +--+      +--+     +--+      +--+     +--+     |
|     |:LFE [dB gain=-46.50]             |       |  |                           |
     |::|               |::|     |  |      |  |     |  |      |  |     |  |
                          ------     ------     ------
     |::|               |::|     |::|      |::|     |::|      |::|     |::|     >
              +--+      |::|     |::|      |::|     |::|      |::|     |::|     >
     |::|               |::|     |::|      |  |     |::|      |::|     |  |     >
...
     |::|     |::|      |::|     |  |      |  |     |  |      |  |     |  |
     |::|     +--+      +--+     +--+      +::+     +::+      +--+     +--+
     +--+     |MM|      |MM|               |MM|     |MM|      |MM|     |MM|
              +--+      +--+               +::+     +::+      +--+     +--+
                                                                      ------
     +--+    77<>77    77<>77   67<>67    77<>77     81         0      0<>0
  < 77<>77  Front Mi  Front Mi Front Mi  Surround  Center   CaLFE      Line
   1 PCM   > Front     77<>77     81        ::       ::       Mic    Mic Boos
                                  ::        ::       ::
     +--+     +--+
/dev/pts/5
15:50:15
#mpg123 rondo_veneziano_-_alba_sul_mare.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
        version 1.4.3; written and copyright by Michael Hipp and others
        free software (LGPL/GPL) without any warranty but with best wishes
Playing MPEG stream 1 of 1: rondo_veneziano_-_alba_sul_mare.mp3 ...
Title:   Alba sul mare                   Artist: Papagena
Comment:                                 Album:  Rondo Veneziano 2
Year:                                    Genre:  classic
MPEG 1.0 layer III, 224 kbit/s, 44100 Hz stereo
^C
[1:54] Decoding of rondo_veneziano_-_alba_sul_mare.mp3 finished.
/dev/pts/12
15:51:56
#alsa
Usage: /usr/sbin/alsa {unload|reload|force-unload|force-reload|suspend|resume}
15:52:04
#alsa reload
/usr/sbin/alsa: Warning: Processes using sound devices: 12536(xfce-mcs-manage) 19478(mpg123).
Unloading ALSA sound driver modules: snd-usb-audio snd-usb-lib snd-rawmidi snd-seq-device snd-hwdep snd-hda-intel snd-pcm snd-timer snd-page-alloc (failed: modules still loaded: snd-hda-intel snd-pcm snd-timer snd-page-alloc).
Loading ALSA sound driver modules: snd-usb-audio snd-usb-lib snd-rawmidi snd-seq-device snd-hwdep snd-hda-intel snd-pcm snd-timer snd-page-alloc.
15:52:07
#alsamixer
|    |::Mic [dB gain=-33.00, -33.00]|      |::|     |  |      |::|     |  |     |
|    |::|     |  |      |::|     |::|      |::|     |::|      |  |     |::|     |
|    |::|   Boost                   +      +--+     +--+      +::+     +  +     |
|    +--+     +--+      |MM|               |MM|     |MM|      |  |     |::|     |
|       IEC958 [Off]    +--+               +--+     +--+      +--+     +  +     |
|             +--+    100<>100  67<>67    77<>77     81                0<>0     |
|  100<>100  77<>77    77<>77   Front    Surround  Center  <  LFE   >  L  e     |
+--  PCM     Front    Front Mi Fro:: Mi-----  -----------------  ----         --+
                                                              L::|
               ::        ::                                    ::|
...
<             |::|
<             |::|               +--+      +--+     +--+
               OO       |OO|     |MM|               |MM|       MM       MM
     |OO|               |OO|     +--+               +--+
              +--+    100<>100  77<>77    67<>67   77<>77      81       87
  <                   Front Mi Front Mi  Front Mi Surround   Center    LFE
   Headphon>  PCM      Front   Front Mi
              |::|
              |::|
     +--+     +--+      +--+
/dev/pts/5
15:52:10
#mpg123 rondo_veneziano_-_alba_sul_mare.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
        version 1.4.3; written and copyright by Michael Hipp and others
        free software (LGPL/GPL) without any warranty but with best wishes
Playing MPEG stream 1 of 1: rondo_veneziano_-_alba_sul_mare.mp3 ...
Title:   Alba sul mare                   Artist: Papagena
Comment:                                 Album:  Rondo Veneziano 2
Year:                                    Genre:  classic
MPEG 1.0 layer III, 224 kbit/s, 44100 Hz stereo
^C
[1:03] Decoding of rondo_veneziano_-_alba_sul_mare.mp3 finished.
15:53:14
#mpg123 alba.wav
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
        version 1.4.3; written and copyright by Michael Hipp and others
        free software (LGPL/GPL) without any warranty but with best wishes
[parse.c:504] error: Giving up searching valid MPEG header after 64K of junk.
[mpg123.c:946] error: Initial seek failed: No error... (code 0)
15:56:21
#sox
alba.wav                                    rondo_veneziano_-_gioco_italiano.mp3
rondo_veneziano_-_alba_sul_mare.mp3         rondo_veneziano_-_incontro.mp3
rondo_veneziano_-_bettina.mp3               rondo_veneziano_-_interludio.mp3
rondo_veneziano_-_casanova.mp3              rondo_veneziano_-_la_serenissima.mp3
rondo_veneziano_-_cattedrali.mp3            rondo_veneziano_-_lorientale.mp3
rondo_veneziano_-_cecilia.mp3               rondo_veneziano_-_magica.mp3
rondo_veneziano_-_danza_mediterranea.mp3    rondo_veneziano_-_nostalgia_di_venezia.mp3
rondo_veneziano_-_desiree.mp3               rondo_veneziano_-_re_sole.mp3
rondo_veneziano_-_donna_lucrezia.mp3        rondo_veneziano_-_torcello.mp3
rondo_veneziano_-_fantasia_veneziana.mp3    rondo_veneziano_-_viaggio_italiano.mp3
15:56:21
#sox rondo_veneziano_-_alba_sul_mare.mp3 -r 8000 -c1 alba.wav avg
sox sox: Effect `avg' is deprecated; see sox(1) for an alternative
15:57:50
#mpg123 alba.wav
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
        version 1.4.3; written and copyright by Michael Hipp and others
        free software (LGPL/GPL) without any warranty but with best wishes
[parse.c:568] error: Header 0xffe701d2 seems to indicate a free format stream; I do not handle that yet
[parse.c:568] error: Header 0xffe60000 seems to indicate a free format stream; I do not handle that yet
[parse.c:568] error: Header 0xffe302d6 seems to indicate a free format stream; I do not handle that yet
[parse.c:568] error: Header 0xffe60284 seems to indicate a free format stream; I do not handle that yet
[parse.c:568] error: Header 0xffe60416 seems to indicate a free format stream; I do not handle that yet
[parse.c:568] error: Header 0xffeb0095 seems to indicate a free format stream; I do not handle that yet
[parse.c:568] error: Header 0xffe2005c seems to indicate a free format stream; I do not handle that yet
[parse.c:504] error: Giving up searching valid MPEG header after 64K of junk.
[mpg123.c:946] error: Initial seek failed: No error... (code 0)
15:58:04
#mv alba.wav /usr/share/asterisk/sounds/al
alabama.gsm                         albuquerque.gsm                     all-reps-busy.gsm
alaska.gsm                          all-circuits-busy-now.gsm           all-your-base.gsm
alba.wav                            all-outgoing-lines-unavailable.gsm  altitude.gsm
15:58:04
#mv alba.wav /usr/share/asterisk/sounds/al
alabama.gsm                         albuquerque.gsm                     all-reps-busy.gsm
alaska.gsm                          all-circuits-busy-now.gsm           all-your-base.gsm
alba.wav                            all-outgoing-lines-unavailable.gsm  altitude.gsm
15:58:04
#mv alba.wav /usr/share/asterisk/sounds/alba.gsm

16:00:07
#sox rondo_veneziano_-_alba_sul_mare.mp3 -r 8000 -c1 alba.wav -ql
sox: SoX v14.0.1
Failed: missing filename
Usage summary: [gopts] [[fopts] infile]... [fopts] outfile [effect [effopts]]...
SPECIAL FILENAMES:
-               stdin (infile) or stdout (outfile)
-n              use the null file handler; for use with e.g. synth & stat
GLOBAL OPTIONS (gopts) (can be specified at any point before the first effect):
--buffer BYTES  set the buffer size (default 8192)
--combine concatenate  concatenate multiple input files (default for sox, rec)
--combine sequence  sequence multiple input files (default for play)
...
-N, --reverse-nibbles  nibble-order
-X, --reverse-bits  bit-order of data
-B/-L           force endianness to big/little
-s/-u/-U/-A/    sample encoding: signed/unsigned/u-law/A-law
  -a/-i/-g/-f   ADPCM/IMA ADPCM/GSM/floating point
-1/-2/-3/-4/-8  sample size in bytes
-v, --volume FACTOR  volume input file volume adjustment factor (real number)
SUPPORTED FILE FORMATS: 8svx aif aifc aiff aiffc al alsa au auto avr cdda cdr cvs cvsd dat dvms fssd gsm hcom ima ircam la lpc lpc10 lu m3u maud mp2 mp3 nist nul null pls prc raw s1 s2 s3 s4 sb sf sl smp snd sndt sou sph sw txw u1 u2 u3 u4 ub ul uw vms voc vox wav wavpcm wve xa
SUPPORTED EFFECTS: allpass band bandpass bandreject bass chorus compand dcshift deemph dither earwax echo echos equalizer fade filter flanger highpass key ladspa lowpass mcompand mixer noiseprof noisered oops pad pan phaser polyphase rabbit repeat resample reverb reverse silence speed stat swap synth tempo treble tremolo trim vol
effopts: depends on effect
16:00:17
#sox rondo_veneziano_-_alba_sul_mare.mp3 -r 8000 -c1 alba.wav

16:02:38
#mpg123 alba.wav
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
        version 1.4.3; written and copyright by Michael Hipp and others
        free software (LGPL/GPL) without any warranty but with best wishes
[parse.c:504] error: Giving up searching valid MPEG header after 64K of junk.
[mpg123.c:946] error: Initial seek failed: No error... (code 0)
16:02:46
#play alba.wav
Input File     : 'alba.wav'
Sample Size    : 16-bit (2 bytes)
Sample Encoding: signed (2's complement)
Channels       : 2
Sample Rate    : 44100
Time: 00:24.71 [03:06.35] of 03:31.06 (11.7%) Samples out: 1.18M Clips: 0    ^C
Aborted.
16:03:28
#sox alba.wav -r 8000 -c 1 alba.gsm

16:03:58
#mv alba.gsm /usr/share/asterisk/sounds/

16:04:08
#sox
sox: SoX v14.0.1
Failed: Not enough input filenames specified
Usage summary: [gopts] [[fopts] infile]... [fopts] outfile [effect [effopts]]...
SPECIAL FILENAMES:
-               stdin (infile) or stdout (outfile)
-n              use the null file handler; for use with e.g. synth & stat
GLOBAL OPTIONS (gopts) (can be specified at any point before the first effect):
--buffer BYTES  set the buffer size (default 8192)
--combine concatenate  concatenate multiple input files (default for sox, rec)
--combine sequence  sequence multiple input files (default for play)
...
-N, --reverse-nibbles  nibble-order
-X, --reverse-bits  bit-order of data
-B/-L           force endianness to big/little
-s/-u/-U/-A/    sample encoding: signed/unsigned/u-law/A-law
  -a/-i/-g/-f   ADPCM/IMA ADPCM/GSM/floating point
-1/-2/-3/-4/-8  sample size in bytes
-v, --volume FACTOR  volume input file volume adjustment factor (real number)
SUPPORTED FILE FORMATS: 8svx aif aifc aiff aiffc al alsa au auto avr cdda cdr cvs cvsd dat dvms fssd gsm hcom ima ircam la lpc lpc10 lu m3u maud mp2 mp3 nist nul null pls prc raw s1 s2 s3 s4 sb sf sl smp snd sndt sou sph sw txw u1 u2 u3 u4 ub ul uw vms voc vox wav wavpcm wve xa
SUPPORTED EFFECTS: allpass band bandpass bandreject bass chorus compand dcshift deemph dither earwax echo echos equalizer fade filter flanger highpass key ladspa lowpass mcompand mixer noiseprof noisered oops pad pan phaser polyphase rabbit repeat resample reverb reverse silence speed stat swap synth tempo treble tremolo trim vol
effopts: depends on effect
16:05:46
#man sox
16:07:54
#ifconfig
eth1      Link encap:Ethernet  HWaddr 00:07:e9:0c:45:80
          inet addr:192.168.102.1  Bcast:192.168.102.255  Mask:255.255.255.0
          inet6 addr: fe80::207:e9ff:fe0c:4580/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:234987 errors:0 dropped:0 overruns:0 frame:0
          TX packets:131189 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:280032348 (267.0 MiB)  TX bytes:11184482 (10.6 MiB)
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:22 errors:0 dropped:0 overruns:0 frame:0
          TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1776 (1.7 KiB)  TX bytes:1776 (1.7 KiB)

Вторник (12/08/09)

08:51:16
#ping 192.168.102.254
PING 192.168.102.254 (192.168.102.254) 56(84) bytes of data.
64 bytes from 192.168.102.254: icmp_seq=1 ttl=64 time=6.30 ms
64 bytes from 192.168.102.254: icmp_seq=2 ttl=64 time=0.534 ms
64 bytes from 192.168.102.254: icmp_seq=3 ttl=64 time=0.563 ms
^C
--- 192.168.102.254 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 0.534/2.468/6.307/2.714 ms
08:51:28
#cd /etc/asterisk/

/dev/pts/7
08:59:27
#screen -x
/dev/pts/5
09:00:36
#vim sip.conf
--- /tmp/l3-saved-13650.9025.1134	2009-12-07 22:00:38.000000000 -1000
+++ sip.conf	2009-12-07 22:00:57.000000000 -1000
@@ -7,3 +7,8 @@
 secret=1234
 callerid="Roman Sidorenko"
 
+[203]
+type=friend
+host=dynamic
+secret=203
+callerid="Roman Sidorenko"
09:00:57
#vim sip.conf
--- /tmp/l3-saved-13650.12047.24361	2009-12-07 22:01:01.000000000 -1000
+++ sip.conf	2009-12-07 22:01:37.000000000 -1000
@@ -11,4 +11,4 @@
 type=friend
 host=dynamic
 secret=203
-callerid="Roman Sidorenko"
+callerid="Roman Sidorenko-softPhone"
09:01:37
#asterisk -rv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
...
  == Parsing '/etc/asterisk/users.conf': Found
  == Parsing '/etc/asterisk/sip_notify.conf': Found
    -- Registered SIP '203' at 192.168.102.101 port 7206 expires 3600
    -- Saved useragent "X-Lite release 1014k stamp 47051" for peer 203
[Dec  7 22:02:01] NOTICE[18719]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 203
[Dec  7 22:02:07] NOTICE[18719]: chan_sip.c:14035 handle_request_invite: Call from '201' to extension '203' rejected because extension not found.
debian4*CLI> q
No such command 'q' (type 'help q' for other possible commands)
debian4*CLI> quit
Executing last minute cleanups
09:02:28
#asterisk -rvvvv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
...
    -- Executing [202@default:1] Answer("SIP/203-09b09f60", "") in new stack
    -- Executing [202@default:2] Wait("SIP/203-09b09f60", "1") in new stack
    -- Executing [202@default:3] Playback("SIP/203-09b09f60", "alba") in new stack
    -- <SIP/203-09b09f60> Playing 'alba' (language 'en')
[Dec  7 22:05:48] WARNING[20676]: file.c:677 ast_readaudio_callback: Failed to write frame
  == Spawn extension (default, 202, 3) exited non-zero on 'SIP/203-09b09f60'
[Dec  7 22:05:54] NOTICE[18719]: chan_sip.c:14035 handle_request_invite: Call from '203' to extension '201' rejected because extension not found.
[Dec  7 22:06:07] NOTICE[18719]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 203
debian4*CLI> quit
Executing last minute cleanups
/dev/pts/10
09:04:48
#rm /usr/share/asterisk/sounds/al
alabama.gsm                         all-circuits-busy-now.gsm
alaska.gsm                          all-outgoing-lines-unavailable.gsm
alba.gsm                            all-reps-busy.gsm
alba.wav                            all-your-base.gsm
albuquerque.gsm                     altitude.gsm
09:04:48
#rm /usr/share/asterisk/sounds/alba.wav

09:05:01
#vi /etc/asterisk/extensions.conf
/dev/pts/5
09:06:11
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
09:15:01
#asterisk -rvvvv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
...
    -- Called 203
    -- SIP/203-0a164d58 is ringing
    -- Got SIP response 486 "Busy Here" back from 192.168.102.101
    -- SIP/203-0a164d58 is busy
  == Everyone is busy/congested at this time (1:1/0/0)
  == Auto fallthrough, channel 'SIP/201-0a1637c8' status is 'BUSY'
uit
No such command 'uit' (type 'help uit' for other possible commands)
debian4*CLI> quit
Executing last minute cleanups
09:16:14
#vim sip.conf
--- /tmp/l3-saved-13650.21834.7637	2009-12-07 22:16:18.000000000 -1000
+++ sip.conf	2009-12-07 22:16:32.000000000 -1000
@@ -5,7 +5,7 @@
 type=friend
 host=dynamic
 secret=1234
-callerid="Roman Sidorenko"
+callerid="Roman Sidorenko-MegaPhone"
 
 [203]
 type=friend
09:16:32
#asterisk -rvvvv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
...
    -- SIP/poltava-0a174610 answered SIP/203-0a168110
    -- Native bridging SIP/203-0a168110 and SIP/poltava-0a174610
    -- Executing [202@default:1] Answer("SIP/kiev-0a179be0", "") in new stack
    -- Executing [202@default:2] Wait("SIP/kiev-0a179be0", "1") in new stack
    -- Executing [202@default:3] Playback("SIP/kiev-0a179be0", "alba") in new stack
    -- <SIP/kiev-0a179be0> Playing 'alba' (language 'en')
debian4*CLI>
debian4*CLI>
debian4*CLI> quit
Executing last minute cleanups
/dev/pts/14
09:25:59
#cd /etc/asterisk/

09:26:03
#cat sip.conf
[general]
context=default
[201]
type=friend
host=dynamic
secret=1234
callerid="Roman Sidorenko-MegaPhone"
[203]
type=friend
host=dynamic
secret=203
callerid="Roman Sidorenko-softPhone"
09:26:11
#cat extensions.conf
[default]
exten => 202,1,Answer
exten => 202,n,Wait(1)
exten => 202,n,Playback(alba)
;exten => 202,n,Playback(demo-congrats)
exten => 202,n,Hangup
exten => _2XX,1,Dial(SIP/${EXTEN})
09:26:22
#vim sip.conf
--- /tmp/l3-saved-20856.3570.26808	2009-12-07 22:28:18.000000000 -1000
+++ sip.conf	2009-12-07 22:28:43.000000000 -1000
@@ -12,3 +12,9 @@
 host=dynamic
 secret=203
 callerid="Roman Sidorenko-softPhone"
+
+[204]
+type=friend
+host=dynamic
+secret=204
+callerid="Roman Sidorenko-softPhone"
09:28:43
#vim sip.conf
09:35:16
#vim extensions.conf
--- /tmp/l3-saved-20856.7111.525	2009-12-07 22:35:54.000000000 -1000
+++ extensions.conf	2009-12-07 22:36:19.000000000 -1000
@@ -7,5 +7,5 @@
 exten => 202,n,Hangup
 
 exten => _2XX,1,Dial(SIP/${EXTEN})
-exten => _999,1,Echo(SIP/${EXTEN})
+exten => 999,1,Echo
 
09:36:19
#vim extensions.conf
--- /tmp/l3-saved-20856.23849.878	2009-12-07 22:36:31.000000000 -1000
+++ extensions.conf	2009-12-07 22:47:18.000000000 -1000
@@ -6,6 +6,10 @@
 ;exten => 202,n,Playback(demo-congrats)
 exten => 202,n,Hangup
 
-exten => _2XX,1,Dial(SIP/${EXTEN})
-exten => 999,1,Echo
+exten => _2XX,1,SetCollerID(SIP/${EXTEN})
+exten => _2XX,n,Dial(SIP/${EXTEN})
+
+exten => 999,1,Answer
+exten => 999,n,Echo
+exten => 999,n,Hangup
 
прошло 10 минут
/dev/pts/16
09:47:03
#screen -x
/dev/pts/10
09:47:16
#~
[default]
exten => 202,1,Answer
exten => 202,n,Wait(1)
exten => 202,n,Playback(alba)
;exten => 202,n,Playback(demo-congrats)
exten => 202,n,Hangup
~
~
~
~
...
~
~
~
~
"/etc/asterisk/extensions.conf" 15 lines, 292 characters
                             number)=5${EXTEN})
exten =>
exten => _2XX,1,Set(CallerID(SIP/${EXTEN})
~
"/etc/asterisk/extensions.conf" 15 lines, 298 characters written
/dev/pts/18
09:48:30
#screen -x
/dev/pts/10
09:50:34
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-18560.22221.3802	2009-12-07 22:51:59.000000000 -1000
+++ /etc/asterisk/extensions.conf	2009-12-07 22:52:56.000000000 -1000
@@ -6,7 +6,7 @@
 ;exten => 202,n,Playback(demo-congrats)
 exten => 202,n,Hangup
 
-exten => _2XX,1,Set(CALLERID(number)=5${EXTEN})
+exten => _2XX,1,Set(CALLERID(number)=5${CALLERID(number)})
 exten => _2XX,n,Dial(SIP/${EXTEN})
 
 exten => 999,1,Answer
09:52:58
#{XTEN})
[general]
context=default
[201]
type=friend
host=dynamic
secret=1234
callerid="Roman Sidorenko-MegaPhone"
[203]
type=friend
host=dynamic
...
~
~
~
~
~
~
~
~
~
"/etc/asterisk/sip.conf" 26 lines, 321 characters written
прошло 23 минуты
10:16:39
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-18560.14517.14868	2009-12-07 23:17:40.000000000 -1000
+++ /etc/asterisk/extensions.conf	2009-12-07 23:18:12.000000000 -1000
@@ -9,6 +9,8 @@
 exten => _2XX,1,Set(CALLERID(number)=5${CALLERID(number)})
 exten => _2XX,n,Dial(SIP/${EXTEN})
 
+exten => _1XX,1,Dial(SIP/poltava/${EXTEN})
+
 exten => 999,1,Answer
 exten => 999,n,Echo
 exten => 999,n,Hangup
10:18:12
#vi /etc/asterisk/sip.conf
--- /tmp/l3-saved-18560.9848.17107	2009-12-07 23:19:16.000000000 -1000
+++ /etc/asterisk/sip.conf	2009-12-07 23:20:21.000000000 -1000
@@ -22,5 +22,5 @@
 [poltava]
 type=friend
 host=192.168.101.3
-secret=1234
+;secret=1234
 
10:20:21
#cat

/dev/pts/12
10:20:40
#ssh root@192.168.101.3
root@192.168.101.3's password:
Linux debian3 2.6.26-2-686 #1 SMP Wed Nov 4 20:45:37 UTC 2009 i686
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Dec  7 23:19:23 2009 from 192.168.102.100
l3-agent is already running: pid=3725; pidfile=/root/.lilalo/l3-agent.pid
10:20:59
#vi /etc/asterisk/sip.conf
/dev/pts/10
10:21:29
#cd /etc/asterisk/

10:21:33
#cat extensions.conf
[default]
exten => 202,1,Answer
exten => 202,n,Wait(1)
exten => 202,n,Playback(alba)
;exten => 202,n,Playback(demo-congrats)
exten => 202,n,Hangup
exten => _2XX,1,Set(CALLERID(number)=5${CALLERID(number)})
exten => _2XX,n,Dial(SIP/${EXTEN})
exten => _1XX,1,Dial(SIP/poltava/${EXTEN})
exten => 999,1,Answer
exten => 999,n,Echo
exten => 999,n,Hangup
/dev/pts/12
10:21:34
#asterisk -rxx
No such command 'x' (type 'help x' for other possible commands)
10:21:42
#asterisk -rv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
...
kiev                       192.168.102.1               5060     Unmonitored
103/103                    192.168.101.102  D          31080    Unmonitored
101/phone                  192.168.101.101  D          2048     Unmonitored
3 sip peers [Monitored: 0 online, 0 offline Unmonitored: 3 online, 0 offline]
debian3*CLI> sip show registry
Host                            Username       Refresh State                Reg.Time
 Reloading SIP
[Dec  7 23:25:39] WARNING[23691]: chan_sip.c:12530 handle_response_register: Forbidden - wrong password on authentication for REGISTER for 'poltava' to '192.168.102.1'
debian3*CLI> quit
Executing last minute cleanups
/dev/pts/10
10:23:51
#vi /etc/asterisk/sip.conf
--- /tmp/l3-saved-18560.24669.7229	2009-12-07 23:24:22.000000000 -1000
+++ /etc/asterisk/sip.conf	2009-12-07 23:25:01.000000000 -1000
@@ -1,6 +1,8 @@
 [general]
 context=default
 
+register => kiev:1234@192.168.101.3/poltava
+
 [201]
 type=friend
 host=dynamic
@@ -21,6 +23,7 @@
 
 [poltava]
 type=friend
-host=192.168.101.3
+host=dynamic
+; 192.168.101.3
 ;secret=1234
 
10:25:01
#vi /etc/asterisk/sip.conf
--- /tmp/l3-saved-18560.10575.18056	2009-12-07 23:26:16.000000000 -1000
+++ /etc/asterisk/sip.conf	2009-12-07 23:26:21.000000000 -1000
@@ -25,5 +25,5 @@
 type=friend
 host=dynamic
 ; 192.168.101.3
-;secret=1234
+secret=1234
 
10:26:21
#vi /etc/asterisk/sip.conf
--- /tmp/l3-saved-18560.16062.25229	2009-12-07 23:26:32.000000000 -1000
+++ /etc/asterisk/sip.conf	2009-12-07 23:26:41.000000000 -1000
@@ -25,5 +25,5 @@
 type=friend
 host=dynamic
 ; 192.168.101.3
-secret=1234
+; secret=1234
 
10:26:41
#vi /etc/asterisk/sip.conf
--- /tmp/l3-saved-18560.9333.28793	2009-12-07 23:27:23.000000000 -1000
+++ /etc/asterisk/sip.conf	2009-12-07 23:27:27.000000000 -1000
@@ -25,5 +25,5 @@
 type=friend
 host=dynamic
 ; 192.168.101.3
-; secret=1234
+secret=1234
 
/dev/pts/12
10:27:03
#less /etc/asterisk/sip.conf
10:28:51
#asterisk -rvv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
  == Parsing '/etc/asterisk/asterisk.conf': Found
  == Parsing '/etc/asterisk/extconfig.conf': Found
Connected to Asterisk 1.4.21.2~dfsg-3 currently running on debian3 (pid = 23680)
Verbosity was 1 and is now 2
debian3*CLI>
debian3*CLI>
debian3*CLI> sip show registry
Host                            Username       Refresh State                Reg.Time
192.168.102.1:5060              poltava            105 Registered           Mon, 07 Dec 2009 23:27:57
debian3*CLI> quit
Executing last minute cleanups
10:29:14
#vi /etc/asterisk/sip.conf
/dev/pts/5
10:30:31
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
This package has been modified for the Debian GNU/Linux distribution
Please report all bugs to http://bugs.debian.org/asterisk
=========================================================================
...
6 sip peers [Monitored: 0 online, 0 offline Unmonitored: 5 online, 1 offline]
[Dec  8 02:28:22] NOTICE[20735]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 204
debian4*CLI> sip reload
 Reloading SIP
  == Parsing '/etc/asterisk/sip.conf': Found
  == Parsing '/etc/asterisk/users.conf': Found
  == Parsing '/etc/asterisk/sip_notify.conf': Found
debian4*CLI>
debian4*CLI> quit
Executing last minute cleanups