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

Содержание

Журнал

Пятница (10/29/10)

/dev/pts/8
08:55:51
#lspci | grep zap

/dev/pts/7
08:55:51
#lspci | grep zap

/dev/pts/8
08:56:04
#lspci | grep digi

/dev/pts/7
08:56:04
#lspci | grep digi

/dev/pts/8
08:56:09
#lspci | grep dig

/dev/pts/7
08:56:09
#lspci | grep dig

/dev/pts/8
08:56:11
#lspci | grep di
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02)
/dev/pts/7
08:56:11
#lspci | grep di
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02)
/dev/pts/8
08:56:12
#lspci | grep
Использование: grep [OPTION]... PATTERN [FILE]...
Попробуйте `grep --help' для получения более подробного описания.
/dev/pts/7
08:56:12
#lspci | grep
Использование: grep [OPTION]... PATTERN [FILE]...
Попробуйте `grep --help' для получения более подробного описания.
/dev/pts/8
08:56:15
#lspci
00:00.0 Host bridge: Intel Corporation 82Q35 Express DRAM Controller (rev 02)
00:02.0 VGA compatible controller: Intel Corporation 82Q35 Express Integrated Graphics Controller (rev 02)
00:03.0 Communication controller: Intel Corporation 82Q35 Express MEI Controller (rev 02)
00:03.2 IDE interface: Intel Corporation 82Q35 Express PT IDER Controller (rev 02)
00:03.3 Serial controller: Intel Corporation 82Q35 Express Serial KT Controller (rev 02)
00:19.0 Ethernet controller: Intel Corporation 82566DM-2 Gigabit Network Connection (rev 02)
00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 02)
00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 02)
00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 02)
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02)
...
00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92)
00:1f.0 ISA bridge: Intel Corporation 82801IO (ICH9DO) LPC Interface Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 4 port SATA IDE Controller (rev 02)
00:1f.5 IDE interface: Intel Corporation 82801I (ICH9 Family) 2 port SATA IDE Controller (rev 02)
30:00.0 PCI bridge: Texas Instruments XIO2000(A)/XIO2200(A) PCI Express-to-PCI Bridge (rev 03)
31:08.0 Ethernet controller: Digium, Inc. Device 8000 (rev 11)
/dev/pts/7
08:56:15
#lspci
00:00.0 Host bridge: Intel Corporation 82Q35 Express DRAM Controller (rev 02)
00:02.0 VGA compatible controller: Intel Corporation 82Q35 Express Integrated Graphics Controller (rev 02)
00:03.0 Communication controller: Intel Corporation 82Q35 Express MEI Controller (rev 02)
00:03.2 IDE interface: Intel Corporation 82Q35 Express PT IDER Controller (rev 02)
00:03.3 Serial controller: Intel Corporation 82Q35 Express Serial KT Controller (rev 02)
00:19.0 Ethernet controller: Intel Corporation 82566DM-2 Gigabit Network Connection (rev 02)
00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 02)
00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 02)
00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 02)
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02)
...
00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92)
00:1f.0 ISA bridge: Intel Corporation 82801IO (ICH9DO) LPC Interface Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 4 port SATA IDE Controller (rev 02)
00:1f.5 IDE interface: Intel Corporation 82801I (ICH9 Family) 2 port SATA IDE Controller (rev 02)
30:00.0 PCI bridge: Texas Instruments XIO2000(A)/XIO2200(A) PCI Express-to-PCI Bridge (rev 03)
31:08.0 Ethernet controller: Digium, Inc. Device 8000 (rev 11)
/dev/pts/8
08:56:19
#find /sys -name \*31:08.0\*
/sys/devices/pci0000:00/0000:00:1c.1/0000:30:00.0/0000:31:08.0
/sys/bus/pci/devices/0000:31:08.0
/sys/bus/pci/drivers/wcte12xp/0000:31:08.0
/dev/pts/7
08:56:19
#find /sys -name \*31:08.0\*
/sys/devices/pci0000:00/0000:00:1c.1/0000:30:00.0/0000:31:08.0
/sys/bus/pci/devices/0000:31:08.0
/sys/bus/pci/drivers/wcte12xp/0000:31:08.0
/dev/pts/10
08:56:35
#lspci
00:00.0 Host bridge: Intel Corporation 82Q35 Express DRAM Controller (rev 02)
00:02.0 VGA compatible controller: Intel Corporation 82Q35 Express Integrated Graphics Controller (rev 02)
00:03.0 Communication controller: Intel Corporation 82Q35 Express MEI Controller (rev 02)
00:03.2 IDE interface: Intel Corporation 82Q35 Express PT IDER Controller (rev 02)
00:03.3 Serial controller: Intel Corporation 82Q35 Express Serial KT Controller (rev 02)
00:19.0 Ethernet controller: Intel Corporation 82566DM-2 Gigabit Network Connection (rev 02)
00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 02)
00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 02)
00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 02)
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02)
...
00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92)
00:1f.0 ISA bridge: Intel Corporation 82801IO (ICH9DO) LPC Interface Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 4 port SATA IDE Controller (rev 02)
00:1f.5 IDE interface: Intel Corporation 82801I (ICH9 Family) 2 port SATA IDE Controller (rev 02)
30:00.0 PCI bridge: Texas Instruments XIO2000(A)/XIO2200(A) PCI Express-to-PCI Bridge (rev 03)
31:08.0 Ethernet controller: Digium, Inc. Device 8000 (rev 11)
/dev/pts/8
08:56:51
#modinfo | grep wcte12xp
Usage: modinfo [-0][-F field][-k kernelversion] module...
 Prints out the information about one or more module(s).
 If a fieldname is given, just print out that field (or nothing if not found).
 Otherwise, print all information out in a readable form
 If -0 is given, separate with nul, not newline.
/dev/pts/7
08:56:51
#modinfo | grep wcte12xp
Usage: modinfo [-0][-F field][-k kernelversion] module...
 Prints out the information about one or more module(s).
 If a fieldname is given, just print out that field (or nothing if not found).
 Otherwise, print all information out in a readable form
 If -0 is given, separate with nul, not newline.
/dev/pts/8
08:57:57
#zapconf

/dev/pts/7
08:57:57
#zapconf

/dev/pts/2
08:58:57
#~
pci:0000:31:08.0     wcte12xp+    d161:8000 Wildcard TE121
/dev/pts/1
08:58:57
#~
pci:0000:31:08.0     wcte12xp+    d161:8000 Wildcard TE121
/dev/pts/2
08:59:02
#vi /etc/zaptel.conf
--- /dev/null	2000-07-29 03:04:08.503167764 +0300
+++ /etc/zaptel.conf	2010-10-29 10:01:19.000000000 +0300
@@ -0,0 +1,15 @@
+# Autogenerated by /usr/sbin/zapconf on Fri Oct 29 10:01:19 2010 -- do not hand edit
+# Zaptel Configuration File
+#
+# This file is parsed by the Zaptel Configurator, ztcfg
+#
+# Span 1: WCT1/0 "Wildcard TE121 Card 0" (MASTER) 
+span=1,1,0,ccs,hdb3,crc4
+# termtype: te
+bchan=1-15,17-31
+dchan=16
+
+# Global data
+
+loadzone	= us
+defaultzone	= us
/dev/pts/1
08:59:02
#vi /etc/zaptel.conf
/dev/pts/8
09:01:19
#apt-cache search astgenkey

/dev/pts/7
09:01:19
#apt-cache search astgenkey

/dev/pts/2
09:01:22
#~
  2 dchan=16
  3 loadzone        = us
    defaultzone     = us
  4 defaultzone     = us
~
~
~
~
~
~
...
~
~
~
~
~
~
~
~
~
"/etc/zaptel.conf" 6L, 83C записано
/dev/pts/1
09:01:22
#~
  2 dchan=16
  3 loadzone        = us
    defaultzone     = us
  4 defaultzone     = us
~
~
~
~
~
~
...
~
~
~
~
~
~
~
~
~
"/etc/zaptel.conf" 6L, 83C записано
/dev/pts/10
09:01:41
#cat /etc/zaptel.conf
# Autogenerated by /usr/sbin/zapconf on Fri Oct 29 10:01:19 2010 -- do not hand edit
# Zaptel Configuration File
#
# This file is parsed by the Zaptel Configurator, ztcfg
#
# Span 1: WCT1/0 "Wildcard TE121 Card 0" (MASTER)
span=1,1,0,ccs,hdb3,crc4
# termtype: te
bchan=1-15,17-31
dchan=16
# Global data
loadzone        = us
defaultzone     = us
09:01:44
#ztscan
[1]
active=yes
alarms=UNCONFIGURED
description=Wildcard TE121 Card 0
name=WCT1/0
manufacturer=Digium
devicetype=Wildcard TE121
location=PCI Bus 49 Slot 09
basechan=1
totchans=31
irq=17
type=digital-E1
syncsrc=0
lbo=0 db (CSU)/0-133 feet (DSX-1)
coding_opts=HDB3
framing_opts=CCS,CRC4
coding=
framing=
09:05:14
#ztcfg -vvv
Zaptel Version: 1.4.11
Echo Canceller: MG2
Configuration
======================
SPAN 1: CCS/HDB3 Build-out: 0 db (CSU)/0-133 feet (DSX-1)
Channel map:
Channel 01: Clear channel (Default) (Slaves: 01)
Channel 02: Clear channel (Default) (Slaves: 02)
Channel 03: Clear channel (Default) (Slaves: 03)
Channel 04: Clear channel (Default) (Slaves: 04)
...
Changing signalling on channel 22 from Unused to Clear channel
Changing signalling on channel 23 from Unused to Clear channel
Changing signalling on channel 24 from Unused to Clear channel
Changing signalling on channel 25 from Unused to Clear channel
Changing signalling on channel 26 from Unused to Clear channel
Changing signalling on channel 27 from Unused to Clear channel
Changing signalling on channel 28 from Unused to Clear channel
Changing signalling on channel 29 from Unused to Clear channel
Changing signalling on channel 30 from Unused to Clear channel
Changing signalling on channel 31 from Unused to Clear channel
09:12:42
#ztcfg -vvvgedit
ztcfg: invalid option -- g
Usage: ztcfg [options]
    Valid options are:
  -c <filename>     -- Use <filename> instead of /etc/zaptel.conf
  -d [level]        -- Generate debugging output. (Default level is 1.)
  -f                -- Always reconfigure every channel
  -h                -- Generate this help statement
  -s[span]          -- Deactivate/shutdown span [span]. Deactivates all spans if no [span] is given.
  -a[span]          -- Activate/start span [span]. Activates all spans if no [span] is given.
  -t                -- Test mode only, do not apply
  -v                -- Verbose (more -v's means more verbose)
/dev/pts/2
09:16:29
#service asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
/dev/pts/1
09:16:29
#service asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
/dev/pts/10
09:17:15
#dmesg | less
/dev/pts/7
09:19:10
#apt-cache search ast
abcm2ps - Translates ABC music description files to PostScript
libace-flreactor-5.6.3 - ACE-GUI reactor integration for Fl
libace-rmcast-5.6.3 - ACE reliable multicast library
libace-rmcast-dev - ACE reliable multicast library development files
libace-tmcast-5.6.3 - ACE transactional multicast library
libace-tmcast-dev - ACE transactional multicast library development files
tao-ft - TAO fault tolerant services
acovea - analysis of compiler options via evolutionary algorithms
libacovea-5.1-5 - library for analyzing compiler options via evolutionary algorithms
libacovea-dev - library for analyzing compiler options via evolutionary algorithms
...
libbz2-1.0 - high-quality block-sorting file compressor library - runtime
libbz2-dev - high-quality block-sorting file compressor library - development
libclamav2 - anti-virus utility for Unix - library
libfreetype6 - FreeType 2 font engine, shared library files
linux-tree-2.6.26 - Linux kernel source tree for building Debian kernel images
subversion-tools - Assorted tools related to Subversion
vlc - multimedia player and streamer
vlc-nox - multimedia player and streamer (without X support)
clamav-daemon - anti-virus utility for Unix - scanner daemon
libclamav6 - anti-virus utility for Unix - library
/dev/pts/8
09:19:10
#apt-cache search ast
abcm2ps - Translates ABC music description files to PostScript
libace-flreactor-5.6.3 - ACE-GUI reactor integration for Fl
libace-rmcast-5.6.3 - ACE reliable multicast library
libace-rmcast-dev - ACE reliable multicast library development files
libace-tmcast-5.6.3 - ACE transactional multicast library
libace-tmcast-dev - ACE transactional multicast library development files
tao-ft - TAO fault tolerant services
acovea - analysis of compiler options via evolutionary algorithms
libacovea-5.1-5 - library for analyzing compiler options via evolutionary algorithms
libacovea-dev - library for analyzing compiler options via evolutionary algorithms
...
libbz2-1.0 - high-quality block-sorting file compressor library - runtime
libbz2-dev - high-quality block-sorting file compressor library - development
libclamav2 - anti-virus utility for Unix - library
libfreetype6 - FreeType 2 font engine, shared library files
linux-tree-2.6.26 - Linux kernel source tree for building Debian kernel images
subversion-tools - Assorted tools related to Subversion
vlc - multimedia player and streamer
vlc-nox - multimedia player and streamer (without X support)
clamav-daemon - anti-virus utility for Unix - scanner daemon
libclamav6 - anti-virus utility for Unix - library
09:19:15
#apt-cache search astge

/dev/pts/7
09:19:15
#apt-cache search astge

прошло 13 минут
/dev/pts/2
09:33:05
#cat /etc/asterisk/zapata
zapata-channels.conf  zapata.conf
09:33:05
#cat /etc/asterisk/zapata-channels.conf
; Autogenerated by /usr/sbin/zapconf on Fri Oct 29 10:01:19 2010 -- do not hand edit
; Zaptel Channels Configurations (zapata.conf)
;
; This is not intended to be a complete zapata.conf. Rather, it is intended
; to be #include-d by /etc/zapata.conf that will include the global settings
;
; Span 1: WCT1/0 "Wildcard TE121 Card 0" (MASTER)
group=0,11
context=from-pstn
switchtype = euroisdn
signalling = pri_cpe
channel => 1-15,17-31
context = default
group = 63
/dev/pts/1
09:33:05
#cat /etc/asterisk/zapata
zapata-channels.conf  zapata.conf
09:33:05
#cat /etc/asterisk/zapata-channels.conf
; Autogenerated by /usr/sbin/zapconf on Fri Oct 29 10:01:19 2010 -- do not hand edit
; Zaptel Channels Configurations (zapata.conf)
;
; This is not intended to be a complete zapata.conf. Rather, it is intended
; to be #include-d by /etc/zapata.conf that will include the global settings
;
; Span 1: WCT1/0 "Wildcard TE121 Card 0" (MASTER)
group=0,11
context=from-pstn
switchtype = euroisdn
signalling = pri_cpe
channel => 1-15,17-31
context = default
group = 63
/dev/pts/2
09:33:17
#cat /etc/asterisk/zapata
zapata-channels.conf  zapata.conf
09:33:17
#cat /etc/asterisk/zapata.conf
;
; Zapata telephony interface
;
; Configuration file
;
; You need to restart Asterisk to re-configure the Zap channel
; CLI> reload chan_zap.so
;               will reload the configuration file,
;               but not all configuration options are
;               re-configured during a reload.
...
;  You can see the dringX patterns is to set any one of the dringXcontext fields
;  and they will be printed on the console when an inbound call comes in.
;
;dring1=95,0,0
;dring1context=internal1
;dring2=325,95,0
;dring2context=internal2
; If no pattern is matched here is where we go.
;context=default
;channel => 1
/dev/pts/1
09:33:17
#cat /etc/asterisk/zapata
zapata-channels.conf  zapata.conf
09:33:17
#cat /etc/asterisk/zapata.conf
;
; Zapata telephony interface
;
; Configuration file
;
; You need to restart Asterisk to re-configure the Zap channel
; CLI> reload chan_zap.so
;               will reload the configuration file,
;               but not all configuration options are
;               re-configured during a reload.
...
;  You can see the dringX patterns is to set any one of the dringXcontext fields
;  and they will be printed on the console when an inbound call comes in.
;
;dring1=95,0,0
;dring1context=internal1
;dring2=325,95,0
;dring2context=internal2
; If no pattern is matched here is where we go.
;context=default
;channel => 1
прошло 12 минут
/dev/pts/2
09:45:50
#vi /etc/asterisk/zapata.conf
--- /tmp/l3-saved-3432.20424.29142	2010-10-29 10:45:51.000000000 +0300
+++ /etc/asterisk/zapata.conf	2010-10-29 10:45:58.000000000 +0300
@@ -3,4 +3,3 @@
 switchtype = euroisdn
 signalling = pri_cpe
 channel => 1-15
-context = default
/dev/pts/1
09:45:50
#vi /etc/asterisk/zapata.conf
/dev/pts/2
09:45:58
#cat /etc/asterisk/extensions.conf
[default]
exten => _13XX,1,Dial(SIP/${EXTEN})
exten => _13XXX,1,Dial(SIP/${EXTEN:0:4})
exten => _63XX,1,Wait(2)
exten => _63XX,n,Playback(/tmp/warning1)
exten => _63XX,1,Dial(SIP/13${EXTEN:2})
exten => 1398,1,Record(/tmp/warning1:gsm,,2)
[macro-answer-with-monitor]
exten => s,1,Answer
exten => s,n,Set(FILENAME=voice-${ARG1}-${CALLERID(num)}-${EPOCH})
...
[group2]
include => service
include => Local
include => National
include => International
[group3]
include => service
include => Local
include => National
include => International
/dev/pts/1
09:45:58
#cat /etc/asterisk/extensions.conf
[default]
exten => _13XX,1,Dial(SIP/${EXTEN})
exten => _13XXX,1,Dial(SIP/${EXTEN:0:4})
exten => _63XX,1,Wait(2)
exten => _63XX,n,Playback(/tmp/warning1)
exten => _63XX,1,Dial(SIP/13${EXTEN:2})
exten => 1398,1,Record(/tmp/warning1:gsm,,2)
[macro-answer-with-monitor]
exten => s,1,Answer
exten => s,n,Set(FILENAME=voice-${ARG1}-${CALLERID(num)}-${EPOCH})
...
[group2]
include => service
include => Local
include => National
include => International
[group3]
include => service
include => Local
include => National
include => International
/dev/pts/2
09:47:41
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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
=========================================================================
...
linux3*CLI> reload
app_amd.so          app_followme.so     app_meetme.so       app_playback.so     app_queue.so        app_voicemail.so    cdr                 cdr_csv.so          cdr_custom.so       cdr_manager.so
cdr_odbc.so         cdr_pgsql.so        chan_agent.so       chan_gtalk.so       chan_iax2.so        chan_mgcp.so        chan_sip.so         chan_zap.so         codec_adpcm.so      codec_alaw.so
codec_g726.so       codec_gsm.so        codec_lpc10.so      codec_speex.so      codec_ulaw.so       codec_zap.so        dnsmgr              enum                extconfig           func_odbc.so
http                manager             pbx_ael.so          pbx_config.so       pbx_dundi.so        res_adsi.so         res_crypto.so       res_features.so     res_indications.so  res_jabber.so
res_musiconhold.so  res_odbc.so         res_smdi.so         rtp                 logger
linux3*CLI> restart now
linux3*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
/dev/pts/1
09:47:41
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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
=========================================================================
...
linux3*CLI> reload
app_amd.so          app_followme.so     app_meetme.so       app_playback.so     app_queue.so        app_voicemail.so    cdr                 cdr_csv.so          cdr_custom.so       cdr_manager.so
cdr_odbc.so         cdr_pgsql.so        chan_agent.so       chan_gtalk.so       chan_iax2.so        chan_mgcp.so        chan_sip.so         chan_zap.so         codec_adpcm.so      codec_alaw.so
codec_g726.so       codec_gsm.so        codec_lpc10.so      codec_speex.so      codec_ulaw.so       codec_zap.so        dnsmgr              enum                extconfig           func_odbc.so
http                manager             pbx_ael.so          pbx_config.so       pbx_dundi.so        res_adsi.so         res_crypto.so       res_features.so     res_indications.so  res_jabber.so
res_musiconhold.so  res_odbc.so         res_smdi.so         rtp                 logger
linux3*CLI> restart now
linux3*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
/dev/pts/2
09:48:09
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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
=========================================================================
...
  == Everyone is busy/congested at this time (1:0/1/0)
  == Auto fallthrough, channel 'SIP/1302-088553c8' status is 'CONGESTION'
linux3*CLI> zap
destroy  restart  show
linux3*CLI> zap restart
 Destroying channels and reloading zaptel configuration.
  == Parsing '/etc/asterisk/zapata.conf': Found
[Oct 29 10:48:50] WARNING[5066]: config.c:772 process_text_line: parse error: No category context for line 1 of /etc/asterisk/zapata.conf
[Oct 29 10:48:50] ERROR[5066]: chan_zap.c:12645 setup_zap: Unable to load config zapata.conf
linux3*CLI>
/dev/pts/1
09:48:09
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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
=========================================================================
...
  == Everyone is busy/congested at this time (1:0/1/0)
  == Auto fallthrough, channel 'SIP/1302-088553c8' status is 'CONGESTION'
linux3*CLI> zap
destroy  restart  show
linux3*CLI> zap restart
 Destroying channels and reloading zaptel configuration.
  == Parsing '/etc/asterisk/zapata.conf': Found
[Oct 29 10:48:50] WARNING[5066]: config.c:772 process_text_line: parse error: No category context for line 1 of /etc/asterisk/zapata.conf
[Oct 29 10:48:50] ERROR[5066]: chan_zap.c:12645 setup_zap: Unable to load config zapata.conf
linux3*CLI>
/dev/pts/8
09:50:54
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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
=========================================================================
...
[Oct 29 10:59:48] WARNING[5124]: chan_zap.c:9164 pri_dchannel: Restart requested on odd/unavailable channel number 0/25 on span 1
[Oct 29 10:59:48] WARNING[5124]: chan_zap.c:9164 pri_dchannel: Restart requested on odd/unavailable channel number 0/26 on span 1
[Oct 29 10:59:48] WARNING[5124]: chan_zap.c:9164 pri_dchannel: Restart requested on odd/unavailable channel number 0/27 on span 1
[Oct 29 10:59:48] WARNING[5124]: chan_zap.c:9164 pri_dchannel: Restart requested on odd/unavailable channel number 0/28 on span 1
[Oct 29 10:59:48] WARNING[5124]: chan_zap.c:9164 pri_dchannel: Restart requested on odd/unavailable channel number 0/29 on span 1
[Oct 29 10:59:48] WARNING[5124]: chan_zap.c:9164 pri_dchannel: Restart requested on odd/unavailable channel number 0/30 on span 1
[Oct 29 10:59:48] WARNING[5124]: chan_zap.c:9164 pri_dchannel: Restart requested on odd/unavailable channel number 0/31 on span 1
    -- Got SIP response 405 "Method Not Allowed" back from 192.168.103.202
    -- Got SIP response 405 "Method Not Allowed" back from 192.168.103.202
linux3*CLI>
/dev/pts/7
09:50:54
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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
=========================================================================
...
[Oct 29 10:59:48] WARNING[5124]: chan_zap.c:9164 pri_dchannel: Restart requested on odd/unavailable channel number 0/25 on span 1
[Oct 29 10:59:48] WARNING[5124]: chan_zap.c:9164 pri_dchannel: Restart requested on odd/unavailable channel number 0/26 on span 1
[Oct 29 10:59:48] WARNING[5124]: chan_zap.c:9164 pri_dchannel: Restart requested on odd/unavailable channel number 0/27 on span 1
[Oct 29 10:59:48] WARNING[5124]: chan_zap.c:9164 pri_dchannel: Restart requested on odd/unavailable channel number 0/28 on span 1
[Oct 29 10:59:48] WARNING[5124]: chan_zap.c:9164 pri_dchannel: Restart requested on odd/unavailable channel number 0/29 on span 1
[Oct 29 10:59:48] WARNING[5124]: chan_zap.c:9164 pri_dchannel: Restart requested on odd/unavailable channel number 0/30 on span 1
[Oct 29 10:59:48] WARNING[5124]: chan_zap.c:9164 pri_dchannel: Restart requested on odd/unavailable channel number 0/31 on span 1
    -- Got SIP response 405 "Method Not Allowed" back from 192.168.103.202
    -- Got SIP response 405 "Method Not Allowed" back from 192.168.103.202
linux3*CLI>
/dev/pts/10
09:57:21
#less /etc/asterisk/zapata
09:57:21
#less /etc/asterisk/zapata.conf
09:57:47
#less /etc/asterisk/zapata
09:57:47
#less /etc/asterisk/zapata-channels.conf
09:58:48
#less /etc/asterisk/extensions.conf
/dev/pts/8
10:03:07
#pwd
/root
/dev/pts/7
10:03:07
#pwd
/root
/dev/pts/8
10:03:14
#as
as                    aseqdump              asoundconf            aspell-autobuildhash  assetTag              astgenkey
ascii2enUS_scancode   aseqnet               aspell                aspell-import         asterisk              astman
10:03:14
#ast
asterisk   astgenkey  astman
/dev/pts/7
10:03:14
#as
as                    aseqdump              asoundconf            aspell-autobuildhash  assetTag              astgenkey
ascii2enUS_scancode   aseqnet               aspell                aspell-import         asterisk              astman
10:03:14
#ast
asterisk   astgenkey  astman
/dev/pts/8
10:03:14
#astgenkey -n
This script generates an RSA private and public key pair
in PEM format for use by Asterisk.  You will be asked to
enter a passcode for your key multiple times.  Please
enter the same code each time.  The resulting files will
need to be moved to /var/lib/asterisk/keys if you want
to use them, and any private keys (.key files) will
need to be initialized at runtime either by running
Asterisk with the '-i' option, or with the 'init keys'
command once Asterisk is running.
Press ENTER to continue or ^C to cancel.
Enter key name: linux3.unix.nt
Generating SSL key 'linux3.unix.nt':
Generating RSA private key, 1024 bit long modulus
...................++++++
...............++++++
e is 65537 (0x10001)
writing RSA key
Key creation successful.
Public key:  linux3.unix.nt.pub
Private key: linux3.unix.nt.key
/dev/pts/7
10:03:14
#astgenkey -n
This script generates an RSA private and public key pair
in PEM format for use by Asterisk.  You will be asked to
enter a passcode for your key multiple times.  Please
enter the same code each time.  The resulting files will
need to be moved to /var/lib/asterisk/keys if you want
to use them, and any private keys (.key files) will
need to be initialized at runtime either by running
Asterisk with the '-i' option, or with the 'init keys'
command once Asterisk is running.
Press ENTER to continue or ^C to cancel.
Enter key name: linux3.unix.nt
Generating SSL key 'linux3.unix.nt':
Generating RSA private key, 1024 bit long modulus
...................++++++
...............++++++
e is 65537 (0x10001)
writing RSA key
Key creation successful.
Public key:  linux3.unix.nt.pub
Private key: linux3.unix.nt.key
/dev/pts/8
10:03:40
#cp linux3.unix.nt.key /var/lib/
alsa/                binfmts/             doc-base/            initramfs-tools/     misc/                samba/               tex-common/          vim/
apt/                 dbus/                dpkg/                initscripts/         mlocate/             scrollkeeper/        ucf/                 x11/
aptitude/            deborphan/           exim4/               insserv/             NetworkManager/      sendmail/            update-manager/      xkb/
aspell/              defoma/              gconf/               libuuid/             nfs/                 sgml-base/           update-notifier/     xml-core/
asterisk/            dhcp3/               gdm/                 logrotate/           python-support/      snmp/                urandom/
bind/                dictionaries-common/ hal/                 menu-xdg/            rpm/                 synaptic/            usbutils/
10:03:40
#cp linux3.unix.nt.key /var/lib/as
aspell/   asterisk/
/dev/pts/7
10:03:40
#cp linux3.unix.nt.key /var/lib/
alsa/                binfmts/             doc-base/            initramfs-tools/     misc/                samba/               tex-common/          vim/
apt/                 dbus/                dpkg/                initscripts/         mlocate/             scrollkeeper/        ucf/                 x11/
aptitude/            deborphan/           exim4/               insserv/             NetworkManager/      sendmail/            update-manager/      xkb/
aspell/              defoma/              gconf/               libuuid/             nfs/                 sgml-base/           update-notifier/     xml-core/
asterisk/            dhcp3/               gdm/                 logrotate/           python-support/      snmp/                urandom/
bind/                dictionaries-common/ hal/                 menu-xdg/            rpm/                 synaptic/            usbutils/
10:03:40
#cp linux3.unix.nt.key /var/lib/as
aspell/   asterisk/
/dev/pts/8
10:03:40
#cp linux3.unix.nt.key /var/lib/asterisk/
astdb   moh/    sounds/
/dev/pts/7
10:03:40
#cp linux3.unix.nt.key /var/lib/asterisk/
astdb   moh/    sounds/
/dev/pts/8
10:03:40
#mkdir /var/lib/asterisk/keys

/dev/pts/7
10:03:40
#mkdir /var/lib/asterisk/keys

/dev/pts/8
10:05:00
#cp linux3.unix.nt.key /var/lib/asterisk/keys/

/dev/pts/7
10:05:00
#cp linux3.unix.nt.key /var/lib/asterisk/keys/

/dev/pts/8
10:05:53
#chown asterisk:asterisk /var/lib/asterisk/keys/linux3.unix.nt.key

/dev/pts/7
10:05:53
#chown asterisk:asterisk /var/lib/asterisk/keys/linux3.unix.nt.key

/dev/pts/8
10:05:57
#scp linux3.unix.nt
linux3.unix.nt:      linux3.unix.nt.key   linux3.unix.nt.pub
/dev/pts/7
10:05:57
#scp linux3.unix.nt
linux3.unix.nt:      linux3.unix.nt.key   linux3.unix.nt.pub
/dev/pts/8
10:05:57
#scp linux3.unix.nt.pub linux4.unix.nt:
The authenticity of host 'linux4.unix.nt (192.168.104.1)' can't be established.
RSA key fingerprint is ab:8e:66:0f:7a:00:9f:29:2f:db:5d:c5:36:00:10:d8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'linux4.unix.nt,192.168.104.1' (RSA) to the list of known hosts.
root@linux4.unix.nt's password:
linux3.unix.nt.pub                                                                                                                                                           100%  272     0.3KB/s   00:00
/dev/pts/7
10:05:57
#scp linux3.unix.nt.pub linux4.unix.nt:
The authenticity of host 'linux4.unix.nt (192.168.104.1)' can't be established.
RSA key fingerprint is ab:8e:66:0f:7a:00:9f:29:2f:db:5d:c5:36:00:10:d8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'linux4.unix.nt,192.168.104.1' (RSA) to the list of known hosts.
root@linux4.unix.nt's password:
linux3.unix.nt.pub                                                                                                                                                           100%  272     0.3KB/s   00:00
/dev/pts/8
10:06:41
#cp /tmp/
gconfd-roma/               keyring-EyVOsW/            linux4.unix.nt.pub         monitor_exec.log           seahorse-kiKQQ7/           virtual-roma.yR3SZ2/       .X11-unix/
.ICE-unix/                 l3-saved-3432.30189.29772  mapping-roma               orbit-roma/                v343639/                   .X0-lock
/dev/pts/7
10:06:41
#cp /tmp/
gconfd-roma/               keyring-EyVOsW/            linux4.unix.nt.pub         monitor_exec.log           seahorse-kiKQQ7/           virtual-roma.yR3SZ2/       .X11-unix/
.ICE-unix/                 l3-saved-3432.30189.29772  mapping-roma               orbit-roma/                v343639/                   .X0-lock
/dev/pts/8
10:06:41
#cp /tmp/linux4.unix.nt.pub /var/lib/
alsa/                binfmts/             doc-base/            initramfs-tools/     misc/                samba/               tex-common/          vim/
apt/                 dbus/                dpkg/                initscripts/         mlocate/             scrollkeeper/        ucf/                 x11/
aptitude/            deborphan/           exim4/               insserv/             NetworkManager/      sendmail/            update-manager/      xkb/
aspell/              defoma/              gconf/               libuuid/             nfs/                 sgml-base/           update-notifier/     xml-core/
asterisk/            dhcp3/               gdm/                 logrotate/           python-support/      snmp/                urandom/
bind/                dictionaries-common/ hal/                 menu-xdg/            rpm/                 synaptic/            usbutils/
10:06:41
#cp /tmp/linux4.unix.nt.pub /var/lib/asterisk/
astdb   keys/   moh/    sounds/
10:06:41
#cp /tmp/linux4.unix.nt.pub /var/lib/asterisk/keys/

/dev/pts/7
10:06:41
#cp /tmp/linux4.unix.nt.pub /var/lib/
alsa/                binfmts/             doc-base/            initramfs-tools/     misc/                samba/               tex-common/          vim/
apt/                 dbus/                dpkg/                initscripts/         mlocate/             scrollkeeper/        ucf/                 x11/
aptitude/            deborphan/           exim4/               insserv/             NetworkManager/      sendmail/            update-manager/      xkb/
aspell/              defoma/              gconf/               libuuid/             nfs/                 sgml-base/           update-notifier/     xml-core/
asterisk/            dhcp3/               gdm/                 logrotate/           python-support/      snmp/                urandom/
bind/                dictionaries-common/ hal/                 menu-xdg/            rpm/                 synaptic/            usbutils/
10:06:41
#cp /tmp/linux4.unix.nt.pub /var/lib/asterisk/
astdb   keys/   moh/    sounds/
10:06:41
#cp /tmp/linux4.unix.nt.pub /var/lib/asterisk/keys/

/dev/pts/8
10:10:04
#find / | grep iaxtel
/usr/share/asterisk/keys/iaxtel.pub
/dev/pts/7
10:10:04
#find / | grep iaxtel
/usr/share/asterisk/keys/iaxtel.pub
/dev/pts/8
10:10:58
#mv /var/lib/asterisk/keys/* /usr/share/asterisk/keys/

/dev/pts/7
10:10:58
#mv /var/lib/asterisk/keys/* /usr/share/asterisk/keys/

/dev/pts/8
10:11:49
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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
=========================================================================
...
[Oct 29 11:11:58] WARNING[5930]: chan_zap.c:9164 pri_dchannel: Restart requested on odd/unavailable channel number 0/31 on span 1
[Oct 29 11:12:09] NOTICE[5915]: chan_iax2.c:5601 register_verify: Host 192.168.104.1 failed MD5 authentication for 'vn' (3b3bc6b18279c8ddb1bf745e4689b557 != 75fec3e76622d23d366db933ae69fa47)
    -- Executing [1401@group2:1] Macro("SIP/1302-092d7390", "dial-with-callerid|IAX2/vn/1401") in new stack
    -- Executing [s@macro-dial-with-callerid:1] Set("SIP/1302-092d7390", "CALLERID(name)="Roma Krul'ko (Softphone) (Kiev)"") in new stack
    -- Executing [s@macro-dial-with-callerid:2] Dial("SIP/1302-092d7390", "IAX2/vn/1401") in new stack
[Oct 29 11:12:19] WARNING[5937]: app_dial.c:1202 dial_exec_full: Unable to create channel of type 'IAX2' (cause 3 - No route to destination)
  == Everyone is busy/congested at this time (1:0/0/1)
  == Auto fallthrough, channel 'SIP/1302-092d7390' status is 'CHANUNAVAIL'
[Oct 29 11:12:39] NOTICE[5917]: chan_iax2.c:5682 authenticate: No way to send secret to peer '192.168.104.1' (their methods: 4)
linux3*CLI>
/dev/pts/7
10:11:49
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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
=========================================================================
...
[Oct 29 11:11:58] WARNING[5930]: chan_zap.c:9164 pri_dchannel: Restart requested on odd/unavailable channel number 0/31 on span 1
[Oct 29 11:12:09] NOTICE[5915]: chan_iax2.c:5601 register_verify: Host 192.168.104.1 failed MD5 authentication for 'vn' (3b3bc6b18279c8ddb1bf745e4689b557 != 75fec3e76622d23d366db933ae69fa47)
    -- Executing [1401@group2:1] Macro("SIP/1302-092d7390", "dial-with-callerid|IAX2/vn/1401") in new stack
    -- Executing [s@macro-dial-with-callerid:1] Set("SIP/1302-092d7390", "CALLERID(name)="Roma Krul'ko (Softphone) (Kiev)"") in new stack
    -- Executing [s@macro-dial-with-callerid:2] Dial("SIP/1302-092d7390", "IAX2/vn/1401") in new stack
[Oct 29 11:12:19] WARNING[5937]: app_dial.c:1202 dial_exec_full: Unable to create channel of type 'IAX2' (cause 3 - No route to destination)
  == Everyone is busy/congested at this time (1:0/0/1)
  == Auto fallthrough, channel 'SIP/1302-092d7390' status is 'CHANUNAVAIL'
[Oct 29 11:12:39] NOTICE[5917]: chan_iax2.c:5682 authenticate: No way to send secret to peer '192.168.104.1' (their methods: 4)
linux3*CLI>
/dev/pts/8
10:13:30
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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
=========================================================================
...
    -- Releasing IAX2/nk-4723 and IAX2/msk-3029
    -- Hungup 'IAX2/msk-3029'
  == Spawn extension (macro-dial-with-callerid2, s, 2) exited non-zero on 'IAX2/nk-4723' in macro 'dial-with-callerid2'
  == Spawn extension (macro-dial-with-callerid2, s, 2) exited non-zero on 'IAX2/nk-4723'
    -- Hungup 'IAX2/nk-4723'
    -- Got SIP response 405 "Method Not Allowed" back from 192.168.103.202
linux3*CLI> restart now
linux3*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
/dev/pts/7
10:13:30
#asterisk -rvvv
Asterisk 1.4.21.2~dfsg-3+lenny1, 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
=========================================================================
...
    -- Releasing IAX2/nk-4723 and IAX2/msk-3029
    -- Hungup 'IAX2/msk-3029'
  == Spawn extension (macro-dial-with-callerid2, s, 2) exited non-zero on 'IAX2/nk-4723' in macro 'dial-with-callerid2'
  == Spawn extension (macro-dial-with-callerid2, s, 2) exited non-zero on 'IAX2/nk-4723'
    -- Hungup 'IAX2/nk-4723'
    -- Got SIP response 405 "Method Not Allowed" back from 192.168.103.202
linux3*CLI> restart now
linux3*CLI>
Disconnected from Asterisk server
Executing last minute cleanups

Файлы

  • /etc/asterisk/extensions.conf
  • /etc/asterisk/zapata
  • /etc/asterisk/zapata-channels.conf
  • /etc/asterisk/zapata.conf
  • /etc/zaptel.conf
  • /etc/asterisk/extensions.conf
    >
    [default]
    exten => _13XX,1,Dial(SIP/${EXTEN})
    exten => _13XXX,1,Dial(SIP/${EXTEN:0:4})
    exten => _63XX,1,Wait(2)
    exten => _63XX,n,Playback(/tmp/warning1)
    exten => _63XX,1,Dial(SIP/13${EXTEN:2})
    exten => 1398,1,Record(/tmp/warning1:gsm,,2)
    [macro-answer-with-monitor]
    exten => s,1,Answer
    exten => s,n,Set(FILENAME=voice-${ARG1}-${CALLERID(num)}-${EPOCH})
    exten => s,n,Set(MONITOR_EXEC=/usr/local/bin/monitor_exec)
    exten => s,n,Monitor(wav,${FILENAME},m,b)
    exten => s,n,Dial(SIP/${ARG1},10,t,T)
    exten => s,n,GotoIf($[${DIALSTATUS} = BUSY]?busy:unavail)
    exten => s,n(unavail),Playback(voicemail-greeting-${ARG1})
    exten => s,n,Voicemail(${ARG1}@default,s)
    exten => s,n(busy),Hangup
    [Local]
    exten => 1304,1,Festival(Festival  is  a  general  purpose  text-to-speech  system.  As well as simply rendering text as speech it can be used in an interactive command mode for testing and developing various aspects of speech synthesis technology.)
    exten => 1303,1,Answer
    exten => 1303,n,SetMusicOnhold(default)
    exten => 1303,n,Queue(queine1,m)
    ;exten => 1302,1,Dial(SIP/${EXTEN})
    exten => _13XX,1,Macro(answer-with-monitor,${EXTEN})
    [service]
    exten => 1399,1,Answer
    exten => 1399,n,Wait(1)
    exten => 1399,n,Playback(demo-thanks)
    exten => 1399,n,Hangup
    exten => 1398,1,VoiceMailMain()
    exten => 1397,n,Record(voicemail-greeting-${CALLERID(number)}:gsm)
    exten => 1396,1,Goto(menu,s,1)
    exten => 1394,1,MeetMe(100,M)
    exten => 1393,1,MeetMe(100,Mm)
    exten => 1392,1,MeetMe(100,Mt)
    exten => _1390X,1,Wait(1)
    exten => _1390X,n,Record(/tmp/message-${EXTEN:4}:gsm)
    exten => _1300X,1,AgentLogin(100${EXTEN:4})
    [menu]
    exten => s,1,Background(/tmp/message-1)
    exten => s,n(start),Background(/tmp/message-2)
    exten => s,n,WaitExten(5)
    exten => s,n,Background(/tmp/message-6)
    exten => s,n,WaitExten(5)
    exten => s,n,Background(/tmp/message-2)
    exten => s,n,WaitExten(5)
    exten => s,n,Background(/tmp/message-7)
    exten => i,1,Background(/tmp/message-3)
    exten => i,n,Goto(s,start)
    exten => 9,1,Goto(s,start)
    exten => 1,1,Goto(submenu,s,1)
    exten => 2,1,Background(/tmp/message-5)
    exten => 2,n,System(touch /tmp/zdes-byl-asterisk)
    [submenu]
    exten => s,1(start),Background(/tmp/message-4)
    exten => 1,1,Goto(Local,1301,1)
    exten => 2,1,Goto(Local,1302,1)
    exten => 9,1,Goto(s,start)
    exten => 0,1,Goto(menu,s,start)
    [macro-dial-with-callerid]
    exten => s,1,Set(CALLERID(name)="${CALLERID(name)} (Kiev)")
    exten => s,n,Dial(${ARG1})
    [National]
    exten => _11XX,1,Macro(dial-with-callerid,IAX2/nk/${EXTEN})
    exten => _12XX,1,Macro(dial-with-callerid,IAX2/rv/${EXTEN})
    exten => _14XX,1,Macro(dial-with-callerid,IAX2/vn/${EXTEN})
    [macro-dial-with-callerid2]
    exten => s,1,Set(CALLERID(name)="${CALLERID(name)} (Ukraine)")
    exten => s,n,Dial(${ARG1})
    [International]
    ;Russia
    exten => _1[5-8]XX,1,Macro(dial-with-callerid2,IAX2/msk/${EXTEN})
    ;Belaruss
    exten => _19XX,1,Macro(dial-with-callerid2,IAX2/bb/${EXTEN})
    exten => _2[0-2]XX,1,Macro(dial-with-callerid2,IAX2/bb/${EXTEN})
    [group1]
    include => service
    include => Local
    include => National
    include => International
    [group2]
    include => service
    include => Local
    include => National
    include => International
    [group3]
    include => service
    include => Local
    include => National
    include => International
    
    /etc/asterisk/zapata
    >
    zapata-channels.conf  zapata.conf
    
    /etc/asterisk/zapata-channels.conf
    >
    ; Autogenerated by /usr/sbin/zapconf on Fri Oct 29 10:01:19 2010 -- do not hand edit
    ; Zaptel Channels Configurations (zapata.conf)
    ;
    ; This is not intended to be a complete zapata.conf. Rather, it is intended
    ; to be #include-d by /etc/zapata.conf that will include the global settings
    ;
    ; Span 1: WCT1/0 "Wildcard TE121 Card 0" (MASTER)
    group=0,11
    context=from-pstn
    switchtype = euroisdn
    signalling = pri_cpe
    channel => 1-15,17-31
    context = default
    group = 63
    
    /etc/asterisk/zapata.conf
    >
    ;
    ; Zapata telephony interface
    ;
    ; Configuration file
    ;
    ; You need to restart Asterisk to re-configure the Zap channel
    ; CLI> reload chan_zap.so
    ;               will reload the configuration file,
    ;               but not all configuration options are
    ;               re-configured during a reload.
    [trunkgroups]
    ;
    ; Trunk groups are used for NFAS or GR-303 connections.
    ;
    ; Group: Defines a trunk group.
    ;        trunkgroup => <trunkgroup>,<dchannel>[,<backup1>...]
    ;
    ;        trunkgroup  is the numerical trunk group to create
    ;        dchannel    is the zap channel which will have the
    ;                    d-channel for the trunk.
    ;        backup1     is an optional list of backup d-channels.
    ;
    ;trunkgroup => 1,24,48
    ;trunkgroup => 1,24
    ;
    ; Spanmap: Associates a span with a trunk group
    ;        spanmap => <zapspan>,<trunkgroup>[,<logicalspan>]
    ;
    ;        zapspan     is the zap span number to associate
    ;        trunkgroup  is the trunkgroup (specified above) for the mapping
    ;        logicalspan is the logical span number within the trunk group to use.
    ;                    if unspecified, no logical span number is used.
    ;
    ;spanmap => 1,1,1
    ;spanmap => 2,1,2
    ;spanmap => 3,1,3
    ;spanmap => 4,1,4
    [channels]
    ;
    ; Default language
    ;
    ;language=en
    ;
    ; Default context
    ;
    context=default
    ;
    ; Switchtype:  Only used for PRI.
    ;
    ; national:       National ISDN 2 (default)
    ; dms100:         Nortel DMS100
    ; 4ess:           AT&T 4ESS
    ; 5ess:           Lucent 5ESS
    ; euroisdn:       EuroISDN
    ; ni1:            Old National ISDN 1
    ; qsig:           Q.SIG
    ;
    switchtype=national
    ;
    ; Some switches (AT&T especially) require network specific facility IE
    ; supported values are currently 'none', 'sdn', 'megacom', 'tollfreemegacom', 'accunet'
    ;
    ;nsf=none
    ;
    ; PRI Dialplan:  Only RARELY used for PRI.
    ;
    ; unknown:        Unknown
    ; private:        Private ISDN
    ; local:          Local ISDN
    ; national:       National ISDN
    ; international:  International ISDN
    ; dynamic:        Dynamically selects the appropriate dialplan
    ;
    ;pridialplan=national
    ;
    ; PRI Local Dialplan:  Only RARELY used for PRI (sets the calling number's numbering plan)
    ;
    ; unknown:        Unknown
    ; private:        Private ISDN
    ; local:          Local ISDN
    ; national:       National ISDN
    ; international:  International ISDN
    ; dynamic:        Dynamically selects the appropriate dialplan
    ;
    ;prilocaldialplan=national
    ;
    ; PRI callerid prefixes based on the given TON/NPI (dialplan)
    ; This is especially needed for euroisdn E1-PRIs
    ;
    ; sample 1 for Germany
    ;internationalprefix = 00
    ;nationalprefix = 0
    ;localprefix = 0711
    ;privateprefix = 07115678
    ;unknownprefix =
    ;
    ; sample 2 for Germany
    ;internationalprefix = +
    ;nationalprefix = +49
    ;localprefix = +49711
    ;privateprefix = +497115678
    ;unknownprefix =
    ;
    ; PRI resetinterval: sets the time in seconds between restart of unused
    ; channels, defaults to 3600; minimum 60 seconds.  Some PBXs don't like
    ; channel restarts. so set the interval to a very long interval e.g. 100000000
    ; or 'never' to disable *entirely*.
    ;
    ;resetinterval = 3600
    ;
    ; Overlap dialing mode (sending overlap digits)
    ;
    ;overlapdial=yes
    ;
    ; PRI Out of band indications.
    ; Enable this to report Busy and Congestion on a PRI using out-of-band
    ; notification. Inband indication, as used by Asterisk doesn't seem to work
    ; with all telcos.
    ;
    ; outofband:      Signal Busy/Congestion out of band with RELEASE/DISCONNECT
    ; inband:         Signal Busy/Congestion using in-band tones
    ; passthrough:    Listen to the telco
    ;
    ; priindication = outofband
    ;
    ; PRI/BRI transfers (HOLD -> SETUP -> ECT/Hangup)
    ;
    ; Configure how transfers are initiated. ECT should be preferred
    ;
    ; no:           no transfers allowed (results in hangup)
    ; ect:          use ECT (facility)
    ; hangup:       transfer on hangup (if your phones dont support ECT)
    ;
    ; pritransfer = ect
    ;
    ; If you need to override the existing channels selection routine and force all
    ; PRI channels to be marked as exclusively selected, set this to yes.
    ; priexclusive = yes
    ;
    ; ISDN Timers
    ; All of the ISDN timers and counters that are used are configurable.  Specify
    ; the timer name, and its value (in ms for timers).
    ; K:    Layer 2 max number of outstanding unacknowledged I frames (default 7)
    ; N200: Layer 2 max number of retransmissions of a frame (default 3)
    ; T200: Layer 2 max time before retransmission of a frame (default 1000 ms)
    ; T203: Layer 2 max time without frames being exchanged (default 10000 ms)
    ; T305: Wait for DISCONNECT acknowledge (default 30000 ms)
    ; T308: Wait for RELEASE acknowledge (default 4000 ms)
    ; T309: Maintain active calls on Layer 2 disconnection (default -1, Asterisk clears calls)
    ;       EuroISDN: 6000 to 12000 ms, according to (N200 + 1) x T200 + 2s
    ;       May vary in other ISDN standards (Q.931 1993 : 90000 ms)
    ; T313: Wait for CONNECT acknowledge, CPE side only (default 3000 ms)
    ;
    ; pritimer => t200,1000
    ; pritimer => t313,4000
    ;
    ; To enable transmission of facility-based ISDN supplementary services (such
    ; as caller name from CPE over facility), enable this option.
    ; facilityenable = yes
    ;
    ;
    ; Signalling method (default is fxs).  Valid values:
    ; em:             E & M
    ; em_w:           E & M Wink
    ; featd:          Feature Group D (The fake, Adtran style, DTMF)
    ; featdmf:        Feature Group D (The real thing, MF (domestic, US))
    ; featdmf_ta:     Feature Group D (The real thing, MF (domestic, US)) through
    ;                 a Tandem Access point
    ; featb:          Feature Group B (MF (domestic, US))
    ; fgccama         Feature Group C-CAMA (DP DNIS, MF ANI)
    ; fgccamamf       Feature Group C-CAMA MF (MF DNIS, MF ANI)
    ; fxs_ls:         FXS (Loop Start)
    ; fxs_gs:         FXS (Ground Start)
    ; fxs_ks:         FXS (Kewl Start)
    ; fxo_ls:         FXO (Loop Start)
    ; fxo_gs:         FXO (Ground Start)
    ; fxo_ks:         FXO (Kewl Start)
    ; pri_cpe:        PRI signalling, CPE side
    ; pri_net:        PRI signalling, Network side
    ; gr303fxoks_net: GR-303 Signalling, FXO Loopstart, Network side
    ; gr303fxsks_cpe: GR-303 Signalling, FXS Loopstart, CPE side
    ; sf:             SF (Inband Tone) Signalling
    ; sf_w:           SF Wink
    ; sf_featd:       SF Feature Group D (The fake, Adtran style, DTMF)
    ; sf_featdmf:     SF Feature Group D (The real thing, MF (domestic, US))
    ; sf_featb:       SF Feature Group B (MF (domestic, US))
    ; e911:           E911 (MF) style signalling
    ;
    ; The following are used for Radio interfaces:
    ; fxs_rx:         Receive audio/COR on an FXS kewlstart interface (FXO at the
    ;                 channel bank)
    ; fxs_tx:         Transmit audio/PTT on an FXS loopstart interface (FXO at the
    ;                 channel bank)
    ; fxo_rx:         Receive audio/COR on an FXO loopstart interface (FXS at the
    ;                 channel bank)
    ; fxo_tx:         Transmit audio/PTT on an FXO groundstart interface (FXS at
    ;                 the channel bank)
    ; em_rx:          Receive audio/COR on an E&M interface (1-way)
    ; em_tx:          Transmit audio/PTT on an E&M interface (1-way)
    ; em_txrx:        Receive audio/COR AND Transmit audio/PTT on an E&M interface
    ;                 (2-way)
    ; em_rxtx:        Same as em_txrx (for our dyslexic friends)
    ; sf_rx:          Receive audio/COR on an SF interface (1-way)
    ; sf_tx:          Transmit audio/PTT on an SF interface (1-way)
    ; sf_txrx:        Receive audio/COR AND Transmit audio/PTT on an SF interface
    ;                 (2-way)
    ; sf_rxtx:        Same as sf_txrx (for our dyslexic friends)
    ;
    signalling=fxo_ls
    ;
    ; If you have an outbound signalling format that is different from format
    ; specified above (but compatible), you can specify outbound signalling format,
    ; (see below). The 'signalling' format specified will be the inbound signalling
    ; format. If you only specify 'signalling', then it will be the format for
    ; both inbound and outbound.
    ;
    ; signalling=featdmf
    ; outsignalling=featb
    ;
    ; For Feature Group D Tandem access, to set the default CIC and OZZ use these
    ; parameters:
    ;defaultozz=0000
    ;defaultcic=303
    ;
    ; A variety of timing parameters can be specified as well
    ; Including:
    ;    prewink:     Pre-wink time (default 50ms)
    ;    preflash:    Pre-flash time (default 50ms)
    ;    wink:        Wink time (default 150ms)
    ;    flash:       Flash time (default 750ms)
    ;    start:       Start time (default 1500ms)
    ;    rxwink:      Receiver wink time (default 300ms)
    ;    rxflash:     Receiver flashtime (default 1250ms)
    ;    debounce:    Debounce timing (default 600ms)
    ;
    rxwink=300              ; Atlas seems to use long (250ms) winks
    ;
    ; How long generated tones (DTMF and MF) will be played on the channel
    ; (in milliseconds)
    ;toneduration=100
    ;
    ; Whether or not to do distinctive ring detection on FXO lines
    ;
    ;usedistinctiveringdetection=yes
    ;distinctiveringaftercid=yes    ; enable dring detection after callerid for those countries like Australia
                                    ; where the ring cadence is changed *after* the callerid spill.
    ;
    ; Whether or not to use caller ID
    ;
    usecallerid=yes
    ;
    ; Type of caller ID signalling in use
    ;     bell     = bell202 as used in US
    ;     v23      = v23 as used in the UK
    ;     v23_jp   = v23 as used in Japan
    ;     dtmf     = DTMF as used in Denmark, Sweden and Netherlands
    ;     smdi     = Use SMDI for callerid.  Requires SMDI to be enabled (usesmdi).
    ;
    ;cidsignalling=bell
    ;
    ; What signals the start of caller ID
    ;     ring     = a ring signals the start
    ;     polarity = polarity reversal signals the start
    ;
    ;cidstart=ring
    ;
    ; Whether or not to hide outgoing caller ID (Override with *67 or *82)
    ;
    hidecallerid=no
    ;
    ; Whether or not to enable call waiting on internal extensions
    ; With this set to 'yes', busy extensions will hear the call-waiting
    ; tone, and can use hook-flash to switch between callers. The Dial()
    ; app will not return the "BUSY" result for extensions.
    ;
    callwaiting=yes
    ;
    ; Whether or not restrict outgoing caller ID (will be sent as ANI only, not
    ; available for the user)
    ; Mostly use with FXS ports
    ;
    ;restrictcid=no
    ;
    ; Whether or not use the caller ID presentation for the outgoing call that the
    ; calling switch is sending.
    ; See doc/callingpres.txt
    ;
    usecallingpres=yes
    ;
    ; Some countries (UK) have ring tones with different ring tones (ring-ring),
    ; which means the callerid needs to be set later on, and not just after
    ; the first ring, as per the default.
    ;
    ;sendcalleridafter=1
    ;
    ;
    ; Support Caller*ID on Call Waiting
    ;
    callwaitingcallerid=yes
    ;
    ; Support three-way calling
    ;
    threewaycalling=yes
    ;
    ; For FXS ports (either direct analog or over T1/E1):
    ;   Support flash-hook call transfer (requires three way calling)
    ;   Also enables call parking (overrides the 'canpark' parameter)
    ;
    ; For digital ports using ISDN PRI protocols:
    ;   Support switch-side transfer (called 2BCT, RLT or other names)
    ;   This setting must be enabled on both ports involved, and the
    ;   'facilityenable' setting must also be enabled to allow sending
    ;   the transfer to the ISDN switch, since it sent in a FACILITY
    ;   message.
    ;
    transfer=yes
    ;
    ; Allow call parking
    ; ('canpark=no' is overridden by 'transfer=yes')
    ;
    canpark=yes
    ;
    ; Support call forward variable
    ;
    cancallforward=yes
    ;
    ; Whether or not to support Call Return (*69)
    ;
    callreturn=yes
    ;
    ; Stutter dialtone support: If a mailbox is specified without a voicemail
    ; context, then when voicemail is received in a mailbox in the default
    ; voicemail context in voicemail.conf, taking the phone off hook will cause a
    ; stutter dialtone instead of a normal one.
    ;
    ; If a mailbox is specified *with* a voicemail context, the same will result
    ; if voicemail received in mailbox in the specified voicemail context.
    ;
    ; for default voicemail context, the example below is fine:
    ;
    ;mailbox=1234
    ;
    ; for any other voicemail context, the following will produce the stutter tone:
    ;
    ;mailbox=1234@context
    ;
    ; Enable echo cancellation
    ; Use either "yes", "no", or a power of two from 32 to 256 if you wish to
    ; actually set the number of taps of cancellation.
    ;
    ; Note that when setting the number of taps, the number 256 does not translate
    ; to 256 ms of echo cancellation.  echocancel=256 means 256 / 8 = 32 ms.
    ;
    ; Note that if any of your Zaptel cards have hardware echo cancellers,
    ; then this setting only turns them on and off; numeric settings will
    ; be treated as "yes". There are no special settings required for
    ; hardware echo cancellers; when present and enabled in their kernel
    ; modules, they take precedence over the software echo canceller compiled
    ; into Zaptel automatically.
    ;
    echocancel=yes
    ;
    ; Generally, it is not necessary (and in fact undesirable) to echo cancel when
    ; the circuit path is entirely TDM.  You may, however, change this behavior
    ; by enabling the echo cancel during pure TDM bridging below.
    ;
    echocancelwhenbridged=yes
    ;
    ; In some cases, the echo canceller doesn't train quickly enough and there
    ; is echo at the beginning of the call.  Enabling echo training will cause
    ; asterisk to briefly mute the channel, send an impulse, and use the impulse
    ; response to pre-train the echo canceller so it can start out with a much
    ; closer idea of the actual echo.  Value may be "yes", "no", or a number of
    ; milliseconds to delay before training (default = 400)
    ;
    ; WARNING:  In some cases this option can make echo worse!  If you are
    ; trying to debug an echo problem, it is worth checking to see if your echo
    ; is better with the option set to yes or no.  Use whatever setting gives
    ; the best results.
    ;
    ; Note that these parameters do not apply to hardware echo cancellers.
    ;
    ;echotraining=yes
    ;echotraining=800
    ;
    ; If you are having trouble with DTMF detection, you can relax the DTMF
    ; detection parameters.  Relaxing them may make the DTMF detector more likely
    ; to have "talkoff" where DTMF is detected when it shouldn't be.
    ;
    ;relaxdtmf=yes
    ;
    ; You may also set the default receive and transmit gains (in dB)
    ;
    rxgain=0.0
    txgain=0.0
    ;
    ; Logical groups can be assigned to allow outgoing rollover.  Groups range
    ; from 0 to 63, and multiple groups can be specified.
    ;
    group=1
    ;
    ; Ring groups (a.k.a. call groups) and pickup groups.  If a phone is ringing
    ; and it is a member of a group which is one of your pickup groups, then
    ; you can answer it by picking up and dialling *8#.  For simple offices, just
    ; make these both the same.  Groups range from 0 to 63.
    ;
    callgroup=1
    pickupgroup=1
    ;
    ; Specify whether the channel should be answered immediately or if the simple
    ; switch should provide dialtone, read digits, etc.
    ; Note: If immediate=yes the dialplan execution will always start at extension
    ; 's' priority 1 regardless of the dialed number!
    ;
    immediate=no
    ;
    ; Specify whether flash-hook transfers to 'busy' channels should complete or
    ; return to the caller performing the transfer (default is yes).
    ;
    ;transfertobusy=no
    ;
    ; CallerID can be set to "asreceived" or a specific number if you want to
    ; override it.  Note that "asreceived" only applies to trunk interfaces.
    ;
    ;callerid=2564286000
    ;
    ; AMA flags affects the recording of Call Detail Records.  If specified
    ; it may be 'default', 'omit', 'billing', or 'documentation'.
    ;
    ;amaflags=default
    ;
    ; Channels may be associated with an account code to ease
    ; billing
    ;
    ;accountcode=lss0101
    ;
    ; ADSI (Analog Display Services Interface) can be enabled on a per-channel
    ; basis if you have (or may have) ADSI compatible CPE equipment
    ;
    ;adsi=yes
    ;
    ; SMDI (Simplified Message Desk Interface) can be enabled on a per-channel
    ; basis if you would like that channel to behave like an SMDI message desk.
    ; The SMDI port specified should have already been defined in smdi.conf.  The
    ; default port is /dev/ttyS0.
    ;
    ;usesmdi=yes
    ;smdiport=/dev/ttyS0
    ;
    ; On trunk interfaces (FXS) and E&M interfaces (E&M, Wink, Feature Group D
    ; etc, it can be useful to perform busy detection either in an effort to
    ; detect hangup or for detecting busies.  This enables listening for
    ; the beep-beep busy pattern.
    ;
    ;busydetect=yes
    ;
    ; If busydetect is enabled, it is also possible to specify how many busy tones
    ; to wait for before hanging up.  The default is 4, but better results can be
    ; achieved if set to 6 or even 8.  Mind that the higher the number, the more
    ; time that will be needed to hangup a channel, but lowers the probability
    ; that you will get random hangups.
    ;
    ;busycount=4
    ;
    ; If busydetect is enabled, it is also possible to specify the cadence of your
    ; busy signal.  In many countries, it is 500msec on, 500msec off.  Without
    ; busypattern specified, we'll accept any regular sound-silence pattern that
    ; repeats <busycount> times as a busy signal.  If you specify busypattern,
    ; then we'll further check the length of the sound (tone) and silence, which
    ; will further reduce the chance of a false positive.
    ;
    ;busypattern=500,500
    ;
    ; NOTE: In the Asterisk Makefile you'll find further options to tweak the busy
    ; detector.  If your country has a busy tone with the same length tone and
    ; silence (as many countries do), consider defining the
    ; -DBUSYDETECT_COMPARE_TONE_AND_SILENCE option.
    ;
    ; Use a polarity reversal to mark when a outgoing call is answered by the
    ; remote party.
    ;
    ;answeronpolarityswitch=yes
    ;
    ; In some countries, a polarity reversal is used to signal the disconnect of a
    ; phone line.  If the hanguponpolarityswitch option is selected, the call will
    ; be considered "hung up" on a polarity reversal.
    ;
    ;hanguponpolarityswitch=yes
    ;
    ; On trunk interfaces (FXS) it can be useful to attempt to follow the progress
    ; of a call through RINGING, BUSY, and ANSWERING.   If turned on, call
    ; progress attempts to determine answer, busy, and ringing on phone lines.
    ; This feature is HIGHLY EXPERIMENTAL and can easily detect false answers,
    ; so don't count on it being very accurate.
    ;
    ; Few zones are supported at the time of this writing, but may be selected
    ; with "progzone"
    ;
    ; This feature can also easily detect false hangups. The symptoms of this is
    ; being disconnected in the middle of a call for no reason.
    ;
    ;callprogress=yes
    ;progzone=us
    ;
    ; FXO (FXS signalled) devices must have a timeout to determine if there was a
    ; hangup before the line was answered.  This value can be tweaked to shorten
    ; how long it takes before Zap considers a non-ringing line to have hungup.
    ;
    ;ringtimeout=8000
    ;
    ; For FXO (FXS signalled) devices, whether to use pulse dial instead of DTMF
    ;
    ;pulsedial=yes
    ;
    ; For fax detection, uncomment one of the following lines.  The default is *OFF*
    ;
    ;faxdetect=both
    ;faxdetect=incoming
    ;faxdetect=outgoing
    ;faxdetect=no
    ;
    ; This option specifies a preference for which music on hold class this channel
    ; should listen to when put on hold if the music class has not been set on the
    ; channel with Set(CHANNEL(musicclass)=whatever) in the dialplan, and the peer
    ; channel putting this one on hold did not suggest a music class.
    ;
    ; If this option is set to "passthrough", then the hold message will always be
    ; passed through as signalling instead of generating hold music locally. This
    ; setting is only valid when used on a channel that uses digital signalling.
    ;
    ; This option may be specified globally, or on a per-user or per-peer basis.
    ;
    ;mohinterpret=default
    ;
    ; This option specifies which music on hold class to suggest to the peer channel
    ; when this channel places the peer on hold. It may be specified globally or on
    ; a per-user or per-peer basis.
    ;
    ;mohsuggest=default
    ;
    ; PRI channels can have an idle extension and a minunused number.  So long as
    ; at least "minunused" channels are idle, chan_zap will try to call "idledial"
    ; on them, and then dump them into the PBX in the "idleext" extension (which
    ; is of the form exten@context).  When channels are needed the "idle" calls
    ; are disconnected (so long as there are at least "minidle" calls still
    ; running, of course) to make more channels available.  The primary use of
    ; this is to create a dynamic service, where idle channels are bundled through
    ; multilink PPP, thus more efficiently utilizing combined voice/data services
    ; than conventional fixed mappings/muxings.
    ;
    ;idledial=6999
    ;idleext=6999@dialout
    ;minunused=2
    ;minidle=1
    ;
    ; Configure jitter buffers in zapata (each one is 20ms, default is 4)
    ;
    ;jitterbuffers=4
    ;
    ;------------------------------ JITTER BUFFER CONFIGURATION --------------------------
    ; jbenable = yes              ; Enables the use of a jitterbuffer on the receiving side of a
                                  ; ZAP channel. Defaults to "no". An enabled jitterbuffer will
                                  ; be used only if the sending side can create and the receiving
                                  ; side can not accept jitter. The ZAP channel can't accept jitter,
                                  ; thus an enabled jitterbuffer on the receive ZAP side will always
                                  ; be used if the sending side can create jitter.
    ; jbmaxsize = 200             ; Max length of the jitterbuffer in milliseconds.
    ; jbresyncthreshold = 1000    ; Jump in the frame timestamps over which the jitterbuffer is
                                  ; resynchronized. Useful to improve the quality of the voice, with
                                  ; big jumps in/broken timestamps, usually sent from exotic devices
                                  ; and programs. Defaults to 1000.
    ; jbimpl = fixed              ; Jitterbuffer implementation, used on the receiving side of a ZAP
                                  ; 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.
    ; jblog = no                  ; Enables jitterbuffer frame logging. Defaults to "no".
    ;-----------------------------------------------------------------------------------
    ;
    ; You can define your own custom ring cadences here.  You can define up to 8
    ; pairs.  If the silence is negative, it indicates where the callerid spill is
    ; to be placed.  Also, if you define any custom cadences, the default cadences
    ; will be turned off.
    ;
    ; Syntax is:  cadence=ring,silence[,ring,silence[...]]
    ;
    ; These are the default cadences:
    ;
    ;cadence=125,125,2000,-4000
    ;cadence=250,250,500,1000,250,250,500,-4000
    ;cadence=125,125,125,125,125,-4000
    ;cadence=1000,500,2500,-5000
    ;
    ; Each channel consists of the channel number or range.  It inherits the
    ; parameters that were specified above its declaration.
    ;
    ; For GR-303, CRV's are created like channels except they must start with the
    ; trunk group followed by a colon, e.g.:
    ;
    ; crv => 1:1
    ; crv => 2:1-2,5-8
    ;
    ;
    ;callerid="Green Phone"<(256) 428-6121>
    ;channel => 1
    ;callerid="Black Phone"<(256) 428-6122>
    ;channel => 2
    ;callerid="CallerID Phone" <(256) 428-6123>
    ;callerid="CallerID Phone" <(630) 372-1564>
    ;callerid="CallerID Phone" <(256) 704-4666>
    ;channel => 3
    ;callerid="Pac Tel Phone" <(256) 428-6124>
    ;channel => 4
    ;callerid="Uniden Dead" <(256) 428-6125>
    ;channel => 5
    ;callerid="Cortelco 2500" <(256) 428-6126>
    ;channel => 6
    ;callerid="Main TA 750" <(256) 428-6127>
    ;channel => 44
    ;
    ; For example, maybe we have some other channels which start out in a
    ; different context and use E & M signalling instead.
    ;
    ;context=remote
    ;sigalling=em
    ;channel => 15
    ;channel => 16
    ;signalling=em_w
    ;
    ; All those in group 0 I'll use for outgoing calls
    ;
    ; Strip most significant digit (9) before sending
    ;
    ;stripmsd=1
    ;callerid=asreceived
    ;group=0
    ;signalling=fxs_ls
    ;channel => 45
    ;signalling=fxo_ls
    ;group=1
    ;callerid="Joe Schmoe" <(256) 428-6131>
    ;channel => 25
    ;callerid="Megan May" <(256) 428-6132>
    ;channel => 26
    ;callerid="Suzy Queue" <(256) 428-6233>
    ;channel => 27
    ;callerid="Larry Moe" <(256) 428-6234>
    ;channel => 28
    ;
    ; Sample PRI (CPE) config:  Specify the switchtype, the signalling as either
    ; pri_cpe or pri_net for CPE or Network termination, and generally you will
    ; want to create a single "group" for all channels of the PRI.
    ;
    ; switchtype = national
    ; signalling = pri_cpe
    ; group = 2
    ; channel => 1-23
    ;
    ;  Used for distinctive ring support for x100p.
    ;  You can see the dringX patterns is to set any one of the dringXcontext fields
    ;  and they will be printed on the console when an inbound call comes in.
    ;
    ;dring1=95,0,0
    ;dring1context=internal1
    ;dring2=325,95,0
    ;dring2context=internal2
    ; If no pattern is matched here is where we go.
    ;context=default
    ;channel => 1
    
    /etc/zaptel.conf
    >
    # Autogenerated by /usr/sbin/zapconf on Fri Oct 29 10:01:19 2010 -- do not hand edit
    # Zaptel Configuration File
    #
    # This file is parsed by the Zaptel Configurator, ztcfg
    #
    # Span 1: WCT1/0 "Wildcard TE121 Card 0" (MASTER)
    span=1,1,0,ccs,hdb3,crc4
    # termtype: te
    bchan=1-15,17-31
    dchan=16
    # Global data
    loadzone        = us
    defaultzone     = us
    

    Статистика

    Время первой команды журнала08:55:51 2010-10-29
    Время последней команды журнала10:13:30 2010-10-29
    Количество командных строк в журнале101
    Процент команд с ненулевым кодом завершения, %10.89
    Процент синтаксически неверно набранных команд, % 0.00
    Суммарное время работы с терминалом *, час 1.29
    Количество командных строк в единицу времени, команда/мин 1.30
    Частота использования команд
    cp16|=============| 13.79%
    grep14|============| 12.07%
    lspci13|===========| 11.21%
    cat11|=========| 9.48%
    asterisk10|========| 8.62%
    less6|=====| 5.17%
    apt-cache6|=====| 5.17%
    scp4|===| 3.45%
    vi4|===| 3.45%
    ~4|===| 3.45%
    find4|===| 3.45%
    mkdir2|=| 1.72%
    astgenkey2|=| 1.72%
    as2|=| 1.72%
    modinfo2|=| 1.72%
    pwd2|=| 1.72%
    chown2|=| 1.72%
    ztcfg2|=| 1.72%
    service2|=| 1.72%
    zapconf2|=| 1.72%
    ast2|=| 1.72%
    mv2|=| 1.72%
    dmesg1|| 0.86%
    ztscan1|| 0.86%
    ____
    *) Интервалы неактивности длительностью 30 минут и более не учитываются

    Справка

    Для того чтобы использовать LiLaLo, не нужно знать ничего особенного: всё происходит само собой. Однако, чтобы ведение и последующее использование журналов было как можно более эффективным, желательно иметь в виду следующее:
    1. В журнал автоматически попадают все команды, данные в любом терминале системы.

    2. Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.

    3. Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
      $ l s-l
      bash: l: command not found
      

    4. Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
      $ test 5 -lt 4
      Обратите внимание на то, что код завершения команды может быть отличен от нуля не только в тех случаях, когда команда была выполнена с ошибкой. Многие команды используют код завершения, например, для того чтобы показать результаты проверки

    5. Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
      $ find / -name abc
      find: /home/devi-orig/.gnome2: Keine Berechtigung
      find: /home/devi-orig/.gnome2_private: Keine Berechtigung
      find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung
      find: /home/devi-orig/.metacity: Keine Berechtigung
      find: /home/devi-orig/.inkscape: Keine Berechtigung
      ^C
      

    6. Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
      # id
      uid=0(root) gid=0(root) Gruppen=0(root)
      

    7. Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
      $ vi ~/.bashrc
      2a3,5
      >    if [ -f /usr/local/etc/bash_completion ]; then
      >         . /usr/local/etc/bash_completion
      >        fi
      

    8. Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
      $ patch ~/.bashrc
      В данном случае изменения применяются к файлу ~/.bashrc

    9. Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.

      Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.

    10. Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.

    11. Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора

    12. Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.

    13. Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.

    14. Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:

      $ whoami
      
      user
      
      $ #^ Интересно, кто я?
      
      в журнале это будет выглядеть так:
      $ whoami
      
      user
      
      Интересно, кто я?

    15. Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:

      $ whoami
      
      user
      
      $ cat > /dev/null #^ Интересно, кто я?
      
      Программа whoami выводит имя пользователя, под которым 
      мы зарегистрировались в системе.
      -
      Она не может ответить на вопрос о нашем назначении 
      в этом мире.
      
      В журнале это будет выглядеть так:
      $ whoami
      user
      
      Интересно, кто я?
      Программа whoami выводит имя пользователя, под которым
      мы зарегистрировались в системе.

      Она не может ответить на вопрос о нашем назначении
      в этом мире.
      Для разделения нескольких абзацев между собой используйте символ "-", один в строке.

    16. Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=

    17. Содержимое файла может быть показано в журнале. Для этого его нужно вывести с помощью программы cat. Если вывод команды отметить симоволами #!, содержимое файла будет показано в журнале в специально отведённой для этого секции.
    18. Для того чтобы вставить скриншот интересующего вас окна в журнал, нужно воспользоваться командой l3shot. После того как команда вызвана, нужно с помощью мыши выбрать окно, которое должно быть в журнале.
    19. Команды в журнале расположены в хронологическом порядке. Если две команды давались одна за другой, но на разных терминалах, в журнале они будут рядом, даже если они не имеют друг к другу никакого отношения.
      1
          2
      3   
          4
      
      Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.

    О программе

    LiLaLo (L3) расшифровывается как Live Lab Log.
    Программа разработана для повышения эффективности обучения Unix/Linux-системам.
    (c) Игорь Чубин, 2004-2008

    $Id$