/l3/users/Kzn/Asterisk22/debian2/root :1 :2 :3 :4 :5 :6 :7 |
|
#grep dir /etc/asterisk/musiconhold.conf
; files -- read files from a directory in any Asterisk supported ; This plays files directly from the specified directory, no external ; (same as a sorted directory listing), and no volume or other ; to the 'astdatalibdir' in asterisk.conf, which defaults to directory=/var/lib/asterisk/moh/ ;directory=moh ;directory=moh ; Note that with mode=custom, a directory is not required, such as when reading ;directory=/var/lib/asterisk/mohmp3 ;directory=/var/lib/asterisk/mohmp3 |
#grep dir /etc/asterisk/musiconhold.conf
; files -- read files from a directory in any Asterisk supported ; This plays files directly from the specified directory, no external ; (same as a sorted directory listing), and no volume or other ; to the 'astdatalibdir' in asterisk.conf, which defaults to directory=/var/lib/asterisk/moh/ ;directory=moh ;directory=moh ; Note that with mode=custom, a directory is not required, such as when reading ;directory=/var/lib/asterisk/mohmp3 ;directory=/var/lib/asterisk/mohmp3 |
#asterisk -rvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian2 (pid = 2456) Verbosity is at least 4 debian2*CLI> moh reload debian2*CLI> moh show classes debian2*CLI> quit Executing last minute cleanups |
#ls /var/lib/asterisk/moh/
1.gsm |
#vim /etc/asterisk/musiconhold.conf
|
#; ; they will switch to listening to this music class.
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian2 (pid = 2456) Verbosity is at least 4 debian2*CLI> moh reload debian2*CLI> moh show classes debian2*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/musiconhold.conf
|
#/etc/init.d/asterisk rerestart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#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 debian2 (pid = 6611) ... -- Executing [s@macro-outgoingcall:4] Dial("SIP/havana-00000018", "SIP/berlin/2301") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/berlin/2301 -- SIP/berlin-00000019 is ringing -- SIP/berlin-00000019 answered SIP/havana-00000018 == Spawn extension (macro-outgoingcall, s, 4) exited non-zero on 'SIP/havana-00000018' in macro 'outgoingcall' == Spawn extension (gr_relay, 2301, 1) exited non-zero on 'SIP/havana-00000018' > Saved useragent "Linphone/3.7.0 (belle-sip/1.3.0)" for peer 1202 debian2*CLI> quit Executing last minute cleanups |
#мÑмÑvim /etc/asterisk/sip.conf
[1201]riend [1201] secret=1234 host=dynamic context=gr1 [1202] [1202]ge=ru callgroup=1 ; гÑÑппа коÑоÑÑÑ Ð¼Ð¾Ð³ÑÑ Ð¿ÐµÑÐµÑ Ð²Ð°ÑÑваÑÑ [1202] [1202] [1202] [1203]riend [1203] secret=1234 [1203] callgroup=1 pickupgroup=1 ; гÑÑппа, коÑоÑÑÑ Ð¼Ñ Ð¼Ð¾Ð¶ÐµÐ¼ пеÑÐµÑ Ð²Ð°ÑÑваÑÑ "/etc/asterisk/sip.conf" 61L, 816C запиÑано 32,0-1 12% |
#vim /etc/asterisk/f
![]() |
#vim /etc/asterisk/features.conf
--- /tmp/l3-saved-4312.16678.18603 2014-04-25 15:39:09.654141848 +0300 +++ /etc/asterisk/features.conf 2014-04-25 15:39:41.246141785 +0300 @@ -80,8 +80,8 @@ ; (default is 3 seconds) ;xfersound = beep ; to indicate an attended transfer is complete ;xferfailsound = beeperr ; to indicate a failed transfer -;pickupexten = *8 ; Configure the pickup extension. (default is *8) -;pickupsound = beep ; to indicate a successful pickup (default: no sound) +pickupexten = *8 ; Configure the pickup extension. (default is *8) +pickupsound = beep ; to indicate a successful pickup (default: no sound) ;pickupfailsound = beeperr ; to indicate that the pickup failed (default: no sound) ;featuredigittimeout = 1000 ; Max time (ms) between digits for ; feature activation (default is 1000 ms) |
#фыфіasterisk -rvvvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian2 (pid = 6611) ... -- Executing [s@macro-outgoingcall:3] Monitor("SIP/1201-00000024", "wav,1102-1201-"2014-04-25-15:44:21",m") in new stack -- Executing [s@macro-outgoingcall:4] Dial("SIP/1201-00000024", "SIP/nikolaev/1102") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/nikolaev/1102 -- SIP/nikolaev-00000025 is ringing -- SIP/nikolaev-00000025 answered SIP/1201-00000024 == Spawn extension (macro-outgoingcall, s, 4) exited non-zero on 'SIP/1201-00000024' in macro 'outgoingcall' == Spawn extension (gr1, 1102, 1) exited non-zero on 'SIP/1201-00000024' debian2*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/ext
![]() |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4312.6495.30874 2014-04-25 15:44:53.226141163 +0300 +++ /etc/asterisk/extensions.conf 2014-04-25 15:45:23.858141103 +0300 @@ -23,7 +23,7 @@ exten => s,n,Set(CALLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H:%M:%S")}) ;exten => s,n,Set(CALLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${EPOCH}) exten => s,n,Monitor(wav,${CALLFILENAME},m) -exten => s,n,Dial(SIP/${ARG1},4) +exten => s,n,Dial(SIP/${ARG1},40) exten => s,n,NoOp(Dial Status: ${DIALSTATUS}) exten => s,n,Goto(s-${DIALSTATUS},1) |
#asterisk -rvvvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian2 (pid = 6611) ... -- Called SIP/1202 -- SIP/1202-0000002b is ringing == Using SIP RTP CoS mark 5 [Apr 25 15:46:20] NOTICE[6993]: features.c:7244 ast_pickup_call: pickup SIP/1202-0000002b attempt by SIP/1201-0000002c -- SIP/1201-0000002c answered SIP/nikolaev-0000002a -- <SIP/1201-0000002c> Playing 'beep.slin' (language 'ru') == Spawn extension (macro-localcall, s, 5) exited non-zero on 'SIP/nikolaev-0000002a' in macro 'localcall' == Spawn extension (gr_relay, 1202, 1) exited non-zero on 'SIP/nikolaev-0000002a' debian2*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4312.29924.284 2014-04-25 15:56:51.586139732 +0300 +++ /etc/asterisk/extensions.conf 2014-04-25 16:00:32.742139288 +0300 @@ -9,8 +9,7 @@ exten => s,1,Answer 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(${ARG1}) - +exten => s,n,Dial(${ARG1,,tT}) [macro-localcall] @@ -23,14 +22,14 @@ exten => s,n,Set(CALLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H:%M:%S")}) ;exten => s,n,Set(CALLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${EPOCH}) exten => s,n,Monitor(wav,${CALLFILENAME},m) -exten => s,n,Dial(SIP/${ARG1},40) +exten => s,n,Dial(SIP/${ARG1},40,tT) exten => s,n,NoOp(Dial Status: ${DIALSTATUS}) exten => s,n,Goto(s-${DIALSTATUS},1) exten => s-NOANSWER,1,NoOp(No Answer) exten => s-NOANSWER,n,VoiceMail(${MACRO_EXTEN}@default) -exten => s-CONGESTION,1,Dial(SIP/${mobile/${CALLERID(num)}}) +exten => s-CONGESTION,1,Dial(SIP/${mobile/${CALLERID(num)}},,tT) exten => s-ANSWER,1,Hangup exten => s-BUSY,1,Busy @@ -128,7 +127,7 @@ exten => 8200,1,GotoIfTime(9:00-17:00,mon-fri,*,*?open) exten => 8200,n,Goto(menu,s,1) -exten => 8200,n(open),Dial(SIP/1201) +exten => 8200,n(open),Dial(SIP/1201,,tT) |
#vim /etc/asterisk/
![]() |
#vim /etc/asterisk/f
![]() |
#vim /etc/asterisk/features.conf
--- /tmp/l3-saved-4312.5480.5096 2014-04-25 16:16:10.558137417 +0300 +++ /etc/asterisk/features.conf 2014-04-25 16:17:22.638137273 +0300 @@ -123,7 +123,7 @@ ;disconnect => *0 ; Disconnect (default is *) -- Make sure to set the H and/or h option in the Dial() or Queue() app call! ;automon => *1 ; One Touch Record a.k.a. Touch Monitor -- Make sure to set the W and/or w option in the Dial() or Queue() app call! atxfer => *2 ; Attended transfer -- Make sure to set the T and/or t option in the Dial() or Queue() app call! -;parkcall => #72 ; Park call (one step parking) -- Make sure to set the K and/or k option in the Dial() app call! +parkcall => #72 ; Park call (one step parking) -- Make sure to set the K and/or k option in the Dial() app call! ;automixmon => *3 ; One Touch Record a.k.a. Touch MixMonitor -- Make sure to set the X and/or x option in the Dial() or Queue() app call! [applicationmap] |
#vim /etc/asterisk/extensions.conf
|
#;comebacktoorigin = yes ; Setting this option configures the behavior of call parking when the
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian2 (pid = 6611) ... -- Added extension '701' priority 1 to parkedcalls -- <SIP/1201-00000061> Playing 'digits/7.slin' (language 'ru') -- <SIP/1201-00000061> Playing 'digits/0.slin' (language 'ru') -- <SIP/1201-00000061> Playing 'digits/1.slin' (language 'ru') == Spawn extension (macro-localcall, s, 5) exited non-zero on 'Parked/SIP/nikolaev-00000060<ZOMBIE>' in macro 'localcall' == Spawn extension (gr_relay, 1201, 1) exited non-zero on 'Parked/SIP/nikolaev-00000060<ZOMBIE>' -- Stopped music on hold on SIP/nikolaev-00000060 == SIP/nikolaev-00000060 got tired of being parked debian2*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4312.5020.3577 2014-04-25 16:35:24.762135115 +0300 +++ /etc/asterisk/extensions.conf 2014-04-25 16:37:25.618134874 +0300 @@ -139,6 +139,9 @@ exten => 8200,n(open),Dial(SIP/1201,,kKtT) +exten => 8201,1,Dial(SIP/1201&SIP/1202@SIP/2201@SIP/2202@SIP/3201/SIP/3202) + + ; ${VARIABLE:start:length} |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4312.8305.116 2014-04-25 16:38:11.522134781 +0300 +++ /etc/asterisk/extensions.conf 2014-04-25 16:39:03.850134678 +0300 @@ -139,7 +139,6 @@ exten => 8200,n(open),Dial(SIP/1201,,kKtT) -exten => 8201,1,Dial(SIP/1201&SIP/1202@SIP/2201@SIP/2202@SIP/3201/SIP/3202) |
#asterisk -rvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian2 (pid = 6611) ... -- Executing [1299@gr_relay:1] Dial("SIP/nikolaev-00000064", "SIP/1201&SIP/1202") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/1201 == Using SIP RTP CoS mark 5 -- Called SIP/1202 -- SIP/1201-00000065 is ringing -- SIP/1202-00000066 is ringing == Spawn extension (gr_relay, 1299, 1) exited non-zero on 'SIP/nikolaev-00000064' debian2*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf.local
--- /tmp/l3-saved-4312.25295.10840 2014-04-25 16:40:22.394134520 +0300 +++ /etc/asterisk/extensions.conf.local 2014-04-25 16:41:10.402134426 +0300 @@ -2,7 +2,7 @@ -exten => 1299,1,Dial(SIP/1201&SIP/1202) +exten => 1299,1,Dial(SIP/1201&SIP/1202&SIP/2201&SIP/2202&SIP/3201&SIP/3202) exten => 1299,n,Hangup exten => _12XX,1,Macro(localcall,${EXTEN}) |
#vim /etc/asterisk/extensions.conf.local
--- /tmp/l3-saved-4312.5815.7371 2014-04-25 16:42:14.286134296 +0300 +++ /etc/asterisk/extensions.conf.local 2014-04-25 16:44:21.466134043 +0300 @@ -2,7 +2,7 @@ -exten => 1299,1,Dial(SIP/1201&SIP/1202&SIP/2201&SIP/2202&SIP/3201&SIP/3202) +exten => 1299,1,Dial(SIP/1201&SIP/1202&havanna/3201&havanna/3202) exten => 1299,n,Hangup exten => _12XX,1,Macro(localcall,${EXTEN}) |
#vim /etc/asterisk/extensions.conf
|
#vim /etc/asterisk/extensions.conf
|
#vim /etc/asterisk/queues.conf"
![]() |
#vim /etc/asterisk/queues.conf"
--- /tmp/l3-saved-4312.26163.22542 2014-04-25 16:52:33.562133061 +0300 +++ /etc/asterisk/queues.conf 2014-04-25 16:53:43.482132921 +0300 @@ -534,4 +534,7 @@ ;member => Agent/@1 ; Any agent in group 1 ;member => Agent/:1,1 ; Any agent in group 1, wait for first ; available, but consider with penalty +[queue1] +member => SIP/1401 +member => SIP/1402 |
#vim /etc/asterisk/queues.conf"
![]() |
#asterisk -rvvv
; если вы пишете *, это значит любое подходит ; везде , и | вы можете использовать как взаимозаменяемые ;exten => 8200,1,Goto(menu,s,1) ;Stavim menu po vremeni raboti ; ${VARIABLE:start:length} exten => 8107,1,AnswerTime(9:00-17:00,mon-fri,*,*?open) exten => 8107,n,Queue(queue1) exten => 8200,n,Goto(menu,s,1) #include "/etc/asterisk/extensions.conf.local" exten => 8200,n(open),Dial(SIP/1201,,kKtT) [menu] "/etc/asterisk/extensions.conf" 266L, 7530C записано |
#[queue1]
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian2 (pid = 6611) ... == Using SIP RTP CoS mark 5 -- Executing [8017@gr1:1] Answer("SIP/1201-0000007d", "") in new stack -- Executing [8017@gr1:2] Record("SIP/1201-0000007d", "/var/tmp/asterisk/message17:gsm,2") in new stack -- <SIP/1201-0000007d> Playing 'beep.slin' (language 'ru') -- Executing [8017@gr1:3] Playback("SIP/1201-0000007d", "/var/tmp/asterisk/message17") in new stack -- <SIP/1201-0000007d> Playing '/var/tmp/asterisk/message17.gsm' (language 'ru') -- Executing [8017@gr1:4] Hangup("SIP/1201-0000007d", "") in new stack == Spawn extension (gr1, 8017, 4) exited non-zero on 'SIP/1201-0000007d' debian2*CLI> quit Executing last minute cleanups |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#vim /etc/asterisk/queue
![]() |
#vim /etc/asterisk/queue
![]() |
#vim /etc/asterisk/queue
![]() |
#vim /etc/asterisk/queues.conf
--- /tmp/l3-saved-4312.10170.17447 2014-04-25 17:02:21.842131887 +0300 +++ /etc/asterisk/queues.conf 2014-04-25 17:02:34.954131861 +0300 @@ -536,5 +536,5 @@ ; available, but consider with penalty [queue1] -member => SIP/1401 -member => SIP/1402 +member => SIP/1201 +member => SIP/1202 |
#asterisk -rvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian2 (pid = 8126) Verbosity was 0 and is now 3 debian2*CLI> queue show queue1 queue1 has 0 calls (max unlimited) in 'linear' strategy (6s holdtime, 1s talktime), W:0, C:1, A:0, SL:0.0% within 0s Members: SIP/1201 (Not in use) has taken no calls yet SIP/1202 (Not in use) has taken 1 calls (last was 135 secs ago) No Callers debian2*CLI> quit Executing last minute cleanups |
#[queue1]
[general] ; ; Global settings for call queues ; ; Persistent Membersr call queues ; Store each dynamic member in each queue in the astdb so that ; when asterisk is restarted, each member will be automatically ; read into their recorded queues. Default is 'yes'. ; Persistent Members persistentmembers = yes ... ; recent, etc, you should list all the agents in this file individually and not ; use agent groups. ; ;member => Agent/@1 ; Any agent in group 1 ;member => Agent/:1,1 ; Any agent in group 1, wait for first ; available, but consider with penalty [queue1] strategy=linear member => SIP/1201 member => SIP/1202 |
#vim /etc/asterisk/queues.conf
--- /tmp/l3-saved-4312.31812.11444 2014-04-26 08:56:00.666017715 +0300 +++ /etc/asterisk/queues.conf 2014-04-26 09:05:34.426016567 +0300 @@ -538,7 +538,8 @@ strategy=linear - - member => SIP/1201 member => SIP/1202 + +member => Agent/1 +;регится оператор что бы не поднимать трубку, оработка очереди |
#vim /etc/asterisk/agents.conf
--- /tmp/l3-saved-4312.6538.23797 2014-04-26 09:05:54.358016527 +0300 +++ /etc/asterisk/agents.conf 2014-04-26 09:07:15.210016368 +0300 @@ -103,3 +103,8 @@ ; ;agent => 1001,4321,Mark Spencer ;agent => 1002,4321,Will Meadows + + + +agent => 007,1234,James Bond + |
#~
/8107 exten => 8200,1,GotoIfTime(9:00-17:00,mon-fri,*,*?open) exten => 8200,n,Goto(menu,s,1) exten => 8200,n(open),Dial(SIP/1201,,kKtT) exten => 8107,n,Queue(queue1) exten => _83XX,1,Answer exten => _83XX,n,AgentLogin(0${EXTEN:2}) ; ${VARIABLE:start:length} ; ${VARIABLE:start:length} "/etc/asterisk/extensions.conf" 269L, 7596C записано |
#vim /etc/asterisk/extensions.conf
|
#; 8002 Главное меню (нажмите 1, ...)
exten => _83XX,n,AgentLogin(0${EXTEN:2}) ; ${VARIABLE:start:length} #include "/etc/asterisk/extensions.conf.local" ;exten => 8307,n,AgentLogin(007) ;exten => 8308,n,AgentLogin(008) ;exten => _83XY,n,AgentLogin(0XY) ;XY = ${EXTEN:2} exten => _83XY,n,AgentLogin(0XY) XY = ${EXTEN:2} [menu] "/etc/asterisk/extensions.conf" 276L, 7716C записано |
#vim /etc/asterisk/extensions.conf
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4312.15057.6784 2014-04-26 09:15:40.506015357 +0300 +++ /etc/asterisk/extensions.conf 2014-04-26 09:16:20.238015278 +0300 @@ -143,20 +143,20 @@ exten => 8107,n,Queue(queue1) + +; слоты +; для будущих 100 агентов (000-099) +; навырост + exten => _83XX,1,Answer exten => _83XX,n,AgentLogin(0${EXTEN:2}) - ;exten => 8307,n,AgentLogin(007) ;exten => 8308,n,AgentLogin(008) ;exten => _83XY,n,AgentLogin(0XY) ;XY = ${EXTEN:2} - - ; ${VARIABLE:start:length} - - #include "/etc/asterisk/extensions.conf.local" |
#vim /etc/asterisk/queues.conf
--- /tmp/l3-saved-4312.10109.9703 2014-04-26 09:16:33.566015253 +0300 +++ /etc/asterisk/queues.conf 2014-04-26 09:17:05.918015187 +0300 @@ -541,5 +541,6 @@ member => SIP/1201 member => SIP/1202 -member => Agent/1 +member => Agent/007 + ;регится оператор что бы не поднимать трубку, оработка очереди |
#asterisk -rvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian2 (pid = 8126) ... -- merging incls/swits/igpats from old(parkedcalls) to new(parkedcalls) context, registrar = pbx_config -- Added extension '700' priority 1 to parkedcalls -- Time to scan old dialplan and merge leftovers back into the new: 0.000092 sec -- Time to restore hints and swap in new dialplan: 0.000003 sec -- Time to delete the old dialplan: 0.000070 sec -- Total time merge_contexts_delete: 0.000165 sec debian2*CLI> queue No such command 'queue ' (type 'core show help queue' for other possible commands) debian2*CLI> quit Executing last minute cleanups |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk-кммм
![]() l3script: $'asterisk-\320\272\320\274\320\274\320\274': команда не найдена |
#asterisk-км -rvvv
![]() l3script: asterisk-: команда не найдена |
#asterisk -rvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian2 (pid = 9907) ... -- Executing [s@macro-outgoingcall:2] Set("SIP/1201-0000000d", "CALLFILENAME=1198-1201-"2014-04-26-09:24:24"") in new stack -- Executing [s@macro-outgoingcall:3] Monitor("SIP/1201-0000000d", "wav,1198-1201-"2014-04-26-09:24:24",m") in new stack -- Executing [s@macro-outgoingcall:4] Dial("SIP/1201-0000000d", "SIP/nikolaev/1198,,kKtT") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/nikolaev/1198 -- SIP/nikolaev-0000000e answered SIP/1201-0000000d == Spawn extension (macro-outgoingcall, s, 4) exited non-zero on 'SIP/1201-0000000d' in macro 'outgoingcall' == Spawn extension (gr1, 1198, 1) exited non-zero on 'SIP/1201-0000000d' debian2*CLI> quit Executing last minute cleanups |
#[local]
![]() Channel: SIP/1201 Extension: 8200 Context: internal ^C |
#less /tmp/1.call
|
#chown asterisk:asterisk /tmp/1.call
|
#chown asterisk:asterisk /tmp/1.call
|
#cp -p /tmp/1.call /var/spool/asterisk/outgoing/
|
#vim /etc/asterisk/extensions.conf
|
#cat /usr/local/bin/call-all
![]() 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 > echo $N > > # cat <<EOF > $FILENAME > # Channel: $N > # Extension: 8107 > # Context: internal ... kiev/2201 kiev/2202 kiev/2301 kiev/2302 kiev/3101 kiev/3102 kiev/3201 kiev/3202 kiev/3301 kiev/3302 |
#bash /usr/local/bin/call-all
![]() bash: /usr/local/bin/call-all: Нет такого файла или каталога |
##bash /usr/local/bin/call-all
|
##bash /usr/local/bin/call-all
|
##ÐвÑообÑзвон кÑÑи ÑнаÑодÑ
|
##Автообзвон кучи народу
|
##Автообзвон кучи народу
|
#скcrontab -e
# Edit this file to introduce tasks to be run by cron. # # Each task to run has to be defined through a single line # indicating with different fields when the task will be run # and what command to run for the task # # To define the time you can provide concrete values for # minute (m), hour (h), day of month (dom), month (mon), # and day of week (dow) or use '*' in these fields (for 'any').# # Notice that tasks will be started based on the cron's system ... # For example, you can run a backup of all your user accounts # at 5 a.m every week with: # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ # # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command * * * * * /usr/local/bin/call-all [ Записано 24 строки ] crontab: installing new crontab |
#crontab -e
# email to the user the crontab file belongs to (unless redirected). # # For example, you can run a backup of all your user accounts # at 5 a.m every week with: # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ # # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command #* * * * * /usr/local/bin/call-all [ Записано 24 строки ] crontab: installing new crontab |
##Автообзвон кучи народу через кронтаб
|
#EDITOR=vim crontab -e
# Output of the crontab jobs (including errors) is sent through # email to the user the crontab file belongs to (unless redirected). #/tmp/crontab.9pTVtd/crontab" 24L, 924C # For example, you can run a backup of all your user accounts # at 5 a.m every week with: # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ # # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command 0 11 8 3 * /usr/local/bin/call-all-girls ~ ~ "crontab.9pTVtd/crontab" 26L, 966C записано crontab: installing new crontab |
#фыasterisk -rvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian2 (pid = 10110) Verbosity was 0 and is now 3 debian2*CLI> debian2*CLI> debian2*CLI> debian2*CLI> debian2*CLI> debian2*CLI> debian2*CLI> quit Executing last minute cleanups |
#less /var/log/asterisk/messages
|
#vim /usr/local/bin/call-all
--- /tmp/l3-saved-4312.26409.4148 2014-04-26 09:58:07.294010275 +0300 +++ /usr/local/bin/call-all 2014-04-26 09:58:21.942010246 +0300 @@ -1,3 +1,5 @@ +#!/bin/bash + for N in berlin/{1,2,3}{1,2,3}0{1,2} do |
#/usr/local/bin/call-all
![]() l3script: /usr/local/bin/call-all: Отказано в доступе |
## bash /usr/local/bin/call-al
|
## Соединяет двух пользователей в один канал
|
#lspci
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09) 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) 00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04) 00:16.3 Serial controller: Intel Corporation 6 Series/C200 Series Chipset Family KT Controller (rev 04) 00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04) 00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04) 00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4) 00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b4) 00:1c.6 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 7 (rev b4) 00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b4) 00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a4) 00:1f.0 ISA bridge: Intel Corporation Q67 Express Chipset Family LPC Controller (rev 04) 00:1f.2 RAID bus controller: Intel Corporation 82801 SATA Controller [RAID mode] (rev 04) 00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 04) 02:00.0 Network controller: Digium, Inc. Device 800a (rev 02) |
#â#lspci
|
##Смотрим карты
|
##СмоÑÑÐlspci
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09) 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) 00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04) 00:16.3 Serial controller: Intel Corporation 6 Series/C200 Series Chipset Family KT Controller (rev 04) 00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04) 00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04) 00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4) 00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b4) 00:1c.6 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 7 (rev b4) 00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b4) 00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a4) 00:1f.0 ISA bridge: Intel Corporation Q67 Express Chipset Family LPC Controller (rev 04) 00:1f.2 RAID bus controller: Intel Corporation 82801 SATA Controller [RAID mode] (rev 04) 00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 04) 02:00.0 Network controller: Digium, Inc. Device 800a (rev 02) |
#apt-get install dahdi-source
![]() Чтение списков пакетов… Готово Построение дерева зависимостей Чтение информации о состоянии… Готово Будут установлены следующие дополнительные пакеты: dahdi-linux fxload НОВЫЕ пакеты, которые будут установлены: dahdi-linux dahdi-source fxload обновлено 0, установлено 3 новых пакетов, для удаления отмечено 0 пакетов, и 6 пакетов не обновлено. Необходимо скачать 1 014 kБ архивов. После данной операции, объём занятого дискового пространства возрастёт на 1 357 kB. Хотите продолжить [Д/н]? н Аварийное завершение. |
#apt-get install dahdi-source
Чтение списков пакетов… Готово Построение дерева зависимостей Чтение информации о состоянии… Готово Будут установлены следующие дополнительные пакеты: dahdi-linux fxload НОВЫЕ пакеты, которые будут установлены: dahdi-linux dahdi-source fxload обновлено 0, установлено 3 новых пакетов, для удаления отмечено 0 пакетов, и 6 пакетов не обновлено. Необходимо скачать 1 014 kБ архивов. После данной операции, объём занятого дискового пространства возрастёт на 1 357 kB. ... (Чтение базы данных … на данный момент установлено 146864 файла и каталога.) Распаковывается пакет fxload (из файла …/fxload_0.0.20081013-1_amd64.deb) … Выбор ранее не выбранного пакета dahdi-linux. Распаковывается пакет dahdi-linux (из файла …/dahdi-linux_1%3a2.6.1+dfsg2-1_all.deb) … Выбор ранее не выбранного пакета dahdi-source. Распаковывается пакет dahdi-source (из файла …/dahdi-source_1%3a2.6.1+dfsg2-1_all.deb) … Обрабатываются триггеры для man-db … Настраивается пакет fxload (0.0.20081013-1) … Настраивается пакет dahdi-linux (1:2.6.1+dfsg2-1) … Настраивается пакет dahdi-source (1:2.6.1+dfsg2-1) … |
## Zaptel/Zapata (старые версии)
|
## DAHDI (более новые)
|
## DAHDI (бÐZaptel/Zapapt-get install dahdi-source
ЧÑение ÑпиÑков пакеÑов⦠ÐоÑово ÐоÑÑÑоение деÑева завиÑимоÑÑей ЧÑение инÑоÑмаÑии о ÑоÑÑоÑнии⦠ÐоÑово Уже ÑÑÑановлена ÑÐ°Ð¼Ð°Ñ Ð½Ð¾Ð²Ð°Ñ Ð²ÐµÑÑÐ¸Ñ dahdi-source. обновлено 0, ÑÑÑановлено 0 новÑÑ Ð¿Ð°ÐºÐµÑов, Ð´Ð»Ñ ÑÐ´Ð°Ð»ÐµÐ½Ð¸Ñ Ð¾ÑмеÑено 0 пакеÑов, и 6 пакеÑов не обновлено. |
##module-assistant auto-install dahdi
|
#m-a a-i dahdi
âââââââââââââââââââ⤠СбоÑка dahdi, Ñаг 2, подождиÑе... ââââââââââââââââââââ âm-a install dahdi â â â â â â â â â â â â â â â â â â â â â â 100% â â â âââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ ÐавеÑÑено Ñ /usr/src/dahdi-modules-3.2.0-4-amd64_2.6.1+dfsg2-1+3.2.54-2_amd64.deb . dpkg -Ei /usr/src/dahdi-modules-3.2.0-4-amd64_2.6.1+dfsg2-1+3.2.54-2_amd64.deb ÐÑÐ±Ð¾Ñ Ñанее не вÑбÑанного пакеÑа dahdi-modules-3.2.0-4-amd64. |
## apt-get install dahdi-source
|
## module-assistant auto-install dahdi
|
## сокращённая версия:
|
## m-a a-i dahdi
|
#apt-get install dahdi
Чтение списков пакетов… Готово Построение дерева зависимостей Чтение информации о состоянии… Готово Уже установлена самая новая версия dahdi. обновлено 0, установлено 0 новых пакетов, для удаления отмечено 0 пакетов, и 6 пакетов не обновлено. |
#apt-get install asterisk-dahdi
Чтение списков пакетов… Готово Построение дерева зависимостей Чтение информации о состоянии… Готово Будут установлены следующие дополнительные пакеты: libopenr2-3 libpri1.4 libss7-1 НОВЫЕ пакеты, которые будут установлены: asterisk-dahdi libopenr2-3 libpri1.4 libss7-1 обновлено 0, установлено 4 новых пакетов, для удаления отмечено 0 пакетов, и 6 пакетов не обновлено. Необходимо скачать 1 252 kБ архивов. После данной операции, объём занятого дискового пространства возрастёт на 2 271 kB. ... Выбор ранее не выбранного пакета libpri1.4. Распаковывается пакет libpri1.4 (из файла …/libpri1.4_1.4.12-2_amd64.deb) … Выбор ранее не выбранного пакета libss7-1. Распаковывается пакет libss7-1 (из файла …/libss7-1_1.0.2-3_amd64.deb) … Выбор ранее не выбранного пакета asterisk-dahdi. Распаковывается пакет asterisk-dahdi (из файла …/asterisk-dahdi_1%3a1.8.13.1~dfsg1-3+deb7u3_amd64.deb) … Настраивается пакет libopenr2-3 (1.3.2-1.1) … Настраивается пакет libpri1.4 (1.4.12-2) … Настраивается пакет libss7-1 (1.0.2-3) … Настраивается пакет asterisk-dahdi (1:1.8.13.1~dfsg1-3+deb7u3) … |
##apt-get install asterisk-dahdi
|
#dahdi_genconf
Empty configuration -- no spans Empty configuration -- no spans |
#lspci
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09) 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) 00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04) 00:16.3 Serial controller: Intel Corporation 6 Series/C200 Series Chipset Family KT Controller (rev 04) 00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04) 00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04) 00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4) 00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b4) 00:1c.6 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 7 (rev b4) 00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b4) 00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04) 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a4) 00:1f.0 ISA bridge: Intel Corporation Q67 Express Chipset Family LPC Controller (rev 04) 00:1f.2 RAID bus controller: Intel Corporation 82801 SATA Controller [RAID mode] (rev 04) 00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 04) 02:00.0 Network controller: Digium, Inc. Device 800a (rev 02) |
#reboot
|
Время первой команды журнала | 14:05:22 2014- 4-25 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 09:53:27 2014- 4-26 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 2.97 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 2.97 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 4.34 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.39 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ find / -name abc |