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

Содержание

Журнал

Среда (04/23/14)

/dev/pts/0
12:11:33
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-24351.18225.26096	2014-04-23 13:11:37.386534149 +0300
+++ /etc/asterisk/extensions.conf	2014-04-23 13:12:54.602535455 +0300
@@ -3,5 +3,5 @@
 ;exten => 3101,1,Dial(SIP/3101)
 exten => _31XX,1,Dial(SIP/${EXTEN})
 exten => _32XX,1,Dial(SIP/santiago/${EXTEN})
-exten => _1XXX,1,Dial(SIP/kiev/${EXTEN})
-;exten => _12XX,1,Dial(SIP/kiev/${EXTEN})
+;exten => _1XXX,1,Dial(SIP/kiev/${EXTEN})
+exten => _[12]XXX,1,Dial(SIP/kiev/${EXTEN})
12:12:54
#[default]
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 debian (pid = 16994)
...
  == Spawn extension (default, 1102, 1) exited non-zero on 'SIP/santiago-0000004e'
  == Using SIP RTP CoS mark 5
    -- Executing [1102@default:1] Dial("SIP/santiago-00000050", "SIP/kiev/1102") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/kiev/1102
    -- SIP/kiev-00000051 is ringing
  == Spawn extension (default, 1102, 1) exited non-zero on 'SIP/santiago-00000050'
debian*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
12:19:36
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-24351.4153.14483	2014-04-23 13:19:38.322542272 +0300
+++ /etc/asterisk/extensions.conf	2014-04-23 13:32:41.450555506 +0300
@@ -5,3 +5,7 @@
 exten => _32XX,1,Dial(SIP/santiago/${EXTEN})
 ;exten => _1XXX,1,Dial(SIP/kiev/${EXTEN})
 exten => _[12]XXX,1,Dial(SIP/kiev/${EXTEN})
+exten => _[12]3XX,1,Dial(SIP/kiev/${EXTEN})
+exten => _2[12]XX,1,Dial(SIP/kiev/${EXTEN})
+exten => _33XX,1,Dial(SIP/kiev/${EXTEN})
+exten => _14XX,1,Dial(SIP/kiev/${EXTEN})
прошло 13 минут
12:32:41
#[default]

12:32:45
#asterisk -rvvvvv
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 debian (pid = 16994)
...
    -- Auto fallthrough, channel 'SIP/3101-0000007c' status is 'CONGESTION'
  == Using SIP RTP CoS mark 5
    -- Executing [1302@default:1] Dial("SIP/3101-0000007e", "SIP/kiev/1302") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/kiev/1302
  == Everyone is busy/congested at this time (1:0/1/0)
    -- Auto fallthrough, channel 'SIP/3101-0000007e' status is 'CONGESTION'
debian*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
12:35:24
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-24351.22072.4666	2014-04-23 13:35:26.326558295 +0300
+++ /etc/asterisk/extensions.conf	2014-04-23 13:36:19.226559186 +0300
@@ -5,7 +5,9 @@
 exten => _32XX,1,Dial(SIP/santiago/${EXTEN})
 ;exten => _1XXX,1,Dial(SIP/kiev/${EXTEN})
 exten => _[12]XXX,1,Dial(SIP/kiev/${EXTEN})
-exten => _[12]3XX,1,Dial(SIP/kiev/${EXTEN})
+;exten => _[12]3XX,1,Dial(SIP/kiev/${EXTEN})
+exten => _23XX,1,Dial(SIP/kiev/${EXTEN})
+exten => _13XX,1,Dial(SIP/kiev/${EXTEN})
 exten => _2[12]XX,1,Dial(SIP/kiev/${EXTEN})
 exten => _33XX,1,Dial(SIP/kiev/${EXTEN})
 exten => _14XX,1,Dial(SIP/kiev/${EXTEN})
12:36:19
#[default]
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 debian (pid = 16994)
...
    -- Total time merge_contexts_delete: 0.000888 sec
  == Using SIP RTP CoS mark 5
    -- Executing [1301@default:1] Dial("SIP/3101-00000080", "SIP/kiev/1301") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/kiev/1301
  == Everyone is busy/congested at this time (1:0/1/0)
    -- Auto fallthrough, channel 'SIP/3101-00000080' status is 'CONGESTION'
debian*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
12:36:42
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-24351.13846.4817	2014-04-23 13:36:43.454559598 +0300
+++ /etc/asterisk/extensions.conf	2014-04-23 13:36:54.346559780 +0300
@@ -5,9 +5,9 @@
 exten => _32XX,1,Dial(SIP/santiago/${EXTEN})
 ;exten => _1XXX,1,Dial(SIP/kiev/${EXTEN})
 exten => _[12]XXX,1,Dial(SIP/kiev/${EXTEN})
-;exten => _[12]3XX,1,Dial(SIP/kiev/${EXTEN})
-exten => _23XX,1,Dial(SIP/kiev/${EXTEN})
-exten => _13XX,1,Dial(SIP/kiev/${EXTEN})
+exten => _[12]3XX,1,Dial(SIP/kiev/${EXTEN})
+;exten => _23XX,1,Dial(SIP/kiev/${EXTEN})
+;exten => _13XX,1,Dial(SIP/kiev/${EXTEN})
 exten => _2[12]XX,1,Dial(SIP/kiev/${EXTEN})
 exten => _33XX,1,Dial(SIP/kiev/${EXTEN})
 exten => _14XX,1,Dial(SIP/kiev/${EXTEN})
12:36:54
#[default]

12:36:59
#[default]
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 debian (pid = 16994)
...
  == Using SIP RTP CoS mark 5
    -- Executing [2101@default:1] Dial("SIP/3101-000000ce", "SIP/kiev/2101") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/kiev/2101
    -- SIP/kiev-000000cf answered SIP/3101-000000ce
    -- Locally bridging SIP/3101-000000ce and SIP/kiev-000000cf
  == Spawn extension (default, 2101, 1) exited non-zero on 'SIP/3101-000000ce'
debian*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
прошло 37 минут
13:14:41
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-24351.26342.9611	2014-04-23 14:14:43.862598132 +0300
+++ /etc/asterisk/extensions.conf	2014-04-23 14:26:41.110610249 +0300
@@ -1,13 +1,45 @@
 [default]
 
 ;exten => 3101,1,Dial(SIP/3101)
+;;exten => _31XX,1,Dial(SIP/${EXTEN})
+;;exten => _32XX,1,Dial(SIP/santiago/${EXTEN})
+;exten => _1XXX,1,Dial(SIP/kiev/${EXTEN})
+;;exten => _[12]XXX,1,Dial(SIP/kiev/${EXTEN})
+;;exten => _[12]3XX,1,Dial(SIP/kiev/${EXTEN})
+;;exten => _2[12]XX,1,Dial(SIP/kiev/${EXTEN})
+;;exten => _33XX,1,Dial(SIP/kiev/${EXTEN})
+;;exten => _14XX,1,Dial(SIP/kiev/${EXTEN})
+
+[internal]
+
+
+[local]
 exten => _31XX,1,Dial(SIP/${EXTEN})
+[national]
 exten => _32XX,1,Dial(SIP/santiago/${EXTEN})
-;exten => _1XXX,1,Dial(SIP/kiev/${EXTEN})
+
+[international]
 exten => _[12]XXX,1,Dial(SIP/kiev/${EXTEN})
 exten => _[12]3XX,1,Dial(SIP/kiev/${EXTEN})
-;exten => _23XX,1,Dial(SIP/kiev/${EXTEN})
-;exten => _13XX,1,Dial(SIP/kiev/${EXTEN})
 exten => _2[12]XX,1,Dial(SIP/kiev/${EXTEN})
 exten => _33XX,1,Dial(SIP/kiev/${EXTEN})
 exten => _14XX,1,Dial(SIP/kiev/${EXTEN})
+
+[gr1]
+
+include => internal
+include => local
+include => national
+include => international
+
+[gr2]
+
+include => internal
+include => local
+include => national
+
+[gr3]
+
+include => internal
+include => local
+
прошло 18 минут
13:33:32
#[general]

13:33:37
#[general]

13:34:04
#[default]
  GNU nano 2.2.6                    File: /etc/asterisk/sip.conf                                     Modified
[general]
context=default
; canreinvite=0 -old version asterisk
directmedia=no
register => havana:1234@192.168.12.8/santiago
register => havana:1234@192.168.12.2/kiev
; peer
;3101 - 3199 all my
[3101]
...
host=dynamic
username=havana
[kiev]
type=friend
secret=1234
host=dynamic
username=havana
context=gr_relay
^G Get Help       ^O WriteOut       ^R Read File      ^Y Prev Page      ^K Cut Text       ^C Cur Pos
^X Exit           ^J Justify        ^W Where Is       ^V Next Page      ^U UnCut Text     ^T To Spell
13:39:20
#nano /etc/asterisk/sip.conf
--- /tmp/l3-saved-24351.28344.4883	2014-04-23 14:39:22.774623123 +0300
+++ /etc/asterisk/sip.conf	2014-04-23 14:39:39.426623404 +0300
@@ -17,7 +17,7 @@
 type=friend
 secret=1234
 host=dynamic
-context=gr2
+context=gr3
 
 [3103]
 type=friend
13:39:39
#[general]
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian (pid = 16994)
Verbosity is at least 5
debian*CLI> sip reload
...
  == Using SIP RTP CoS mark 5
    -- Called SIP/kiev/3301
  == Everyone is busy/congested at this time (1:0/1/0)
    -- Auto fallthrough, channel 'SIP/santiago-000000e4' status is 'CONGESTION'
  == Using SIP RTP CoS mark 5
[Apr 23 14:40:04] NOTICE[17032]: chan_sip.c:22753 handle_request_invite: Call from '3102' (192.168.12.107:33784) to extension '3201' rejected because extension not found in context 'gr3'.
[Apr 23 14:40:47] NOTICE[17032]: chan_sip.c:25030 handle_request_register: Registration from '<sip:vaduz@192.168.12.7>' failed for '192.168.12.9:5060' - Wrong password
debian*CLI> sip reload
Disconnected from Asterisk server
Executing last minute cleanups
13:41:51
#nano /etc/asterisk/sip.conf
13:42:03
#[general]

13:42:31
#{EXTEN})
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian (pid = 16994)
Verbosity is at least 5
debian*CLI> sip reload
Disconnected from Asterisk server
Executing last minute cleanups
13:43:07
#asterisk -rvvvvv
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 debian (pid = 16994)
...
debian*CLI>
debian*CLI>
  == Using SIP RTP CoS mark 5
[Apr 23 14:53:51] NOTICE[17032]: chan_sip.c:22753 handle_request_invite: Call from 'havana' (192.168.12.8:5060) to extension '1201}' rejected because extension not found in context 'gr_relay'.
  == Using SIP RTP CoS mark 5
[Apr 23 14:53:56] NOTICE[17032]: chan_sip.c:22753 handle_request_invite: Call from 'havana' (192.168.12.8:5060) to extension '1202}' rejected because extension not found in context 'gr_relay'.
debian*CLI>
debian*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
прошло 11 минут
13:54:14
#nano /etc/asterisk/extensions.conf
13:54:41
#[default]
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 debian (pid = 16994)
...
[Apr 23 14:54:54] NOTICE[17032]: chan_sip.c:22753 handle_request_invite: Call from 'havana' (192.168.12.8:5060) to extension '1201}' rejected because extension not found in context 'gr_relay'.
  == Using SIP RTP CoS mark 5
[Apr 23 14:54:59] NOTICE[17032]: chan_sip.c:22753 handle_request_invite: Call from 'havana' (192.168.12.8:5060) to extension '1201}' rejected because extension not found in context 'gr_relay'.
  == Using SIP RTP CoS mark 5
[Apr 23 14:55:03] NOTICE[17032]: chan_sip.c:22753 handle_request_invite: Call from 'havana' (192.168.12.8:5060) to extension '1202}' rejected because extension not found in context 'gr_relay'.
  == Using SIP RTP CoS mark 5
[Apr 23 14:55:09] NOTICE[17032]: chan_sip.c:22753 handle_request_invite: Call from 'havana' (192.168.12.8:5060) to extension '1201}' rejected because extension not found in context 'gr_relay'.
debian*CLI> 1201}  =:-[   ]
Disconnected from Asterisk server
Executing last minute cleanups
13:55:56
#nano /etc/asterisk/extensions.conf
13:56:58
#[default]
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 debian (pid = 16994)
...
  == Using SIP RTP CoS mark 5
    -- Executing [2301@gr_relay:1] Dial("SIP/santiago-0000014a", "SIP/kiev/2301") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/kiev/2301
    -- Got SIP response 503 "Service Unavailable" back from 192.168.12.2:5060
    -- SIP/kiev-0000014b is circuit-busy
  == Everyone is busy/congested at this time (1:0/1/0)
    -- Auto fallthrough, channel 'SIP/santiago-0000014a' status is 'CONGESTION'
debian*CLI> quit
Executing last minute cleanups
прошло 24 минуты
14:21:21
#nano /etc/asterisk/extensions.conf
14:21:30
#[default]
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 debian (pid = 16994)
...
    -- SIP/3101-0000017b is ringing
  == Spawn extension (gr_relay, 3101, 1) exited non-zero on 'SIP/kiev-0000017a'
  == Using SIP RTP CoS mark 5
    -- Executing [3102@gr_relay:1] Dial("SIP/kiev-0000017c", "SIP/3102") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/3102
    -- SIP/3102-0000017d is ringing
  == Spawn extension (gr_relay, 3102, 1) exited non-zero on 'SIP/kiev-0000017c'
debian*CLI> quit
Executing last minute cleanups
прошло 36 минут
14:58:23
#mkdir -p /var/tmp/asterisk/

14:58:42
#chown asterisk:asterisk /var/tmp/asterisk/

14:59:17
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-24351.5652.2764	2014-04-23 15:59:28.018704321 +0300
+++ /etc/asterisk/extensions.conf	2014-04-23 16:08:51.986713851 +0300
@@ -10,11 +10,17 @@
 ;;exten => _33XX,1,Dial(SIP/kiev/${EXTEN})
 ;;exten => _14XX,1,Dial(SIP/kiev/${EXTEN})
 
+
 [internal]
+exten => 8001,1,Answer
+exten => 8001,n,Record(/var/tmp/asterisk/message:gsm,2)
+exten => 8001,n,Playback(/var/tmp/asterisk/message)
+exten => 8001,n,Hangup
 
 
 [local]
 exten => _31XX,1,Dial(SIP/${EXTEN})
+
 [national]
 exten => _32XX,1,Dial(SIP/santiago/${EXTEN})
 
@@ -25,12 +31,17 @@
 exten => _33XX,1,Dial(SIP/kiev/${EXTEN})
 exten => _14XX,1,Dial(SIP/kiev/${EXTEN})
 
+[fallback]
+
+exten => _.,1,Playback(/var/tmp/asterisk/message)
+
 [gr_relay]
 
 include => internal
 include => local
 include => national
 include => international
+include => fallback
 
 
 [gr1]
@@ -39,15 +50,18 @@
 include => local
 include => national
 include => international
+include => fallback
 
 [gr2]
 
 include => internal
 include => local
 include => national
+include => fallback
 
 [gr3]
 
 include => internal
 include => local
+include => fallback
 
15:08:53
#nano /etc/asterisk/extensions.conf
15:10:33
#ls /var/tmp/asterisk/

15:10:44
#ls /var/tmp/asterisk/
message.gsm
15:11:38
#nano /etc/asterisk/extensions.conf
15:12:14
#[default]
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 debian (pid = 16994)
...
  == Using SIP RTP CoS mark 5
    -- Called SIP/kiev/1105
    -- Got SIP response 503 "Service Unavailable" back from 192.168.12.2:5060
    -- SIP/kiev-00000187 is circuit-busy
  == Everyone is busy/congested at this time (1:0/1/0)
    -- Auto fallthrough, channel 'SIP/3101-00000186' status is 'CONGESTION'
    -- Executing [h@gr1:1] Playback("SIP/3101-00000186", "/var/tmp/asterisk/message") in new stack
  == Spawn extension (gr1, h, 1) exited non-zero on 'SIP/3101-00000186'
debian*CLI> quit
Executing last minute cleanups
15:15:44
#ls /var/tmp/asterisk/
message.gsm
15:15:48
#nano /etc/asterisk/extensions.conf
15:17:10
#[default]
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 debian (pid = 16994)
...
  == Using SIP RTP CoS mark 5
    -- Executing [9901@gr1:1] Playback("SIP/3101-0000018c", "/var/tmp/asterisk/message") in new stack
    -- <SIP/3101-0000018c> Playing '/var/tmp/asterisk/message.gsm' (language 'en')
    -- Auto fallthrough, channel 'SIP/3101-0000018c' status is 'UNKNOWN'
    -- Executing [h@gr1:1] Playback("SIP/3101-0000018c", "/var/tmp/asterisk/message") in new stack
[Apr 23 16:18:10] WARNING[26050]: file.c:766 ast_readaudio_callback: Failed to write frame
    -- <SIP/3101-0000018c> Playing '/var/tmp/asterisk/message.gsm' (language 'en')
[Apr 23 16:18:10] WARNING[26050]: app_playback.c:475 playback_exec: ast_streamfile failed on SIP/3101-0000018c for /var/tmp/asterisk/message
debian*CLI> quit
Executing last minute cleanups
прошло 15 минут
15:33:08
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-24351.14604.30000	2014-04-23 16:33:41.442739016 +0300
+++ /etc/asterisk/extensions.conf	2014-04-23 16:34:17.958739635 +0300
@@ -19,7 +19,10 @@
 
 
 [local]
-exten => _31XX,1,Dial(SIP/${EXTEN})
+;exten => _31XX,1,Dial(SIP/${EXTEN})
+exten => _3101,1,Dial(SIP/3101,2)
+exten => _3101,n,Dial(SIP/3102)
+
 
 [national]
 exten => _32XX,1,Dial(SIP/santiago/${EXTEN})
15:34:17
#[default]
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 debian (pid = 16994)
...
  == Using SIP RTP CoS mark 5
    -- Executing [3301@gr_relay:1] Dial("SIP/santiago-00000196", "SIP/kiev/3301") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/kiev/3301
    -- SIP/kiev-00000197 is ringing
  == Spawn extension (gr_relay, 3301, 1) exited non-zero on 'SIP/santiago-00000196'
    -- Executing [h@gr_relay:1] Playback("SIP/santiago-00000196", "/var/tmp/asterisk/message") in new stack
  == Spawn extension (gr_relay, h, 1) exited non-zero on 'SIP/santiago-00000196'
debian*CLI> quit
Executing last minute cleanups
15:38:03
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-24351.10135.14863	2014-04-23 16:38:04.778743467 +0300
+++ /etc/asterisk/extensions.conf	2014-04-23 16:39:00.462744412 +0300
@@ -21,6 +21,7 @@
 [local]
 ;exten => _31XX,1,Dial(SIP/${EXTEN})
 exten => _3101,1,Dial(SIP/3101,2)
+exten => _3101,n,NoOp(Dial Status: ${DIALSTATUS})
 exten => _3101,n,Dial(SIP/3102)
 
 
15:41:44
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-24351.12781.17725	2014-04-23 16:41:46.218747211 +0300
+++ /etc/asterisk/extensions.conf	2014-04-23 16:42:19.726747773 +0300
@@ -23,7 +23,7 @@
 exten => _3101,1,Dial(SIP/3101,2)
 exten => _3101,n,NoOp(Dial Status: ${DIALSTATUS})
 exten => _3101,n,Dial(SIP/3102)
-
+exten => _3101,n,NoOp(Dial Status: ${DIALSTATUS})
 
 [national]
 exten => _32XX,1,Dial(SIP/santiago/${EXTEN})
15:42:19
#[default]
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 debian (pid = 16994)
...
    -- SIP/3102-000001a8 is ringing
    -- SIP/3102-000001a8 answered SIP/santiago-000001a6
    -- Locally bridging SIP/santiago-000001a6 and SIP/3102-000001a8
    -- Executing [h@gr_relay:1] Playback("SIP/santiago-000001a6", "/var/tmp/asterisk/message") in new stack
[Apr 23 16:42:34] WARNING[26167]: file.c:766 ast_readaudio_callback: Failed to write frame
    -- <SIP/santiago-000001a6> Playing '/var/tmp/asterisk/message.gsm' (language 'en')
[Apr 23 16:42:34] WARNING[26167]: app_playback.c:475 playback_exec: ast_streamfile failed on SIP/santiago-000001a6 for /var/tmp/asterisk/message
  == Spawn extension (gr_relay, 3101, 3) exited non-zero on 'SIP/santiago-000001a6'
debian*CLI> quit
Executing last minute cleanups
15:42:39
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-24351.24547.17462	2014-04-23 16:42:40.586748130 +0300
+++ /etc/asterisk/extensions.conf	2014-04-23 16:42:58.614748433 +0300
@@ -23,7 +23,7 @@
 exten => _3101,1,Dial(SIP/3101,2)
 exten => _3101,n,NoOp(Dial Status: ${DIALSTATUS})
 exten => _3101,n,Dial(SIP/3102)
-exten => _3101,n,NoOp(Dial Status: ${DIALSTATUS})
+exten => _3102,n,NoOp(Dial Status: ${DIALSTATUS})
 
 [national]
 exten => _32XX,1,Dial(SIP/santiago/${EXTEN})
15:42:58
#[default]
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 debian (pid = 16994)
...
    -- Called SIP/3102
    -- SIP/3102-000001ae is ringing
    -- Got SIP response 486 "Busy Here" back from 192.168.12.107:33784
    -- SIP/3102-000001ae is busy
  == Everyone is busy/congested at this time (1:1/0/0)
    -- Auto fallthrough, channel 'SIP/santiago-000001ac' status is 'BUSY'
    -- Executing [h@gr_relay:1] Playback("SIP/santiago-000001ac", "/var/tmp/asterisk/message") in new stack
  == Spawn extension (gr_relay, h, 1) exited non-zero on 'SIP/santiago-000001ac'
debian*CLI> quit
Executing last minute cleanups
15:43:39
#nano /etc/asterisk/extensions.conf
15:45:41
#[default]
  GNU nano 2.2.6                  File: /etc/asterisk/extensions.conf                                Modified
[default]
;exten => 3101,1,Dial(SIP/3101)
;;exten => _31XX,1,Dial(SIP/${EXTEN})
;;exten => _32XX,1,Dial(SIP/santiago/${EXTEN})
;exten => _1XXX,1,Dial(SIP/kiev/${EXTEN})
;;exten => _[12]XXX,1,Dial(SIP/kiev/${EXTEN})
;;exten => _[12]3XX,1,Dial(SIP/kiev/${EXTEN})
;;exten => _2[12]XX,1,Dial(SIP/kiev/${EXTEN})
;;exten => _33XX,1,Dial(SIP/kiev/${EXTEN})
...
[fallback]
exten => _.,1,Playback(/var/tmp/asterisk/message)
[gr_relay]
include => internal
include => local
include => national
include => international
include => fallback
^G Get Help       ^O WriteOut       ^R Read File      ^Y Prev Page      ^K Cut Text       ^C Cur Pos
^X Exit           ^J Justify        ^W Where Is       ^V Next Page      ^U UnCut Text     ^T To Spell
прошло 11 минут
15:57:34
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-24351.26221.2648	2014-04-23 16:57:35.866763258 +0300
+++ /etc/asterisk/extensions.conf	2014-04-23 17:10:48.186776647 +0300
@@ -18,17 +18,21 @@
 exten => 8001,n,Hangup
 
 
-[local]
-;exten => _31XX,1,Dial(SIP/${EXTEN})
-exten => _3101,1,Dial(SIP/3101,2)
-exten => _3101,n,NoOp(Dial Status: ${DIALSTATUS})
-exten => _3101,n,Goto(s-${DIALSTATUS})
+[macro-localcall]т
+
+exten => s,1,Dial(SIP/${ARG1},2)
+exten => s,n,NoOp(Dial Status: ${DIALSTATUS})
+exten => s,n,Goto(s-${DIALSTATUS})
 
 exten => s-NOANSWER,1,Dial(SIP/3102)
 exten => s-CONGESTION,1,Dial(SIP/3102)
 exten => s-ANSWER,1,Hangup
 exten => s-BUSY,1,Busy
 
+[local]
+
+exten => _31XX,1,Macro(localcall,${EXTEN})
+
 
 [national]
 exten => _32XX,1,Dial(SIP/santiago/${EXTEN})
прошло 14 минут
16:12:02
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-24351.6882.6281	2014-04-23 17:12:03.310777918 +0300
+++ /etc/asterisk/extensions.conf	2014-04-23 17:12:15.362778119 +0300
@@ -18,7 +18,7 @@
 exten => 8001,n,Hangup
 
 
-[macro-localcall]т
+[macro-localcall]
 
 exten => s,1,Dial(SIP/${ARG1},2)
 exten => s,n,NoOp(Dial Status: ${DIALSTATUS})
16:12:15
#[default]
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 debian (pid = 16994)
...
    -- SIP/santiago-000001cd is ringing
    -- SIP/santiago-000001cd answered SIP/3101-000001cc
    -- Locally bridging SIP/3101-000001cc and SIP/santiago-000001cd
    -- Executing [h@gr1:1] Playback("SIP/3101-000001cc", "/var/tmp/asterisk/message") in new stack
[Apr 23 17:16:00] WARNING[26334]: file.c:766 ast_readaudio_callback: Failed to write frame
    -- <SIP/3101-000001cc> Playing '/var/tmp/asterisk/message.gsm' (language 'en')
[Apr 23 17:16:00] WARNING[26334]: app_playback.c:475 playback_exec: ast_streamfile failed on SIP/3101-000001cc for /var/tmp/asterisk/message
  == Spawn extension (gr1, 3201, 1) exited non-zero on 'SIP/3101-000001cc'
debian*CLI> quit
Executing last minute cleanups
16:16:09
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-24351.2104.18776	2014-04-23 17:16:10.654782094 +0300
+++ /etc/asterisk/extensions.conf	2014-04-23 17:17:21.898783296 +0300
@@ -22,7 +22,7 @@
 
 exten => s,1,Dial(SIP/${ARG1},2)
 exten => s,n,NoOp(Dial Status: ${DIALSTATUS})
-exten => s,n,Goto(s-${DIALSTATUS})
+exten => s,n,Goto(s-${DIALSTATUS},1)
 
 exten => s-NOANSWER,1,Dial(SIP/3102)
 exten => s-CONGESTION,1,Dial(SIP/3102)
16:17:21
#[default]
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 debian (pid = 16994)
...
    -- Got SIP response 503 "Service Unavailable" back from 192.168.12.2:5060
    -- SIP/kiev-000001ea is circuit-busy
  == Everyone is busy/congested at this time (1:0/1/0)
    -- Auto fallthrough, channel 'SIP/santiago-000001e9' status is 'CONGESTION'
    -- Executing [h@gr_relay:1] Playback("SIP/santiago-000001e9", "/var/tmp/asterisk/message") in new stack
  == Spawn extension (gr_relay, h, 1) exited non-zero on 'SIP/santiago-000001e9'
debian*CLI> qui
No such command 'qui' (type 'core show help qui' for other possible commands)
debian*CLI> quit
Executing last minute cleanups
прошло 15 минут
16:32:53
#nano /etc/asterisk/extensions.conf
прошло 12 минут
16:45:38
#[default]

16:45:40
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-24351.15395.15250	2014-04-23 17:45:41.642812023 +0300
+++ /etc/asterisk/extensions.conf	2014-04-23 17:46:32.222812881 +0300
@@ -29,6 +29,8 @@
 exten => s-ANSWER,1,Hangup
 exten => s-BUSY,1,Busy
 
+
+#include "/etc/asterisk/extensions.conf.local"
 [local]
 
 exten => _31XX,1,Macro(localcall,${EXTEN})
16:46:32
#[default]

16:46:33
#nano /etc/asterisk/extensions.conf
16:47:03
#[default]
  GNU nano 2.2.6                File: /etc/asterisk/extensions.conf.local                            Modified
[local] => international
include => fallback
^G Get Help       ^O WriteOut       ^R Read File      ^Y Prev Page      ^K Cut Text       ^C Cur Pos
^X Exit           ^J Justify        ^W Where Is       ^V Next Page      ^U UnCut Text     ^T To Spell

Четверг (04/24/14)

08:23:59
#asterisk -rvvvvv
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 debian (pid = 16994)
Verbosity is at least 5
debian*CLI> quit
Executing last minute cleanups
прошло 19 минут
08:43:11
#asterisk -rvvvvv
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 debian (pid = 16994)
Verbosity is at least 5
debian*CLI> quit
Executing last minute cleanups
08:47:33
#asterisk -rv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian (pid = 16994)
Verbosity is at least 5
debian*CLI>
...
  == Using SIP RTP CoS mark 5
    -- Called SIP/kiev/3301
    -- SIP/kiev-000001f3 is ringing
  == Spawn extension (gr_relay, 3301, 1) exited non-zero on 'SIP/santiago-000001f2'
    -- Executing [h@gr_relay:1] Playback("SIP/santiago-000001f2", "/var/tmp/asterisk/message") in new stack
  == Spawn extension (gr_relay, h, 1) exited non-zero on 'SIP/santiago-000001f2'
    -- Registered SIP '3102' at 192.168.12.107:61010
[Apr 24 09:50:48] NOTICE[17032]: chan_sip.c:24850 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 3102
debian*CLI> quit
Executing last minute cleanups
08:51:15
#nano /etc/asterisk/sip.conf
--- /tmp/l3-saved-24351.29218.7917	2014-04-24 09:51:27.839791191 +0300
+++ /etc/asterisk/sip.conf	2014-04-24 09:51:42.435791435 +0300
@@ -17,7 +17,7 @@
 type=friend
 secret=1234
 host=dynamic
-context=gr3
+context=gr1
 
 [3103]
 type=friend
08:51:42
#[general]
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian (pid = 16994)
Verbosity is at least 5
  == Using SIP RTP CoS mark 5
...
    -- Executing [s@macro-localcall:1] Dial("SIP/kiev-000001ff", "SIP/3102,2") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/3102
    -- SIP/3102-00000200 is ringing
  == Spawn extension (macro-localcall, s, 1) exited non-zero on 'SIP/kiev-000001ff' in macro 'localcall'
  == Spawn extension (gr_relay, 3102, 1) exited non-zero on 'SIP/kiev-000001ff'
    -- Executing [h@gr_relay:1] Playback("SIP/kiev-000001ff", "/var/tmp/asterisk/message") in new stack
  == Spawn extension (gr_relay, h, 1) exited non-zero on 'SIP/kiev-000001ff'
debian*CLI> quit
Executing last minute cleanups
09:01:26
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-24351.71.26139	2014-04-24 10:01:30.571801373 +0300
+++ /etc/asterisk/extensions.conf	2014-04-24 10:06:29.567806424 +0300
@@ -12,10 +12,16 @@
 
 
 [internal]
-exten => 8001,1,Answer
-exten => 8001,n,Record(/var/tmp/asterisk/message:gsm,2)
-exten => 8001,n,Playback(/var/tmp/asterisk/message)
-exten => 8001,n,Hangup
+;exten => 8001,1,Answer
+;exten => 8001,n,Record(/var/tmp/asterisk/message:gsm,2)
+;exten => 8001,n,Playback(/var/tmp/asterisk/message)
+;exten => 8001,n,Hangup
+
+exten => _80XX,1,Answer
+exten => _80XX,n,Record(/var/tmp/asterisk/message${EXTEN:2}:gsm,2)
+exten => _80XX,n,Playback(/var/tmp/asterisk/message${EXTEN:2})
+exten => _80XX,n,Hangup
+
 
 
 [macro-localcall]
09:06:29
#[default]
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian (pid = 16994)
Verbosity is at least 5
debian*CLI> dialplan reload
...
    -- Time to scan old dialplan and merge leftovers back into the new: 0.000818 sec
    -- Time to restore hints and swap in new dialplan: 0.000003 sec
    -- Time to delete the old dialplan: 0.000053 sec
    -- Total time merge_contexts_delete: 0.000874 sec
debian*CLI> qui
No such command 'qui' (type 'core show help qui' for other possible commands)
debian*CLI> qui
No such command 'qui' (type 'core show help qui' for other possible commands)
debian*CLI> quit
Executing last minute cleanups
09:07:27
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-24351.32087.4065	2014-04-24 10:07:28.603807430 +0300
+++ /etc/asterisk/extensions.conf	2014-04-24 10:09:06.963809079 +0300
@@ -22,6 +22,7 @@
 exten => _80XX,n,Playback(/var/tmp/asterisk/message${EXTEN:2})
 exten => _80XX,n,Hangup
 
+; ${VARIABLE:start:length}
 
 
 [macro-localcall]
09:09:06
#[default]
.ICE-unix/          .X11-unix/          pulse-HGY7lVsaJOWt/ pulse-xiEH4iN5mfCH/ tracker-user/
.X0-lock            orbit-user/         pulse-PKdhtXMmr18n/ ssh-28W5T68mG4yT/
09:09:06
#ls /tmp/
.ICE-unix/          .X11-unix/          pulse-HGY7lVsaJOWt/ pulse-xiEH4iN5mfCH/ tracker-user/
.X0-lock            orbit-user/         pulse-PKdhtXMmr18n/ ssh-28W5T68mG4yT/
09:09:06
#ls /tmp/
.ICE-unix/          .X11-unix/          pulse-HGY7lVsaJOWt/ pulse-xiEH4iN5mfCH/ tracker-user/
.X0-lock            orbit-user/         pulse-PKdhtXMmr18n/ ssh-28W5T68mG4yT/
09:09:06
#ls /var/tmp/asterisk/
message.gsm  message02.gsm  message03.gsm
09:10:31
#asterisk -rv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian (pid = 16994)
Verbosity is at least 5
  == Using SIP RTP CoS mark 5
...
    -- Executing [8002@gr1:4] Hangup("SIP/3101-00000203", "") in new stack
  == Spawn extension (gr1, 8002, 4) exited non-zero on 'SIP/3101-00000203'
    -- Executing [h@gr1:1] Playback("SIP/3101-00000203", "/var/tmp/asterisk/message") in new stack
[Apr 24 10:11:21] WARNING[28191]: file.c:766 ast_readaudio_callback: Failed to write frame
    -- <SIP/3101-00000203> Playing '/var/tmp/asterisk/message.gsm' (language 'en')
[Apr 24 10:11:21] WARNING[28191]: app_playback.c:475 playback_exec: ast_streamfile failed on SIP/3101-00000203 for /var/tmp/asterisk/message
debian*CLI> do
No such command 'do' (type 'core show help do' for other possible commands)
debian*CLI> quit
Executing last minute cleanups
09:11:35
#ls /var/tmp/asterisk/
message.gsm  message02.gsm  message03.gsm
09:11:38
#asterisk -rv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian (pid = 16994)
Verbosity is at least 5
  == Using SIP RTP CoS mark 5
...
    -- Called SIP/santiago/3201
    -- SIP/santiago-00000205 is ringing
    -- Got SIP response 503 "Service Unavailable" back from 192.168.12.8:5060
    -- SIP/santiago-00000205 is circuit-busy
  == Everyone is busy/congested at this time (1:0/1/0)
    -- Auto fallthrough, channel 'SIP/3101-00000204' status is 'CONGESTION'
    -- Executing [h@gr1:1] Playback("SIP/3101-00000204", "/var/tmp/asterisk/message") in new stack
  == Spawn extension (gr1, h, 1) exited non-zero on 'SIP/3101-00000204'
debian*CLI> quit
Executing last minute cleanups
09:17:08
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-24351.12636.5026	2014-04-24 10:17:11.703817273 +0300
+++ /etc/asterisk/extensions.conf	2014-04-24 10:19:27.243819569 +0300
@@ -22,12 +22,15 @@
 exten => _80XX,n,Playback(/var/tmp/asterisk/message${EXTEN:2})
 exten => _80XX,n,Hangup
 
+
 ; ${VARIABLE:start:length}
 
 
 [macro-localcall]
 
-exten => s,1,Dial(SIP/${ARG1},2)
+exten => s,1,Answer
+exten => s,n,Monitor(wav,monitor,m)
+exten => s,n,Dial(SIP/${ARG1},2)
 exten => s,n,NoOp(Dial Status: ${DIALSTATUS})
 exten => s,n,Goto(s-${DIALSTATUS},1)
 
09:20:21
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-24351.10648.30997	2014-04-24 10:20:23.183820512 +0300
+++ /etc/asterisk/extensions.conf	2014-04-24 10:20:33.707820687 +0300
@@ -18,7 +18,7 @@
 ;exten => 8001,n,Hangup
 
 exten => _80XX,1,Answer
-exten => _80XX,n,Record(/var/tmp/asterisk/message${EXTEN:2}:gsm,2)
+exten => _80XX,n,Record(/var/tmp/asterisk/message${EXTEN:2}:gsm,10)
 exten => _80XX,n,Playback(/var/tmp/asterisk/message${EXTEN:2})
 exten => _80XX,n,Hangup
 
09:20:33
#[default]
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian (pid = 16994)
Verbosity is at least 5
debian*CLI> dialplan reload
...
    -- Called SIP/santiago/3201
    -- SIP/santiago-0000020b answered SIP/3101-0000020a
    -- Locally bridging SIP/3101-0000020a and SIP/santiago-0000020b
    -- Executing [h@gr1:1] Playback("SIP/3101-0000020a", "/var/tmp/asterisk/message") in new stack
[Apr 24 10:21:33] WARNING[28282]: file.c:766 ast_readaudio_callback: Failed to write frame
    -- <SIP/3101-0000020a> Playing '/var/tmp/asterisk/message.gsm' (language 'en')
[Apr 24 10:21:33] WARNING[28282]: app_playback.c:475 playback_exec: ast_streamfile failed on SIP/3101-0000020a for /var/tmp/asterisk/message
  == Spawn extension (gr1, 3201, 1) exited non-zero on 'SIP/3101-0000020a'
debian*CLI> quit
Executing last minute cleanups
09:21:47
#ls /var/spool/asterisk/
dictate  meetme  monitor  outgoing  system  tmp  voicemail
09:22:01
#ls /var/spool/asterisk/monitor/

09:22:07
#ls -la /var/spool/asterisk/
total 36
drwxr-x--- 9 asterisk asterisk 4096 Apr 22 14:27 .
drwxr-xr-x 8 root     root     4096 Apr 22 14:27 ..
drwxr-x--- 2 asterisk asterisk 4096 Jan  4 03:07 dictate
drwxr-x--- 2 asterisk asterisk 4096 Jan  4 03:07 meetme
drwxr-x--- 2 asterisk asterisk 4096 Jan  4 03:07 monitor
drwxr-x--- 2 asterisk asterisk 4096 Jan  4 03:07 outgoing
drwxr-x--- 2 asterisk asterisk 4096 Jan  4 03:07 system
drwxr-x--- 2 asterisk asterisk 4096 Jan  4 03:07 tmp
drwxr-x--- 2 asterisk asterisk 4096 Jan  4 03:07 voicemail
09:22:32
#nano /etc/asterisk/extensions.conf
09:24:18
#[default]
total 192
drwxr-x--- 2 asterisk asterisk   4096 Apr 24 10:24 .
drwxr-x--- 9 asterisk asterisk   4096 Apr 22 14:27 ..
-rw-rw---- 1 asterisk asterisk 185324 Apr 24 10:24 monitor.wav
09:24:28
#ls -la /var/spool/asterisk/monitor/
total 192
drwxr-x--- 2 asterisk asterisk   4096 Apr 24 10:24 .
drwxr-x--- 9 asterisk asterisk   4096 Apr 22 14:27 ..
-rw-rw---- 1 asterisk asterisk 185324 Apr 24 10:24 monitor.wav
09:25:31
#ls -la /var/spool/asterisk/monitor/
total 192
drwxr-x--- 2 asterisk asterisk   4096 Apr 24 10:24 .
drwxr-x--- 9 asterisk asterisk   4096 Apr 22 14:27 ..
-rw-rw---- 1 asterisk asterisk 185324 Apr 24 10:24 monitor.wav
09:25:36
#ls -la /var/spool/asterisk/monitor/
total 216
drwxr-x--- 2 asterisk asterisk   4096 Apr 24 10:26 .
drwxr-x--- 9 asterisk asterisk   4096 Apr 22 14:27 ..
-rw-rw---- 1 asterisk asterisk 211884 Apr 24 10:26 monitor.wav
09:26:07
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-24351.16925.28221	2014-04-24 10:32:22.467832666 +0300
+++ /etc/asterisk/extensions.conf	2014-04-24 10:41:16.451841689 +0300
@@ -25,6 +25,15 @@
 
 ; ${VARIABLE:start:length}
 
+[macro-outgoingcall]
+
+; ${ARG1} - outgoing channel + extension
+
+exten => s,1,Answer
+exten => s,n,Monitor(wav,monitor,m)
+exten => s,n,Dial(${ARG1})
+
+
 
 [macro-localcall]
 
@@ -43,18 +52,19 @@
 #include "/etc/asterisk/extensions.conf.local"
 
 [national]
-exten => _32XX,1,Dial(SIP/santiago/${EXTEN})
+;exten => _32XX,1,Dial(SIP/santiago/${EXTEN})
+exten => _32XX,1,Macro(outgoingcall,SIP/santiago/${EXTEN})
 
 [international]
-exten => _[12]XXX,1,Dial(SIP/kiev/${EXTEN})
-exten => _[12]3XX,1,Dial(SIP/kiev/${EXTEN})
-exten => _2[12]XX,1,Dial(SIP/kiev/${EXTEN})
-exten => _33XX,1,Dial(SIP/kiev/${EXTEN})
-exten => _14XX,1,Dial(SIP/kiev/${EXTEN})
+exten => _[12]XXX,1,Macro(outgoingcall,SIP/kiev/${EXTEN})
+exten => _[12]3XX,1,Macro(outgoingcall,SIP/kiev/${EXTEN})
+exten => _2[12]XX,1,Macro(outgoingcall,SIP/kiev/${EXTEN})
+exten => _33XX,1,Macro(outgoingcall,SIP/kiev/${EXTEN})
+exten => _14XX,1,Macro(outgoingcall,SIP/kiev/${EXTEN})
 
 [fallback]
 
-exten => _.,1,Playback(/var/tmp/asterisk/message)
+;exten => _.,1,Playback(/var/tmp/asterisk/message)
 
 [gr_relay]
 
прошло 15 минут
09:41:20
#asterisk -rx 'dialplan reload'
Dialplan reloaded.
09:41:38
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-24351.31324.20069	2014-04-24 10:42:02.735842471 +0300
+++ /etc/asterisk/extensions.conf	2014-04-24 10:44:00.763844465 +0300
@@ -39,7 +39,7 @@
 
 exten => s,1,Answer
 exten => s,n,Monitor(wav,monitor,m)
-exten => s,n,Dial(SIP/${ARG1},2)
+exten => s,n,Dial(SIP/${ARG1},10)
 exten => s,n,NoOp(Dial Status: ${DIALSTATUS})
 exten => s,n,Goto(s-${DIALSTATUS},1)
 
09:44:00
#[default]
Dialplan reloaded.
09:44:02
#ls -la /var/spool/asterisk/monitor/
total 136
drwxr-x--- 2 asterisk asterisk   4096 Apr 24 10:44 .
drwxr-x--- 9 asterisk asterisk   4096 Apr 22 14:27 ..
-rw-rw---- 1 asterisk asterisk 130444 Apr 24 10:44 monitor.wav
09:44:36
#nano /etc/asterisk/extensions.conf
09:50:33
#[default]
Dialplan reloaded.
09:50:42
#ls -la /var/spool/asterisk/monitor/
total 208
drwxr-x--- 2 asterisk asterisk   4096 Apr 24 10:50 .
drwxr-x--- 9 asterisk asterisk   4096 Apr 22 14:27 ..
-rw-rw---- 1 asterisk asterisk  34412 Apr 24 10:50 monitor-in.wav
-rw-rw---- 1 asterisk asterisk  32812 Apr 24 10:50 monitor-out.wav
-rw-rw---- 1 asterisk asterisk 130444 Apr 24 10:44 monitor.wav
09:50:56
#ls -la /var/spool/asterisk/monitor/
total 240
drwxr-x--- 2 asterisk asterisk   4096 Apr 24 10:51 .
drwxr-x--- 9 asterisk asterisk   4096 Apr 22 14:27 ..
-rw-rw---- 1 asterisk asterisk 234604 Apr 24 10:51 monitor.wav
09:51:09
#ls -la /var/spool/asterisk/monitor/
total 240
drwxr-x--- 2 asterisk asterisk   4096 Apr 24 10:51 .
drwxr-x--- 9 asterisk asterisk   4096 Apr 22 14:27 ..
-rw-rw---- 1 asterisk asterisk 234604 Apr 24 10:51 monitor.wav
09:51:19
#nano /etc/asterisk/extensions.conf
09:52:48
#[default]

09:52:49
#ls -la /var/spool/asterisk/monitor/
total 624
drwxr-x--- 2 asterisk asterisk   4096 Apr 24 10:52 .
drwxr-x--- 9 asterisk asterisk   4096 Apr 22 14:27 ..
-rw-rw---- 1 asterisk asterisk 193324 Apr 24 10:52 3201-2101-1398325930.wav
-rw-rw---- 1 asterisk asterisk 194604 Apr 24 10:52 3201-3101-1398325951.wav
-rw-rw---- 1 asterisk asterisk 234604 Apr 24 10:51 monitor.wav
09:52:50
#nano /etc/asterisk/extensions.conf
прошло 38 минут
10:31:19
#[default]

10:31:21
#^C

10:31:21
#ntpdate ntp.lucky.net
24 Apr 11:31:43 ntpdate[28819]: step time server 193.193.193.107 offset 2.481400 sec
10:31:43
#cat /etc/asterisk/extensions.conf
[default]
[internal]
exten => _80XX,1,Answer
exten => _80XX,n,Record(/var/tmp/asterisk/message${EXTEN:2}:gsm,10)
exten => _80XX,n,Playback(/var/tmp/asterisk/message${EXTEN:2})
exten => _80XX,n,Hangup
; ${VARIABLE:start:length}
[macro-outgoingcall]
; ${ARG1} - outgoing channel + extension
; EPOCH = seconds since 1.01.1970
...
include => fallback
[gr2]
include => internal
include => local
include => national
include => fallback
[gr3]
include => internal
include => local
include => fallback

Файлы

  • /etc/asterisk/extensions.conf
  • /etc/asterisk/extensions.conf
    >
    [default]
    [internal]
    exten => _80XX,1,Answer
    exten => _80XX,n,Record(/var/tmp/asterisk/message${EXTEN:2}:gsm,10)
    exten => _80XX,n,Playback(/var/tmp/asterisk/message${EXTEN:2})
    exten => _80XX,n,Hangup
    ; ${VARIABLE:start:length}
    [macro-outgoingcall]
    ; ${ARG1} - outgoing channel + extension
    ; EPOCH = seconds since 1.01.1970
    exten => s,1,Answer
    exten => s,n,Set(CALLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${EPOCH})
    exten => s,n,Monitor(wav,${CALLFILENAME},m)
    exten => s,n,Dial(${ARG1})
    [macro-localcall]
    ; ${ARG1}
    ; ${ARG2}
    exten => s,1,Answer
    exten => s,n,Monitor(wav,monitor,m)
    exten => s,n,Dial(SIP/${ARG1},10)
    exten => s,n,NoOp(Dial Status: ${DIALSTATUS})
    exten => s,n,Goto(s-${DIALSTATUS},1)
    exten => s-NOANSWER,1,Dial(SIP/3102)
    exten => s-CONGESTION,1,Dial(SIP/3102)
    exten => s-ANSWER,1,Hangup
    exten => s-BUSY,1,Busy
    #include "/etc/asterisk/extensions.conf.local"
    [national]
    ;exten => _32XX,1,Dial(SIP/santiago/${EXTEN})
    exten => _32XX,1,Macro(outgoingcall,SIP/santiago/${EXTEN})
    [international]
    exten => _[12]XXX,1,Macro(outgoingcall,SIP/kiev/${EXTEN})
    exten => _[12]3XX,1,Macro(outgoingcall,SIP/kiev/${EXTEN})
    exten => _2[12]XX,1,Macro(outgoingcall,SIP/kiev/${EXTEN})
    exten => _33XX,1,Macro(outgoingcall,SIP/kiev/${EXTEN})
    exten => _14XX,1,Macro(outgoingcall,SIP/kiev/${EXTEN})
    [fallback]
    ;exten => _.,1,Playback(/var/tmp/asterisk/message)
    [gr_relay]
    include => internal
    include => local
    include => national
    include => international
    include => fallback
    [gr1]
    include => internal
    include => local
    include => national
    include => international
    include => fallback
    [gr2]
    include => internal
    include => local
    include => national
    include => fallback
    [gr3]
    include => internal
    include => local
    include => fallback
    

    Статистика

    Время первой команды журнала12:11:33 2014- 4-23
    Время последней команды журнала10:31:43 2014- 4-24
    Количество командных строк в журнале101
    Процент команд с ненулевым кодом завершения, % 0.00
    Процент синтаксически неверно набранных команд, % 0.00
    Суммарное время работы с терминалом *, час 4.84
    Количество командных строк в единицу времени, команда/мин 0.35
    Частота использования команд
    nano36|===================================| 35.64%
    [default]28|===========================| 27.72%
    ls18|=================| 17.82%
    asterisk8|=======| 7.92%
    [general]5|====| 4.95%
    {EXTEN})1|| 0.99%
    mkdir1|| 0.99%
    cat1|| 0.99%
    ntpdate1|| 0.99%
    chown1|| 0.99%
    ^C1|| 0.99%
    ____
    *) Интервалы неактивности длительностью 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$