/l3/users/sergs/asterisk/linux5.unix.nt/root :1 :2 :3 :4 :5 :6 |
|
#w
12:08:36 up 55 min, 2 users, load average: 0.00, 0.00, 0.00 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT root tty1 - 11:26 28:21 1.48s 1.34s ssh 192.168.15. root tty2 - 12:07 0.00s 0.06s 0.00s /bin/login -- |
#free
total used free shared buffers cached Mem: 3099904 273700 2826204 0 25612 201752 -/+ buffers/cache: 46336 3053568 Swap: 2650684 0 2650684 test comment |
#vi /etc/network/interfaces
--- /tmp/l3-saved-4631.1030.5468 2010-05-25 12:21:45.000000000 +0300 +++ /etc/network/interfaces 2010-05-25 12:23:22.000000000 +0300 @@ -8,11 +8,11 @@ # The primary network interface allow-hotplug eth0 iface eth0 inet static - address 192.168.15.5 + address 192.168.5.1 netmask 255.255.255.0 - network 192.168.15.0 - broadcast 192.168.15.255 - gateway 192.168.15.254 + network 192.168.5.0 + broadcast 192.168.5.255 + gateway 192.168.5.254 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 10.0.35.1 dns-search unix.nt |
#ls -al
total 32 drwxr-xr-x 7 root root 4096 2010-05-25 12:23 . drwxr-xr-x 60 root root 4096 2010-05-25 12:04 .. drwxr-xr-x 2 root root 4096 2008-05-05 23:33 if-down.d drwxr-xr-x 2 root root 4096 2008-05-05 23:33 if-post-down.d drwxr-xr-x 2 root root 4096 2008-05-05 23:33 if-pre-up.d drwxr-xr-x 2 root root 4096 2010-05-25 11:48 if-up.d -rw-r--r-- 1 root root 512 2010-05-25 12:23 interfaces drwxr-xr-x 2 root root 4096 2010-05-25 11:13 run |
#vi /etc/network/interfaces
|
#./if-
if-down.d/ if-post-down.d/ if-pre-up.d/ if-up.d/ |
#ls
if-down.d if-post-down.d if-pre-up.d if-up.d interfaces run |
#./interfaces
bash: ./interfaces: Permission denied |
#ifocnfig
bash: ifocnfig: command not found |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:1b:fc:7d:bc:f0 inet addr:192.168.15.5 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::21b:fcff:fe7d:bcf0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:25163 errors:0 dropped:0 overruns:0 frame:0 TX packets:15540 errors:0 dropped:0 overruns:0 carrier:1 collisions:0 txqueuelen:1000 RX bytes:31456733 (29.9 MiB) TX bytes:1056711 (1.0 MiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:14 errors:0 dropped:0 overruns:0 frame:0 TX packets:14 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1072 (1.0 KiB) TX bytes:1072 (1.0 KiB) |
#ifconfig down eth0
^C |
#ifconfig down eth0
^C |
#/etc/init.d/networking restart
Reconfiguring network interfaces...SIOCDELRT: No such process done. |
#/etc/init.d/networking restart
Reconfiguring network interfaces...done. |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:1b:fc:7d:bc:f0 inet addr:192.168.15.5 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::21b:fcff:fe7d:bcf0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:25163 errors:0 dropped:0 overruns:0 frame:0 TX packets:15560 errors:0 dropped:0 overruns:0 carrier:1 collisions:0 txqueuelen:1000 RX bytes:31456733 (29.9 MiB) TX bytes:1057911 (1.0 MiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:23 errors:0 dropped:0 overruns:0 frame:0 TX packets:23 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1826 (1.7 KiB) TX bytes:1826 (1.7 KiB) |
#if
if ifconfig ifdown ifup |
#ifdown eth0
ifdown: interface eth0 not configured |
#ifup eth0
|
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:1b:fc:7d:bc:f0 inet addr:192.168.5.1 Bcast:192.168.5.255 Mask:255.255.255.0 inet6 addr: fe80::21b:fcff:fe7d:bcf0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:25164 errors:0 dropped:0 overruns:0 frame:0 TX packets:15575 errors:0 dropped:0 overruns:0 carrier:1 collisions:0 txqueuelen:1000 RX bytes:31456793 (29.9 MiB) TX bytes:1058832 (1.0 MiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:28 errors:0 dropped:0 overruns:0 frame:0 TX packets:28 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2250 (2.1 KiB) TX bytes:2250 (2.1 KiB) |
#w
12:36:07 up 1:22, 2 users, load average: 0.00, 0.00, 0.00 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT root tty1 - 11:26 2.00s 2.08s 1.94s ssh 192.168.15. root tty2 - 12:07 0.00s 0.20s 0.00s /bin/login -- |
#ps -ax
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html PID TTY STAT TIME COMMAND 1 ? Ss 0:01 init [2] 2 ? S< 0:00 [kthreadd] 3 ? S< 0:00 [migration/0] 4 ? S< 0:00 [ksoftirqd/0] 5 ? S< 0:00 [watchdog/0] 6 ? S< 0:00 [migration/1] 7 ? S< 0:00 [ksoftirqd/1] 8 ? S< 0:00 [watchdog/1] ... 4581 ? Ss 0:09 l3-agent 4586 tty2 Ss+ 0:00 /bin/login -- 4593 tty2 S+ 0:00 script -f -c bash -q /root/.lilalo//16534126012696426 4630 tty2 S+ 0:00 script -f -c bash -q /root/.lilalo//16534126012696426 4631 pts/0 Ss 0:00 bash 4860 pts/0 S 0:00 /bin/sh /etc/network/if-up.d/ntpdate 4871 pts/0 S 0:00 lockfile-touch /var/lock/ntpdate 4872 pts/0 S 0:00 /usr/sbin/ntpdate -s -b 0.debian.pool.ntp.org 1.debia 4876 ? Ss 0:00 /usr/sbin/sshd 4900 pts/0 R+ 0:00 ps -ax |
#kill -9 2674
|
#ping ya.ru
PING ya.ru (93.158.134.3) 56(84) bytes of data. 64 bytes from www.yandex.ru (93.158.134.3): icmp_seq=1 ttl=48 time=49.5 ms 64 bytes from www.yandex.ru (93.158.134.3): icmp_seq=2 ttl=48 time=52.7 ms ^C --- ya.ru ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1003ms rtt min/avg/max/mdev = 49.512/51.142/52.772/1.630 ms |
#apt-get install gpm
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: gpm 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 213kB of archives. After this operation, 455kB of additional disk space will be used. Get:1 http://10.0.35.1 lenny/main gpm 1.20.4-3.1 [213kB] Fetched 213kB in 0s (4761kB/s) Preconfiguring packages ... Selecting previously deselected package gpm. (Reading database ... 21823 files and directories currently installed.) Unpacking gpm (from .../gpm_1.20.4-3.1_i386.deb) ... Processing triggers for man-db ... Setting up gpm (1.20.4-3.1) ... Creating config file /etc/gpm.conf with new version Stopping mouse interface server: gpmO0o.oops(): [daemon/check_kill.c(38)]: Could not open /var/run/gpm.pid. failed! Starting mouse interface server: gpm. |
#ping 192.168.4.1
PING 192.168.4.1 (192.168.4.1) 56(84) bytes of data. 64 bytes from 192.168.4.1: icmp_seq=1 ttl=63 time=0.226 ms 64 bytes from 192.168.4.1: icmp_seq=2 ttl=63 time=0.224 ms 64 bytes from 192.168.4.1: icmp_seq=3 ttl=63 time=0.217 ms ^C --- 192.168.4.1 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 1999ms rtt min/avg/max/mdev = 0.217/0.222/0.226/0.012 ms |
#apt-cache search dhcp server | less
|
#ssh 192.168.4.1
The authenticity of host '192.168.4.1 (192.168.4.1)' can't be established. RSA key fingerprint is a8:91:5d:22:21:72:02:03:a6:3e:1e:6b:70:33:b2:c8. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.4.1' (RSA) to the list of known hosts. root@192.168.4.1's password: Linux linux4.unix.nt 2.6.26-2-686 #1 SMP Wed May 12 21:56:10 UTC 2010 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Tue May 25 12:40:50 2010 from 192.168.15.100 l3-agent is already running: pid=4496; pidfile=/root/.lilalo/l3-agent.pid |
#screen -x
|
#apt-get install dhcp3-server
Package configuration ┌──────────────────────────────┤ DHCP Server ├──────────────────────────────┐ │ │ │ Non-authoritative version of DHCP server │ │ │ │ The version 3 DHCP server is non-authoritative by default. │ │ │ │ This means that if a client requests an address that the server knows │ │ nothing about and the address is incorrect for that network segment, the │ │ server will _not_ send a DHCPNAK (which tells the client it should stop │ ... └───────────────────────────────────────────────────────────────────────────┘ Selecting previously deselected package dhcp3-server. (Reading database ... 21858 files and directories currently installed.) Unpacking dhcp3-server (from .../dhcp3-server_3.1.1-6+lenny4_i386.deb) ... Processing triggers for man-db ... Setting up dhcp3-server (3.1.1-6+lenny4) ... Generating /etc/default/dhcp3-server... Starting DHCP server: dhcpd3check syslog for diagnostics. failed! failed! invoke-rc.d: initscript dhcp3-server, action "start" failed. |
#cd /etc/dhcp3/
|
#vi /etc/default/dhcp3-server
--- /tmp/l3-saved-4631.11626.16744 2010-05-25 12:45:58.000000000 +0300 +++ /etc/default/dhcp3-server 2010-05-25 12:46:26.000000000 +0300 @@ -8,4 +8,4 @@ # On what interfaces should the DHCP server (dhcpd) serve DHCP requests? # Separate multiple interfaces with spaces, e.g. "eth0 eth1". -INTERFACES="" +INTERFACES="eth0" |
#vi dhcpd.conf
--- /tmp/l3-saved-4631.24149.3452 2010-05-25 12:47:46.000000000 +0300 +++ dhcpd.conf 2010-05-25 12:51:41.000000000 +0300 @@ -11,8 +11,8 @@ ddns-update-style none; # option definitions common to all supported networks... -option domain-name "example.org"; -option domain-name-servers ns1.example.org, ns2.example.org; +option domain-name "unix.nt"; +option domain-name-servers 10.0.35.1; default-lease-time 600; max-lease-time 7200; @@ -33,10 +33,10 @@ # This is a very basic subnet declaration. -#subnet 10.254.239.0 netmask 255.255.255.224 { -# range 10.254.239.10 10.254.239.20; -# option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org; -#} +subnet 192.168.5.0 netmask 255.255.255.0 { + range 192.168.5.10 192.168.5.50; + option routers 192.168.5.254; +} # This declaration allows BOOTP clients to get dynamic addresses, # which we don't really recommend. |
#/etc/init.d/dhcp3-server restart
Stopping DHCP server: dhcpd3 failed! Starting DHCP server: dhcpd3. |
#/etc/init.d/dhcp3-server restart
Stopping DHCP server: dhcpd3. Starting DHCP server: dhcpd3. |
#/etc/init.d/dhcp3-server status
Status of DHCP server: dhcpd3 is running. |
#tail /var/lib/dhcp3/dhc
dhclient.leases dhcpd.leases dhcpd.leases~ |
#tail /var/lib/dhcp3/dhc
dhclient.leases dhcpd.leases dhcpd.leases~ |
#tail /var/lib/dhcp3/dhcpd.leases
lease 192.168.5.10 { starts 2 2010/05/25 09:53:31; ends 2 2010/05/25 10:03:31; cltt 2 2010/05/25 09:53:31; binding state active; next binding state free; hardware ethernet 00:1d:60:ec:c0:9e; uid "\001\000\035`\354\300\236"; client-hostname "UC-10"; } |
#apt-get install vlock
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: vlock 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 38.1kB of archives. After this operation, 221kB of additional disk space will be used. Get:1 http://10.0.35.1 lenny/main vlock 2.2.2-3 [38.1kB] Fetched 38.1kB in 0s (945kB/s) Selecting previously deselected package vlock. (Reading database ... 21871 files and directories currently installed.) Unpacking vlock (from .../vlock_2.2.2-3_i386.deb) ... Processing triggers for man-db ... Setting up vlock (2.2.2-3) ... |
#vl
bash: vl: command not found |
#vlock
This TTY is now locked. Please press [ENTER] to unlock. root's Password: |
#man vlock
|
#vlock -a
vlock: this terminal is not a virtual console |
#man vlock
|
#vlock --all
vlock: this terminal is not a virtual console |
#vl
bash: vl: command not found |
#vlock
This TTY is now locked. Please press [ENTER] to unlock. root's Password: |
#man vlock
|
#vlock -a
vlock: this terminal is not a virtual console |
#vl
bash: vl: command not found |
#tail /var/lib/dhcp3/dhcpd.leases
lease 192.168.5.10 { starts 2 2010/05/25 11:18:30; ends 2 2010/05/25 11:28:30; cltt 2 2010/05/25 11:18:30; binding state active; next binding state free; hardware ethernet 00:1d:60:ec:c0:9e; uid "\001\000\035`\354\300\236"; client-hostname "UC-10"; } |
#tail /var/lib/dhcp3/dhcpd.leases
lease 192.168.5.11 { starts 2 2010/05/25 11:21:07; ends 2 2010/05/25 11:31:07; cltt 2 2010/05/25 11:21:07; binding state active; next binding state free; hardware ethernet 00:0e:08:d2:2e:07; uid "\001\000\016\010\322.\007"; client-hostname "ph200"; } |
#tail /var/lib/dhcp3/dhcpd.leases -n 30
lease 192.168.5.10 { starts 2 2010/05/25 11:13:30; ends 2 2010/05/25 11:23:30; cltt 2 2010/05/25 11:13:30; binding state active; next binding state free; hardware ethernet 00:1d:60:ec:c0:9e; uid "\001\000\035`\354\300\236"; client-hostname "UC-10"; } ... lease 192.168.5.11 { starts 2 2010/05/25 11:21:07; ends 2 2010/05/25 11:31:07; cltt 2 2010/05/25 11:21:07; binding state active; next binding state free; hardware ethernet 00:0e:08:d2:2e:07; uid "\001\000\016\010\322.\007"; client-hostname "ph200"; } |
#apt-get install asterisk-sounds-
asterisk-sounds-extra asterisk-sounds-main |
#apt-get install asterisk-sounds-extra
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: asterisk-sounds-extra 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 3224kB of archives. After this operation, 6291kB of additional disk space will be used. Get:1 http://10.0.35.1 lenny/main asterisk-sounds-extra 1.4.7-1 [3224kB] Fetched 3224kB in 0s (11.6MB/s) Selecting previously deselected package asterisk-sounds-extra. (Reading database ... 25234 files and directories currently installed.) Unpacking asterisk-sounds-extra (from .../asterisk-sounds-extra_1.4.7-1_all.deb) ... Setting up asterisk-sounds-extra (1.4.7-1) ... |
#dpkg -l | grep aster
ii asterisk 1:1.4.21.2~dfsg-3+lenny1 Open Source Private Branch Exchange (PBX) ii asterisk-config 1:1.4.21.2~dfsg-3+lenny1 Configuration files for Asterisk ii asterisk-sounds-extra 1.4.7-1 Additional sound files for the Asterisk PBX ii asterisk-sounds-main 1:1.4.21.2~dfsg-3+lenny1 Core Sound files for Asterisk (English) ii base-passwd 3.5.20 Debian base system master password and group files |
#cd /etc/asterisk/
|
#ls -al
total 436 drwxr-xr-x 3 asterisk asterisk 4096 2010-05-25 14:26 . drwxr-xr-x 66 root root 4096 2010-05-25 14:26 .. -rw-r----- 1 asterisk asterisk 140 2009-12-14 21:08 adsi.conf -rw-r----- 1 asterisk asterisk 840 2009-12-14 21:08 adtranvofr.conf -rw-r----- 1 asterisk asterisk 2724 2009-12-14 21:08 agents.conf -rw-r----- 1 asterisk asterisk 2227 2009-12-14 21:08 alarmreceiver.conf -rw-r----- 1 asterisk asterisk 2675 2009-12-14 21:08 alsa.conf -rw-r----- 1 asterisk asterisk 767 2009-12-14 21:08 amd.conf -rw-r----- 1 asterisk asterisk 3260 2009-12-14 21:08 asterisk.adsi ... -rw-r----- 1 asterisk asterisk 4044 2009-12-14 21:08 skinny.conf -rw-r----- 1 asterisk asterisk 6691 2009-12-14 21:08 sla.conf -rw-r----- 1 asterisk asterisk 2665 2009-12-14 21:08 smdi.conf -rw-r----- 1 asterisk asterisk 1384 2009-12-14 21:08 telcordia-1.adsi -rw-r----- 1 asterisk asterisk 598 2009-12-14 21:08 udptl.conf -rw-r----- 1 asterisk asterisk 1804 2009-12-14 21:08 users.conf -rw-r----- 1 asterisk asterisk 11723 2009-12-14 21:08 voicemail.conf -rw-r----- 1 asterisk asterisk 2772 2009-12-14 21:08 vpb.conf -rw-r----- 1 asterisk asterisk 393 2009-12-14 21:08 watchdog.conf -rw-r----- 1 asterisk asterisk 24193 2009-12-14 21:08 zapata.conf |
#ls
adsi.conf enum.conf manager.conf rtp.conf adtranvofr.conf esel.conf manager.d say.conf agents.conf extconfig.conf meetme.conf sip.conf alarmreceiver.conf extensions.ael mgcp.conf sip_notify.conf alsa.conf extensions.conf misdn.conf skinny.conf amd.conf features.conf modules.conf sla.conf asterisk.adsi festival.conf musiconhold.conf smdi.conf asterisk.conf followme.conf muted.conf telcordia-1.adsi cdr.conf func_odbc.conf osp.conf udptl.conf cdr_custom.conf gtalk.conf oss.conf users.conf cdr_manager.conf h323.conf phone.conf voicemail.conf cdr_odbc.conf http.conf privacy.conf vpb.conf cdr_pgsql.conf iax.conf queues.conf watchdog.conf cdr_tds.conf iaxprov.conf res_odbc.conf zapata.conf codecs.conf indications.conf res_pgsql.conf dnsmgr.conf jabber.conf res_snmp.conf dundi.conf logger.conf rpt.conf |
#dp
dpkg dpkg-gencontrol dpkg-scansources dpkg-architecture dpkg-gensymbols dpkg-shlibdeps dpkg-buildpackage dpkg-name dpkg-source dpkg-checkbuilddeps dpkg-parsechangelog dpkg-split dpkg-deb dpkg-preconfigure dpkg-statoverride dpkg-distaddfile dpkg-query dpkg-trigger dpkg-divert dpkg-reconfigure dprofpp dpkg-genchanges dpkg-scanpackages |
#dpkg -L asterisk | less
|
#tail /var/lib/dhcp3/dhcpd.leases -n 30
lease 192.168.5.11 { starts 2 2010/05/25 11:23:37; ends 2 2010/05/25 11:33:37; cltt 2 2010/05/25 11:23:37; binding state active; next binding state free; hardware ethernet 00:0e:08:d2:2e:07; uid "\001\000\016\010\322.\007"; client-hostname "SipuraSPA"; } ... lease 192.168.5.10 { starts 2 2010/05/25 11:28:30; ends 2 2010/05/25 11:38:30; cltt 2 2010/05/25 11:28:30; binding state active; next binding state free; hardware ethernet 00:1d:60:ec:c0:9e; uid "\001\000\035`\354\300\236"; client-hostname "UC-10"; } |
#less /var/lib/dhcp3/dhcpd.leases
|
#less /etc/default/asterisk
|
#cd /etc/asterisk/
|
#cp sip.conf sip.conf.old
|
#vi sip.conf
--- /tmp/l3-saved-4631.18656.27922 2010-05-25 15:58:47.000000000 +0300 +++ sip.conf 2010-05-25 16:00:12.000000000 +0300 @@ -1,669 +0,0 @@ -; -; SIP Configuration example for Asterisk -; -; Syntax for specifying a SIP device in extensions.conf is -; SIP/devicename where devicename is defined in a section below. -; -; You may also use -; SIP/username@domain to call any SIP user on the Internet -; (Don't forget to enable DNS SRV records if you want to use this) -; -; If you define a SIP proxy as a peer below, you may call -; SIP/proxyhostname/user or SIP/user@proxyhostname -; where the proxyhostname is defined in a section below -; -; Useful CLI commands to check peers/users: -; sip show peers Show all SIP peers (including friends) -; sip show users Show all SIP users (including friends) -; sip show registry Show status of hosts we register with -; -; sip debug Show all SIP messages -; -; reload chan_sip.so Reload configuration file -; Active SIP peers will not be reconfigured -; - -[general] -context=default ; Default context for incoming calls -;allowguest=no ; Allow or reject guest calls (default is yes) -allowoverlap=no ; Disable overlap dialing support. (Default is yes) -;allowtransfer=no ; Disable all transfers (unless enabled in peers or users) - ; Default is enabled -;realm=mydomain.tld ; Realm for digest authentication - ; defaults to "asterisk". If you set a system name in - ; asterisk.conf, it defaults to that system name - ; Realms MUST be globally unique according to RFC 3261 - ; Set this to your host name or domain name -bindport=5060 ; UDP Port to bind to (SIP standard port is 5060) - ; bindport is the local UDP port that Asterisk will listen on -bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all) -srvlookup=yes ; Enable DNS SRV lookups on outbound calls - ; Note: Asterisk only uses the first host - ; in SRV records - ; Disabling DNS SRV lookups disables the - ; ability to place SIP calls based on domain - ; names to some other SIP users on the Internet - -;domain=mydomain.tld ; Set default domain for this host - ; If configured, Asterisk will only allow - ; INVITE and REFER to non-local domains - ; Use "sip show domains" to list local domains -;pedantic=yes ; Enable checking of tags in headers, - ; international character conversions in URIs - ; and multiline formatted headers for strict - ; SIP compatibility (defaults to "no") - -; See doc/ip-tos.txt for a description of these parameters. -;tos_sip=cs3 ; Sets TOS for SIP packets. -;tos_audio=ef ; Sets TOS for RTP audio packets. -;tos_video=af41 ; Sets TOS for RTP video packets. - -;maxexpiry=3600 ; Maximum allowed time of incoming registrations - ; and subscriptions (seconds) -;minexpiry=60 ; Minimum length of registrations/subscriptions (default 60) -;defaultexpiry=120 ; Default length of incoming/outgoing registration -;t1min=100 ; Minimum roundtrip time for messages to monitored hosts - ; Defaults to 100 ms -;notifymimetype=text/plain ; Allow overriding of mime type in MWI NOTIFY -;checkmwi=10 ; Default time between mailbox checks for peers -;buggymwi=no ; Cisco SIP firmware doesn't support the MWI RFC - ; fully. Enable this option to not get error messages - ; when sending MWI to phones with this bug. -;vmexten=voicemail ; dialplan extension to reach mailbox sets the - ; Message-Account in the MWI notify message - ; defaults to "asterisk" -;disallow=all ; First disallow all codecs -;allow=ulaw ; Allow codecs in order of preference -;allow=ilbc ; see doc/rtp-packetization for framing options -; -; 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. -; -; 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 -; -;language=en ; Default language setting for all users/peers - ; This may also be set for individual users/peers -;relaxdtmf=yes ; Relax dtmf handling -;trustrpid = no ; If Remote-Party-ID should be trusted -;sendrpid = yes ; If Remote-Party-ID should be sent -;progressinband=never ; If we should generate in-band ringing always - ; use 'never' to never use in-band signalling, even in cases - ; where some buggy devices might not render it - ; Valid values: yes, no, never Default: never -;useragent=Asterisk PBX ; Allows you to change the user agent string -;promiscredir = no ; If yes, allows 302 or REDIR to non-local SIP address - ; Note that promiscredir when redirects are made to the - ; local system will cause loops since Asterisk is incapable - ; of performing a "hairpin" call. -;usereqphone = no ; If yes, ";user=phone" is added to uri that contains - ; a valid phone number -;dtmfmode = rfc2833 ; Set default dtmfmode for sending DTMF. Default: rfc2833 - ; Other options: - ; info : SIP INFO messages - ; inband : Inband audio (requires 64 kbit codec -alaw, ulaw) - ; auto : Use rfc2833 if offered, inband otherwise - -;compactheaders = yes ; send compact sip headers. -; -;videosupport=yes ; Turn on support for SIP video. You need to turn this on - ; in the this section to get any video support at all. - ; You can turn it off on a per peer basis if the general - ; video support is enabled, but you can't enable it for - ; one peer only without enabling in the general section. -;maxcallbitrate=384 ; Maximum bitrate for video calls (default 384 kb/s) - ; Videosupport and maxcallbitrate is settable - ; for peers and users as well -;callevents=no ; generate manager events when sip ua - ; performs events (e.g. hold) -;alwaysauthreject = yes ; When an incoming INVITE or REGISTER is to be rejected, - ; for any reason, always reject with '401 Unauthorized' - ; instead of letting the requester know whether there was - ; a matching user or peer for their request - -;g726nonstandard = yes ; If the peer negotiates G726-32 audio, use AAL2 packing - ; order instead of RFC3551 packing order (this is required - ; for Sipura and Grandstream ATAs, among others). This is - ; contrary to the RFC3551 specification, the peer _should_ - ; be negotiating AAL2-G726-32 instead :-( - -;matchexterniplocally = yes ; Only substitute the externip or externhost setting if it matches - ; your localnet setting. Unless you have some sort of strange network - ; setup you will not need to enable this. - -; -; If regcontext is specified, Asterisk will dynamically create and destroy a -; NoOp priority 1 extension for a given peer who registers or unregisters with -; us and have a "regexten=" configuration item. -; Multiple contexts may be specified by separating them with '&'. The -; actual extension is the 'regexten' parameter of the registering peer or its -; name if 'regexten' is not provided. If more than one context is provided, -; the context must be specified within regexten by appending the desired -; context after '@'. More than one regexten may be supplied if they are -; separated by '&'. Patterns may be used in regexten. -; -;regcontext=sipregistrations -; -;--------------------------- RTP timers ---------------------------------------------------- -; These timers are currently used for both audio and video streams. The RTP timeouts -; are only applied to the audio channel. -; The settings are settable in the global section as well as per device -; -;rtptimeout=60 ; Terminate call if 60 seconds of no RTP or RTCP activity - ; on the audio channel - ; when we're not on hold. This is to be able to hangup - ; a call in the case of a phone disappearing from the net, - ; like a powerloss or grandma tripping over a cable. -;rtpholdtimeout=300 ; Terminate call if 300 seconds of no RTP or RTCP activity - ; on the audio channel - ; 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 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 limit set -; for a device. When the call limit is filled, we will indicate busy. Note that -; you need at least 2 in order to be able to do attended transfers. -; -; 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 = yes ; Notify subscriptions on RINGING state (default: no) -;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. -;limitonpeers = yes ; Apply call limits on peers only. This will improve - ; status notification when you are using type=friend - ; Inbound calls, that really apply to the user part - ; of a friend will now be added to and compared with - ; the peer limit instead of applying two call limits, - ; one for the peer and one for the user. - ; "sip show inuse" will only show active calls on - ; the peer side of a "type=friend" object if this - ; setting is turned on. - -;----------------------------------------- T.38 FAX PASSTHROUGH SUPPORT ----------------------- -; -; This setting is available in the [general] section as well as in device configurations. -; Setting this to yes, enables T.38 fax (UDPTL) passthrough on SIP to SIP calls, provided -; both parties have T38 support enabled in their Asterisk configuration -; This has to be enabled in the general section for all devices to work. You can then -; disable it on a per device basis. -; -; T.38 faxing only works in SIP to SIP calls, with no local or agent channel being used. -; -; t38pt_udptl = yes ; Default false -; -;----------------------------------------- OUTBOUND SIP REGISTRATIONS ------------------------ -; Asterisk can register as a SIP user agent to a SIP proxy (provider) -; Format for the register statement is: -; register => user[:secret[:authuser]]@host[:port][/extension] -; -; 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). -; -; host is either a host name defined in DNS or the name of a section defined -; below. -; -; 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 type=peer and type=user sections for SIP providers -; (instead of type=friend) if you have calls in both directions - -;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 - -;----------------------------------------- NAT SUPPORT ------------------------ -; The externip, externhost and localnet settings are used if you use Asterisk -; behind a NAT device to communicate with services on the outside. - -;externip = 200.201.202.203 ; Address that we're going to put in outbound SIP - ; messages if we're behind a NAT - - ; The externip and localnet is used - ; when registering and communicating with other proxies - ; that we're registered with -;externhost=foo.dyndns.net ; Alternatively you can specify an - ; external host, and Asterisk will - ; perform DNS queries periodically. Not - ; recommended for production - ; environments! Use externip instead -;externrefresh=10 ; How often to refresh externhost if - ; used - ; You may add multiple local networks. A reasonable - ; set of defaults are: -;localnet=192.168.0.0/255.255.0.0; All RFC 1918 addresses are local networks -;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 nat= setting is used when Asterisk is on a public IP, communicating with -; devices hidden behind a NAT device (broadband router). If you have one-way -; audio problems, you usually have problems with your NAT configuration or your -; firewall's support of SIP+RTP ports. You configure Asterisk choice of RTP -; ports for incoming audio in rtp.conf -; -;nat=no ; Global NAT settings (Affects all peers and users) - ; yes = Always ignore info and assume NAT - ; no = Use NAT mode only according to RFC3581 (;rport) - ; never = Never attempt NAT mode or RFC3581 support - ; route = Assume NAT, don't send rport - ; (work around more UNIDEN bugs) - -;----------------------------------- MEDIA HANDLING -------------------------------- -; By default, Asterisk tries to re-invite the audio 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 with in the case where Asterisk is outside and have -; clients on the inside of a NAT. In that case, you want to set canreinvite=nonat -; -;canreinvite=yes ; 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). - ; The default setting is YES. If you have all clients - ; behind a NAT, or for some other reason wants Asterisk to - ; stay in the audio path, you may want to turn this off. - - ; In Asterisk 1.4 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 canreinvite is enabled when - ; the device is actually behind NAT. - -;canreinvite=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). - -;canreinvite=update ; Yet a third option... use UPDATE for media path redirection, - ; instead of INVITE. This can be combined with 'nonat', as - ; 'canreinvite=update,nonat'. It implies 'yes'. - -;----------------------------------------- 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'. -;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. -; 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. - -; 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 - -;------------------------------------------------------------------------------ -; Users and peers have different settings available. Friends have all settings, -; since a friend is both a peer and a user -; -; User config options: Peer configuration: -; -------------------- ------------------- -; context context -; callingpres callingpres -; permit permit -; deny deny -; secret secret -; md5secret md5secret -; dtmfmode dtmfmode -; canreinvite canreinvite -; nat nat -; callgroup callgroup -; pickupgroup pickupgroup -; language language -; allow allow -; disallow disallow -; insecure insecure -; trustrpid trustrpid -; progressinband progressinband -; promiscredir promiscredir -; useclientcode useclientcode -; accountcode accountcode -; setvar setvar -; callerid callerid -; amaflags amaflags -; call-limit call-limit -; allowoverlap allowoverlap -; allowsubscribe allowsubscribe -; allowtransfer allowtransfer -; subscribecontext subscribecontext -; videosupport videosupport -; maxcallbitrate maxcallbitrate -; rfc2833compensate mailbox -; t38pt_usertpsource username -; template -; fromdomain -; regexten -; fromuser -; host -; port -; qualify -; defaultip -; rtptimeout -; rtpholdtimeout -; sendrpid -; outboundproxy -; rfc2833compensate -; t38pt_usertpsource - -;[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 -;secret=guessit -;username=yourusername ; Authentication user for outbound proxies -;fromuser=yourusername ; Many SIP providers require this! -;fromdomain=provider.sip.domain -;host=box.provider.com -;usereqphone=yes ; This provider requires ";user=phone" on URI -;call-limit=5 ; permit only 5 simultaneous outgoing calls to this peer -;outboundproxy=proxy.provider.domain ; send outbound signaling to this proxy, not directly to the peer - ; Call-limits will not be enforced on real-time peers, - ; since they are not stored in-memory -;port=80 ; The port number we want to connect to on the remote side - ; Also used as "defaultport" in combination with "defaultip" settings - -;------------------------------------------------------------------------------ -; Definitions of locally connected SIP devices -; -; type = user a device that authenticates to us by "from" field to place calls -; type = peer a device we place calls to or that calls us and we match by host -; type = friend two configurations (peer+user) in one -; -; 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 - -;[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 -;canreinvite=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 - ; 1 for the explicit peer, 1 for the explicit user, - ; remember that a friend equals 1 peer and 1 user in - ; memory - ; This will affect your subscriptions as well. - ; 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 doc/callingpres.txt 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 -;canreinvite=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 - - -;[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 -;username=polly ; Username to use in INVITE until peer registers - ; 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 -; -; 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 - -;[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 -;canreinvite=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 -;username=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 this device - -;[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. |
#ssh 192.168.15.6
install_l3bashrc_for_this_users=${users:-"root user"} # users who will use l3ag lilalo_context="/users/${lilalo_user}/${lab}/${hostname}" # ############################################################################### "install" 185 lines, 5285 characters lilalo_rc=.l3rc lilalo_home=.lilalo url_lilalo="http://xgu.ru/lilalo" url_l3bashrc="${url_lilalo}"/l3bashrc url_l3agent="${url_lilalo}"/l3-agent ... #xterm*|rxvt*) # PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"' # ;; #*) # ;; #esac # enable bash completion in interactive shells fi #if [ -f /etc/bash_completion ]; then "/etc/bash.bashrc" 47 lines, 1450 characters written |
#vi sip.conf
--- /tmp/l3-saved-4631.24952.3065 2010-05-25 16:00:14.000000000 +0300 +++ sip.conf 2010-05-25 16:05:19.000000000 +0300 @@ -0,0 +1,7 @@ +context=default + +[501] +type=friend +secret=password +host=dynamic + |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#c
[501] type=friend ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "sip.conf" 8L, 75C written |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#mv extensions.conf extensions.conf.SAVE
|
#vi extensions.conf
|
#asterisk -rx 'dialplan reload'
Dialplan reloaded. |
#vim sip.conf
--- /tmp/l3-saved-4631.1238.29186 2010-05-25 16:29:27.000000000 +0300 +++ sip.conf 2010-05-25 16:29:48.000000000 +0300 @@ -6,3 +6,8 @@ secret=password host=dynamic +[502] +type=friend +secret=password +host=dynamic + |
#asterisk -vvvr
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 ========================================================================= ... == Spawn extension (default, 501, 1) exited non-zero on 'SIP/502-081d07d0' -- Executing [501@default:1] Dial("SIP/502-081d07d0", "SIP/501") in new stack -- Called 501 -- SIP/501-081d2108 is ringing -- SIP/501-081d2108 answered SIP/502-081d07d0 -- Native bridging SIP/502-081d07d0 and SIP/501-081d2108 == Spawn extension (default, 501, 1) exited non-zero on 'SIP/502-081d07d0' [May 25 16:37:53] NOTICE[10684]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 502 linux5*CLI> quit Executing last minute cleanups |
#vim extensions.conf
--- /tmp/l3-saved-4631.19569.26894 2010-05-25 16:38:05.000000000 +0300 +++ extensions.conf 2010-05-25 16:38:49.000000000 +0300 @@ -4,4 +4,4 @@ exten => 8000,n,Wait(1) exten => 8000,n,Playback(demo-thanks) -exten => 501,1,Dial(SIP/501) +exten => _5XX,1,Dial(SIP/${EXTEN}) |
#asterisk -vvvr
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 ========================================================================= ... -- Added extension '8000' priority 3 to default -- Added extension '_5XX' priority 1 to default == Parsing '/etc/asterisk/users.conf': Found -- Executing [502@default:1] Dial("SIP/501-081d07d0", "SIP/502") in new stack -- Called 502 -- SIP/502-081d2108 is ringing == Spawn extension (default, 502, 1) exited non-zero on 'SIP/501-081d07d0' [May 25 16:40:54] NOTICE[10684]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 502 linux5*CLI> quit Executing last minute cleanups |
#asterisk -vvvr
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 ========================================================================= ... -- Called 501 -- SIP/501-081d2108 is ringing == Spawn extension (default, 501, 1) exited non-zero on 'SIP/502-081d07d0' -- Executing [502@default:1] Dial("SIP/501-081d07d0", "SIP/502") in new stack -- Called 502 -- SIP/502-b5900500 is ringing == Spawn extension (default, 502, 1) exited non-zero on 'SIP/501-081d07d0' [May 25 16:43:54] NOTICE[10684]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 502 linux5*CLI> quit Executing last minute cleanups |
#ping 192.168.4.1
PING 192.168.4.1 (192.168.4.1) 56(84) bytes of data. 64 bytes from 192.168.4.1: icmp_seq=1 ttl=63 time=0.228 ms 64 bytes from 192.168.4.1: icmp_seq=2 ttl=63 time=0.227 ms ^C --- 192.168.4.1 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1005ms rtt min/avg/max/mdev = 0.227/0.227/0.228/0.015 ms |
#ping 192.168.3.1
PING 192.168.3.1 (192.168.3.1) 56(84) bytes of data. 64 bytes from 192.168.3.1: icmp_seq=1 ttl=63 time=0.221 ms ^C --- 192.168.3.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.221/0.221/0.221/0.000 ms |
#ping 192.168.2.1
PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data. 64 bytes from 192.168.2.1: icmp_seq=1 ttl=63 time=0.226 ms 64 bytes from 192.168.2.1: icmp_seq=2 ttl=63 time=0.225 ms ^C --- 192.168.2.1 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.225/0.225/0.226/0.015 ms |
#asterisk -vvvr
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 ========================================================================= ... Connected to Asterisk 1.4.21.2~dfsg-3+lenny1 currently running on linux5 (pid = 10673) Verbosity is at least 3 [May 25 16:46:54] NOTICE[10684]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 502 -- Executing [502@default:1] Dial("SIP/501-081d07d0", "SIP/502") in new stack -- Called 502 -- SIP/502-081d2108 is ringing == Spawn extension (default, 502, 1) exited non-zero on 'SIP/501-081d07d0' [May 25 16:49:54] NOTICE[10684]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 502 linux5*CLI> quit Executing last minute cleanups |
#vim sip.conf
|
#date
Tue May 25 16:53:37 EEST 2010 |
#vim sip.conf
--- /tmp/l3-saved-4631.18032.17300 2010-05-25 16:55:20.000000000 +0300 +++ sip.conf 2010-05-25 17:01:04.000000000 +0300 @@ -1,5 +1,6 @@ [general] context=default +register => crimea:password@192.168.4.1/crimea [501] type=friend @@ -13,3 +14,5 @@ host=dynamic callerid="X-Lite soft phone" + + |
#asterisk -vvvr
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 ========================================================================= ... Verbosity is at least 3 linux5*CLI> sip reload Reloading SIP == Parsing '/etc/asterisk/sip.conf': Found == Parsing '/etc/asterisk/users.conf': Found == Parsing '/etc/asterisk/sip_notify.conf': Found [May 25 17:01:29] WARNING[10684]: chan_sip.c:12620 handle_response_register: Forbidden - wrong password on authentication for REGISTER for 'crimea' to '192.168.4.1' [May 25 17:01:55] NOTICE[10684]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 502 linux5*CLI> quit Executing last minute cleanups |
#vim sip.conf
|
#callerid="X-Lite soft phone"
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 ========================================================================= ... Connected to Asterisk 1.4.21.2~dfsg-3+lenny1 currently running on linux5 (pid = 10673) Verbosity is at least 3 linux5*CLI> sip reload Reloading SIP == Parsing '/etc/asterisk/sip.conf': Found == Parsing '/etc/asterisk/users.conf': Found == Parsing '/etc/asterisk/sip_notify.conf': Found [May 25 17:03:03] WARNING[10684]: chan_sip.c:12620 handle_response_register: Forbidden - wrong password on authentication for REGISTER for 'crimea' to '192.168.4.1' linux5*CLI> quit Executing last minute cleanups |
#asterisk -vvvr
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 ========================================================================= ... 501/501 192.168.5.12 D 5060 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline] [May 25 17:04:55] NOTICE[10684]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 502 -- Executing [502@default:1] Dial("SIP/501-081d2108", "SIP/502") in new stack -- Called 502 -- SIP/502-081d07d0 is ringing == Spawn extension (default, 502, 1) exited non-zero on 'SIP/501-081d2108' [May 25 17:05:36] NOTICE[10684]: chan_sip.c:15642 handle_request_register: Registration from '<sip:dnepr@192.168.5.1>' failed for '192.168.4.1' - No matching peer found linux5*CLI> quit Executing last minute cleanups |
#vim sip.conf
--- /tmp/l3-saved-4631.6644.1934 2010-05-25 17:05:49.000000000 +0300 +++ sip.conf 2010-05-25 17:07:44.000000000 +0300 @@ -14,5 +14,10 @@ host=dynamic callerid="X-Lite soft phone" +[kharkov] +type=friend +secret=password +host=192.168.4.1 + |
#asterisk -vvvr
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 ========================================================================= ... == Parsing '/etc/asterisk/users.conf': Found == Parsing '/etc/asterisk/sip_notify.conf': Found linux5*CLI> sip show peers Name/username Host Dyn Nat ACL Port Status kharkov 192.168.4.1 5060 Unmonitored 502/502 192.168.5.10 D 37094 Unmonitored 501/501 192.168.5.12 D 5060 Unmonitored 3 sip peers [Monitored: 0 online, 0 offline Unmonitored: 3 online, 0 offline] linux5*CLI> quit Executing last minute cleanups |
#vim sip.conf
--- /tmp/l3-saved-4631.15922.20870 2010-05-25 17:10:08.000000000 +0300 +++ sip.conf 2010-05-25 17:11:34.000000000 +0300 @@ -1,6 +1,10 @@ [general] context=default register => crimea:password@192.168.4.1/crimea +register => crimea:password@192.168.3.1/crimea +register => crimea:password@192.168.2.1/crimea +register => crimea:password@192.168.1.1/crimea + [501] type=friend @@ -19,5 +23,20 @@ secret=password host=192.168.4.1 +[odessa] +type=friend +secret=password +host=192.168.3.1 + +[kiev] +type=friend +secret=password +host=192.168.2.1 + +[dnepr] +type=friend +secret=password +host=192.168.1.1 + |
#asterisk -vvvr
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 ========================================================================= ... Name/username Host Dyn Nat ACL Port Status dnepr 192.168.1.1 5060 Unmonitored kiev 192.168.2.1 5060 Unmonitored odessa 192.168.3.1 5060 Unmonitored kharkov 192.168.4.1 5060 Unmonitored 502/502 192.168.5.10 D 37094 Unmonitored 501/501 192.168.5.12 D 5060 Unmonitored 6 sip peers [Monitored: 0 online, 0 offline Unmonitored: 6 online, 0 offline] linux5*CLI> quit Executing last minute cleanups |
#asterisk -vvvr
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 ========================================================================= ... [May 25 17:13:55] NOTICE[10684]: chan_sip.c:15500 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 502 linux5*CLI> sip reload Reloading SIP == Parsing '/etc/asterisk/sip.conf': Found == Parsing '/etc/asterisk/users.conf': Found == Parsing '/etc/asterisk/sip_notify.conf': Found [May 25 17:13:58] WARNING[10684]: chan_sip.c:12627 handle_response_register: Got 404 Not found on SIP register to service crimea@192.168.1.1, giving up [May 25 17:13:58] WARNING[10684]: chan_sip.c:12627 handle_response_register: Got 404 Not found on SIP register to service crimea@192.168.2.1, giving up linux5*CLI> quit Executing last minute cleanups |
#vim extensions.conf
--- /tmp/l3-saved-4631.32548.20143 2010-05-25 17:14:17.000000000 +0300 +++ extensions.conf 2010-05-25 17:15:00.000000000 +0300 @@ -5,3 +5,8 @@ exten => 8000,n,Playback(demo-thanks) exten => _5XX,1,Dial(SIP/${EXTEN}) +exten => _4XX,1,Dial(SIP/kharkov/${EXTEN}) +exten => _3XX,1,Dial(SIP/odessa/${EXTEN}) +exten => _2XX,1,Dial(SIP/kiev/${EXTEN}) +exten => _1XX,1,Dial(SIP/dnepr/${EXTEN}) + |
Время первой команды журнала | 11:07:51 2010- 5-25 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 16:14:09 2010- 5-25 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 99 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 5.05 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 4.04 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.49 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.66 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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