/l3/users/2014-11-nt-voip/nt-voip/debian3/root :1 :2 :3 :4 :5 |
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-5140.10.24679 2014-11-25 13:52:43.772705595 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 13:54:01.844706517 +0200 @@ -12,7 +12,7 @@ exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) -exten =>_23XX,1,Dial(SIP/${EXTEN}) +exten =>_23XX,1,Dial(SIP/brest/${EXTEN}) |
#asterisk -r
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 debian3 (pid = 2704) Verbosity is at least 3 == Using SIP RTP CoS mark 5 [Nov 25 13:55:03] NOTICE[2765]: chan_sip.c:22753 handle_request_invite: Call from '1301' (192.168.30.100:5060) to extension '230123' rejected because extension not found in context 'default'. == Using SIP RTP CoS mark 5 -- Executing [2302@default:1] Dial("SIP/1301-00000006", "SIP/brest/2302") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/brest/2302 -- SIP/brest-00000007 is ringing == Spawn extension (default, 2302, 1) exited non-zero on 'SIP/1301-00000006' debian3*CLI> Disconnected from Asterisk server |
#vim /etc/asterisk/sip.conf
|
#asterisk -r
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 debian3 (pid = 2704) Verbosity is at least 3 debian3*CLI> dialplan reload Disconnected from Asterisk server |
#vim /etc/asterisk/sip.conf
|
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-5140.12631.31429 2014-11-25 14:19:09.888724367 +0200 +++ /etc/asterisk/sip.conf 2014-11-25 14:21:46.068726210 +0200 @@ -51,3 +51,4 @@ + |
#vim /etc/asterisk/extensions.conf
|
#vim /etc/asterisk/sip.conf
|
#vim /etc/asterisk/sip.conf
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-5140.7531.32016 2014-11-25 15:07:56.260759004 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 15:26:23.052772100 +0200 @@ -21,3 +21,42 @@ +[local] +exten => _13XX,1,Dial(SIP/${EXTEN}) + +[national] +exten =>_23XX,1,Dial(SIP/brest/${EXTEN}) + +[international] +exten =>_1[12]XX,1,Dial(SIP/kiev/${EXTEN}) +exten =>_3[123]XX,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 + +[gr4] + +include => internal +include => local +include => national +include => international + + + + + |
#vim /etc/asterisk/sip.conf
|
#vim /etc/asterisk/extensions.conf
|
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-5140.4546.10395 2014-11-25 15:32:36.524776525 +0200 +++ /etc/asterisk/sip.conf 2014-11-25 15:35:55.476778879 +0200 @@ -21,13 +21,14 @@ type=friend secret=1234 host=dynamic - +context=gr1 [1302] type=friend secret=1234 host=dynamic +context=gr3 ;Minsk - Brest [brest] @@ -36,6 +37,7 @@ host=dynamic directmedia=no username=minsk +context=gr4 ;minsk-kiev [kiev] |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-5140.6095.26045 2014-11-25 15:38:17.764780562 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 15:39:28.040781383 +0200 @@ -20,6 +20,10 @@ exten =>_3[123]XX,1,Dial(SIP/kiev/${EXTEN}) +[internal] +exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) +exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) + [local] exten => _13XX,1,Dial(SIP/${EXTEN}) |
#vim /etc/asterisk/extensions.conf
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-5140.21813.23942 2014-11-25 15:47:52.092787361 +0200 +++ /etc/asterisk/extensions.conf 2014-11-25 15:59:20.052795503 +0200 @@ -1,25 +1,6 @@ [default] -exten => _13XX,1,Dial(SIP/${EXTEN}) -exten => _13XX,n,No0p(to extension ${EXTEN}) -exten => _11XX,n,Dial(SIP/${EXTEN}) - -;пример exten => 8100,1,Record(/var/tmp/asterisk/record00:gsm) - - - -exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) -exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) - -exten =>_23XX,1,Dial(SIP/brest/${EXTEN}) - - -exten =>_1[12]XX,1,Dial(SIP/kiev/${EXTEN}) -exten =>_2[12]XX,1,Dial(SIP/kiev/${EXTEN}) -exten =>_3[123]XX,1,Dial(SIP/kiev/${EXTEN}) - - [internal] exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-5140.11795.14176 2014-11-25 15:59:23.748795545 +0200 +++ /etc/asterisk/sip.conf 2014-11-25 16:00:02.184795990 +0200 @@ -46,6 +46,7 @@ host=dynamic directmedia=no username=minsk +context=gr4 |
#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 debian3 (pid = 2704) ... -- SIP/kiev-00000059 is ringing [Nov 25 16:12:27] NOTICE[2765]: chan_sip.c:24850 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1302 == Spawn extension (gr1, 3101, 1) exited non-zero on 'SIP/1301-00000058' == Using SIP RTP CoS mark 5 -- Executing [3201@gr1:1] Dial("SIP/1301-0000005a", "SIP/kiev/3201") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/kiev/3201 -- SIP/kiev-0000005b is ringing debian3*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-5140.17373.4741 2014-11-25 16:16:28.104807671 +0200 +++ /etc/asterisk/sip.conf 2014-11-25 16:17:11.712808186 +0200 @@ -28,7 +28,7 @@ type=friend secret=1234 host=dynamic -context=gr3 +context=gr1 ;Minsk - Brest [brest] |
#vim /etc/asterisk/sip.conf
|
#play /path/to/a/gsm/file.gsm
play WARN alsa: can't encode 0-bit Unknown or not applicable play FAIL formats: can't open input file `/path/to/a/gsm/file.gsm': No such file or directory |
#apt-get install sendmail-bin
Reading package lists... Done Building dependency tree Reading state information... Done The following package was automatically installed and is no longer required: libgadu3 libmysqlclient18 mysql-common Use 'apt-get autoremove' to remove it. The following extra packages will be installed: sendmail-base sendmail-cf Suggested packages: sendmail-doc logcheck resolvconf sasl2-bin ... Warning: These messages were issued while creating sendmail.cf make sure they are benign before starting sendmail! Errors in generating sendmail.cf *** ERROR: FEATURE() should be before MAILER() *** MAILER(`local') must appear after FEATURE(`always_add_domain')*** ERROR: FEATURE() should be before MAILER() *** MAILER(`local') must appear after FEATURE(`allmasquerade')*** ERROR: FEATURE() should be before MAILER() Starting Mail Transport Agent (MTA): sendmail. (Reading database ... 132013 files and directories currently installed.) Removing exim4-base ... Processing triggers for man-db ... |
#echo debian3.unix.nt >> /etc/mail/local-host-names
|
#vim /etc/mail/sendmail.mc
--- /tmp/l3-saved-5140.24767.17839 2014-11-25 16:38:59.576823665 +0200 +++ /etc/mail/sendmail.mc 2014-11-25 16:39:43.084824182 +0200 @@ -54,9 +54,9 @@ dnl # FEATURE(`no_default_msa')dnl dnl DAEMON_OPTIONS(`Family=inet6, Name=MTA-v6, Port=smtp, Addr=::1')dnl -;DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl +dnl DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl dnl DAEMON_OPTIONS(`Family=inet6, Name=MSP-v6, Port=submission, M=Ea, Addr=::1')dnl -;DAEMON_OPTIONS(`Family=inet, Name=MSP-v4, Port=submission, M=Ea, Addr=127.0.0.1')dnl +dnl DAEMON_OPTIONS(`Family=inet, Name=MSP-v4, Port=submission, M=Ea, Addr=127.0.0.1')dnl dnl # dnl # Be somewhat anal in what we allow define(`confPRIVACY_FLAGS',dnl |
#/etc/init.d/sendmail restart
Restarting Mail Transport Agent (MTA): sendmail^[[A. |
#/etc/init.d/sendmail restart^C
|
#/etc/init.d/sendmail restart
Restarting Mail Transport Agent (MTA): sendmail. |
#dpkg -L asterisk-modules | grep app_ | head -15
/usr/lib/asterisk/modules/app_softhangup.so /usr/lib/asterisk/modules/app_waituntil.so /usr/lib/asterisk/modules/app_senddtmf.so /usr/lib/asterisk/modules/app_celgenuserevent.so /usr/lib/asterisk/modules/app_parkandannounce.so /usr/lib/asterisk/modules/app_userevent.so /usr/lib/asterisk/modules/app_transfer.so /usr/lib/asterisk/modules/app_playback.so /usr/lib/asterisk/modules/app_waitforring.so /usr/lib/asterisk/modules/app_read.so /usr/lib/asterisk/modules/app_system.so /usr/lib/asterisk/modules/app_controlplayback.so /usr/lib/asterisk/modules/app_echo.so /usr/lib/asterisk/modules/app_alarmreceiver.so /usr/lib/asterisk/modules/app_dial.so |
#vim /etc/asterisk//extension
|
#vim /etc/asterisk//extension.conf
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3542.23012.12338 2014-11-26 09:54:48.174631290 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 09:58:12.634635627 +0200 @@ -4,7 +4,7 @@ [internal] exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) - +exten => _ [local] exten => _13XX,1,Dial(SIP/${EXTEN}) |
#vim /etc/asterisk/voicemail.conf
--- /tmp/l3-saved-3542.23802.23216 2014-11-26 09:59:07.182636731 +0200 +++ /etc/asterisk/voicemail.conf 2014-11-26 10:04:17.574643261 +0200 @@ -380,6 +380,18 @@ [default] +; 1301 =>1234 + + + + + + + + + + + 1234 => 4242,Example Mailbox,root@localhost ;4200 => 9855,Mark Spencer,markster@linux-support.net,mypager@digium.com,attach=no|serveremail=myaddy@digium.com|tz=central|maxmsg=10 |
#vim /etc/asterisk/extensions.conf
|
#[local]
[default] E325: ATTENTION Found a swap file by the name "/etc/asterisk/.extensions.conf.swp" [internal]owned by: root dated: Tue Nov 25 12:03:18 2014 file name: /etc/asterisk/extensions.conf modified: YES user name: root host name: debian3 process ID: 4773 While opening file "/etc/asterisk/extensions.conf" dated: Wed Nov 26 09:58:12 2014 ... include => internal include => local [gr4] include => internal include => local include => national include => international [gr2 ~ "/etc/asterisk/extensions.conf" 47L, 705C written |
#vim /etc/asterisk/voicemail.conf
--- /tmp/l3-saved-3542.19279.12725 2014-11-26 10:12:51.954654079 +0200 +++ /etc/asterisk/voicemail.conf 2014-11-26 10:14:39.626656338 +0200 @@ -380,7 +380,7 @@ [default] -; 1301 =>1234 +; 1301 =>1234 user 1 (1301),user@localhost |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3542.31840.5909 2014-11-26 10:14:42.698656407 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 10:15:39.626657606 +0200 @@ -8,7 +8,7 @@ [local] exten => _13XX,1,Dial(SIP/${EXTEN}) -xxten => _83XX,1,VoiceMail(33${EXTEN:2}@default) +xxten => _83XX,1,VoiceMail(13${EXTEN:2}@default) [national] exten =>_23XX,1,Dial(SIP/brest/${EXTEN}) |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-3542.6516.10361 2014-11-26 10:16:11.154658273 +0200 +++ /etc/asterisk/sip.conf 2014-11-26 10:18:10.354660775 +0200 @@ -22,7 +22,7 @@ secret=1234 host=dynamic context=gr1 - +mailbox=1301@default [1302] type=friend |
#vim /etc/asterisk/voicemail.conf
--- /tmp/l3-saved-3542.8776.25930 2014-11-26 10:18:18.794660951 +0200 +++ /etc/asterisk/voicemail.conf 2014-11-26 10:19:23.606662311 +0200 @@ -385,14 +385,6 @@ - - - - - - - - 1234 => 4242,Example Mailbox,root@localhost ;4200 => 9855,Mark Spencer,markster@linux-support.net,mypager@digium.com,attach=no|serveremail=myaddy@digium.com|tz=central|maxmsg=10 ;4300 => 3456,Ben Rigas,ben@american-computer.net |
#vim /etc/asterisk/extensions.conf
|
#asterisk -r
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 debian3 (pid = 2495) debian3*CLI> dialplan reload Dialplan reloaded. ... debian3*CLI> sip reload debian3*CLI> sip show peers Name/username Host Dyn Forcerport ACL Port Status 1301/1301 192.168.30.100 D N 5060 OK (19 ms) 1302/1302 192.168.30.101 D N 14394 OK (115 ms) brest/minsk 192.168.60.1 D N 5060 OK (1 ms) kiev/minsk 192.168.10.1 D N 5060 OK (1 ms) 4 sip peers [Monitored: 4 online, 0 offline Unmonitored: 0 online, 0 offline] debian3*CLI> sip reload Disconnected from Asterisk server |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3542.21967.9276 2014-11-26 10:21:32.614665028 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 10:21:50.106665394 +0200 @@ -1,45 +1,15 @@ [default] -[internal] -exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) -exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) -exten => _ - -[local] exten => _13XX,1,Dial(SIP/${EXTEN}) -xxten => _83XX,1,VoiceMail(13${EXTEN:2}@default) -[national] -exten =>_23XX,1,Dial(SIP/brest/${EXTEN}) - -[international] -exten =>_1[12]XX,1,Dial(SIP/kiev/${EXTEN}) -exten =>_3[123]XX,1,Dial(SIP/kiev/${EXTEN}) - -[gr1] - -include => internal -include => local -include => national -include => international - -[gr2] +exten => _13XX,n,No0p(to extension ${EXTEN}) +exten => _11XX,n,Dial(SIP/${EXTEN}) -include => internal -include => local -include => national +exten ===> 8101,1,Record(/var/tmp/asterisk/record00:gsm) -[gr3] -include => internal -include => local -[gr4] -include => internal -include => local -include => national -include => international |
#vim /etc/asterisk/extensions.conf
|
#vim /etc/asterisk/extensions.conf
|
#vim /etc/asterisk/extensions.conf
|
#vim /etc/asterisk/extensions.conf
|
#exten ===> 8101,1,Record(/var/tmp/asterisk/record00:gsm)
extconfig.conf extensionc.conf extensions.ael extensions.conf.bak extensions_minivm.conf extension extension.conf extensions.conf extensions.lua |
#vim /etc/asterisk/ext
|
#vim /etc/asterisk/extension.conf
|
#~
extension extension.conf extensions.conf extensions.lua extensionc.conf extensions.ael extensions.conf.bak extensions_minivm.conf |
#vim /etc/asterisk/extension
|
#vim /etc/asterisk/extension
|
#vim /etc/asterisk/extensions
|
#vim /etc/asterisk/extensions
|
#vim /etc/asterisk/extensions
|
#cat /etc/asterisk/extensions.conf
[default] exten => _13XX,1,Dial(SIP/${EXTEN}) exten => _13XX,n,No0p(to extension ${EXTEN}) exten => _11XX,n,Dial(SIP/${EXTEN}) exten ===> 8101,1,Record(/var/tmp/asterisk/record00:gsm) |
#cat /etc/asterisk/extensionc.conf
|
#cat /etc/asterisk/extension
extension extension.conf extensions.conf extensions.lua extensionc.conf extensions.ael extensions.conf.bak extensions_minivm.conf |
#cat /etc/asterisk/extension.conf
|
#cat /etc/asterisk/extension
extension extension.conf extensions.conf extensions.lua extensionc.conf extensions.ael extensions.conf.bak extensions_minivm.conf |
#cat /etc/asterisk/extension
extension extension.conf extensions.conf extensions.lua extensionc.conf extensions.ael extensions.conf.bak extensions_minivm.conf |
#cat /etc/asterisk/extensions
extensions.ael extensions.conf extensions.conf.bak extensions.lua extensions_minivm.conf |
#cat /etc/asterisk/extensions.conf
[default] exten => _13XX,1,Dial(SIP/${EXTEN}) exten => _13XX,n,No0p(to extension ${EXTEN}) exten => _11XX,n,Dial(SIP/${EXTEN}) exten ===> 8101,1,Record(/var/tmp/asterisk/record00:gsm) |
#cat /etc/asterisk/extension
|
#cat /etc/asterisk/extensionc.conf
|
#rm /etc/asterisk/extensionc.conf
|
#less /etc/asterisk/extensions.conf
|
#vim /etc/asterisk/extensions.conf
|
#cat ~/.lilalo/*ext* | less
|
#cat ~/.lilalo/*ext* > /tmp/1.txt
|
#vim /tmp/1.txt
--- /tmp/l3-saved-3542.3487.4931 2014-11-26 10:32:40.906679080 +0200 +++ /tmp/1.txt 2014-11-26 10:35:27.334682580 +0200 @@ -1,309 +1,40 @@ ---- /tmp/l3-saved-4114.30616.12769 2014-11-25 10:42:27.528570474 +0200 -+++ /etc/asterisk/extensions.conf 2014-11-25 11:22:13.036598703 +0200 -@@ -2,3 +2,9 @@ - - - exten => _13XX,1,Dial(SIP/${EXTEN}) -+ -+ -+ -+ -+ -+ ---- /tmp/l3-saved-4114.14283.8210 2014-11-25 11:47:38.908616773 +0200 -+++ /etc/asterisk/extensions.conf 2014-11-25 11:53:47.980621211 +0200 -@@ -2,7 +2,14 @@ - - - exten => _13XX,1,Dial(SIP/${EXTEN}) -- -+exten => _13XX,n,No0p(to extension ${EXTEN}) -+exten => _11XX,n,Dial(SIP/${EXTEN}) -+ -+exten => 8100,1,Record(/var/tmp/asterisk/record00:gsm) -+ -+ -+ -+ - - - ---- /tmp/l3-saved-3542.23012.12338 2014-11-26 09:54:48.174631290 +0200 -+++ /etc/asterisk/extensions.conf 2014-11-26 09:58:12.634635627 +0200 -@@ -4,7 +4,7 @@ - [internal] - exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) - exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) -- -+exten => _ - - [local] - exten => _13XX,1,Dial(SIP/${EXTEN}) ---- /tmp/l3-saved-3542.3926.29068 2014-11-26 10:07:47.402647674 +0200 -+++ /etc/asterisk/extensions.conf 2014-11-26 10:12:47.850653993 +0200 -@@ -8,7 +8,7 @@ - - [local] - exten => _13XX,1,Dial(SIP/${EXTEN}) -- -+xxten => _83XX,1,VoiceMail(33${EXTEN:2}@default) - [national] - exten =>_23XX,1,Dial(SIP/brest/${EXTEN}) - ---- /tmp/l3-saved-3542.31840.5909 2014-11-26 10:14:42.698656407 +0200 -+++ /etc/asterisk/extensions.conf 2014-11-26 10:15:39.626657606 +0200 -@@ -8,7 +8,7 @@ - - [local] - exten => _13XX,1,Dial(SIP/${EXTEN}) --xxten => _83XX,1,VoiceMail(33${EXTEN:2}@default) -+xxten => _83XX,1,VoiceMail(13${EXTEN:2}@default) - [national] - exten =>_23XX,1,Dial(SIP/brest/${EXTEN}) - ---- /tmp/l3-saved-3542.21967.9276 2014-11-26 10:21:32.614665028 +0200 -+++ /etc/asterisk/extensions.conf 2014-11-26 10:21:50.106665394 +0200 -@@ -1,45 +1,15 @@ - [default] - - --[internal] --exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) --exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) --exten => _ -- --[local] - exten => _13XX,1,Dial(SIP/${EXTEN}) --xxten => _83XX,1,VoiceMail(13${EXTEN:2}@default) --[national] --exten =>_23XX,1,Dial(SIP/brest/${EXTEN}) -- --[international] --exten =>_1[12]XX,1,Dial(SIP/kiev/${EXTEN}) --exten =>_3[123]XX,1,Dial(SIP/kiev/${EXTEN}) -- --[gr1] -- --include => internal --include => local --include => national --include => international -- --[gr2] -+exten => _13XX,n,No0p(to extension ${EXTEN}) -+exten => _11XX,n,Dial(SIP/${EXTEN}) - --include => internal --include => local --include => national -+exten ===> 8101,1,Record(/var/tmp/asterisk/record00:gsm) - --[gr3] - --include => internal --include => local - --[gr4] - --include => internal --include => local --include => national --include => international - - - ---- /tmp/l3-saved-5140.31881.15037 2014-11-25 12:07:47.280631069 +0200 -+++ /etc/asterisk/extensions.conf 2014-11-25 12:27:43.440645237 +0200 -@@ -9,7 +9,8 @@ - - - -- -+exten => _81XX,1,Record(/var/tmp/asterisk/record ${EXTEN:2}:gsm) -+exten => _82XX,1,Playback(/var/tmp/asterisk/record ${EXTEN:2}) - - - ---- /tmp/l3-saved-5140.2732.24062 2014-11-25 12:29:43.580646650 +0200 -+++ /etc/asterisk/extensions.conf 2014-11-25 12:30:28.232647179 +0200 -@@ -9,8 +9,8 @@ - - - --exten => _81XX,1,Record(/var/tmp/asterisk/record ${EXTEN:2}:gsm) --exten => _82XX,1,Playback(/var/tmp/asterisk/record ${EXTEN:2}) -+exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) -+exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) - - - ---- /tmp/l3-saved-5140.197.11122 2014-11-25 13:03:10.224670401 +0200 -+++ /etc/asterisk/extensions.conf 2014-11-25 13:06:18.828672596 +0200 -@@ -5,7 +5,7 @@ - exten => _13XX,n,No0p(to extension ${EXTEN}) - exten => _11XX,n,Dial(SIP/${EXTEN}) - --exten => 8100,1,Record(/var/tmp/asterisk/record00:gsm) -+;пример exten => 8100,1,Record(/var/tmp/asterisk/record00:gsm) - - - ---- /tmp/l3-saved-5140.7723.9260 2014-11-25 13:44:44.652699925 +0200 -+++ /etc/asterisk/extensions.conf 2014-11-25 13:47:20.744701772 +0200 -@@ -12,7 +12,7 @@ - exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) - exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) - -- -+exten => 23,XX,1,Dial(SIP/${EXTEN}) - - - ---- /tmp/l3-saved-5140.10103.13444 2014-11-25 13:51:01.552704385 +0200 -+++ /etc/asterisk/extensions.conf 2014-11-25 13:51:35.680704787 +0200 -@@ -12,7 +12,7 @@ - exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) - exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) - --exten => 23,XX,1,Dial(SIP/${EXTEN}) -+exten =>_23XX,1,Dial(SIP/${EXTEN}) - - - ---- /tmp/l3-saved-5140.10.24679 2014-11-25 13:52:43.772705595 +0200 -+++ /etc/asterisk/extensions.conf 2014-11-25 13:54:01.844706517 +0200 -@@ -12,7 +12,7 @@ - exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) - exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) - --exten =>_23XX,1,Dial(SIP/${EXTEN}) -+exten =>_23XX,1,Dial(SIP/brest/${EXTEN}) - - - ---- /tmp/l3-saved-5140.7420.14218 2014-11-25 13:56:41.196708404 +0200 -+++ /etc/asterisk/extensions.conf 2014-11-25 13:59:34.380710455 +0200 -@@ -16,3 +16,4 @@ - - - -+ ---- /tmp/l3-saved-5140.23111.2571 2014-11-25 14:06:15.028715197 +0200 -+++ /etc/asterisk/extensions.conf 2014-11-25 14:07:22.964716000 +0200 -@@ -15,5 +15,4 @@ - exten =>_23XX,1,Dial(SIP/brest/${EXTEN}) - - -- -- -+exten =>_11XX,1,Dial(SIP/kiev/${EXTEN}) ---- /tmp/l3-saved-5140.27441.1061 2014-11-25 14:21:50.056726264 +0200 -+++ /etc/asterisk/extensions.conf 2014-11-25 14:29:46.172731899 +0200 -@@ -15,4 +15,9 @@ - exten =>_23XX,1,Dial(SIP/brest/${EXTEN}) - - --exten =>_11XX,1,Dial(SIP/kiev/${EXTEN}) -+exten =>_1[12]XX,1,Dial(SIP/kiev/${EXTEN}) -+exten =>_2[12]XX,1,Dial(SIP/kiev/${EXTEN}) -+exten =>_3[123]XX,1,Dial(SIP/kiev/${EXTEN}) -+ -+ -+ ---- /tmp/l3-saved-5140.7531.32016 2014-11-25 15:07:56.260759004 +0200 -+++ /etc/asterisk/extensions.conf 2014-11-25 15:26:23.052772100 +0200 -@@ -21,3 +21,42 @@ - - - -+[local] -+exten => _13XX,1,Dial(SIP/${EXTEN}) -+ -+[national] -+exten =>_23XX,1,Dial(SIP/brest/${EXTEN}) -+ -+[international] -+exten =>_1[12]XX,1,Dial(SIP/kiev/${EXTEN}) -+exten =>_3[123]XX,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 -+ -+[gr4] -+ -+include => internal -+include => local -+include => national -+include => international -+ -+ -+ -+ -+ ---- /tmp/l3-saved-5140.6095.26045 2014-11-25 15:38:17.764780562 +0200 -+++ /etc/asterisk/extensions.conf 2014-11-25 15:39:28.040781383 +0200 -@@ -20,6 +20,10 @@ - exten =>_3[123]XX,1,Dial(SIP/kiev/${EXTEN}) - - -+[internal] -+exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) -+exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) -+ - - [local] - exten => _13XX,1,Dial(SIP/${EXTEN}) ---- /tmp/l3-saved-5140.21813.23942 2014-11-25 15:47:52.092787361 +0200 -+++ /etc/asterisk/extensions.conf 2014-11-25 15:59:20.052795503 +0200 -@@ -1,25 +1,6 @@ - [default] - - --exten => _13XX,1,Dial(SIP/${EXTEN}) --exten => _13XX,n,No0p(to extension ${EXTEN}) --exten => _11XX,n,Dial(SIP/${EXTEN}) -- --;пример exten => 8100,1,Record(/var/tmp/asterisk/record00:gsm) -- -- -- --exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) --exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) -- --exten =>_23XX,1,Dial(SIP/brest/${EXTEN}) -- -- --exten =>_1[12]XX,1,Dial(SIP/kiev/${EXTEN}) --exten =>_2[12]XX,1,Dial(SIP/kiev/${EXTEN}) --exten =>_3[123]XX,1,Dial(SIP/kiev/${EXTEN}) -- -- - [internal] - exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) - exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) ---- /tmp/l3-saved-4181.455.27978 2014-11-24 18:12:06.401152174 +0200 -+++ /etc/asterisk/extensions.conf 2014-11-24 18:16:35.209157828 +0200 -@@ -0,0 +1 @@ -+exten => _13XX,1,Dial(SIP/${EXTEN}) ---- /tmp/l3-saved-4181.15335.29691 2014-11-24 18:16:46.885158073 +0200 -+++ /etc/asterisk/extensions.conf 2014-11-24 18:17:51.757159438 +0200 -@@ -1 +1,4 @@ -+[default] -+ -+ - exten => _13XX,1,Dial(SIP/${EXTEN}) +[internal] +exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) +exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) + +[local] +exten => _13XX,1,Dial(SIP/${EXTEN}) + +[national] +exten =>_23XX,1,Dial(SIP/brest/${EXTEN}) + +[international] +exten =>_1[12]XX,1,Dial(SIP/kiev/${EXTEN}) +exten =>_3[123]XX,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 + +[gr4] + +include => internal +include => local +include => national +include => international + + |
#mv /tmp/1.txt /etc/asterisk/extensions.
extensions.ael extensions.conf extensions.conf.bak extensions.lua |
#mv /tmp/1.txt /etc/asterisk/extensions.conf
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3542.15109.31140 2014-11-26 10:35:41.122682866 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 10:36:12.602683532 +0200 @@ -1,7 +1,11 @@ +[default] + [internal] exten => _81XX,1,Record(/var/tmp/asterisk/record${EXTEN:2}:gsm) exten => _82XX,1,Playback(/var/tmp/asterisk/record${EXTEN:2}) +; сюда добавляйте голосовую почту + [local] exten => _13XX,1,Dial(SIP/${EXTEN}) |
#Ñvim /etc/asterisk/extensions.conf
[ ] [nclude =] local exten => _83XX,1,VoiceMailMain(13${EXTEN:2}@default) include => international [local] [local] ( ) "/etc/asterisk/extensions.conf" 44L, 705C [gr2] ] [ ] ( ) [ ] ... [gr4] include => internal include => local include => national include => international ~ ~ ~ ~ "/etc/asterisk/extensions.conf" 44L, 757C written |
#vim /etc/asterisk/extensions.conf
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3542.26642.11716 2014-11-26 10:53:08.990704903 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 10:58:11.734711268 +0200 @@ -7,8 +7,11 @@ ; сюда добавляйте голосовую почту [local] -exten => _13XX,1,Dial(SIP/${EXTEN}) - +exten =>_13XX,1,Dial(SIP/${EXTEN}) +; скобки не было +; и 13 забыли +exten =>_13XX,n,VoiceMailMain(13${EXTEN:2}@default) + [national] exten =>_23XX,1,Dial(SIP/brest/${EXTEN}) |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3542.18459.10880 2014-11-26 10:59:21.058712725 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 11:00:48.162714557 +0200 @@ -7,7 +7,7 @@ ; сюда добавляйте голосовую почту [local] -exten =>_13XX,1,Dial(SIP/${EXTEN}) +exten =>_13XX,1,Dial(SIP/${EXTEN}5) ; скобки не было ; и 13 забыли exten =>_13XX,n,VoiceMailMain(13${EXTEN:2}@default) |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3542.29746.20459 2014-11-26 11:01:52.422715909 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 11:02:10.686716293 +0200 @@ -7,7 +7,7 @@ ; сюда добавляйте голосовую почту [local] -exten =>_13XX,1,Dial(SIP/${EXTEN}5) +exten =>_13XX,1,Dial(SIP/${EXTEN},5) ; скобки не было ; и 13 забыли exten =>_13XX,n,VoiceMailMain(13${EXTEN:2}@default) |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3542.28389.12870 2014-11-26 11:03:39.966718167 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 11:04:04.186718664 +0200 @@ -7,7 +7,7 @@ ; сюда добавляйте голосовую почту [local] -exten =>_13XX,1,Dial(SIP/${EXTEN},5) +exten =>_13XX,1,Dial(SIP/${EXTEN},10) ; скобки не было ; и 13 забыли exten =>_13XX,n,VoiceMailMain(13${EXTEN:2}@default) |
#echo hi | mutt user
|
#su user
-*-Mutt: /var/mail/user [Msgs:1 0.7K]---(threads/date)------------------------------------------------------------------------------(all)--- 1 kept, 0 deleted. user@debian3:~$ exit exit |
#less /var/log/asterisk/messages
|
#less /etc/asterisk/voicemail.conf
|
#vim /etc/asterisk/voicemail.conf
--- /tmp/l3-saved-3542.19329.17111 2014-11-26 11:06:33.646721822 +0200 +++ /etc/asterisk/voicemail.conf 2014-11-26 11:06:50.926722184 +0200 @@ -380,7 +380,8 @@ [default] - 1301 =>1234 user 1 (1301),user@localhost +; была пропущена запятая +1301 =>1234,User 1 (1301),user@localhost |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-3542.3624.12711 2014-11-26 11:06:55.302722276 +0200 +++ /etc/asterisk/sip.conf 2014-11-26 11:07:19.414722783 +0200 @@ -29,6 +29,7 @@ secret=1234 host=dynamic context=gr1 +mailbox=1302@default ;Minsk - Brest [brest] |
#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 debian3 (pid = 2495) ... -- Executing [1301@gr1:2] VoiceMailMain("SIP/1302-00000010", "1301@default") in new stack -- <SIP/1302-00000010> Playing 'vm-password.gsm' (language 'en') -- <SIP/1302-00000010> Playing 'vm-youhave.gsm' (language 'en') -- <SIP/1302-00000010> Playing 'vm-no.gsm' (language 'en') -- <SIP/1302-00000010> Playing 'vm-messages.gsm' (language 'en') -- <SIP/1302-00000010> Playing 'vm-opts.gsm' (language 'en') == Spawn extension (gr1, 1301, 2) exited non-zero on 'SIP/1302-00000010' debian3*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#vim /etc/asterisk/sip.conf
|
#less /etc/asterisk/extensions.conf
|
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-5814.20993.22387 2014-11-26 11:29:45.262751083 +0200 +++ /etc/asterisk/extensions.conf 2014-11-26 11:30:05.550751511 +0200 @@ -10,7 +10,8 @@ exten =>_13XX,1,Dial(SIP/${EXTEN},5) ; скобки не было ; и 13 забыли -exten =>_13XX,n,VoiceMailMain(13${EXTEN:2}@default) +; здесь нужно использовать VoiceMail а не VoiceMailMain +exten =>_13XX,n,VoiceMail(13${EXTEN:2}@default) [national] exten =>_23XX,1,Dial(SIP/brest/${EXTEN}) |
#_ last
bash: _: command not found |
#vim /etc/asterisk/voicemail.conf
|
#[ ]
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 debian3 (pid = 2495) ... -- Executing [1302@gr1:1] Dial("SIP/1301-0000002c", "SIP/1302,5") in new stack == Using SIP RTP CoS mark 5 -- Called SIP/1302 -- SIP/1302-0000002d is ringing -- Nobody picked up in 5000 ms -- Executing [1302@gr1:2] VoiceMail("SIP/1301-0000002c", "1302@default") in new stack [Nov 26 11:40:07] WARNING[6104]: app_voicemail.c:5660 leave_voicemail: No entry in voicemail config file for '1302' -- Auto fallthrough, channel 'SIP/1301-0000002c' status is 'NOANSWER' debian3*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
|
#{EXTEN})
[general] context=default qualify=yes ;include "/etc/asterisk/sip.conf.kiev" register => minsk:1234@192.168.60.1/brest register => minsk:1234@192.168.10.1/kiev [phone](!) type=friend host=dynamic qualify=yes ... username=minsk context=gr4 ;minsk-kiev [kiev] type=friend secret=1234 host=dynamic directmedia=no username=minsk context=gr4 |
extensions.ael extensions.conf extensions.conf.bak extensions.lua extensions_minivm.conf
[default] exten => _13XX,1,Dial(SIP/${EXTEN}) exten => _13XX,n,No0p(to extension ${EXTEN}) exten => _11XX,n,Dial(SIP/${EXTEN}) exten ===> 8101,1,Record(/var/tmp/asterisk/record00:gsm)
Время первой команды журнала | 12:52:39 2014-11-25 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 10:41:06 2014-11-26 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 2.97 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.99 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 4.80 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.35 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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