/l3/users/azhun/nt-voip-2014-apr/debian/root :1 :2 :3 :4 :5 :6 :7 :8 |
|
#[default]
|
#{MACRO_EXTEN}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H:%M:$
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 debian7 (pid = 16994) Verbosity is at least 5 debian7*CLI> dialplan reload ... -- Executing [s@macro-localcall:4] Monitor("SIP/3102-00000309", "wav,3101-3102-"2014-04-25-16:26:50",m") in new stack -- Executing [s@macro-localcall:5] Dial("SIP/3102-00000309", "SIP/3101,10,,tTkkK") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/3101 -- SIP/3101-0000030a is ringing -- SIP/3101-0000030a answered SIP/3102-00000309 == Spawn extension (macro-localcall, s, 5) exited non-zero on 'SIP/3102-00000309' in macro 'localcall' == Spawn extension (gr1, 3101, 1) exited non-zero on 'SIP/3102-00000309' debian7*CLI> quit Executing last minute cleanups |
#nano /etc/asterisk/extensions.conf
|
#[default]
; ; Set(__DYNAMIC_FEATURES=myfeature1#myfeature2#myfeature3) ; ; (Note: The two leading underscores allow these feature settings to be set on ; on the outbound channels, as well. Otherwise, only the original channel ; will have access to these features.) ; ; The syntax for declaring a dynamic feature is any of the following: ; ;<FeatureName> => <DTMF_sequence>,<ActivateOn>[/<ActivatedBy>],<Application>[,<AppArguments>[,MOH_Class]] ... ial() or Queue() app call! ; Disconnect (default is *) -- Make sure to set the H and/or h option in the DD ;parkpos => 800-850 on in the Dial() or Queue() app call! Touch Record a.k.a. Touch Monitor -- Make sure to set the W and/or w optii ;findslot => next Queue() app call! ; Attended transfer -- Make sure to set the T and/or t option in the Dial() or Dial() app call! ; Park call (one step parking) -- Make sure to set the K and/or k option in thee ; Note that the DTMF features listed below only work when two channels have answered and are bridged together. ption in the Dial() or Queue() app call!uch Record a.k.a. Touch MixMonitor -- Make sure to set the X and/or x oo ; They can not be used while the remote party is ringing or in progress. If you require this feature you can uss [applicationmap] |
#; Note that the DYNAMIC_FEATURES channel variable must be set to use the features
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 debian7 (pid = 16994) ... -- Executing [s@macro-localcall:4] Monitor("SIP/3102-0000030f", "wav,3101-3102-"2014-04-25-16:30:56",m") in new stack -- Executing [s@macro-localcall:5] Dial("SIP/3102-0000030f", "SIP/3101,10,,tTkkK") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/3101 -- SIP/3101-00000310 is ringing -- SIP/3101-00000310 answered SIP/3102-0000030f == Spawn extension (macro-localcall, s, 5) exited non-zero on 'SIP/3102-0000030f' in macro 'localcall' == Spawn extension (gr1, 3101, 1) exited non-zero on 'SIP/3102-0000030f' debian7*CLI> quit Executing last minute cleanups |
#less /etc/asterisk/extensions.conf
|
#grep Dial /etc/asterisk/extensions.conf
exten => 8200,n(open),Dial(SIP/1201) exten => s,n,Dial(${ARG1},,tT) ;exten => s,n,Dial(SIP/${ARG1},4,tTkK) ;exten => s,n,NoOp(Dial Status: ${DIALSTATUS}) exten => s,n,Dial(SIP/${ARG1},10,,tTkkK) exten => s,n,NoOp(Dial Status: ${DIALSTATUS}) exten => s-CONGESTION,1,Dial(SIP/${mobile/${CALLERID(num)}},,tTkK) ;exten => s-CONGESTION,1,Dial(SIP/3102) ;exten => _32XX,1,Dial(SIP/santiago/${EXTEN}) |
#vim /etc/asterisk/extensions.conf
|
#[ ]
|
#exten => 8105,n(not_found),Playback(/var/tmp/asterisk/message25) |
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 debian7 (pid = 16994) ... -- Executing [s@macro-localcall:4] Monitor("SIP/santiago-00000313", "wav,3101-3201-"2014-04-25-16:34:49",m") in new stack -- Executing [s@macro-localcall:5] Dial("SIP/santiago-00000313", "SIP/3101,10,,tTkkK") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/3101 -- SIP/3101-00000314 is ringing -- SIP/3101-00000314 answered SIP/santiago-00000313 == Spawn extension (macro-localcall, s, 5) exited non-zero on 'SIP/santiago-00000313' in macro 'localcall' == Spawn extension (gr_relay, 3101, 1) exited non-zero on 'SIP/santiago-00000313' debian7*CLI> quit Executing last minute cleanups |
#less /etc/asterisk/features.conf
|
#scp 192.168.12.8:/etc/asterisk/feautres.conf /tmp/
The authenticity of host '192.168.12.8 (192.168.12.8)' can't be established. ECDSA key fingerprint is 21:b5:11:9e:cd:9d:63:5c:36:81:ae:75:5b:bc:6b:13. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.12.8' (ECDSA) to the list of known hosts. root@192.168.12.8's password: scp: /etc/asterisk/feautres.conf: No such file or directory |
#scp 192.168.12.8:/etc/asterisk/features.conf /tmp/
root@192.168.12.8's password: Permission denied, please try again. root@192.168.12.8's password: features.conf 100% 13KB 13.4KB/s 00:00 |
#vimdiff /tmp/features.conf /etc/asterisk/features.conf
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ... ~ ~ ~ ~ ;pickupsound = beep ; to indicate a succe ;pickupfailsound = beeperr ; to indicate that th ;featuredigittimeout = 1000 ; Max time (ms) betwe ; feature activation ;atxfernoanswertimeout = 15 ; Timeout for answer ;atxferdropcall = no ; If someone does an |
# ; caller is connected ;
; ; Sample Call Features (parking, transfer, etc) configuration ; [general] parkext => 700 ; What extension to dial to park. Set per parking lot. ;parkext_exclusive=yes ; Specify that the parkext created for this parking lot ; will only access this parking lot. (default is no) parkpos => 701-720 ; What extensions to park calls on. (defafult parking lot) ; These need to be numeric, as Asterisk starts from the start position ; and increments with one for the next parked call. ... ; ; When the parked call times out, send it back to the dialplan. The location ; will be the 'parkedcallstimeout' context. The extension will be built from ; the saved channel name that parked the call. For example, if a SIP peer named ; '0004F2040001' parked this call, the extension will be 'SIP_0004F2040001'. ; (Note that an underscore is used here because the '/' character has a special ; meaning in extension names for CallerID matching.) If this extension does not ; exist, the call will be sent to the 's' extension, instead. Finally, if the 's' ; extension of 'parkedcallstimeout' does not exist, the call will fall back to the ; 's' extension of the 'default' context. |
#asterisk -rvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian7 (pid = 12605) ... -- Executing [s@macro-outgoingcall:3] Monitor("SIP/kiev-00000000", "wav,3201-1101-"2014-04-25-16:44:20",m") in new stack -- Executing [s@macro-outgoingcall:4] Dial("SIP/kiev-00000000", "SIP/santiago/3201,,tTkK") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/santiago/3201 -- SIP/santiago-00000001 is ringing -- SIP/santiago-00000001 answered SIP/kiev-00000000 == Spawn extension (macro-outgoingcall, s, 4) exited non-zero on 'SIP/kiev-00000000' in macro 'outgoingcall' == Spawn extension (gr_relay, 3201, 1) exited non-zero on 'SIP/kiev-00000000' debian7*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-6759.12194.25574 2014-04-25 16:44:45.039707341 +0300 +++ /etc/asterisk/extensions.conf 2014-04-25 16:45:25.379708018 +0300 @@ -94,7 +94,7 @@ ;exten => s,n,System(/usr/local/bin/restart-samba) exten => s,n,Set(CALLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H:%M:%S")}) exten => s,n,Monitor(wav,${CALLFILENAME},m) -exten => s,n,Dial(SIP/${ARG1},10,,tTkkK) +exten => s,n,Dial(SIP/${ARG1},10,,tTkK) exten => s,n,NoOp(Dial Status: ${DIALSTATUS}) exten => s,n,Goto(s-${DIALSTATUS},1) |
#asterisk -rvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian7 (pid = 12605) ... -- Added extension 's' priority 1 to app_dial_gosub_virtual_context -- Registered extension context 'app_queue_gosub_virtual_context'; registrar: app_queue -- merging incls/swits/igpats from old(app_queue_gosub_virtual_context) to new(app_queue_gosub_virtual_context) context, registrar = pbx_config -- Added extension 's' priority 1 to app_queue_gosub_virtual_context -- Time to scan old dialplan and merge leftovers back into the new: 0.000845 sec -- Time to restore hints and swap in new dialplan: 0.000003 sec -- Time to delete the old dialplan: 0.000108 sec -- Total time merge_contexts_delete: 0.000956 sec debian7*CLI> quit Executing last minute cleanups |
#nano /etc/asterisk/queue
|
#nano /etc/asterisk/queues.conf
--- /tmp/l3-saved-6759.23720.28260 2014-04-25 16:53:07.403715830 +0300 +++ /etc/asterisk/queues.conf 2014-04-25 16:56:42.419719464 +0300 @@ -535,3 +535,6 @@ ;member => Agent/:1,1 ; Any agent in group 1, wait for first ; available, but consider with penalty +[queue1] +member => SIP/3101 +member => SIP/3102 |
#; Each member of this call queue is listed on a separate line in
|
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-6759.26566.17602 2014-04-25 16:57:09.151719916 +0300 +++ /etc/asterisk/extensions.conf 2014-04-25 17:00:53.307723702 +0300 @@ -65,6 +65,7 @@ exten => 8200,n(open),Dial(SIP/1201) + ;${VARIABLE:start:length} [macro-outgoingcall] |
#; must also preload pbx_config.so and chan_local.so (or pbx_ael.so, pbx_lua.so,
|
#[local]
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 debian7 (pid = 12605) ... -- Executing [s@macro-outgoingcall:1] Answer("SIP/santiago-0000000f", "") in new stack -- Executing [s@macro-outgoingcall:2] Set("SIP/santiago-0000000f", "CALLFILENAME=2298-3202-"2014-04-25-17:04:52"") in new stack -- Executing [s@macro-outgoingcall:3] Monitor("SIP/santiago-0000000f", "wav,2298-3202-"2014-04-25-17:04:52",m") in new stack -- Executing [s@macro-outgoingcall:4] Dial("SIP/santiago-0000000f", "SIP/kiev/2298,,tTkK") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/kiev/2298 [Apr 25 17:04:52] NOTICE[12841]: channel.c:4170 __ast_read: Dropping incompatible voice frame on SIP/santiago-0000000f of format ulaw since our native format has changed to 0x2 (gsm) -- SIP/kiev-00000010 answered SIP/santiago-0000000f debian7*CLI> quit Executing last minute cleanups |
#nano /etc/asterisk/queues.conf
|
#; must also preload pbx_config.so and chan_local.so (or pbx_ael.so, pbx_lua.so,
|
#[local]
|
#{EXTEN})
|
#; must also preload pbx_config.so and chan_local.so (or pbx_ael.so, pbx_lua.so,
|
#[local]
|
#; must also preload pbx_config.so and chan_local.so (or pbx_ael.so, pbx_lua.so,
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 debian7 (pid = 12605) Verbosity is at least 5 debian7*CLI> features show Disconnected from Asterisk server Executing last minute cleanups |
#core reload
l3script: core: command not found |
#asterisk -rvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian7 (pid = 12605) Verbosity is at least 5 debian7*CLI> quit Executing last minute cleanups |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -rvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian7 (pid = 13033) ... == Using SIP RTP CoS mark 5 -- Called SIP/kiev/3301 -- SIP/kiev-0000000f answered SIP/santiago-0000000e == Spawn extension (macro-outgoingcall, s, 4) exited non-zero on 'SIP/santiago-0000000e' in macro 'outgoingcall' == Spawn extension (gr_relay, 3301, 1) exited non-zero on 'SIP/santiago-0000000e' > Saved useragent "Cisco-CP7912/8.0.1-060412A" for peer 3101 debian7*CLI> debian7*CLI> debian7*CLI> quit Executing last minute cleanups |
#nano /etc/asterisk/queues.conf
--- /tmp/l3-saved-6759.19856.30845 2014-04-26 08:56:16.444692341 +0300 +++ /etc/asterisk/queues.conf 2014-04-26 09:05:57.588702160 +0300 @@ -539,4 +539,6 @@ member => SIP/3101 member => SIP/3102 +member => Agent/1 + strategy=linear |
#;
|
#; An optional custom beep sound file to play to always-connected agents.
GNU nano 2.2.6 File: /etc/asterisk/extensions.conf Modified exten => 8105,n(not_found),Playback(/var/tmp/asterisk/message25) | exten => 8105,n,Hangup exten => 8106,1,Answer exten => 8106,n,Read(MOBILE,/var/tmp/asterisk/message26) exten => 8106,n,Set(DB(mobile/${CALLERID(num)})=${MOBILE}) exten => 8106,n,Playback(/var/tmp/asterisk/message27) exten => 8106,n,SayDigits(${CALLERID(num)}) exten => 8106,n,Playback(/var/tmp/asterisk/message28) exten => 8106,n,SayDigits(${DB(mobile/${CALLERID(num)})}) ... exten => s,n,Dial(${ARG1},,tTkK) [macro-localcall] ; ${ARG1} ; ${ARG2} ;exten => s,1,Answer ;exten => s,n,Monitor(wav,monitor,m) ;exten => s,n,Dial(SIP/${ARG1},4,tTkK) ;exten => s,n,NoOp(Dial Status: ${DIALSTATUS}) ^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 |
#; must also preload pbx_config.so and chan_local.so (or pbx_ael.so, pbx_lua.so,
l3script: y: command not found |
#nano /etc/asterisk/extensions.conf
|
#[local]
|
#; must also preload pbx_config.so and chan_local.so (or pbx_ael.so, pbx_lua.so,
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 debian7 (pid = 13033) ... -- Registered extension context 'ael-dundi-e164-switch'; registrar: pbx_ael -- merging incls/swits/igpats from old(ael-dundi-e164-switch) to new(ael-dundi-e164-switch) context, registrar = pbx_lua -- Including switch 'DUNDi/e164' in context 'ael-dundi-e164-switch' -- Registered extension context 'ael-dundi-e164-local'; registrar: pbx_ael -- merging incls/swits/igpats from old(ael-dundi-e164-local) to new(ael-dundi-e164-local) context, registrar = pbx_lua -- Including context 'ael-dundi-e164-canonical' in context 'ael-dundi-e164-local' -- Including context 'ael-dundi-e164-customers' in context 'ael-dundi-e164-local' -- Including context 'ael-dundi-e164-via-pstn' in context 'ael-dundi-e164-local' debian7*CLI> quit Executing last minute cleanups |
#nano /etc/asterisk/extensions.conf.local
--- /tmp/l3-saved-6759.14009.19904 2014-04-26 09:18:15.484714631 +0300 +++ /etc/asterisk/extensions.conf.local 2014-04-26 09:18:23.620714768 +0300 @@ -1,5 +1,5 @@ [local] -exten => 3199,1,Dial(SIP/3101&SIP/3102 +exten => 3199,1,Dial(SIP/3101&SIP/3102) exten => 3199,n,Hangup exten => 3198,1,Answer |
#[local]
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 debian7 (pid = 13033) ... == Using SIP RTP CoS mark 5 -- SIP/3102-00000016 is ringing -- Nobody picked up in 15000 ms -- Stopped music on hold on SIP/3101-00000010 -- agent_call, call to agent '007' call on 'SIP/3101-00000010' -- <SIP/3101-00000010> Playing 'beep.slin' (language 'ru') -- Agent/007 answered SIP/3102-00000014 -- Stopped music on hold on SIP/3102-00000014 debian7*CLI> quit Executing last minute cleanups |
#nano /etc/asterisk/queues.conf
--- /tmp/l3-saved-6759.16054.30836 2014-04-26 09:23:16.580719718 +0300 +++ /etc/asterisk/queues.conf 2014-04-26 09:23:29.976719944 +0300 @@ -536,8 +536,8 @@ ; available, but consider with penalty [queue1] -member => SIP/3101 -member => SIP/3102 +;member => SIP/3101 +;member => SIP/3102 member => Agent/007 |
#; must also preload pbx_config.so and chan_local.so (or pbx_ael.so, pbx_lua.so,
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 debian7 (pid = 13033) ... -- Stopped music on hold on SIP/3101-0000001e -- agent_call, call to agent '007' call on 'SIP/3101-0000001e' -- <SIP/3101-0000001e> Playing 'beep.slin' (language 'ru') -- Agent/007 answered SIP/santiago-0000001f -- Stopped music on hold on SIP/santiago-0000001f == Spawn extension (gr_relay, 3198, 2) exited non-zero on 'SIP/santiago-0000001f' == Agent '007' logged out == Spawn extension (gr1, 8307, 2) exited non-zero on 'SIP/3101-0000001e' debian7*CLI> quit Executing last minute cleanups |
#nano /etc/asterisk/extensions.conf.local
|
#[local]
|
#nano /tmp/1.call
--- /dev/null 2014-04-22 13:06:30.798645062 +0300 +++ /tmp/1.call 2014-04-26 09:34:39.948731265 +0300 @@ -0,0 +1,4 @@ +Channel: SIP/1101 +Extension: 8107 +Context: internal + |
#Channel: SIP/1101
Channel: SIP/1101 Extension: 8107 Context: internal |
#cp /tmp/1.call /var/spool/asterisk/outgoing/
|
#asterisk -rvvvv^C
|
#^C
|
#ls -l /var/spool/asterisk/outgoing/
total 0 |
#ls -l\
> ^C |
#ls -l
total 16164 -rw-r--r-- 1 root root 0 Apr 24 15:31 1.txt -rw-r--r-- 1 root root 16543475 Apr 24 14:13 asterisk-core-sounds-ru-wav-current.tar.gz -rw-r--r-- 1 root root 5272 Apr 22 13:54 install |
#nano 1.txt
|
#nano 1.txt
--- /tmp/l3-saved-6759.18147.3955 2014-04-26 09:37:25.944734069 +0300 +++ 1.txt 2014-04-26 09:37:43.876734372 +0300 @@ -0,0 +1,4 @@ +Channel: SIP/3101 +Extension: 8107 +Context: internal + |
#Channel: SIP/3101
|
#cp /tmp/1.call /var/spool/asterisk/outgoing/
|
#nano 1.call
|
#Channel: SIP/3101
|
#nano 1.call
|
#Channel: SIP/3101
|
#who
user tty7 Apr 22 13:07 (:0) root pts/0 Apr 23 11:49 (:0:S.0) user pts/1 Apr 24 16:38 (:0) user pts/4 Apr 23 09:57 (:0) root pts/5 Apr 25 16:43 (teach:S.1) |
#pwd
/root |
#cp /root/1.call /var/spool/asterisk/outgoing/
|
#cat /usr/local/bin/call-all
for N in kiev/{1,2,3}{1,2,3}0{1,2} do N=`echo $N | sed s@kiev/11@11@` FILENAME=/tmp/$RANDOM$RANDOM.call cat <<EOF > $FILENAME Channel: SIP/$N Extension: 8107 Context: internal EOF chown asterisk:asterisk $FILENAME mv $FILENAME /var/spool/asterisk/outgoing/ done |
#crontab -l
no crontab for root |
#nano /usr/local/bin/call-all
--- /tmp/l3-saved-6759.11985.25545 2014-04-26 09:58:09.432755080 +0300 +++ /usr/local/bin/call-all 2014-04-26 09:58:49.852755766 +0300 @@ -1,3 +1,5 @@ +#!/bin/bash + for N in kiev/{1,2,3}{1,2,3}0{1,2} do |
#!/bin/bash
|
#!/bin/bash
|
#!/bin/bash
|
#apt-get install subversion
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libsvn1 Suggested packages: subversion-tools The following NEW packages will be installed: libsvn1 subversion 0 upgraded, 2 newly installed, 0 to remove and 5 not upgraded. ... Get:2 http://192.168.12.254/debian/ wheezy/main subversion amd64 1.6.17dfsg-4+deb7u4 [1320 kB] Fetched 2253 kB in 0s (34.5 MB/s) Selecting previously unselected package libsvn1:amd64. (Reading database ... 138526 files and directories currently installed.) Unpacking libsvn1:amd64 (from .../libsvn1_1.6.17dfsg-4+deb7u4_amd64.deb) ... Selecting previously unselected package subversion. Unpacking subversion (from .../subversion_1.6.17dfsg-4+deb7u4_amd64.deb) ... Processing triggers for man-db ... Setting up libsvn1:amd64 (1.6.17dfsg-4+deb7u4) ... Setting up subversion (1.6.17dfsg-4+deb7u4) ... |
#cd /s
sbin/ selinux/ srv/ sys/ |
#cd /usr/
bin/ games/ include/ lib/ local/ sbin/ share/ src/ |
#cd /usr/src/
|
#svn checkout http://chan-datacard.googlecode.com/svn/trunk/ c
A c/__helpers.c A c/__char_conv.c A c/configure A c/chan_datacard.h A c/Makefile.in A c/__cli.c A c/COPYRIGHT.txt A c/__channel.c A c/__manager.c A c/__at_fifo_queue.c ... A c/__at_response.c A c/__ringbuffer.c A c/README.txt A c/etc A c/etc/datacard.conf A c/__ringbuffer.h A c/chan_datacard.c A c/__at_parse.c A c/__at_read.c Checked out revision 191. |
#han-datacard-read-only
l3script: han-datacard-read-only: command not found |
#ls -l
total 72 drwxr-xr-x 4 root root 4096 Apr 26 12:29 c -rw-r--r-- 1 root root 69129 May 9 2012 vpb-driver.tar.bz2 |
#svn checkout http://chan-datacard.googlecode.com/svn/trunk/ c
Checked out revision 191. |
#svn checkout http://chan-datacard.googlecode.com/svn/trunk/ chan-datacard-read-only
A chan-datacard-read-only/__helpers.c A chan-datacard-read-only/__char_conv.c A chan-datacard-read-only/configure A chan-datacard-read-only/chan_datacard.h A chan-datacard-read-only/Makefile.in A chan-datacard-read-only/__cli.c A chan-datacard-read-only/COPYRIGHT.txt A chan-datacard-read-only/__channel.c A chan-datacard-read-only/__manager.c A chan-datacard-read-only/__at_fifo_queue.c ... A chan-datacard-read-only/__at_response.c A chan-datacard-read-only/__ringbuffer.c A chan-datacard-read-only/README.txt A chan-datacard-read-only/etc A chan-datacard-read-only/etc/datacard.conf A chan-datacard-read-only/__ringbuffer.h A chan-datacard-read-only/chan_datacard.c A chan-datacard-read-only/__at_parse.c A chan-datacard-read-only/__at_read.c Checked out revision 191. |
#ls- l
l3script: ls-: command not found |
#ls -l
total 76 drwxr-xr-x 4 root root 4096 Apr 26 12:29 c drwxr-xr-x 4 root root 4096 Apr 26 12:31 chan-datacard-read-only -rw-r--r-- 1 root root 69129 May 9 2012 vpb-driver.tar.bz2 |
#cd chan-datacard-read-only/
|
#apt-get install asterisk-dev
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: asterisk-dev 0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded. Need to get 959 kB of archives. After this operation, 2131 kB of additional disk space will be used. Get:1 http://192.168.12.254/debian/ wheezy/main asterisk-dev all 1:1.8.13.1~dfsg1-3+deb7u3 [959 kB] Fetched 959 kB in 0s (26.5 MB/s) Selecting previously unselected package asterisk-dev. (Reading database ... 138614 files and directories currently installed.) Unpacking asterisk-dev (from .../asterisk-dev_1%3a1.8.13.1~dfsg1-3+deb7u3_all.deb) ... Setting up asterisk-dev (1:1.8.13.1~dfsg1-3+deb7u3) ... |
#./configure
configure complete, now type 'make' |
#./configure
configure complete, now type 'make' |
#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 gcc -shared -Xlinker -x chan_datacard.o -o chan_datacard.so chmod 755 chan_datacard.so |
#make install
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 gcc -shared -Xlinker -x chan_datacard.o -o chan_datacard.so chmod 755 chan_datacard.so install -d /usr/lib/asterisk/modules/ install -m 755 chan_datacard.so /usr/lib/asterisk/modules/ |
#fine / -name datacard
l3script: fine: command not found |
#find / -name datacard
|
#apt-get install asterisk-dev^C
|
#find / -name datacard.conf
/usr/src/chan-datacard-read-only/etc/datacard.conf /usr/src/c/etc/datacard.conf |
#cp etc/datacard.conf /etc/asterisk/
|
#pwd
/usr/src/chan-datacard-read-only |
#nano /etc/asterisk/datacard.conf
--- /tmp/l3-saved-6759.7306.29354 2014-04-26 13:14:47.160954439 +0300 +++ /etc/asterisk/datacard.conf 2014-04-26 13:17:22.508957065 +0300 @@ -38,13 +38,13 @@ ;jblog = no ; Enables jitterbuffer frame logging. Defaults to "no". ;----------------------------------------------------------------------------------- -[E1550_t](!) -context=incoming-datacard ; context for incoming calls -rxgain=3 ; increase the incoming volume -txgain=-3 ; increase the outgoint volume -autodeletesms=yes ; auto delete incoming sms -resetdatacard=yes ; reset datacard during initialization -u2diag=0 ; set U2DIAG parameter (0 = disable everything except modem function) +;[E1550_t](!) +;context=incoming-datacard ; context for incoming calls +;rxgain=3 ; increase the incoming volume +;txgain=-3 ; increase the outgoint volume +;autodeletesms=yes ; auto delete incoming sms +;resetdatacard=yes ; reset datacard during initialization +;u2diag=0 ; set U2DIAG parameter (0 = disable everything except modem function) [datacard0](E1550_t) @@ -53,19 +53,19 @@ group=1 ; calling group -[datacard1] -context=incoming-datacard ; context for incoming calls +;[datacard1] +;context=incoming-datacard ; context for incoming calls ;language=de ; Use German as default language -audio=/dev/ttyUSB4 ; tty port for audio connection -data=/dev/ttyUSB5 ; tty port for AT commands -group=2 ; calling group -rxgain=10 ; increase the incoming volume -txgain=10 ; increase the outgoint volume -autodeletesms=yes ; auto delete incoming sms -resetdatacard=yes ; reset datacard during initialization -u2diag=0 ; set U2DIAG parameter (0 = disable everything except modem function) -usecallingpres=yes ; use the caller ID presentation or not -callingpres=allowed_passed_screen ; set caller ID presentation -disablesms=yes ; chan_datacard has currently a bug with SMS reception. When a SMS gets in during a +;audio=/dev/ttyUSB4 ; tty port for audio connection +;data=/dev/ttyUSB5 ; tty port for AT commands +;group=2 ; calling group +;rxgain=10 ; increase the incoming volume +;txgain=10 ; increase the outgoint volume +;autodeletesms=yes ; auto delete incoming sms +;resetdatacard=yes ; reset datacard during initialization +;u2diag=0 ; set U2DIAG parameter (0 = disable everything except modem function) +;usecallingpres=yes ; use the caller ID presentation or not +;callingpres=allowed_passed_screen ; set caller ID presentation +;disablesms=yes ; chan_datacard has currently a bug with SMS reception. When a SMS gets in during a ; call chan_datacard might crash. Enable this option to disable sms reception. ; Default = no |
#;jbimpl = fixed ; Jitterbuffer implementation, used on the receiving side of a Datacard
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 debian7 (pid = 13033) Verbosity is at least 5 debian7*CLI> quit Executing last minute cleanups |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#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. ========================================================================= Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?) |
for N in kiev/{1,2,3}{1,2,3}0{1,2} do N=`echo $N | sed s@kiev/11@11@` FILENAME=/tmp/$RANDOM$RANDOM.call cat <<EOF > $FILENAME Channel: SIP/$N Extension: 8107 Context: internal EOF chown asterisk:asterisk $FILENAME mv $FILENAME /var/spool/asterisk/outgoing/ done
Время первой команды журнала | 15:19:43 2014- 4-25 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 12:17:46 2014- 4-26 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 3.96 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 4.95 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.45 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.69 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ 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 |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008