/l3/users/igor-gorbatko/asterisk/debian3.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 |
|
#ssh root@192.168.102.1
root@192.168.102.1's password: Linux debian4 2.6.26-2-686 #1 SMP Wed Aug 19 06:06:52 UTC 2009 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Thu Dec 10 21:56:42 2009 from 192.168.102.110 l3-agent is already running: pid=2751; pidfile=/root/.lilalo/l3-agent.pid |
#screen -x
![]() |
#exit
exit Connection to 192.168.102.1 closed. |
#screen -x
![]() |
#screen -x
![]() |
#vi voicemail.conf
--- /tmp/l3-saved-8425.11385.10775 2009-12-10 22:04:00.000000000 -1000 +++ voicemail.conf 2009-12-10 22:09:53.000000000 -1000 @@ -243,6 +243,7 @@ ; Mailboxes may be organized into multiple contexts for ; voicemail virtualhosting ; +[] [other] ;The intro can be customized on a per-context basis |
#vi voicemail.conf
--- /tmp/l3-saved-8425.24209.2849 2009-12-10 22:11:00.000000000 -1000 +++ voicemail.conf 2009-12-10 22:12:43.000000000 -1000 @@ -229,6 +229,7 @@ ; Define maximum number of messages per folder for a particular context. ;maxmsg=50 +101 => 1234,Example Mailbox,root@localhost 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 @@ -243,7 +244,6 @@ ; Mailboxes may be organized into multiple contexts for ; voicemail virtualhosting ; -[] [other] ;The intro can be customized on a per-context basis |
#asterisk -rvvv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... -- Executing [101@white:2] Macro("SIP/101-093a60d0", "maillog|101") in new stack -- Executing [s@macro-maillog:1] System("SIP/101-093a60d0", "echo Snimi tpubku ""gib-snom" <4101>" | /usr/local/bin/maillog 101") in new stack -- Executing [s@macro-maillog:2] Dial("SIP/101-093a60d0", "SIP/101") in new stack -- Called 101 -- Got SIP response 486 "Busy Here" back from 192.168.101.101 -- SIP/101-093aa048 is busy == Everyone is busy/congested at this time (1:1/0/0) [Dec 10 22:13:11] WARNING[11262]: pbx.c:1832 pbx_extension_helper: No application 'ViceMail' for extension (macro-maillog, s, 3) == Spawn extension (macro-maillog, s, 3) exited non-zero on 'SIP/101-093a60d0' in macro 'maillog' == Spawn extension (macro-maillog, s, 3) exited non-zero on 'SIP/101-093a60d0' |
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-8425.6787.2067 2009-12-10 22:13:21.000000000 -1000 +++ /etc/asterisk/extensions.conf 2009-12-10 22:13:31.000000000 -1000 @@ -3,7 +3,7 @@ [macro-maillog] exten => s,1,System(echo Snimi tpubku "${CALLERID(all)}" | /usr/local/bin/maillog ${ARG1}) exten => s,n,Dial(SIP/${ARG1}) -exten => s,n,ViceMail(${ARG1}@default) +exten => s,n,VoiceMail(${ARG1}@default) [internal] exten => s,1,Answer |
#vi /etc/asterisk/extensions.conf
|
#[ ]]
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... -- Executing [101@black:2] Macro("SIP/103-093ae588", "maillog|101") in new stack -- Executing [s@macro-maillog:1] System("SIP/103-093ae588", "echo Snimi tpubku ""GIB-win" <4103>" | /usr/local/bin/maillog 101") in new stack -- Executing [s@macro-maillog:2] Dial("SIP/103-093ae588", "SIP/101") in new stack -- Called 101 -- SIP/101-093afb18 is ringing -- SIP/101-093afb18 is ringing -- SIP/101-093afb18 is ringing -- SIP/101-093afb18 is ringing -- SIP/101-093afb18 is ringing poltava*CLI> |
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-8425.8551.2684 2009-12-10 22:16:00.000000000 -1000 +++ /etc/asterisk/extensions.conf 2009-12-10 22:17:03.000000000 -1000 @@ -2,9 +2,8 @@ [macro-maillog] exten => s,1,System(echo Snimi tpubku "${CALLERID(all)}" | /usr/local/bin/maillog ${ARG1}) -exten => s,n,Dial(SIP/${ARG1}) +exten => s,n,Dial(SIP/${ARG1},10) exten => s,n,VoiceMail(${ARG1}@default) - [internal] exten => s,1,Answer exten => s,n,Background(rondo) |
#asterisk -rvvv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... -- Called 101 -- SIP/101-093a60d0 is ringing -- SIP/101-093a60d0 is ringing -- SIP/101-093a60d0 is ringing -- SIP/101-093a60d0 is ringing -- SIP/101-093a60d0 is ringing -- Nobody picked up in 10000 ms -- Executing [s@macro-maillog:3] VoiceMail("SIP/103-093acff8", "101@default") in new stack [Dec 10 22:20:20] WARNING[11487]: app_voicemail.c:2862 leave_voicemail: No entry in voicemail config file for '101' == Auto fallthrough, channel 'SIP/103-093acff8' status is 'NOANSWER' |
#vi /etc/asterisk/extensions.conf
|
#vi /etc/asterisk/extensions.conf
|
#; nextaftercmd=yes ; Skips to the next message after hitting 7 or 9 to delete/save current message.
skipms=3000 ; How many seconds of silence before we end the recording maxsilence=10 ; Silence threshold (what we consider silence: the lower, the more sensitive) silencethreshold=128 ; Max number of failed login attempts maxlogins=3 ; ; User context is where entries from users.conf are registered. The ; default value is 'default' ... ; ; Mailboxes may be organized into multiple contexts for ; voicemail virtualhosting ; [other] [other] [other] ;directoryintro=dir-company2 1234 => 5678,Company2 User,root@localhost "voicemail.conf" 251L, 11766C written |
#vi voicemail.conf
|
#asterisk -rvvv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... -- Called 101 -- SIP/101-093afb18 is ringing -- SIP/101-093afb18 is ringing -- SIP/101-093afb18 is ringing -- SIP/101-093afb18 is ringing -- SIP/101-093afb18 is ringing -- Nobody picked up in 10000 ms -- Executing [s@macro-maillog:3] VoiceMail("SIP/103-093ae588", "101@default") in new stack [Dec 10 22:27:58] WARNING[11650]: app_voicemail.c:2862 leave_voicemail: No entry in voicemail config file for '101' == Auto fallthrough, channel 'SIP/103-093ae588' status is 'NOANSWER' |
#vi voicemail.conf
|
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#vi /etc/asterisk/extensions.conf
|
#vi voicemail.conf
|
#~
/var/spool/asterisk/voicemail |
#ls /var/spool/asterisk/voicemail/
default |
#ls /var/spool/asterisk/voicemail/default/
101 103 |
#ls /var/spool/asterisk/voicemail/default/103
INBOX temp tmp |
#ls /var/spool/asterisk/voicemail/default/103/INBOX/
msg0000.gsm msg0000.wav msg0001.gsm msg0001.wav msg0000.txt msg0000.WAV msg0001.txt msg0001.WAV |
#ls -l /var/spool/asterisk/voicemail/default/103/INBOX/
![]() asterisk -rvvv Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': Found == Parsing '/etc/asterisk/extconfig.conf': Found Connected to Asterisk 1.4.21.2~dfsg-3 currently running on poltava (pid = 11894) Verbosity is at least 3 [Dec 11 02:09:57] NOTICE[11912]: chan_sip.c:15236 handle_request_register: Registration from '"103" <sip:103@poltava.unix.nt>' failed for '192.168.101.102' - Wrong password [Dec 11 02:09:59] NOTICE[11912]: chan_sip.c:15236 handle_request_register: Registration from '"103" <sip:103@poltava.unix.nt>' failed for '192.168.101.102' - Wrong password [Dec 11 02:10:06] NOTICE[11912]: chan_sip.c:15236 handle_request_register: Registration from '"103" <sip:103@poltava.unix.nt>' failed for '192.168.101.102' - Wrong password poltava*CLI> |
#ls -l /var/spool/asterisk/voicemail/default/103/INBOX/
[xten =>]s,n,Dial(SIP/${ARG1},10)ubku "${CALLERID(all)}" | /usr/local/bin/mailloo [xten => s,n,V]iceMail(${ARG1}@default) [ ] [internal] exten => s,1,Answer } - ${CALLERID(all)} - ${CHANNEL} " | sendxmpp -f /var/lib/asterisk/.sendxmpprc gib@poltava.unix.nt) exten => 700,1,VoiceMailMain() exten => 102,n,Background(rondo) exten => 102,1,Answer exten => 102,n,Hangup ;exten => 102,n,Wait(1) exten => 102,n,System(echo incoming: " ${STRFTIME(${EPOCH},,%d/\%m/\%Y-%H:%M:%S)) exten => 300,1,MeetMe(1,dPc,1234)8L, 2344C exten => 301,1,MeetMe(1,dPcm,1234) exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)}) 6,1 Top |
#[ ]
[ ] secret=123 "/etc/asterisk/sip.conf" 36L, 442C callerid="gib-snom" [101] [101] context=black type=friend host=dynamic secret=123 callerid="GIB-win" [kiev] context=inbound 14,0-1 Top |
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... [Dec 11 02:18:50] NOTICE[11912]: chan_sip.c:14035 handle_request_invite: Call from '103' to extension '202' rejected because extension not found. [Dec 11 02:18:53] NOTICE[11912]: chan_sip.c:14035 handle_request_invite: Call from '103' to extension '201' rejected because extension not found. -- Executing [202@white:1] Dial("SIP/101-0a073ee0", "SIP/kiev/202") in new stack -- Called kiev/202 -- SIP/kiev-0a077e58 answered SIP/101-0a073ee0 -- Native bridging SIP/101-0a073ee0 and SIP/kiev-0a077e58 [Dec 11 02:19:35] NOTICE[11912]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103 [Dec 11 02:21:35] NOTICE[11912]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 103 poltava*CLI> exit Executing last minute cleanups |
#ls -l /var/spool/asterisk/voicemail/default/103/INBOX/
![]() |
#asterisk -rvvv
"/etc/asterisk/sip.conf" 36L, 442C callerid="gib-snom" videosupport=yes [103] context=black type=friend host=dynamic secret=123 callerid="GIB-win" [kiev] "sip.conf" 36L, 458C written |
#ls -l /var/spool/asterisk/voicemail/default/103/INBOX/
![]() |
#ls -l /var/spool/asterisk/voicemail/default/103/INBOX/
/etc/init.d/asterisk restart Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#vim extensions.conf
|
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-8425.11166.24512 2009-12-11 02:29:56.000000000 -1000 +++ /etc/asterisk/extensions.conf 2009-12-11 02:30:24.000000000 -1000 @@ -62,8 +62,8 @@ exten => s,1,Answer exten => s,n,Background(rondo) exten => _2XX,1,Dial(SIP/kiev/${EXTEN}) -exten => _3XX,1,Dial(IAX2/obukhov/${EXTEN}) -;exten => _3XX,1,Dial(ZAP/G1/${EXTEN}) +;exten => _3XX,1,Dial(IAX2/obukhov/${EXTEN}) +exten => _3XX,1,Dial(ZAP/G1/${EXTEN}) exten => _380XXXXXXXXX,1,Dial(SIP/kiev/${EXTEN}) exten => 891,1,Dial(SIP/kiev/380503049607,10) |
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-8425.27430.20691 2009-12-11 02:33:07.000000000 -1000 +++ /etc/asterisk/extensions.conf 2009-12-11 02:33:15.000000000 -1000 @@ -14,8 +14,8 @@ exten => 102,n,Background(rondo) exten => 102,n,Hangup -exten => 300,1,MeetMe(1,dPc,1234) -exten => 301,1,MeetMe(1,dPcm,1234) +;exten => 300,1,MeetMe(1,dPc,1234) +;exten => 301,1,MeetMe(1,dPcm,1234) exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)}) exten => _1XX,n,Dial(SIP/${EXTEN}) |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#/etc/init.d/zaptel restart
Zaptel telephony kernel driver: zaptel. |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -rvvv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... -- Called G1/301 -- Channel 0/2, span 1 got hangup, cause 44 -- Forcing restart of channel 0/2 on span 1 since channel reported in use -- Hungup 'Zap/2-1' == Everyone is busy/congested at this time (1:0/0/1) == Auto fallthrough, channel 'SIP/101-092fee90' status is 'CHANUNAVAIL' -- B-channel 0/2 successfully restarted on span 1 -- Registered IAX2 to '192.168.102.2', who sees us as 192.168.101.3:4569 with no messages waiting -- Going to extension s|1 because of immediate=yes -- Extension 's' in context 'default' from '' does not exist. Rejecting call on channel 0/1, span 1 |
#cd /etc/asterisk/
|
#vi extensions.conf
--- /tmp/l3-saved-2643.12016.1607 2009-12-11 02:44:39.000000000 -1000 +++ extensions.conf 2009-12-11 02:45:07.000000000 -1000 @@ -1,9 +1,9 @@ [default] [macro-maillog] -exten => s,1,System(echo Snimi tpubku "${CALLERID(all)}" | /usr/local/bin/maillog ${ARG1}) -exten => s,n,Dial(SIP/${ARG1},10) -exten => s,n,VoiceMail(${ARG1}@default) +;exten => s,1,System(echo Snimi tpubku "${CALLERID(all)}" | /usr/local/bin/maillog ${ARG1}) +;exten => s,n,Dial(SIP/${ARG1},10) +;exten => s,n,VoiceMail(${ARG1}@default) [internal] exten => s,1,Answer |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#register => poltava:1234@192.168.102.1/kiev
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#cp extensions.conf
![]() cp: missing destination file operand after `extensions.conf' Try `cp --help' for more information. |
#cp extensions.conf extensions.conf.3
|
#vi extensions.conf
--- /tmp/l3-saved-2643.21007.30734 2009-12-11 02:47:10.000000000 -1000 +++ extensions.conf 2009-12-11 02:48:11.000000000 -1000 @@ -1,79 +1,9 @@ [default] -[macro-maillog] -;exten => s,1,System(echo Snimi tpubku "${CALLERID(all)}" | /usr/local/bin/maillog ${ARG1}) -;exten => s,n,Dial(SIP/${ARG1},10) -;exten => s,n,VoiceMail(${ARG1}@default) - -[internal] -exten => s,1,Answer -exten => s,n,Background(rondo) -exten => 700,1,VoiceMailMain() -exten => 102,1,Answer -;exten => 102,n,Wait(1) -exten => 102,n,System(echo incoming: " ${STRFTIME(${EPOCH},,%d/\%m/\%Y-%H:%M:%S)} - ${CALLERID(all)} - ${CHANNEL} " | sendxmpp -f /var/lib/asterisk/.sendxmpprc gib@poltava.unix.nt) -exten => 102,n,Background(rondo) -exten => 102,n,Hangup - -;exten => 300,1,MeetMe(1,dPc,1234) -;exten => 301,1,MeetMe(1,dPcm,1234) - exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)}) exten => _1XX,n,Dial(SIP/${EXTEN}) -;exten => _1XX,n,Macro(maillog,${EXTEN}) - -exten => 999,1,Answer -exten => 999,n,Echo() -exten => 880,1,Answer -exten => 880,n,Wait(1) -exten => 880,n,Record(/tmp/hello:gsm|2) -exten => 880,n,Playback(/tmp/hello) -exten => 881,1,Answer -exten => 881,n,Wait(1) -exten => 881,n,Record(/tmp/hello2:gsm|2) -exten => 881,n,Playback(/tmp/hello2) -exten => 882,1,Answer -exten => 882,n,Wait(1) -exten => 882,n,Record(/tmp/hello3:gsm|2) -exten => 882,n,Playback(/tmp/hello3) -exten => 883,1,Answer -exten => 883,n,Wait(1) -exten => 883,n,Record(/tmp/hello4:gsm|2) -exten => 883,n,Playback(/tmp/hello4) -exten => 884,1,Answer -exten => 884,n,Wait(1) -exten => 884,n,Record(/tmp/hello5:gsm|2) - -exten => 888,1,Answer -exten => 888,n,Background(/tmp/hello) -exten => 888,n,WaitExten() -exten => 1,1,Background(/tmp/hello2) -exten => 1,n,Goto(888,1) -exten => 2,1,Background(/tmp/hello3) -exten => 2,n,Goto(888,1) -exten => 3,1,Background(/tmp/hello4) -exten => 3,n,Goto(888,1) -exten => 0,1,Background(/tmp/hello5) -exten => 0,n,Hangup - -exten => _9XX,1,Answer -exten => _9XX,n,Festival(' Bash also interprets a number of multi-character options. These options must appear on the command line before the single-character options to be recognized.') - -[outbound] -exten => s,1,Answer -exten => s,n,Background(rondo) exten => _2XX,1,Dial(SIP/kiev/${EXTEN}) ;exten => _3XX,1,Dial(IAX2/obukhov/${EXTEN}) exten => _3XX,1,Dial(ZAP/G1/${EXTEN}) exten => _380XXXXXXXXX,1,Dial(SIP/kiev/${EXTEN}) -exten => 891,1,Dial(SIP/kiev/380503049607,10) - -[white] -include => internal -include => outbound - -[black] -include => internal -[inbound] -include => internal |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#vi extensions.conf
|
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3643.6817.29687 2009-12-11 02:59:03.000000000 -1000 +++ /etc/asterisk/extensions.conf 2009-12-11 02:59:22.000000000 -1000 @@ -48,10 +48,9 @@ exten => 0,1,Background(/tmp/hello5) exten => 0,n,Hangup -exten => _9XX,1,Answer +;exten => _9XX,1,Answer exten => 911,1,Dial(ZAP/G1/${EXTEN}) -exte => s,1,Answner -exten => s,n,Background(rondo) + exten => _2XX,1,Dial(SIP/kiev/${EXTEN}) ;exten => _3XX,1,Dial(IAX2/obukhov/${EXTEN}) exten => _3XX,1,Dial(ZAP/G1/${EXTEN}) |
#vi /etc/zaptel.conf
--- /tmp/l3-saved-3643.11992.20816 2009-12-11 03:00:19.000000000 -1000 +++ /etc/zaptel.conf 2009-12-11 03:01:18.000000000 -1000 @@ -1,3 +1,5 @@ +loadzone=us +defaultzone=us span=1,1,0,ccs,hdb3,crc4 bchan=1-15,17-31 dchan=16 |
#/etc/init.d/asterisk stop
Stopping Asterisk PBX: asterisk. |
#/etc/init.d/zaptel restart
Zaptel telephony kernel driver: zaptel. |
#/etc/init.d/asterisk start
Starting Asterisk PBX: asterisk. |
#vi extensions.conf
|
#apt-get install mc
Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: zip unzip arj xpdf dbview odt2txt The following NEW packages will be installed: mc 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 2140kB of archives. After this operation, 6402kB of additional disk space will be used. Get:1 http://10.0.35.1 lenny/main mc 2:4.6.2~git20080311-4 [2140kB] Fetched 2140kB in 0s (5682kB/s) Selecting previously deselected package mc. (Reading database ... 58203 files and directories currently installed.) Unpacking mc (from .../mc_2%3a4.6.2~git20080311-4_i386.deb) ... Processing triggers for man-db ... Setting up mc (2:4.6.2~git20080311-4) ... |
#asterisk -rvvv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... -- Channel 0/1, span 1 received AOC-E charging 0 units == Spawn extension (default, s, 2) exited non-zero on 'Zap/1-1' -- Hungup 'Zap/1-1' -- Going to extension s|1 because of immediate=yes -- Accepting voice call from '' to 's' on channel 0/1, span 1 -- Executing [s@default:1] Answer("Zap/1-1", "") in new stack -- Executing [s@default:2] BackGround("Zap/1-1", "rondo") in new stack -- <Zap/1-1> Playing 'rondo' (language 'en') [Dec 11 03:44:50] NOTICE[3893]: chan_iax2.c:8262 socket_process: Registration of 'frompoltava' rejected: 'Registration Refused' from: '192.168.102.2' poltava*CLI> |
#vi extensions.conf
![]() |
#~
;exten => s,1,Answerp1) ;exten => s,n,Background(rondo) exten => 102,n,System(echo incoming: " ${STRFTIME(${EPOCH},,%d/\%m/\%Y-%H:%M:%S)) exten => _1XX,1,Set(CALLERID(number)=4${CALLERID(number)}) exten => _1XX,n,Dial(SIP/${EXTEN}) "/etc/asterisk/extensions.conf" 56L, 1661C exten => 880,1,Answer exten => 880,n,Wait(1) exten => 880,n,Record(/tmp/hello:gsm|2) exten => 880,n,Playback(/tmp/hello) "/etc/asterisk/extensions.conf" 56L, 1663C written |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#vim ../zaptel.conf
|
#~
![]() If this is the case, be careful not to end up with two different instances of the same file when making changes. Quit, or continue with caution. (2) An edit session for this file crashed. If this is the case, use ":recover" or "vim -r sip.conf" to recover the changes (see ":help recovery"). If you did this already, delete the swap file ".sip.conf.swp" to avoid this message. Swap file ".sip.conf.swp" already exists! |
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4340.26790.13543 2009-12-11 03:49:05.000000000 -1000 +++ /etc/asterisk/extensions.conf 2009-12-11 03:49:12.000000000 -1000 @@ -1,7 +1,7 @@ [default] exten => s,1,Answer -;exten => s,n,Background(rondo) +exten => s,n,Background(rondo) exten => 700,1,VoiceMailMain() exten => 102,1,Answer ;exten => 102,n,Wait(1) |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#[ ]
[Dec 11 03:50:59] WARNING[4871] chan_zap.c: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 11 03:51:04] WARNING[4871] chan_zap.c: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 11 03:51:09] NOTICE[5081] cdr.c: CDR simple logging enabled. [Dec 11 03:51:09] NOTICE[5081] loader.c: 160 modules will be loaded. [Dec 11 03:51:09] WARNING[5081] res_smdi.c: No SMDI interfaces are available to listen on, not starting SMDI listener. [Dec 11 03:51:09] NOTICE[5081] res_odbc.c: Adding ENV var: INFORMIXSERVER=my_special_database [Dec 11 03:51:09] NOTICE[5081] res_odbc.c: Adding ENV var: INFORMIXDIR=/opt/informix [Dec 11 03:51:09] NOTICE[5081] res_odbc.c: res_odbc loaded. [Dec 11 03:51:09] ERROR[5081] chan_vpb.cc: No Voicetronix cards detected [Dec 11 03:51:10] NOTICE[5081] pbx_ael.c: Starting AEL load process. ... [Dec 11 03:52:34] WARNING[5096] chan_zap.c: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 11 03:52:39] WARNING[5096] chan_zap.c: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 11 03:52:44] WARNING[5096] chan_zap.c: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 11 03:52:49] WARNING[5096] chan_zap.c: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 11 03:52:49] NOTICE[5106] chan_iax2.c: Registration of 'frompoltava' rejected: 'Registration Refused' from: '192.168.102.2' [Dec 11 03:52:54] WARNING[5096] chan_zap.c: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 11 03:52:59] WARNING[5096] chan_zap.c: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 11 03:53:04] WARNING[5096] chan_zap.c: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 11 03:53:09] WARNING[5096] chan_zap.c: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 11 03:53:14] WARNING[5096] chan_zap.c: No D-channels available! Using Primary channel 16 as D-channel anyway! |
#vi /etc/asterisk/zapata.conf
|
#; If busydetect is enabled, it is also possible to specify the cadence of your
[trunkgroups] [channels] context=default rxwink=300 ; Atlas seems to use long (250ms) winks ; where the ring cadence is changed *after* the callerid spill. usecallerid=yes hidecallerid=no callwaiting=yes usecallingpres=yes callwaitingcallerid=yes ... ; big jumps in/broken timestamps, usually sent from exotic devices ; and programs. Defaults to 1000. ; channel. Two implementations are currently available - "fixed" ; (with size always equals to jbmax-size) and "adaptive" (with ; variable size, actually the new jb of IAX2). Defaults to fixed. switchtype = euroisdn signalling = pri_cpe context=default group=1 channel => 1-2 |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... T203 Timer: 10000 T305 Timer: 30000 T308 Timer: 4000 T309 Timer: -1 T313 Timer: 4000 N200 Counter: 3 [Dec 11 03:54:57] WARNING[5263]: chan_zap.c:2498 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 11 03:55:02] WARNING[5263]: chan_zap.c:2498 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! poltava*CLI> quit Executing last minute cleanups |
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... [Dec 11 03:55:12] WARNING[5263]: chan_zap.c:2498 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 11 03:55:17] WARNING[5263]: chan_zap.c:2498 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! -- Remote UNIX connection [Dec 11 03:55:22] WARNING[5263]: chan_zap.c:2498 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 11 03:55:27] WARNING[5263]: chan_zap.c:2498 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! -- Remote UNIX connection disconnected [Dec 11 03:55:32] WARNING[5263]: chan_zap.c:2498 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 11 03:55:37] WARNING[5263]: chan_zap.c:2498 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 11 03:55:39] NOTICE[5263]: chan_zap.c:9024 pri_dchannel: PRI got event: HDLC Abort (6) on Primary D-channel of span 1 poltava*CLI> |
#cat /etc/zaptel.conf
loadzone=us defaultzone=us span=1,1,0,ccs,hdb3,crc4 bchan=1-15,17-31 dchan=16 |
#/etc/init.d/zaptel stop
|
#/etc/init.d/zaptel start
Zaptel telephony kernel driver: zaptel. |
#cat /etc/zaptel.conf
loadzone=us defaultzone=us span=1,1,0,ccs,hdb3,crc4 bchan=1-15,17-31 dchan=16 |
#less /var/log/messages
|
#asterisk -rvvv
![]() Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... [Dec 11 04:07:21] WARNING[5648]: chan_zap.c:2498 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 11 04:07:26] WARNING[5648]: chan_zap.c:2498 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 11 04:07:31] WARNING[5648]: chan_zap.c:2498 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 11 04:07:36] WARNING[5648]: chan_zap.c:2498 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 11 04:07:41] WARNING[5648]: chan_zap.c:2498 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 11 04:07:43] NOTICE[5657]: chan_iax2.c:8262 socket_process: Registration of 'frompoltava' rejected: 'Registration Refused' from: '192.168.102.2' [Dec 11 04:07:46] WARNING[5648]: chan_zap.c:2498 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 11 04:07:51] WARNING[5648]: chan_zap.c:2498 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 11 04:07:56] WARNING[5648]: chan_zap.c:2498 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! poltava*CLI> |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... [Dec 11 04:08:16] WARNING[5648]: chan_zap.c:2498 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 11 04:08:21] WARNING[5648]: chan_zap.c:2498 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 11 04:08:26] WARNING[5648]: chan_zap.c:2498 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 11 04:08:31] WARNING[5648]: chan_zap.c:2498 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! [Dec 11 04:08:33] NOTICE[5654]: chan_iax2.c:8262 socket_process: Registration of 'frompoltava' rejected: 'Registration Refused' from: '192.168.102.2' [Dec 11 04:08:36] WARNING[5648]: chan_zap.c:2498 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! -- Remote UNIX connection poltava*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4340.20435.7253 2009-12-11 04:08:00.000000000 -1000 +++ /etc/asterisk/extensions.conf 2009-12-11 04:08:34.000000000 -1000 @@ -4,5 +4,5 @@ exten => 102,n,Wait(1) exten => 102,n,Background(rondo) exten => 102,n,Hangup - +exten => _3XX,1,Dial(ZAP/G1/${EXTEN}) exten => _1XX,1,Dial(SIP/${EXTEN}) |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -rv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... -- Requested transfer capability: 0x00 - SPEECH -- Called G1/301 -- Zap/1-1 is proceeding passing it to SIP/101-0874c160 -- Channel 0/1, span 1 got hangup request, cause 16 -- Hungup 'Zap/1-1' -- No one is available to answer at this time (1:0/0/0) == Auto fallthrough, channel 'SIP/101-0874c160' status is 'NOANSWER' [Dec 11 04:11:44] NOTICE[5845]: chan_iax2.c:8262 socket_process: Registration of 'frompoltava' rejected: 'Registration Refused' from: '192.168.102.2' poltava*CLI> quit Executing last minute cleanups |
#cd /etc/asterisk/
|
#vim extensions.conf
|
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#[ ]
![]() [ ] trunk=yes "/etc/asterisk/iax.conf" 23L, 379C [kiev] ] [ ] type=friend host=dynamic secret=1234 deny=0.0.0.0/0.0.0.0 permit=192.168.102.1/255.255.255.255 trunk=yes ; call-limit=1 ; limitonpeers=yes 13,0-1 All |
#[kiev]
exten => 102,1,Answer ;exten => _3XX,1,Dial(IAX2/G1/${EXTEN}) exten => _3XX,1,Dial(ZAP/G1/${EXTEN}) exten => 102,n,Background(rondo) ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "/etc/asterisk/extensions.conf" 9L, 224C written |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#vi /etc/asterisk/sip.conf
--- /tmp/l3-saved-4340.8174.21209 2009-12-11 04:23:11.000000000 -1000 +++ /etc/asterisk/sip.conf 2009-12-11 04:24:55.000000000 -1000 @@ -1,6 +1,7 @@ [general] context=default register => poltava:1234@192.168.102.1/kiev +register => frompoltava:1234@192.178.102.2/obukhov ; register => nt:1234@xgu.ru/vpoltava videosupport=yes @@ -34,3 +35,8 @@ host=xgu.ru secret=1234 +[obukhov] +type=friend +host=dynamic +secret=123 + |
loadzone=us defaultzone=us span=1,1,0,ccs,hdb3,crc4 bchan=1-15,17-31 dchan=16
Время первой команды журнала | 08:58:49 2009-12-11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 15:23:09 2009-12-11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 6.93 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 3.06 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.55 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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