/l3/users/igor-public/ais-voip-2011-jun/linux0.unix.ais/root :1 :2 :3 :4 :5 :6 |
|
#all cat ~/.bash_profile
l3-agent l3-agent . ~/.bashrc l3-agent .~/.bashrc l3-agent l3-agent l3-agent . ~/.bashrc |
#vim ~/bin/all
--- /tmp/l3-saved-6783.14164.1918 2011-06-27 15:53:10.000000000 +0400 +++ /root/bin/all 2011-06-27 15:53:25.000000000 +0400 @@ -1,4 +1,4 @@ for i in 1 2 3 4 5 6 do -ssh 192.168.15.$i "$@" +ssh 192.168.15.$i "$@" | sed 's/^/$i: /' done |
#all cat ~/.bash_profile
$i: l3-agent $i: $i: l3-agent $i: $i: . ~/.bashrc $i: l3-agent $i: $i: .~/.bashrc $i: l3-agent $i: $i: . ~/.bashrc $i: l3-agent $i: $i: l3-agent $i: $i: . ~/.bashrc |
#all cat ~/.bash_profile
1: l3-agent 1: 2: l3-agent 2: 2: . ~/.bashrc 3: l3-agent 3: 3: .~/.bashrc 4: l3-agent 4: 4: . ~/.bashrc 5: l3-agent 5: 6: l3-agent 6: 6: . ~/.bashrc |
#all cat ~/.bash_profile
1: l3-agent 1: 2: l3-agent 2: 2: . ~/.bashrc 3: l3-agent 3: 3: .~/.bashrc 4: l3-agent 4: 4: . ~/.bashrc 5: l3-agent 5: 6: l3-agent 6: 6: . ~/.bashrc |
#all rm -f ~/.bash_pofile
|
#all cat ~/.bash_profile
1: l3-agent 1: 2: l3-agent 2: 2: . ~/.bashrc 3: l3-agent 3: 3: .~/.bashrc 4: l3-agent 4: 4: . ~/.bashrc 5: l3-agent 5: 6: l3-agent 6: 6: . ~/.bashrc |
#ssh 192.168.15.5
Linux linux5 2.6.32-5-amd64 #1 SMP Tue Jun 14 09:42:28 UTC 2011 x86_64 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: Mon Jun 27 15:24:49 2011 l3-agent is already running: pid=5562; pidfile=/root/.lilalo/l3-agent.pid root@linux5:~# cat ~/root/.bash_profile l3-agent ... root@linux5:~# host vpnc.mts.ru vpnc.mts.ru has address 194.54.151.238 root@linux5:~# nc vpnc.mts.ru 80 GET / root@linux5:~# nc vpnc.mts.ru 443 GET / root@linux5:~# root@linux5:~# exit logout Connection to 192.168.15.5 closed. |
#apt-get install asterisk
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово Будут установлены следующие дополнительные пакеты: asterisk-config asterisk-core-sounds-en-gsm autopoint dahdi dahdi-linux debhelper freetds-common fxload gettext git html2text intltool-debian libc-client2007e libcorosync4 libcurl3 liberror-perl libgmime-2.0-2a libiksemel3 libmail-sendmail-perl libopenais3 libopenr2-3 libpq5 libpri1.4 libradiusclient-ng2 libresample1 libsox-fmt-alsa libsox-fmt-base libsox1b libspandsp2 libsqlite0 libss7-1 libssh2-1 libsybdb5 ... libgmime-2.0-2a libiksemel3 libmail-sendmail-perl libopenais3 libopenr2-3 libpq5 libpri1.4 libradiusclient-ng2 libresample1 libsox-fmt-alsa libsox-fmt-base libsox1b libspandsp2 libsqlite0 libss7-1 libssh2-1 libsybdb5 libsys-hostname-long-perl libtonezone2.0 libunistring0 libvpb0 mlock module-assistant odbcinst odbcinst1debian2 po-debconf rsync sox unixodbc vpb-driver-source обновлено 0, установлено 47 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено. Необходимо скачать 20,6 MБ архивов. После данной операции, объём занятого дискового пространства возрастёт на 50,9 MB. Хотите продолжить [Д/н]? ^C |
#apt-get install asterisk
Выбор ранее не выбранного пакета libssh2-1. Распаковывается пакет libssh2-1 (из файла .../libssh2-1_1.2.6-1_amd64.deb)... Выбор ранее не выбранного пакета libcurl3. Распаковывается пакет libcurl3 (из файла .../libcurl3_7.21.0-1_amd64.deb)... Выбор ранее не выбранного пакета libgmime-2.0-2a. Распаковывается пакет libgmime-2.0-2a (из файла .../libgmime-2.0-2a_2.2.25-2_amd64.deb)... Выбор ранее не выбранного пакета libiksemel3. Распаковывается пакет libiksemel3 (из файла .../libiksemel3_1.2-4_amd64.deb)... Выбор ранее не выбранного пакета libcorosync4. Распаковывается пакет libcorosync4 (из файла .../libcorosync4_1.2.1-4_amd64.deb)... ... Настраивается пакет unixodbc (2.2.14p2-1) ... Настраивается пакет asterisk (1:1.6.2.9-2+squeeze2) ... Adding system user for Asterisk Добавляется пользователь «asterisk» в группу «dialout» ... Добавление пользователя asterisk в группу dialout Готово. Добавляется пользователь «asterisk» в группу «audio» ... Добавление пользователя asterisk в группу audio Готово. Starting Asterisk PBX: asterisk. |
#apt-get install asterisk-sounds-extra
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово НОВЫЕ пакеты, которые будут установлены: asterisk-sounds-extra обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено. Необходимо скачать 3 419 kБ архивов. После данной операции, объём занятого дискового пространства возрастёт на 6 562 kB. Получено:1 http://192.168.15.253/debian/ squeeze/main asterisk-sounds-extra all 1.4.9-1 [3 419 kB] Получено 3 419 kБ за 1с (2 053 kБ/c) Выбор ранее не выбранного пакета asterisk-sounds-extra. (Чтение базы данных ... на данный момент установлено 125912 файлов и каталогов.) Распаковывается пакет asterisk-sounds-extra (из файла .../asterisk-sounds-extra_1.4.9-1_all.deb)... Настраивается пакет asterisk-sounds-extra (1.4.9-1) ... |
#dpkg -L asterisk
/. /var /var/lib /var/lib/asterisk /var/lib/asterisk/moh /var/lib/asterisk/sounds /var/lib/asterisk/sounds/custom /var/spool /var/spool/asterisk /var/spool/asterisk/meetme ... /etc/default/asterisk /etc/logrotate.d /etc/logrotate.d/asterisk /etc/asterisk /etc/init.d /etc/init.d/asterisk /usr/share/man/man8/rasterisk.8.gz /usr/share/asterisk/sounds/recordings /usr/share/asterisk/sounds/custom /usr/sbin/rasterisk |
#dpkg -L asterisk | less
|
#ls /var/lib/asterisk/sounds/custom/
|
#ls /usr/share/as
aspell/ asterisk/ |
#ls /usr/share/as
aspell/ asterisk/ |
#ls /usr/share/asterisk/
agi-bin/ documentation/ keys/ static-http/ conf/ firmware/ sounds/ |
#ls /usr/share/asterisk/sounds/
Display all 1147 possibilities? (y or n) 1-for-am-2-for-pm.gsm 1-yes-2-no.gsm abandon-all-hope.gsm abandons.gsm academic-support.gsm access-code.gsm access-denied.gsm access-granted.gsm accessible-through-system.gsm ... a-charge-for-this-svc.gsm a-collect-charge.gsm a-collect-charge-of.gsm a-connect-charge.gsm a-connect-charge-of.gsm activated.gsm added.gsm added-to.gsm address.gsm administration.gsm |
#ls /usr/share/asterisk/sounds/| less
|
#ls /usr/lib/asterisk/modules/
app_adsiprog.so app_voicemail.so func_channel.so app_alarmreceiver.so app_waitforring.so func_config.so app_amd.so app_waitforsilence.so func_curl.so app_authenticate.so app_waituntil.so func_cut.so app_cdr.so app_while.so func_db.so app_chanisavail.so app_zapateller.so func_devstate.so app_channelredirect.so bridge_builtin_features.so func_dialgroup.so app_chanspy.so bridge_multiplexed.so func_dialplan.so app_confbridge.so bridge_simple.so func_enum.so app_controlplayback.so bridge_softmix.so func_env.so ... app_stack.so format_sln.so res_musiconhold.so app_system.so format_vox.so res_odbc.so app_talkdetect.so format_wav_gsm.so res_phoneprov.so app_test.so format_wav.so res_realtime.so app_transfer.so func_aes.so res_smdi.so app_url.so func_audiohookinherit.so res_snmp.so app_userevent.so func_base64.so res_speech.so app_verbose.so func_blacklist.so res_timing_dahdi.so app_voicemail_imap.so func_callerid.so res_timing_pthread.so app_voicemail_odbc.so func_cdr.so res_timing_timerfd.so |
#ls /usr/lib/asterisk/
modules |
#| less
|
#dpkg -L asterisk | less
|
#ls /etc/asterisk/
adsi.conf enum.conf muted.conf adtranvofr.conf extconfig.conf osp.conf agents.conf extensions.ael oss.conf ais.conf extensions.conf phone.conf alarmreceiver.conf extensions.lua phoneprov.conf alsa.conf extensions_minivm.conf queuerules.conf amd.conf features.conf queues.conf asterisk.adsi festival.conf res_config_sqlite.conf asterisk.conf followme.conf res_ldap.conf cdr_adaptive_odbc.conf func_odbc.conf res_odbc.conf ... chan_dahdi.conf jingle.conf skinny.conf cli_aliases.conf logger.conf sla.conf cli.conf manager.conf smdi.conf cli_permissions.conf manager.d telcordia-1.adsi codecs.conf meetme.conf udptl.conf console.conf mgcp.conf unistim.conf dbsep.conf minivm.conf usbradio.conf dnsmgr.conf misdn.conf users.conf dsp.conf modules.conf voicemail.conf dundi.conf musiconhold.conf vpb.conf |
#ls /etc/default/asterisk
/etc/default/asterisk |
#cd /etc/asterisk/
|
#mv sip.conf sip.conf.SAVE
|
#mv sip.conf sip.conf.SAVE
|
#mv sip.conf sip.conf.SAVE
# |
## cd /etc/asterisk
|
#vim sip.conf
--- /dev/null 2011-06-27 15:15:44.671852420 +0400 +++ sip.conf 2011-06-27 16:48:38.000000000 +0400 @@ -0,0 +1,8 @@ +context=default + +[1101] +type=friend +secret=1234 +host=dynamic +canreinvite=no + |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -rvvv
Asterisk 1.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 linux0 (pid = 8606) ... -- Executing [s@default:7] WaitExten("SIP/192.168.15.6-00000001", "") in new stack -- Timeout on SIP/192.168.15.6-00000001, going to 't' -- Executing [t@default:1] Goto("SIP/192.168.15.6-00000001", "#,1") in new stack -- Goto (default,#,1) -- Executing [#@default:1] Playback("SIP/192.168.15.6-00000001", "demo-thanks") in new stack -- <SIP/192.168.15.6-00000001> Playing 'demo-thanks.gsm' (language 'en') -- Executing [#@default:2] Hangup("SIP/192.168.15.6-00000001", "") in new stack == Spawn extension (default, #, 2) exited non-zero on 'SIP/192.168.15.6-00000001' linux0*CLI> quit Executing last minute cleanups |
#ssh 192.168.15.3
Linux linux3 2.6.32-5-amd64 #1 SMP Tue Jun 14 09:42:28 UTC 2011 x86_64 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: Mon Jun 27 15:48:17 2011 from linux0.unix.nt l3-agent is already running: pid=3902; pidfile=/root/.lilalo/l3-agent.pid |
#exit
exit Connection to 192.168.15.3 closed. |
#ping 192.168.15.226
PING 192.168.15.226 (192.168.15.226) 56(84) bytes of data. 64 bytes from 192.168.15.226: icmp_req=1 ttl=64 time=90.9 ms 64 bytes from 192.168.15.226: icmp_req=2 ttl=64 time=3.66 ms ^C --- 192.168.15.226 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1001ms rtt min/avg/max/mdev = 3.667/47.300/90.933/43.633 ms |
#ssh igor@192.168.15.253
<emergencyProxy></emergencyProxy> <emergencyProxyPort></emergencyProxyPort> <outboundProxy></outboundProxy> <outboundProxyPort></outboundProxyPort> <registerWithProxy>true</registerWithProxy> </sipProxies> <sipCallFeatures> <cnfJoinEnabled>true</cnfJoinEnabled> <callForwardURI>x--serviceuri-cfwdall</callForwardURI> <~>$ exit logout Connection to 192.168.15.253 closed. |
#mv extensions.conf extensions.conf.SAVE
|
#vim extensions.conf
--- /dev/null 2011-06-27 15:15:44.671852420 +0400 +++ extensions.conf 2011-06-28 11:07:51.000000000 +0400 @@ -0,0 +1,5 @@ +[default] + +exten => 8000,1,Playback(welcome) + + |
#ls /usr/share/as
aspell/ asterisk/ |
#[ ]
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 linux0 (pid = 8606) ... -- merging incls/swits/igpats from old(app_dial_gosub_virtual_context) to new(app_dial_gosub_virtual_context) context, registrar = pbx_config -- Added extension 's' priority 1 to app_dial_gosub_virtual_context (0x22f31e0) -- Time to scan old dialplan and merge leftovers back into the new: 0.000267 sec -- Time to restore hints and swap in new dialplan: 0.000000 sec -- Time to delete the old dialplan: 0.000077 sec -- Total time merge_contexts_delete: 0.000344 sec linux0*CLI> linux0*CLI> linux0*CLI> quit Executing last minute cleanups |
#vim extensions.conf
|
#ls /usr/share/asterisk/sounds/ -l | less
|
#ls /usr/share/asterisk/sounds/ -lS | less
|
#dpkg -L asterisk-sounds-extra | less
|
#~
register => la:password@192.168.15.6/ny context=default [1101] [1101] [1101] [ny] [ny]=friend secret=password host=dynamic canreinvite=no username=la type=friend ~ ~ ~ ~ "sip.conf" 18L, 202C записано |
#asterisk -rx 'sip reload'
|
#asterisk -rx 'sip show peers'
Name/username Host Dyn Nat ACL Port Status 1101 (Unspecified) D 5060 Unmonitored ny/la 192.168.15.6 D 5060 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline] |
#asterisk -rx 'sip reload'
|
#asterisk -rx 'sip show peers'
Name/username Host Dyn Nat ACL Port Status 1101 (Unspecified) D 5060 Unmonitored ny/la 192.168.15.6 D 5060 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline] |
#asterisk -rv
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. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on linux0 (pid = 8606) Verbosity is at least 3 linux0*CLI> dialplan reload ... -- merging incls/swits/igpats from old(app_queue_gosub_virtual_context) to new(app_queue_gosub_virtual_context) context, registrar = pbx_config -- Added extension 's' priority 1 to app_queue_gosub_virtual_context (0x22ebe20) -- Time to scan old dialplan and merge leftovers back into the new: 0.000337 sec -- Time to restore hints and swap in new dialplan: 0.000001 sec -- Time to delete the old dialplan: 0.000026 sec -- Total time merge_contexts_delete: 0.000364 sec linux0*CLI> linux0*CLI> linux0*CLI> quit Executing last minute cleanups |