/l3/users/gvlad/nt-voip-2011-06/linux9.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 |
|
#sudo asterisk
[general] context=default allowoverlap=no udpbindaddr=0.0.0.0 tcpenable=no tcpbindaddr=0.0.0.0 "/etc/asterisk/sip.conf" 831L, 42478C srvlookup=yes [3101] type=friendord ... tcpbindaddr=0.0.0.0 lion:password@192.168.103.1/paris register => paris:password@192.168.103.1/lion type=friendord host=dynamic callerid="VoIP Phone <3101>" user=3101 # [general] "/etc/asterisk/sip.conf" 831L, 42478C записано |
#[ ]
[default] exten => 8000,1,Wait(1) exten => 8000,n,Playback(demo-congrats) exten => _81.,1,Wait(1) exten => _81.,n,Say(${EXTEN}) exten => _31XX,1,Dial(SIP/${EXTEN},10) exten => 3103,1,Dial(SIP/3101&SIP/3102,10) "/etc/asterisk/extension.conf" 11L, 214C |
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux9 (pid = 3623) ... == Using SIP RTP CoS mark 5 -- Called 3101 -- SIP/3101-00000003 is ringing == Spawn extension (default, 3101, 1) exited non-zero on 'SIP/paris-00000002' -- Remote UNIX connection Executing last minute cleanups == Destroying musiconhold processes linux9*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#asterisk show pers
Asterisk already running on /var/run/asterisk/asterisk.ctl. Use 'asterisk -r' to connect. |
#asterisk show peers
Asterisk already running on /var/run/asterisk/asterisk.ctl. Use 'asterisk -r' to connect. |
#~
[general] context=default allowoverlap=no udpbindaddr=0.0.0.0 tcpenable=no tcpbindaddr=0.0.0.0 srvlookup=yes register => lion:password@192.168.103.1/paris [3101] type=friend ... ; ; * session-timers - Session-Timers feature operates in the following three mm odes: ; originate : Request and run session-timers always ; accept : Run session-timers only when requested by other UA ; refuse : Do not run session timers in any case type=friend 56,1 4% secre=password host=dynamic |
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux9 (pid = 4058) ... [Jun 21 10:45:27] NOTICE[4095]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 3102 [Jun 21 10:48:28] NOTICE[4095]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 3102 [Jun 21 10:51:28] NOTICE[4095]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 3102 [Jun 21 10:54:28] NOTICE[4095]: chan_sip.c:21599 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 3102 -- Remote UNIX connection Executing last minute cleanups == Destroying musiconhold processes linux9*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-2734.17339.16530 2011-06-21 10:00:51.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-06-21 10:01:09.000000000 +0300 @@ -1,4 +1,4 @@ -[default]i +[default] exten => 8000,1,Wait(1) exten => 8000,n,Playback(demo-congrats) |
#vim /etc/asterisk/extension.conf
|
#~
; User context is where entries from users.conf are registered. The ; default value is 'default' ; result of their operations ; ;userscontext=default ; ; You can include other config files, use the #include command ; (without the ';'). Note that this is different from the "include" command ; that includes contexts within other contexts. The #include command works ; in all asterisk configuration files. ;#include "filename.conf" ;#include <filename.conf> "/etc/asterisk/extensions.conf" 802L, 27855C записано |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-2734.4694.17801 2011-06-21 10:02:46.000000000 +0300 +++ /etc/asterisk/sip.conf 2011-06-21 10:03:26.000000000 +0300 @@ -40,792 +40,3 @@ username=lion canreinvite=no - ; when we're on hold (must be > rtptimeout) -;rtpkeepalive=<secs> ; Send keepalives in the RTP stream to keep NAT open - ; (default is off - zero) - -;--------------------------- SIP Session-Timers (RFC 4028)------------------------------------ -; SIP Session-Timers provide an end-to-end keep-alive mechanism for active SIP sessions. -; This mechanism can detect and reclaim SIP channels that do not terminate through normal -; signaling procedures. Session-Timers can be configured globally or at a user/peer level. -; The operation of Session-Timers is driven by the following configuration parameters: -; -; * session-timers - Session-Timers feature operates in the following three modes: -; originate : Request and run session-timers always -; accept : Run session-timers only when requested by other UA -; refuse : Do not run session timers in any case -; The default mode of operation is 'accept'. -; * session-expires - Maximum session refresh interval in seconds. Defaults to 1800 secs. -; * session-minse - Minimum session refresh interval in seconds. Defualts to 90 secs. -; * session-refresher - The session refresher (uac|uas). Defaults to 'uas'. -; -;session-timers=originate -;session-expires=600 -;session-minse=90 -;session-refresher=uas -; -;--------------------------- HASH TABLE SIZES ------------------------------------------------ -; For maximum efficiency, adjust the following -; values to be slightly larger than the maximum number of in-memory objects (devices). -; Too large, and space is wasted. Too small, and things will run slower. -; 563 is probably way too big for small (home) applications, but it -; should cover most small/medium sites. -; It is recommended to make the sizes be a prime number! -; This was internally set to 17 for small-memory applications... -; All tables default to 563, except when compiled in LOW_MEMORY mode, -; in which case, they default to 17. You can override this by uncommenting -; the following, and changing the values. -;hash_users=563 -;hash_peers=563 -;hash_dialogs=563 - -;--------------------------- SIP DEBUGGING --------------------------------------------------- -;sipdebug = yes ; Turn on SIP debugging by default, from - ; the moment the channel loads this configuration -;recordhistory=yes ; Record SIP history by default - ; (see sip history / sip no history) -;dumphistory=yes ; Dump SIP history at end of SIP dialogue - ; SIP history is output to the DEBUG logging channel - - -;--------------------------- STATUS NOTIFICATIONS (SUBSCRIPTIONS) ---------------------------- -; You can subscribe to the status of extensions with a "hint" priority -; (See extensions.conf.sample for examples) -; chan_sip support two major formats for notifications: dialog-info and SIMPLE -; -; You will get more detailed reports (busy etc) if you have a call counter enabled -; for a device. -; -; If you set the busylevel, we will indicate busy when we have a number of calls that -; matches the busylevel treshold. -; -; For queues, you will need this level of detail in status reporting, regardless -; if you use SIP subscriptions. Queues and manager use the same internal interface -; for reading status information. -; -; Note: Subscriptions does not work if you have a realtime dialplan and use the -; realtime switch. -; -;allowsubscribe=no ; Disable support for subscriptions. (Default is yes) -;subscribecontext = default ; Set a specific context for SUBSCRIBE requests - ; Useful to limit subscriptions to local extensions - ; Settable per peer/user also -;notifyringing = no ; Control whether subscriptions already INUSE get sent - ; RINGING when another call is sent (default: yes) -;notifyhold = yes ; Notify subscriptions on HOLD state (default: no) - ; Turning on notifyringing and notifyhold will add a lot - ; more database transactions if you are using realtime. -;notifycid = yes ; Control whether caller ID information is sent along with - ; dialog-info+xml notifications (supported by snom phones). - ; Note that this feature will only work properly when the - ; incoming call is using the same extension and context that - ; is being used as the hint for the called extension. This means - ; that it won't work when using subscribecontext for your sip - ; user or peer (if subscribecontext is different than context). - ; This is also limited to a single caller, meaning that if an - ; extension is ringing because multiple calls are incoming, - ; only one will be used as the source of caller ID. Specify - ; 'ignore-context' to ignore the called context when looking - ; for the caller's channel. The default value is 'no.' Setting - ; notifycid to 'ignore-context' also causes call-pickups attempted - ; via SNOM's NOTIFY mechanism to set the context for the call pickup - ; to PICKUPMARK. -;callcounter = yes ; Enable call counters on devices. This can be set per - ; device too. - -;----------------------------------------- T.38 FAX SUPPORT ---------------------------------- -; -; This setting is available in the [general] section as well as in device configurations. -; Setting this to yes enables T.38 FAX (UDPTL) on SIP calls; it defaults to off. -; -; t38pt_udptl = yes ; Enables T.38 with FEC error correction. -; t38pt_udptl = yes,fec ; Enables T.38 with FEC error correction. -; t38pt_udptl = yes,redundancy ; Enables T.38 with redundancy error correction. -; t38pt_udptl = yes,none ; Enables T.38 with no error correction. -; -; In some cases, T.38 endpoints will provide a T38FaxMaxDatagram value (during T.38 setup) that -; is based on an incorrect interpretation of the T.38 recommendation, and results in failures -; because Asterisk does not believe it can send T.38 packets of a reasonable size to that -; endpoint (Cisco media gateways are one example of this situation). In these cases, during a -; T.38 call you will see warning messages on the console/in the logs from the Asterisk UDPTL -; stack complaining about lack of buffer space to send T.38 FAX packets. If this occurs, you -; can set an override (globally, or on a per-device basis) to make Asterisk ignore the -; T38FaxMaxDatagram value specified by the other endpoint, and use a configured value instead. -; This can be done by appending 'maxdatagram=<value>' to the t38pt_udptl configuration option, -; like this: -; -; t38pt_udptl = yes,fec,maxdatagram=400 ; Enables T.38 with FEC error correction and overrides -; ; the other endpoint's provided value to assume we can -; ; send 400 byte T.38 FAX packets to it. -; -; FAX detection will cause the SIP channel to jump to the 'fax' extension (if it exists) -; based one or more events being detected. The events that can be detected are an incoming -; CNG tone or an incoming T.38 re-INVITE request. -; -; faxdetect = yes ; Default 'no', 'yes' enables both CNG and T.38 detection -; faxdetect = cng ; Enables only CNG detection -; faxdetect = t38 ; Enables only T.38 detection -; faxdetect = both ; Enables both CNG and T.38 detection (same as 'yes') -; -;----------------------------------------- OUTBOUND SIP REGISTRATIONS ------------------------ -; Asterisk can register as a SIP user agent to a SIP proxy (provider) -; Format for the register statement is: -; register => [peer?][transport://]user[@domain][:secret[:authuser]]@host[:port][/extension][~expiry] -; -; -; -; domain is either -; - domain in DNS -; - host name in DNS -; - the name of a peer defined below or in realtime -; The domain is where you register your username, so your SIP uri you are registering to -; is username@domain -; -; If no extension is given, the 's' extension is used. The extension needs to -; be defined in extensions.conf to be able to accept calls from this SIP proxy -; (provider). -; -; A similar effect can be achieved by adding a "callbackextension" option in a peer section. -; this is equivalent to having the following line in the general section: -; -; register => username:secret@host/callbackextension -; -; and more readable because you don't have to write the parameters in two places -; (note that the "port" is ignored - this is a bug that should be fixed). -; -; Note that a register= line doesn't mean that we will match the incoming call in any -; other way than described above. If you want to control where the call enters your -; dialplan, which context, you want to define a peer with the hostname of the provider's -; server. If the provider has multiple servers to place calls to your system, you need -; a peer for each server. -; -; Beginning with Asterisk version 1.6.2, the "user" portion of the register line may -; contain a port number. Since the logical separator between a host and port number is a -; ':' character, and this character is already used to separate between the optional "secret" -; and "authuser" portions of the line, there is a bit of a hoop to jump through if you wish -; to use a port here. That is, you must explicitly provide a "secret" and "authuser" even if -; they are blank. See the third example below for an illustration. -; -; -; Examples: -; -;register => 1234:password@mysipprovider.com -; -; This will pass incoming calls to the 's' extension -; -; -;register => 2345:password@sip_proxy/1234 -; -; Register 2345 at sip provider 'sip_proxy'. Calls from this provider -; connect to local extension 1234 in extensions.conf, default context, -; unless you configure a [sip_proxy] section below, and configure a -; context. -; Tip 1: Avoid assigning hostname to a sip.conf section like [provider.com] -; Tip 2: Use separate inbound and outbound sections for SIP providers -; (instead of type=friend) if you have calls in both directions -; -;register => 3456@mydomain:5082::@mysipprovider.com -; -; Note that in this example, the optional authuser and secret portions have -; been left blank because we have specified a port in the user section -; -;register => tls://username:xxxxxx@sip-tls-proxy.example.org -; -; The 'transport' part defaults to 'udp' but may also be 'tcp' or 'tls'. -; Using 'udp://' explicitly is also useful in case the username part -; contains a '/' ('user/name'). - -;registertimeout=20 ; retry registration calls every 20 seconds (default) -;registerattempts=10 ; Number of registration attempts before we give up - ; 0 = continue forever, hammering the other server - ; until it accepts the registration - ; Default is 0 tries, continue forever -;----------------------------------------- OUTBOUND MWI SUBSCRIPTIONS ------------------------- -; Asterisk can subscribe to receive the MWI from another SIP server and store it locally for retrieval -; by other phones. -; Format for the mwi register statement is: -; mwi => user[:secret[:authuser]]@host[:port][/mailbox] -; -; Examples: -;mwi => 1234:password@mysipprovider.com/1234 -; -; MWI received will be stored in the 1234 mailbox of the SIP_Remote context. It can be used by other phones by following the below: -; mailbox=1234@SIP_Remote -;----------------------------------------- NAT SUPPORT ------------------------ -; -; WARNING: SIP operation behind a NAT is tricky and you really need -; to read and understand well the following section. -; -; When Asterisk is behind a NAT device, the "local" address (and port) that -; a socket is bound to has different values when seen from the inside or -; from the outside of the NATted network. Unfortunately this address must -; be communicated to the outside (e.g. in SIP and SDP messages), and in -; order to determine the correct value Asterisk needs to know: -; -; + whether it is talking to someone "inside" or "outside" of the NATted network. -; This is configured by assigning the "localnet" parameter with a list -; of network addresses that are considered "inside" of the NATted network. -; IF LOCALNET IS NOT SET, THE EXTERNAL ADDRESS WILL NOT BE SET CORRECTLY. -; Multiple entries are allowed, e.g. a reasonable set is the following: -; -; localnet=192.168.0.0/255.255.0.0 ; RFC 1918 addresses -; localnet=10.0.0.0/255.0.0.0 ; Also RFC1918 -; localnet=172.16.0.0/12 ; Another RFC1918 with CIDR notation -; localnet=169.254.0.0/255.255.0.0 ; Zero conf local network -; -; + the "externally visible" address and port number to be used when talking -; to a host outside the NAT. This information is derived by one of the -; following (mutually exclusive) config file parameters: -; -; a. "externip = hostname[:port]" specifies a static address[:port] to -; be used in SIP and SDP messages. -; The hostname is looked up only once, when [re]loading sip.conf . -; If a port number is not present, use the "bindport" value (which is -; not guaranteed to work correctly, because a NAT box might remap the -; port number as well as the address). -; This approach can be useful if you have a NAT device where you can -; configure the mapping statically. Examples: -; -; externip = 12.34.56.78 ; use this address. -; externip = 12.34.56.78:9900 ; use this address and port. -; externip = mynat.my.org:12600 ; Public address of my nat box. -; -; b. "externhost = hostname[:port]" is similar to "externip" except -; that the hostname is looked up every "externrefresh" seconds -; (default 10s). This can be useful when your NAT device lets you choose -; the port mapping, but the IP address is dynamic. -; Beware, you might suffer from service disruption when the name server -; resolution fails. Examples: -; -; externhost=foo.dyndns.net ; refreshed periodically -; externrefresh=180 ; change the refresh interval -; -; c. "stunaddr = stun.server[:port]" queries the STUN server specified -; as an argument to obtain the external address/port. -; Queries are also sent periodically every "externrefresh" seconds -; (as a side effect, sending the query also acts as a keepalive for -; the state entry on the nat box): -; -; stunaddr = foo.stun.com:3478 -; externrefresh = 15 -; -; Note that at the moment all these mechanism work only for the SIP socket. -; The IP address discovered with externip/externhost/STUN is reused for -; media sessions as well, but the port numbers are not remapped so you -; may still experience problems. -; -; NOTE 1: in some cases, NAT boxes will use different port numbers in -; the internal<->external mapping. In these cases, the "externip" and -; "externhost" might not help you configure addresses properly, and you -; really need to use STUN. -; -; NOTE 2: when using "externip" or "externhost", the address part is -; also used as the external address for media sessions. -; If you use "stunaddr", STUN queries will be sent to the same server -; also from media sockets, and this should permit a correct mapping of -; the port numbers as well. -; -; In addition to the above, Asterisk has an additional "nat" parameter to -; address NAT-related issues in incoming SIP or media sessions. -; In particular, depending on the 'nat= ' settings described below, Asterisk -; may override the address/port information specified in the SIP/SDP messages, -; and use the information (sender address) supplied by the network stack instead. -; However, this is only useful if the external traffic can reach us. -; The following settings are allowed (both globally and in individual sections): -; -; nat = no ; default. Use NAT mode only according to RFC3581 (;rport) -; nat = yes ; Always ignore info and assume NAT -; nat = never ; Never attempt NAT mode or RFC3581 support -; nat = route ; route = Assume NAT, don't send rport -; ; (work around more UNIDEN bugs) - -;----------------------------------- MEDIA HANDLING -------------------------------- -; By default, Asterisk tries to re-invite media streams to an optimal path. If there's -; no reason for Asterisk to stay in the media path, the media will be redirected. -; This does not really work well in the case where Asterisk is outside and the -; clients are on the inside of a NAT. In that case, you want to set directmedia=nonat. -; -;directmedia=yes ; Asterisk by default tries to redirect the - ; RTP media stream to go directly from - ; the caller to the callee. Some devices do not - ; support this (especially if one of them is behind a NAT). - ; The default setting is YES. If you have all clients - ; behind a NAT, or for some other reason want Asterisk to - ; stay in the audio path, you may want to turn this off. - - ; This setting also affect direct RTP - ; at call setup (a new feature in 1.4 - setting up the - ; call directly between the endpoints instead of sending - ; a re-INVITE). - -;directrtpsetup=yes ; Enable the new experimental direct RTP setup. This sets up - ; the call directly with media peer-2-peer without re-invites. - ; Will not work for video and cases where the callee sends - ; RTP payloads and fmtp headers in the 200 OK that does not match the - ; callers INVITE. This will also fail if directmedia is enabled when - ; the device is actually behind NAT. - - ; Additionally this option does not disable all reINVITE operations. - ; It only controls Asterisk generating reINVITEs for the specific - ; purpose of setting up a direct media path. If a reINVITE is - ; needed to switch a media stream to inactive (when placed on - ; hold) or to T.38, it will still be done, regardless of this - ; setting. Note that direct T.38 is not supported. - -;directmedia=nonat ; An additional option is to allow media path redirection - ; (reinvite) but only when the peer where the media is being - ; sent is known to not be behind a NAT (as the RTP core can - ; determine it based on the apparent IP address the media - ; arrives from). - -;directmedia=update ; Yet a third option... use UPDATE for media path redirection, - ; instead of INVITE. This can be combined with 'nonat', as - ; 'directmedia=update,nonat'. It implies 'yes'. - -;ignoresdpversion=yes ; By default, Asterisk will honor the session version - ; number in SDP packets and will only modify the SDP - ; session if the version number changes. This option will - ; force asterisk to ignore the SDP session version number - ; and treat all SDP data as new data. This is required - ; for devices that send us non standard SDP packets - ; (observed with Microsoft OCS). By default this option is - ; off. - -;----------------------------------------- REALTIME SUPPORT ------------------------ -; For additional information on ARA, the Asterisk Realtime Architecture, -; please read realtime.txt and extconfig.txt in the /doc directory of the -; source code. -; -;rtcachefriends=yes ; Cache realtime friends by adding them to the internal list - ; just like friends added from the config file only on a - ; as-needed basis? (yes|no) - -;rtsavesysname=yes ; Save systemname in realtime database at registration - ; Default= no - -;rtupdate=yes ; Send registry updates to database using realtime? (yes|no) - ; If set to yes, when a SIP UA registers successfully, the ip address, - ; the origination port, the registration period, and the username of - ; the UA will be set to database via realtime. - ; If not present, defaults to 'yes'. Note: realtime peers will - ; probably not function across reloads in the way that you expect, if - ; you turn this option off. -;rtautoclear=yes ; Auto-Expire friends created on the fly on the same schedule - ; as if it had just registered? (yes|no|<seconds>) - ; If set to yes, when the registration expires, the friend will - ; vanish from the configuration until requested again. If set - ; to an integer, friends expire within this number of seconds - ; instead of the registration interval. - -;ignoreregexpire=yes ; Enabling this setting has two functions: - ; - ; For non-realtime peers, when their registration expires, the - ; information will _not_ be removed from memory or the Asterisk database - ; if you attempt to place a call to the peer, the existing information - ; will be used in spite of it having expired - ; - ; For realtime peers, when the peer is retrieved from realtime storage, - ; the registration information will be used regardless of whether - ; it has expired or not; if it expires while the realtime peer - ; is still in memory (due to caching or other reasons), the - ; information will not be removed from realtime storage - -;----------------------------------------- SIP DOMAIN SUPPORT ------------------------ -; Incoming INVITE and REFER messages can be matched against a list of 'allowed' -; domains, each of which can direct the call to a specific context if desired. -; By default, all domains are accepted and sent to the default context or the -; context associated with the user/peer placing the call. -; REGISTER to non-local domains will be automatically denied if a domain -; list is configured. -; -; Domains can be specified using: -; domain=<domain>[,<context>] -; Examples: -; domain=myasterisk.dom -; domain=customer.com,customer-context -; -; In addition, all the 'default' domains associated with a server should be -; added if incoming request filtering is desired. -; autodomain=yes -; -; To disallow requests for domains not serviced by this server: -; allowexternaldomains=no - -;domain=mydomain.tld,mydomain-incoming - ; Add domain and configure incoming context - ; for external calls to this domain -;domain=1.2.3.4 ; Add IP address as local domain - ; You can have several "domain" settings -;allowexternaldomains=no ; Disable INVITE and REFER to non-local domains - ; Default is yes -;autodomain=yes ; Turn this on to have Asterisk add local host - ; name and local IP to domain list. - -; fromdomain=mydomain.tld ; When making outbound SIP INVITEs to - ; non-peers, use your primary domain "identity" - ; for From: headers instead of just your IP - ; address. This is to be polite and - ; it may be a mandatory requirement for some - ; destinations which do not have a prior - ; account relationship with your server. - -;------------------------------ JITTER BUFFER CONFIGURATION -------------------------- -; jbenable = yes ; Enables the use of a jitterbuffer on the receiving side of a - ; SIP 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 SIP channel can accept jitter, - ; thus a jitterbuffer on the receive SIP side will be used only - ; if it is forced and enabled. - -; jbforce = no ; Forces the use of a jitterbuffer on the receive side of a SIP - ; channel. Defaults to "no". - -; 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 SIP - ; channel. Two implementations are currently available - "fixed" - ; (with size always equals to jbmaxsize) and "adaptive" (with - ; variable size, actually the new jb of IAX2). Defaults to fixed. - -; jbtargetextra = 40 ; This option only affects the jb when 'jbimpl = adaptive' is set. - ; The option represents the number of milliseconds by which the new jitter buffer - ; will pad its size. the default is 40, so without modification, the new - ; jitter buffer will set its size to the jitter value plus 40 milliseconds. - ; increasing this value may help if your network normally has low jitter, - ; but occasionally has spikes. - -; jblog = no ; Enables jitterbuffer frame logging. Defaults to "no". -;----------------------------------------------------------------------------------- - -[authentication] -; Global credentials for outbound calls, i.e. when a proxy challenges your -; Asterisk server for authentication. These credentials override -; any credentials in peer/register definition if realm is matched. -; -; This way, Asterisk can authenticate for outbound calls to other -; realms. We match realm on the proxy challenge and pick an set of -; credentials from this list -; Syntax: -; auth = <user>:<secret>@<realm> -; auth = <user>#<md5secret>@<realm> -; Example: -;auth=mark:topsecret@digium.com -; -; You may also add auth= statements to [peer] definitions -; Peer auth= override all other authentication settings if we match on realm - -;------------------------------------------------------------------------------ -; DEVICE CONFIGURATION -; -; The SIP channel has two types of devices, the friend and the peer. -; * The type=friend is a device type that accepts both incoming and outbound calls, -; where Asterisk match on the From: username on incoming calls. -; (A synonym for friend is "user"). This is a type you use for your local -; SIP phones. -; * The type=peer also handles both incoming and outbound calls. On inbound calls, -; Asterisk only matches on IP/port, not on names. This is mostly used for SIP -; trunks. -; -; For device names, we recommend using only a-z, numerics (0-9) and underscore -; -; For local phones, type=friend works most of the time -; -; If you have one-way audio, you probably have NAT problems. -; If Asterisk is on a public IP, and the phone is inside of a NAT device -; you will need to configure nat option for those phones. -; Also, turn on qualify=yes to keep the nat session open -; -; Configuration options available -; -------------------- -; context -; callingpres -; permit -; deny -; secret -; md5secret -; remotesecret -; transport -; dtmfmode -; directmedia -; nat -; callgroup -; pickupgroup -; language -; allow -; disallow -; insecure -; trustrpid -; progressinband -; promiscredir -; useclientcode -; accountcode -; setvar -; callerid -; amaflags -; callcounter -; busylevel -; allowoverlap -; allowsubscribe -; allowtransfer -; ignoresdpversion -; subscribecontext -; template -; videosupport -; maxcallbitrate -; rfc2833compensate -; mailbox -; session-timers -; session-expires -; session-minse -; session-refresher -; t38pt_usertpsource -; regexten -; fromdomain -; fromuser -; host -; port -; qualify -; defaultip -; defaultuser -; rtptimeout -; rtpholdtimeout -; sendrpid -; outboundproxy -; rfc2833compensate -; callbackextension -; registertrying -; timert1 -; timerb -; qualifyfreq -; t38pt_usertpsource -; contactpermit ; Limit what a host may register as (a neat trick -; contactdeny ; is to register at the same IP as a SIP provider, -; ; then call oneself, and get redirected to that -; ; same location). - -;[sip_proxy] -; For incoming calls only. Example: FWD (Free World Dialup) -; We match on IP address of the proxy for incoming calls -; since we can not match on username (caller id) -;type=peer -;context=from-fwd -;host=fwd.pulver.com - -;[sip_proxy-out] -;type=peer ; we only want to call out, not be called -;remotesecret=guessit ; Our password to their service -;defaultuser=yourusername ; Authentication user for outbound proxies -;fromuser=yourusername ; Many SIP providers require this! -;fromdomain=provider.sip.domain -;host=box.provider.com -;transport=udp,tcp ; This sets the default transport type to udp for outgoing, and will -; ; accept both tcp and udp. The default transport type is only used for -; ; outbound messages until a Registration takes place. During the -; ; peer Registration the transport type may change to another supported -; ; type if the peer requests so. - -;usereqphone=yes ; This provider requires ";user=phone" on URI -;callcounter=yes ; Enable call counter -;busylevel=2 ; Signal busy at 2 or more calls -;outboundproxy=proxy.provider.domain ; send outbound signaling to this proxy, not directly to the peer -;port=80 ; The port number we want to connect to on the remote side - ; Also used as "defaultport" in combination with "defaultip" settings - -;--- sample definition for a provider -;[provider1] -;type=peer -;host=sip.provider1.com -;fromuser=4015552299 ; how your provider knows you -;remotesecret=youwillneverguessit ; The password we use to authenticate to them -;secret=gissadetdu ; The password they use to contact us -;callbackextension=123 ; Register with this server and require calls coming back to this extension -;transport=udp,tcp ; This sets the transport type to udp for outgoing, and will -; ; accept both tcp and udp. Default is udp. The first transport -; ; listed will always be used for outgoing connections. - -; -; Because you might have a large number of similar sections, it is generally -; convenient to use templates for the common parameters, and add them -; the the various sections. Examples are below, and we can even leave -; the templates uncommented as they will not harm: - -[basic-options](!) ; a template - dtmfmode=rfc2833 - context=from-office - type=friend - -[natted-phone](!,basic-options) ; another template inheriting basic-options - nat=yes - directmedia=no - host=dynamic - -[public-phone](!,basic-options) ; another template inheriting basic-options - nat=no - directmedia=yes - -[my-codecs](!) ; a template for my preferred codecs - disallow=all - allow=ilbc - allow=g729 - allow=gsm - allow=g723 - allow=ulaw - -[ulaw-phone](!) ; and another one for ulaw-only - disallow=all - allow=ulaw - -; and finally instantiate a few phones -; -; [2133](natted-phone,my-codecs) -; secret = peekaboo -; [2134](natted-phone,ulaw-phone) -; secret = not_very_secret -; [2136](public-phone,ulaw-phone) -; secret = not_very_secret_either -; ... -; - -; Standard configurations not using templates look like this: -; -;[grandstream1] -;type=friend -;context=from-sip ; Where to start in the dialplan when this phone calls -;callerid=John Doe <1234> ; Full caller ID, to override the phones config - ; on incoming calls to Asterisk -;host=192.168.0.23 ; we have a static but private IP address - ; No registration allowed -;nat=no ; there is not NAT between phone and Asterisk -;directmedia=yes ; allow RTP voice traffic to bypass Asterisk -;dtmfmode=info ; either RFC2833 or INFO for the BudgeTone -;call-limit=1 ; permit only 1 outgoing call and 1 incoming call at a time - ; from the phone to asterisk (deprecated) - ; 1 for the explicit peer, 1 for the explicit user, - ; remember that a friend equals 1 peer and 1 user in - ; memory - ; There is no combined call counter for a "friend" - ; so there's currently no way in sip.conf to limit - ; to one inbound or outbound call per phone. Use - ; the group counters in the dial plan for that. - ; -;mailbox=1234@default ; mailbox 1234 in voicemail context "default" -;disallow=all ; need to disallow=all before we can use allow= -;allow=ulaw ; Note: In user sections the order of codecs - ; listed with allow= does NOT matter! -;allow=alaw -;allow=g723.1 ; Asterisk only supports g723.1 pass-thru! -;allow=g729 ; Pass-thru only unless g729 license obtained -;callingpres=allowed_passed_screen ; Set caller ID presentation - ; See README.callingpres for more information - -;[xlite1] -; Turn off silence suppression in X-Lite ("Transmit Silence"=YES)! -; Note that Xlite sends NAT keep-alive packets, so qualify=yes is not needed -;type=friend -;regexten=1234 ; When they register, create extension 1234 -;callerid="Jane Smith" <5678> -;host=dynamic ; This device needs to register -;nat=yes ; X-Lite is behind a NAT router -;directmedia=no ; Typically set to NO if behind NAT -;disallow=all -;allow=gsm ; GSM consumes far less bandwidth than ulaw -;allow=ulaw -;allow=alaw -;mailbox=1234@default,1233@default ; Subscribe to status of multiple mailboxes -;registertrying=yes ; Send a 100 Trying when the device registers. - -;[snom] -;type=friend ; Friends place calls and receive calls -;context=from-sip ; Context for incoming calls from this user -;secret=blah -;subscribecontext=localextensions ; Only allow SUBSCRIBE for local extensions -;language=de ; Use German prompts for this user -;host=dynamic ; This peer register with us -;dtmfmode=inband ; Choices are inband, rfc2833, or info -;defaultip=192.168.0.59 ; IP used until peer registers -;mailbox=1234@context,2345 ; Mailbox(-es) for message waiting indicator -;subscribemwi=yes ; Only send notifications if this phone - ; subscribes for mailbox notification -;vmexten=voicemail ; dialplan extension to reach mailbox - ; sets the Message-Account in the MWI notify message - ; defaults to global vmexten which defaults to "asterisk" -;disallow=all -;allow=ulaw ; dtmfmode=inband only works with ulaw or alaw! - - -;[polycom] -;type=friend ; Friends place calls and receive calls -;context=from-sip ; Context for incoming calls from this user -;secret=blahpoly -;host=dynamic ; This peer register with us -;dtmfmode=rfc2833 ; Choices are inband, rfc2833, or info -;defaultuser=polly ; Username to use in INVITE until peer registers -;defaultip=192.168.40.123 - ; Normally you do NOT need to set this parameter -;disallow=all -;allow=ulaw ; dtmfmode=inband only works with ulaw or alaw! -;progressinband=no ; Polycom phones don't work properly with "never" - - -;[pingtel] -;type=friend -;secret=blah -;host=dynamic -;insecure=port ; Allow matching of peer by IP address without - ; matching port number -;insecure=invite ; Do not require authentication of incoming INVITEs -;insecure=port,invite ; (both) -;qualify=1000 ; Consider it down if it's 1 second to reply - ; Helps with NAT session - ; qualify=yes uses default value -;qualifyfreq=60 ; Qualification: How often to check for the - ; host to be up in seconds - ; Set to low value if you use low timeout for - ; NAT of UDP sessions -; -; Call group and Pickup group should be in the range from 0 to 63 -; -;callgroup=1,3-4 ; We are in caller groups 1,3,4 -;pickupgroup=1,3-5 ; We can do call pick-p for call group 1,3,4,5 -;defaultip=192.168.0.60 ; IP address to use if peer has not registered -;deny=0.0.0.0/0.0.0.0 ; ACL: Control access to this account based on IP address -;permit=192.168.0.60/255.255.255.0 -;permit=192.168.0.60/24 ; we can also use CIDR notation for subnet masks - -;[cisco1] -;type=friend -;secret=blah -;qualify=200 ; Qualify peer is no more than 200ms away -;nat=yes ; This phone may be natted - ; Send SIP and RTP to the IP address that packet is - ; received from instead of trusting SIP headers -;host=dynamic ; This device registers with us -;directmedia=no ; Asterisk by default tries to redirect the - ; RTP media stream (audio) to go directly from - ; the caller to the callee. Some devices do not - ; support this (especially if one of them is - ; behind a NAT). -;defaultip=192.168.0.4 ; IP address to use until registration -;defaultuser=goran ; Username to use when calling this device before registration - ; Normally you do NOT need to set this parameter -;setvar=CUSTID=5678 ; Channel variable to be set for all calls from or to this device -;setvar=ATTENDED_TRANSFER_COMPLETE_SOUND=beep ; This channel variable will - ; cause the given audio file to - ; be played upon completion of - ; an attended transfer. - -;[pre14-asterisk] -;type=friend -;secret=digium -;host=dynamic -;rfc2833compensate=yes ; Compensate for pre-1.4 DTMF transmission from another Asterisk machine. - ; You must have this turned on or DTMF reception will work improperly. -;t38pt_usertpsource=yes ; Use the source IP address of RTP as the destination IP address for UDPTL packets - ; if the nat option is enabled. If a single RTP packet is received Asterisk will know the - ; external IP address of the remote device. If port forwarding is done at the client side - ; then UDPTL will flow to the remote device. |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-2791.26097.25403 2011-06-21 10:40:13.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-06-21 10:57:00.000000000 +0300 @@ -11,6 +11,51 @@ exten => _13XX,1,Dial(SIP/paris/${EXTEN},10) +;------------------------------------------ + +[internal] + +exten => 8000,1,Wait(1) +exten => 8000,n,Playback(demo-congrats) + +exten => _8xxx,1,Wait(1) +exten => _8xxx,n,Say($exten) + +[local] + +exten => _31XX,1,Dial(SIP/${EXTEN},10) +exten => 3103,1,Dial(SIP/3101&SIP/3102,10) +exten => _31XX,n,Playback(demo-congrats) + +[national] +exten => _13XX,1,Dial(SIP/paris/${EXTEN},10) + +[international] + +exten => _23XX,1,Dial(SIP/kiev/${EXTEN},10) + +;----------------------------------------- + +[gr1] + +include => internal +include => local + +[gr2] + +include => internal +include => local +include => national + +[gr3] + +include => internal +include => local +include => national +include => international + +[gr4] +include => local |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-4415.18724.1584 2011-06-21 10:53:11.000000000 +0300 +++ /etc/asterisk/sip.conf 2011-06-21 10:56:51.000000000 +0300 @@ -14,6 +14,7 @@ host=dynamic user=3101 callerid="VoIP Phone <3101>" +context=gr1 # @@ -31,6 +32,7 @@ host=dynamic user=3102 callerid="sofphone <3102>" +context=gr1 [paris] @@ -39,4 +41,4 @@ host=dynamic username=lion canreinvite=no - +context=gr1 |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-4415.22833.19541 2011-06-21 10:56:54.000000000 +0300 +++ /etc/asterisk/sip.conf 2011-06-21 11:02:39.000000000 +0300 @@ -32,7 +32,7 @@ host=dynamic user=3102 callerid="sofphone <3102>" -context=gr1 +context=gr2 [paris] @@ -41,4 +41,4 @@ host=dynamic username=lion canreinvite=no -context=gr1 +context=gr3 |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux9 (pid = 4554) ... == Everyone is busy/congested at this time (1:0/1/0) -- Auto fallthrough, channel 'SIP/3102-00000007' status is 'CONGESTION' == Using SIP RTP CoS mark 5 [Jun 21 11:01:37] NOTICE[4591]: chan_sip.c:20281 handle_request_invite: Call from '3102' to extension '2301' rejected because extension not found in context 'gr1'. -- Remote UNIX connection Executing last minute cleanups == Destroying musiconhold processes linux9*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-4415.5428.3043 2011-06-21 11:04:39.000000000 +0300 +++ /etc/asterisk/sip.conf 2011-06-21 11:08:39.000000000 +0300 @@ -18,14 +18,6 @@ # -[general] -context=default -allowoverlap=no -udpbindaddr=0.0.0.0 -tcpenable=no -tcpbindaddr=0.0.0.0 -srvlookup=yes - [3102] type=friend secre=password |
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux9 (pid = 4942) ... 3102/3102 192.168.109.2 D 13370 Unmonitored ny/lion (Unspecified) D 5060 Unmonitored paris/lion 192.168.103.1 D 5060 Unmonitored 4 sip peers [Monitored: 0 online, 0 offline Unmonitored: 4 online, 0 offline] -- Remote UNIX connection Executing last minute cleanups == Destroying musiconhold processes linux9*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#diaplan reload
bash: diaplan: команда не найдена |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#secre=password
allowoverlap=no udpbindaddr=0.0.0.0 tcpbindaddr=0.0.0.0 srvlookup=yes register => lion:password@192.168.103.1/paris type=friend [3101] secre=password user=3101 host=dynamic ... [3101] type=friendord host=dynamic callerid="VoIP Phone <3101>" user=3101 context=gr1 # [3102] type=friend "/etc/asterisk/sip.conf" 47L, 619C записано |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-4415.16538.28467 2011-06-21 11:23:33.000000000 +0300 +++ /etc/asterisk/sip.conf 2011-06-21 11:23:52.000000000 +0300 @@ -7,7 +7,7 @@ srvlookup=yes register => lion:password@192.168.103.1/paris -register => lion:password@192.168.103.1/ny +register => lion:password@192.168.105.1/ny [3101] type=friend |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-4415.10479.1967 2011-06-21 11:25:45.000000000 +0300 +++ /etc/asterisk/sip.conf 2011-06-21 11:35:48.000000000 +0300 @@ -7,7 +7,7 @@ srvlookup=yes register => lion:password@192.168.103.1/paris -register => lion:password@192.168.105.1/ny + [3101] type=friend @@ -15,7 +15,7 @@ host=dynamic user=3101 callerid="VoIP Phone <3101>" -context=gr1 +context=gr3 # @@ -34,14 +34,7 @@ host=dynamic username=lion canreinvite=no -context=gr3 +context=gr4 -[ny] -type=friend -secret=password -host=dynamic -username=lion -canreinvite=no -context=gr4 |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux9 (pid = 5033) ... -- Time to restore hints and swap in new dialplan: 0.000000 sec -- Time to delete the old dialplan: 0.000296 sec -- Total time merge_contexts_delete: 0.000855 sec -- Remote UNIX connection disconnected -- Remote UNIX connection Executing last minute cleanups == Destroying musiconhold processes linux9*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#vim /etc/asterisk/sip.conf
|
#[ ]
|
#!v
vim /etc/asterisk/extension.conf |
#~
rm -rf /etc/asterisk/extension.conf |
#vim /etc/asterisk/extensions
|
#vim /etc/asterisk/extensions.
|
#vim /etc/asterisk/extensions.conf
|
#include => local
[3101] "/etc/asterisk/sip.conf" 40L, 490C type=friend secre=password host=dynamic user=3101 callerid="VoIP Phone <3101>" context=gr3 # [3102] |
#[ype=fri]nd
Dialplan reloaded. |
#asterisk -rx 'sip reload'
|
#[3101]
[gr3] [gr3] include => internal include => local include => national include => international [gr4] [gr4] [gr4] include => national include => international "/etc/asterisk/extensions.conf" 851L, 28704C записано |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-4415.10030.20548 2011-06-21 11:39:56.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-06-21 11:40:29.000000000 +0300 @@ -33,7 +33,9 @@ [international] exten => _23XX,1,Dial(SIP/kiev/${EXTEN},10) -exten => _21XX,1,Dial(SIP/ny/${EXTEN},10) + +;----------USA +exten => _2[12]XX,1,Dial(SIP/paris/${EXTEN},10) ;-----------RUSSIA exten => _1[12]XX,1,Dial(SIP/paris/${EXTEN},10) |
#asterisk -rx 'dialplan reload'
Dialplan reloaded. |
#asterisk -rx 'sip reload'
|
#asterisk -rvvvvvvv
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux9 (pid = 5033) ... -- Time to restore hints and swap in new dialplan: 0.000000 sec -- Time to delete the old dialplan: 0.000296 sec -- Total time merge_contexts_delete: 0.000855 sec -- Remote UNIX connection disconnected -- Remote UNIX connection Executing last minute cleanups == Destroying musiconhold processes linux9*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#apt -cach search bind9
bash: apt: команда не найдена |
#[default]
apt-cache search bind9 bindgraph - DNS statistics RRDtool frontend for BIND9 collectd-core - statistics collection and monitoring daemon (core system) gforge-dns-bind9 - collaborative development tool - DNS management (using Bind9) gadmin-bind-dbg - GTK+ configuration tool for bind9 (debug) gadmin-bind - GTK+ configuration tool for bind9 libbind4-dev - DNS resolver and message parsing static library and headers libbind4 - DNS resolver and message parsing library libconfig-auto-perl - Magical config file parser libnss-lwres - NSS module for using bind9's lwres as a naming service unbound-host - reimplementation of the 'host' command bind9-doc - Documentation for BIND bind9-host - Version of 'host' bundled with BIND 9.X bind9 - Internet Domain Name Server bind9utils - Utilities for BIND libbind9-60 - BIND9 Shared Library used by BIND |
#get-install asterisk-h323 asteriskconf asterisk-sound-main
bind9-host bash: get-install: команда не найдена |
#get-install bind9- host
bash: get-install: команда не найдена |
#cat /etc/resolv.conf
search unix.nt nameserver 192.168.15.253 |
#vim /etc/resolv.conf
--- /tmp/l3-saved-4508.7663.16577 2011-06-21 12:23:06.000000000 +0300 +++ /etc/resolv.conf 2011-06-21 12:23:48.000000000 +0300 @@ -1,2 +1,2 @@ search unix.nt -nameserver 192.168.15.253 +nameserver 192.168.109.1 |
#host ya.ru
;; connection timed out; no servers could be reached |
#~
|
#~
|
#~
^[[B ; <<>> DiG 9.7.3 <<>> lion.unix.nt a ;; global options: +cmd ;; connection timed out; no servers could be reached |
#vim /etc/bind/named.conf.local
|
#vim /etc/
--- /tmp/l3-saved-6529.31406.15869 2011-06-21 13:57:13.000000000 +0300 +++ /etc/resolv.conf 2011-06-21 13:57:16.000000000 +0300 @@ -1,2 +1,2 @@ search unix.nt -nameserver 192.168.109.1 +#nameserver 192.168.109.1 |
#vim /etc/b
--- /tmp/l3-saved-6529.13764.23467 2011-06-21 13:57:21.000000000 +0300 +++ /etc/resolv.conf 2011-06-21 13:57:30.000000000 +0300 @@ -1,2 +1,3 @@ search unix.nt #nameserver 192.168.109.1 +nameserver 192.168.15.253 |
#dpkg -l | grep bind
ii bind9-host 1:9.7.3.dfsg-1~squeeze2 Version of 'host' bundled with BIND 9.X ii libaccess-bridge-java-jni 1.26.2-5 Java Access Bridge for GNOME (jni bindings) ii libart2.0-cil 2.24.1-6 CLI binding for libart 2.3 ii libatspi1.0-0 1.30.1-3 C binding libraries of at-spi for GNOME Accessibility ii libbind9-60 1:9.7.3.dfsg-1~squeeze2 BIND9 Shared Library used by BIND ii libeggdbus-1-0 0.6-1 D-Bus bindings for GObject ii libgconf2.0-cil 2.24.1-6 CLI binding for GConf 2.24 ii libglade2.0-cil 2.12.10-1 CLI binding for the Glade libraries 2.6 ii libglib2.0-cil 2.12.10-1 CLI binding for the GLib utility library 2.12 ii libgmime2.4-cil 2.4.14-1+nmu1 CLI binding for the GMime library ... ii python-gtksourceview2 2.10.1-1 Python bindings for the GtkSourceView widget ii python-libxml2 2.7.8.dfsg-2+squeeze1 Python bindings for the GNOME XML library ii python-louis 2.0.0-1 Python bindings for liblouis ii python-notify 0.1.1-2+b2 Python bindings for libnotify ii python-opengl 3.0.1~b2-1 Python bindings to OpenGL ii python-pyatspi 1.30.1-3 Assistive Technology Service Provider Interface - Python bindings ii python-pyorbit 2.24.0-6 A Python language binding for the ORBit2 CORBA implementation ii python-vte 1:0.24.3-2 Python bindings for the VTE widget set ii python-webkit 1.1.7-1+b1 WebKit/Gtk Python bindings ii python-wnck 2.30.0-4 Python bindings for the WNCK library |
#apt-get install bind9
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово Будут установлены следующие дополнительные пакеты: bind9utils Предлагаемые пакеты: bind9-doc resolvconf ufw НОВЫЕ пакеты, которые будут установлены: bind9 bind9utils обновлено 0, установлено 2 новых пакетов, для удаления отмечено 0 пакетов, и 4 пакетов не обновлено. Необходимо скачать 476 kБ архивов. После данной операции, объём занятого дискового пространства возрастёт на 1.290 kB. Хотите продолжить [Д/н]? Ош http://security.debian.org/ squeeze/updates/main bind9utils amd64 1:9.7.3.dfsg-1~squeeze2 Не удалось найти IP адрес для security.debian.org Ош http://security.debian.org/ squeeze/updates/main bind9 amd64 1:9.7.3.dfsg-1~squeeze2 Не удалось найти IP адрес для security.debian.org Не удалось получить http://security.debian.org/pool/updates/main/b/bind9/bind9utils_9.7.3.dfsg-1~squeeze2_amd64.deb Не удалось найти IP адрес для security.debian.org Не удалось получить http://security.debian.org/pool/updates/main/b/bind9/bind9_9.7.3.dfsg-1~squeeze2_amd64.deb Не удалось найти IP адрес для security.debian.org E: Невозможно получить некоторые архивы, вероятно надо запустить apt-get update или попытаться повторить запуск с ключом --fix-missing |
#cat /etc/resolv.conf
search unix.nt nameserver 192.168.109.1 |
#vim /etc/resolv.conf
--- /tmp/l3-saved-6529.15719.24493 2011-06-21 13:58:20.000000000 +0300 +++ /etc/bind/named.conf.options 2011-06-21 13:58:35.000000000 +0300 @@ -10,9 +10,9 @@ // Uncomment the following block, and insert the addresses replacing // the all-0's placeholder. - // forwarders { - // 0.0.0.0; - // }; + forwarders { + 192.168.15.253; + }; auth-nxdomain no; # conform to RFC1035 listen-on-v6 { any; }; |
#ls /etc/named/
ls: невозможно получить доступ к /etc/named/: Нет такого файла или каталога |
#ls /etc/bind/
bind.keys db.127 db.empty db.root named.conf.default-zones named.conf.options zones.rfc1918 db.0 db.255 db.local named.conf named.conf.local rndc.key |
#vim /etc/bind/db.odessa.unix.nt
--- /tmp/l3-saved-6529.23924.10845 2011-06-21 13:59:21.000000000 +0300 +++ /etc/bind/db.odessa.unix.nt 2011-06-21 13:59:45.000000000 +0300 @@ -1,9 +1,8 @@ -@ SOA linux0.unix.nt. root 1 9600 9600 9600 9600 - NS linux0.unix.nt. - MX 10 linux0.unix.nt. +@ SOA linux9.unix.nt. root 1 9600 9600 9600 9600 + NS linux9.unix.nt. + MX 10 linux9.unix.nt. - A 192.168.15.252 + A 192.168.109.1 -asterisk A 192.168.15.252 |
#mv /etc/bind/db.odessa.unix.nt /etc/bind/db.lyon.unix.nt
|
#vim /etc/bind/named.conf
|
#~
// // Do any local configuration here // // Consider adding the 1918 zones here, if they are not used in your // organization //include "/etc/bind/zones.rfc1918"; "/etc/bind/named.conf.local" 8L, 165C |
#~
options { directory "/var/cache/bind"; // If there is a firewall between you and nameservers you want // to talk to, you may need to fix the firewall to allow multiple // ports to talk. See http://www.kb.cert.org/vuls/id/800113 // If your ISP provided one or more IP addresses for stable // nameservers, you probably want to use them as forwarders. // Uncomment the following block, and insert the addresses replacing // the all-0's placeholder. forwarders { 192.168.15.253; }; auth-nxdomain no; # conform to RFC1035 listen-on-v6 { any; }; }; "/etc/bind/named.conf.options" 20L, 571C |
#/etc/init.d/bind9 restart
Stopping domain name service...: bind9 waiting for pid 7910 to die. Starting domain name service...: bind9. |
#dig @127.0.0.1 lyon.unix.nt
; <<>> DiG 9.7.3 <<>> @127.0.0.1 lyon.unix.nt ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18619 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;lyon.unix.nt. IN A ;; ANSWER SECTION: lyon.unix.nt. 9600 IN A 192.168.109.1 ;; AUTHORITY SECTION: lyon.unix.nt. 9600 IN NS linux9.unix.nt. ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Tue Jun 21 14:01:06 2011 ;; MSG SIZE rcvd: 67 |
#vim /etc/resolv.conf
--- /tmp/l3-saved-6529.7678.14783 2011-06-21 14:01:16.000000000 +0300 +++ /etc/resolv.conf 2011-06-21 14:01:20.000000000 +0300 @@ -1,3 +1,2 @@ search unix.nt -#nameserver 192.168.109.1 -nameserver 192.168.15.253 +nameserver 192.168.109.1 |
#host ya.ru
ya.ru has address 77.88.21.3 ya.ru has address 87.250.250.3 ya.ru has address 87.250.250.203 ya.ru has address 87.250.251.3 ya.ru has address 93.158.134.3 ya.ru has address 93.158.134.203 ya.ru has address 213.180.204.3 ya.ru mail is handled by 10 mx.yandex.ru. |
#apt-get install sendmail sensible-mda sendmail-bin
ЧÑение ÑпиÑков пакеÑов... ÐоÑово ÐоÑÑÑоение деÑева завиÑимоÑÑей ЧÑение инÑоÑмаÑии о ÑоÑÑоÑнии... ÐоÑово СледÑÑÑие пакеÑÑ ÑÑÑанавливалиÑÑ Ð°Ð²ÑомаÑиÑеÑки и болÑÑе не ÑÑебÑÑÑÑÑ: libmysqlclient16 mysql-common ÐÐ»Ñ Ð¸Ñ ÑÐ´Ð°Ð»ÐµÐ½Ð¸Ñ Ð¸ÑполÑзÑйÑе 'apt-get autoremove'. ÐÑдÑÑ ÑÑÑÐ°Ð½Ð¾Ð²Ð»ÐµÐ½Ñ ÑледÑÑÑие дополниÑелÑнÑе пакеÑÑ: libmysqlclient16 mysql-common sendmail-base sendmail-cf ÐÑедлагаемÑе пакеÑÑ: sendmail-doc rmail logcheck resolvconf sasl2-bin ... РаÑпаковÑваеÑÑÑ Ð¿Ð°ÐºÐµÑ libmysqlclient16 (из Ñайла .../libmysqlclient16_5.1.49-3_amd64.deb)... ÐÑÐ±Ð¾Ñ Ñанее не вÑбÑанного пакеÑа sensible-mda. РаÑпаковÑваеÑÑÑ Ð¿Ð°ÐºÐµÑ sensible-mda (из Ñайла .../sensible-mda_8.14.3-9.4_amd64.deb)... ÐÑÐ±Ð¾Ñ Ñанее не вÑбÑанного пакеÑа sendmail. РаÑпаковÑваеÑÑÑ Ð¿Ð°ÐºÐµÑ sendmail (из Ñайла .../sendmail_8.14.3-9.4_all.deb)... ÐбÑабаÑÑваÑÑÑÑ ÑÑиггеÑÑ Ð´Ð»Ñ man-db ... ÐаÑÑÑаиваеÑÑÑ Ð¿Ð°ÐºÐµÑ mysql-common (5.1.49-3) ... ÐаÑÑÑаиваеÑÑÑ Ð¿Ð°ÐºÐµÑ libmysqlclient16 (5.1.49-3) ... ÐаÑÑÑаиваеÑÑÑ Ð¿Ð°ÐºÐµÑ sensible-mda (8.14.3-9.4) ... ÐаÑÑÑаиваеÑÑÑ Ð¿Ð°ÐºÐµÑ sendmail (8.14.3-9.4) ... |
#cd /etc/mail
|
#vim local-host-names
|
#~
DAEMON_OPTIONS(`Family=inet, Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl dnl DAEMON_OPTIONS(`Family=inet6, Name=MSP-v6, Port=submission, M=Ea, Addr=::1')) dnl DAEMON_OPTIONS(`Family=inet, Name=MSP-v4, Port=submission, M=Ea, Addr=127.0.0.11 ')dnl dnl # dnl # Be somewhat anal in what we allow define(`confPRIVACY_FLAGS',dnl `needmailhelo,needexpnhelo,needvrfyhelo,restrictqrun,restrictexpand,nobodyreturnn ,authwarnings')dnl ... include(`/etc/mail/m4/dialup.m4')dnl include(`/etc/mail/m4/provider.m4')dnl dnl # dnl # Default Mailer setup MAILER_DEFINITIONS MAILER(`local')dnl MAILER(`smtp')dnl -- ВСТАВКА -- 105,1 Внизу 105L, 4082C записано "sendmail.mc" |
#/etc/init.d/sendmail restart
Restarting Mail Transport Agent (MTA): sendmail. |
#su -user
su: неверный ключ -- «u» Использование: su [параметры] [имя пользователя] Параметры: -c, --command COMMAND передать команду COMMAND вызываемой оболочке -h, --help показать данное сообщение и закончить работу -, -l, --login запускать оболочку как регистрационную -m, -p, --preserve-environment не сбрасывать переменные окружения и сохранить запустившую оболочку -s, --shell SHELL использовать значение переменной SHELL вместо значения из файла passwd |
#The access db is the basis for most of sendmail's checking
The authenticity of host '192.168.103.1 (192.168.103.1)' can't be established. RSA key fingerprint is f5:37:1c:a8:53:ed:47:e8:b8:31:a0:92:1d:89:f9:f6. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.103.1' (RSA) to the list of known hosts. root@192.168.103.1's password: sendmail.mc 100% 4213 4.1KB/s 00:00 |
#vim sendmail.mc
--- /tmp/l3-saved-10117.18209.32506 2011-06-21 14:45:36.000000000 +0300 +++ sendmail.mc 2011-06-21 14:45:59.000000000 +0300 @@ -89,7 +89,7 @@ FEATURE(`ratecontrol', `nodelay', `terminate')dnl dnl # Masquerading options FEATURE(`always_add_domain')dnl -MASQUERADE_AS(`paris.unix.nt')dnl +MASQUERADE_AS(`lyon.unix.nt')dnl FEATURE(`allmasquerade')dnl FEATURE(`masquerade_envelope')dnl dnl # |
#apt -get install qpopper
bash: apt: команда не найдена |
#apt-get install qpopper
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово Следующие пакеты устанавливались автоматически и больше не требуются: libmysqlclient16 mysql-common Для их удаления используйте 'apt-get autoremove'. Будут установлены следующие дополнительные пакеты: openbsd-inetd НОВЫЕ пакеты, которые будут установлены: openbsd-inetd qpopper ... Выбор ранее не выбранного пакета openbsd-inetd. (Чтение базы данных ... на данный момент установлено 129836 файлов и каталогов.) Распаковывается пакет openbsd-inetd (из файла .../openbsd-inetd_0.20080125-6_amd64.deb)... Выбор ранее не выбранного пакета qpopper. Распаковывается пакет qpopper (из файла .../qpopper_4.0.9.dfsg-1.2_amd64.deb)... Обрабатываются триггеры для man-db ... Настраивается пакет openbsd-inetd (0.20080125-6) ... Stopping internet superserver: inetd. Not starting internet superserver: no services enabled. Настраивается пакет qpopper (4.0.9.dfsg-1.2) ... |
#netstat lnp | grep :110
|
#netstat -lnp | grep :110
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 10481/inetd |
#vim /etc/mail/acess
|
#~
#ClientRate:192.168 0 #ClientConn:192.168 0 # Defaults GreetPause: 5000 ClientRate: 10 ClientConn: 10 # # Don't offer AUTH on local network #SRV_Features:192.168.1 A # ... #ClientConn:192.168.109 0 # Hosts that validly forward to me #GreetPause:<ip> 0 #ClientRate:<ip> 30 #ClientConn:<ip> 0 # # Whitelisted users # Spam:postmaster@ FRIEND "access" 139L, 4276C записано |
#/etc/init.d/sendmail restart
Restarting Mail Transport Agent (MTA): sendmail. |
#muut
bash: muut: команда не найдена |
#mutt
|
#su - user
---Mutt: /var/mail/user [Msgs:0]---(threads/date)-----------------------(all)--- Почтовый ящик не изменился. user@linux9:~$ exit logout |
#etc/ sendmail
bash: etc/: Нет такого файла или каталога |
#etc/sendmail/loca-hosts-names
bash: etc/sendmail/loca-hosts-names: Нет такого файла или каталога |
search unix.nt nameserver 192.168.109.1
Время первой команды журнала | 08:37:37 2011- 6-21 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 14:12:15 2011- 6-21 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 15.84 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 6.93 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 3.19 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.53 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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