/l3/users/Sergey-Ma/nt-voip-2014-apr/debian8/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 |
|
#vim /etc/asterisk/extensions.conf
![]() --- /tmp/l3-saved-7112.8624.19981 2014-04-24 16:25:55.335166372 +0300 +++ /etc/asterisk/extensions.conf 2014-04-24 16:26:06.355166257 +0300 @@ -83,9 +83,9 @@ exten=> 8100,n(vm),VoiceMailMain() -exten=>8101,1,AGI(/usr/local/bin/asterisk-festival.pl /home/usr/belki.txt) +exten=>8101,1,AGI(/usr/local/bin/asterisk-festival.pl /home/user/belki.txt) -exten=>8102,1,AGI(/usr/local/bin/asterisk-festival.pl /home/usr/burunduki.txt) +exten=>8102,1,AGI(/usr/local/bin/asterisk-festival.pl /home/user/burunduki.txt) exten=>8103,1,AGI(/usr/local/bin/asterisk-festival.pl Я рад вас слышать. Добрый день) |
#ls -la /usr/local/bin/
![]() total 52 drwxrwsr-x 2 root staff 4096 Apr 24 16:19 . drwxrwsr-x 10 root staff 4096 Apr 22 12:10 .. -rwxr-xr-x 1 root staff 702 Apr 24 16:11 asterisk-festival.pl -rwxr-xr-x 1 root staff 33439 Apr 22 14:12 l3-agent -rwxr-xr-x 1 root staff 100 Apr 22 14:12 l3-config lrwxrwxrwx 1 root staff 9 Apr 22 13:58 l3script -> /bin/bash |
#ls -la /usr/local/bin/
total 52 drwxrwsr-x 2 root staff 4096 Apr 24 16:19 . drwxrwsr-x 10 root staff 4096 Apr 22 12:10 .. -rwxr-xr-x 1 root staff 702 Apr 24 16:11 asterisk-festival.pl -rwxr-xr-x 1 root staff 33439 Apr 22 14:12 l3-agent -rwxr-xr-x 1 root staff 100 Apr 22 14:12 l3-config lrwxrwxrwx 1 root staff 9 Apr 22 13:58 l3script -> /bin/bash |
#ls
![]() 1 bel belka.wav burunduki.wav Documents Mail Pictures Templates Videos 1.txt belka.txt burunduki.txt Desktop Downloads Music Public test.wav |
#ls
1 bel belka.wav burunduki.wav Documents Mail Pictures Templates Videos 1.txt belka.txt burunduki.txt Desktop Downloads Music Public test.wav |
#vim /etc/asterisk/extensions.conf
![]() --- /tmp/l3-saved-7112.2962.31781 2014-04-24 16:27:06.295165619 +0300 +++ /etc/asterisk/extensions.conf 2014-04-24 16:27:21.963165451 +0300 @@ -83,7 +83,7 @@ exten=> 8100,n(vm),VoiceMailMain() -exten=>8101,1,AGI(/usr/local/bin/asterisk-festival.pl /home/user/belki.txt) +exten=>8101,1,AGI(/usr/local/bin/asterisk-festival.pl /home/user/belka.txt) exten=>8102,1,AGI(/usr/local/bin/asterisk-festival.pl /home/user/burunduki.txt) |
#ls
![]() 1 bel belka.wav burunduki.wav Documents Mail Pictures Templates Videos 1.txt belka.txt burunduki.txt Desktop Downloads Music Public test.wav |
#ls
1 bel belka.wav burunduki.wav Documents Mail Pictures Templates Videos 1.txt belka.txt burunduki.txt Desktop Downloads Music Public test.wav |
#vim /etc/asterisk/extensions.conf
![]() --- /tmp/l3-saved-7112.2606.29069 2014-04-24 16:29:10.487164298 +0300 +++ /etc/asterisk/extensions.conf 2014-04-24 16:30:03.023163738 +0300 @@ -87,7 +87,7 @@ exten=>8102,1,AGI(/usr/local/bin/asterisk-festival.pl /home/user/burunduki.txt) -exten=>8103,1,AGI(/usr/local/bin/asterisk-festival.pl Я рад вас слышать. Добрый день) +exten=>8103,1,AGI('/usr/local/bin/asterisk-festival.pl' 'Я рад вас слышать. Добрый день') ;exten=> 8100,1,VoiceMailMain() |
#vim /etc/asterisk/extensions.conf
![]() --- /tmp/l3-saved-7112.26669.6780 2014-04-24 16:30:22.415163532 +0300 +++ /etc/asterisk/extensions.conf 2014-04-24 16:31:18.675162934 +0300 @@ -87,7 +87,7 @@ exten=>8102,1,AGI(/usr/local/bin/asterisk-festival.pl /home/user/burunduki.txt) -exten=>8103,1,AGI('/usr/local/bin/asterisk-festival.pl' 'Я рад вас слышать. Добрый день') +exten=>8103,1,AGI(/usr/local/bin/asterisk-festival.pl Я рад вас слышать. Добрый день) ;exten=> 8100,1,VoiceMailMain() |
#vim /etc/asterisk/extensions.conf
![]() --- /tmp/l3-saved-7112.21735.19815 2014-04-24 16:34:04.367161174 +0300 +++ /etc/asterisk/extensions.conf 2014-04-24 16:34:15.159161059 +0300 @@ -83,11 +83,11 @@ exten=> 8100,n(vm),VoiceMailMain() -exten=>8101,1,AGI(/usr/local/bin/asterisk-festival.pl, /home/user/belka.txt) +exten=>8101,1,AGI(/usr/local/bin/asterisk-festival.pl,/home/user/belka.txt) -exten=>8102,1,AGI(/usr/local/bin/asterisk-festival.pl, /home/user/burunduki.txt) +exten=>8102,1,AGI(/usr/local/bin/asterisk-festival.pl,/home/user/burunduki.txt) -exten=>8103,1,AGI(/usr/local/bin/asterisk-festival.pl, Я рад вас слышать. Добрый день) +exten=>8103,1,AGI(/usr/local/bin/asterisk-festival.pl,Я рад вас слышать. Добрый день) ;exten=> 8100,1,VoiceMailMain() |
#{EXTEN})
![]() Reading package lists... Done Building dependency tree Reading state information... Done perl is already the newest version. The following package was automatically installed and is no longer required: asterisk-core-sounds-ru-gsm Use 'apt-get autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. |
#{EXTEN})
Reading package lists... Done Building dependency tree Reading state information... Done perl is already the newest version. The following package was automatically installed and is no longer required: asterisk-core-sounds-ru-gsm Use 'apt-get autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. |
#apt-get install libasterisk-agi-perl
![]() Reading package lists... Done Building dependency tree Reading state information... Done The following package was automatically installed and is no longer required: asterisk-core-sounds-ru-gsm Use 'apt-get autoremove' to remove it. The following NEW packages will be installed: libasterisk-agi-perl 0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. Need to get 42.2 kB of archives. After this operation, 160 kB of additional disk space will be used. Get:1 http://192.168.12.254/debian/ wheezy/main libasterisk-agi-perl all 1.01-2 [42.2 kB] Fetched 42.2 kB in 0s (3,780 kB/s) Selecting previously unselected package libasterisk-agi-perl. (Reading database ... 139171 files and directories currently installed.) Unpacking libasterisk-agi-perl (from .../libasterisk-agi-perl_1.01-2_all.deb) ... Processing triggers for man-db ... Setting up libasterisk-agi-perl (1.01-2) ... |
#apt-get install libasterisk-agi-perl
Reading package lists... Done Building dependency tree Reading state information... Done The following package was automatically installed and is no longer required: asterisk-core-sounds-ru-gsm Use 'apt-get autoremove' to remove it. The following NEW packages will be installed: libasterisk-agi-perl 0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. Need to get 42.2 kB of archives. After this operation, 160 kB of additional disk space will be used. Get:1 http://192.168.12.254/debian/ wheezy/main libasterisk-agi-perl all 1.01-2 [42.2 kB] Fetched 42.2 kB in 0s (3,780 kB/s) Selecting previously unselected package libasterisk-agi-perl. (Reading database ... 139171 files and directories currently installed.) Unpacking libasterisk-agi-perl (from .../libasterisk-agi-perl_1.01-2_all.deb) ... Processing triggers for man-db ... Setting up libasterisk-agi-perl (1.01-2) ... |
#apt-get install sendxmpp
![]() Reading package lists... Done Building dependency tree Reading state information... Done The following package was automatically installed and is no longer required: asterisk-core-sounds-ru-gsm Use 'apt-get autoremove' to remove it. The following extra packages will be installed: libauthen-sasl-perl libnet-xmpp-perl libxml-stream-perl Suggested packages: libdigest-hmac-perl libgssapi-perl libnet-dns-perl ... Unpacking libxml-stream-perl (from .../libxml-stream-perl_1.23-2_all.deb) ... Selecting previously unselected package libnet-xmpp-perl. Unpacking libnet-xmpp-perl (from .../libnet-xmpp-perl_1.02-3_all.deb) ... Selecting previously unselected package sendxmpp. Unpacking sendxmpp (from .../sendxmpp_1.22-1_all.deb) ... Processing triggers for man-db ... Setting up libauthen-sasl-perl (2.1500-1) ... Setting up libxml-stream-perl (1.23-2) ... Setting up libnet-xmpp-perl (1.02-3) ... Setting up sendxmpp (1.22-1) ... |
#apt-get install sendxmpp
Reading package lists... Done Building dependency tree Reading state information... Done The following package was automatically installed and is no longer required: asterisk-core-sounds-ru-gsm Use 'apt-get autoremove' to remove it. The following extra packages will be installed: libauthen-sasl-perl libnet-xmpp-perl libxml-stream-perl Suggested packages: libdigest-hmac-perl libgssapi-perl libnet-dns-perl ... Unpacking libxml-stream-perl (from .../libxml-stream-perl_1.23-2_all.deb) ... Selecting previously unselected package libnet-xmpp-perl. Unpacking libnet-xmpp-perl (from .../libnet-xmpp-perl_1.02-3_all.deb) ... Selecting previously unselected package sendxmpp. Unpacking sendxmpp (from .../sendxmpp_1.22-1_all.deb) ... Processing triggers for man-db ... Setting up libauthen-sasl-perl (2.1500-1) ... Setting up libxml-stream-perl (1.23-2) ... Setting up libnet-xmpp-perl (1.02-3) ... Setting up sendxmpp (1.22-1) ... |
#~
![]() #!/bin/sh # $1 -- JID (Jabber-ID) of recipient # STDIN -- message /usr/bin/sendxmpp -i /var/lib/asterisk/.sendxmpprc "$1" "/usr/local/bin/jabber-send" 7L, 125C |
#~
#!/bin/sh # $1 -- JID (Jabber-ID) of recipient # STDIN -- message /usr/bin/sendxmpp -i /var/lib/asterisk/.sendxmpprc "$1" "/usr/local/bin/jabber-send" 7L, 125C |
#8 6 seconds ago
![]() exten=>s,n,Monitor(wav,${CALLFILENAME},m) exten=>s,1,Answer{ARG1}) exten=>s,n,Set(CALLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${EPOCH}) exten=>s,n,Monitor(wav,${CALLFILENAME},m) [xten=>s,n,Dial(]IP/${ARG1},8) [ ] exten=>s,n,NoOp(Answering ${MACRO_EXTEN}) [ ] [ e=>s,n,Set(CA]LFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${EPOCH}) exten=>s,n,Goto(s-${DIALSTATUS},1)2L, 39)0C exten => s,n,System(echo ${CALLERID(num)} is calling | /usr/local/bin/jabber-send user8@lab0.xgu.ru) ( ) ;;;;exten=>s-NO(NSWER,1,Dial()IP/3202) ( ) ( ) "/etc/asterisk/extensions.conf" 178L, 4099C written |
#8 6 seconds ago
[macro-outgoingcall] ;{ARG1}-- outgoing channel ;EPOCH = second since 1.01.1970 exten=>s,1,Answer [macro-localcall]LLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${EPOCH}) exten=>s,n,Monitor(wav,${CALLFILENAME},m) exten=>s,1,Answer{ARG1}) exten=>s,n,Set(CALLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${EPOCH}) exten=>s,n,Monitor(wav,${CALLFILENAME},m) exten=>s,n,Dial(SIP/${ARG1},8) ... ,NoOp(Answering ${MACRO_EXTEN}) [ ] [ e=>s,n,Set(CA]LFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${EPOCH}) ( ) exten => s,n,System(echo ${CALLERID(num)} is calling | /usr/local/bin/jabber-send user8@lab0.xgu.ru) ( ) ( ) ( ) ( ) "/etc/asterisk/extensions.conf" 178L, 4099C written |
#vim /etc/asterisk/extensions.conf
![]() --- /tmp/l3-saved-7112.23120.30129 2014-04-24 16:56:00.403147174 +0300 +++ /etc/asterisk/extensions.conf 2014-04-24 16:57:01.391146530 +0300 @@ -14,8 +14,9 @@ [macro-localcall] -exten=>s,1,NoOp(Answering ${MACRO_EXTEN}) +;exten=>s,1,NoOp(Answering ${MACRO_EXTEN}) +;exten=>s,1,Answer exten => s,n,System(echo ${CALLERID(num)} is calling | /usr/local/bin/jabber-send user8@lab0.xgu.ru) |
#vim /etc/asterisk/extensions.conf
![]() --- /tmp/l3-saved-7112.22998.6960 2014-04-24 16:57:19.467146335 +0300 +++ /etc/asterisk/extensions.conf 2014-04-24 16:57:36.779146152 +0300 @@ -16,7 +16,7 @@ ;exten=>s,1,NoOp(Answering ${MACRO_EXTEN}) -;exten=>s,1,Answer +exten=>s,1,Answer exten => s,n,System(echo ${CALLERID(num)} is calling | /usr/local/bin/jabber-send user8@lab0.xgu.ru) |
#su -asterisk
![]() su: invalid option -- 'a' Usage: su [options] [LOGIN] Options: -c, --command COMMAND pass COMMAND to the invoked shell -h, --help display this help message and exit -, -l, --login make the shell a login shell -m, -p, --preserve-environment do not reset environment variables, and keep the same shell -s, --shell SHELL use SHELL instead of the default in passwd |
#su -asterisk
![]() su: invalid option -- 'a' Usage: su [options] [LOGIN] Options: -c, --command COMMAND pass COMMAND to the invoked shell -h, --help display this help message and exit -, -l, --login make the shell a login shell -m, -p, --preserve-environment do not reset environment variables, and keep the same shell -s, --shell SHELL use SHELL instead of the default in passwd |
#su - asterisk
![]() |
#echo hi | /usr/local/bin/jabber-send user8@lab0.xgu.ru
![]() cannot read /root/.sendxmpprc: No such file or directory |
#echo hi | /usr/local/bin/jabber-send user8@lab0.xgu.ru
![]() cannot read /root/.sendxmpprc: No such file or directory |
#vim /etc/asterisk/extensions.conf
![]() --- /tmp/l3-saved-7112.18056.16880 2014-04-24 17:35:09.539122194 +0300 +++ /etc/asterisk/extensions.conf 2014-04-24 17:35:21.547122065 +0300 @@ -14,9 +14,9 @@ [macro-localcall] -;exten=>s,1,NoOp(Answering ${MACRO_EXTEN}) +exten=>s,1,NoOp(Answering ${MACRO_EXTEN}) -exten=>s,1,Answer +;exten=>s,1,Answer exten => s,n,System(/usr/local/bin/jabber-send user8@lab0.xgu.ru ${CALLERID(num)} is calling) |
#vim /etc/asterisk/extensions.conf
![]() |
#vim /etc/asterisk/extensions.conf
![]() --- /tmp/l3-saved-7112.17991.10246 2014-04-24 17:41:11.783118341 +0300 +++ /etc/asterisk/extensions.conf 2014-04-24 17:41:58.043117851 +0300 @@ -19,9 +19,6 @@ ;exten=>s,1,Answer exten => s,n,System(/usr/local/bin/jabber-send user8@lab0.xgu.ru ${CALLERID(num)} is calling) - - - exte=>s,n,Set(CALLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${EPOCH}) exten=>s,n,Monitor(wav,${CALLFILENAME},m) exten=>s,n,Dial(SIP/${ARG1},8) |
#vim /etc/asterisk/sip.conf
![]() |
#vim /etc/asterisk/extensions.conf
![]() --- /tmp/l3-saved-7112.26835.20730 2014-04-24 17:57:50.083107725 +0300 +++ /etc/asterisk/extensions.conf 2014-04-24 17:58:12.267107487 +0300 @@ -15,8 +15,6 @@ [macro-localcall] exten=>s,1,NoOp(Answering ${MACRO_EXTEN}) - -;exten=>s,1,Answer exten => s,n,System(/usr/local/bin/jabber-send user8@lab0.xgu.ru ${CALLERID(num)} is calling) exte=>s,n,Set(CALLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${EPOCH}) |
#asterisk -rvvvvvvv
![]() Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on debian8 (pid = 2622) Verbosity is at least 7 debian8*CLI> quit Executing last minute cleanups |
#asterisk -rvvvvvvv
Asterisk 1.8.13.1~dfsg1-3+deb7u3, Copyright (C) 1999 - 2012 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.8.13.1~dfsg1-3+deb7u3 currently running on debian8 (pid = 2622) Verbosity is at least 7 debian8*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
![]() |
#[national]
![]() exten=>s,1,Answer [macro-localcall]LLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${EPOCH}) exten=>s,n,Monitor(wav,${CALLFILENAME},m) exten=>s,1,NoOp(Answering ${MACRO_EXTEN}) exten => s,n,System(/usr/local/bin/jabber-send user8@lab0.xgu.ru ${CALLERID(num)} is calling) exte=>s,n,Set(CALLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${EPOCH}) exten=>s,n,Monitor(wav,${CALLFILENAME},m) exten=>s,n,Dial(SIP/${ARG1},8)" 174L, 4088C exten=>s,n,NoOp(Dial Status: ${DIALSTATUS}) exten=>s,n,Goto(s-${DIALSTATUS},1) ;;;;exten=>s-NOANSWER,1,Dial(SIP/3202) |
#[national]
exten=>s,1,Answer [macro-localcall]LLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${EPOCH}) exten=>s,n,Monitor(wav,${CALLFILENAME},m) exten=>s,1,NoOp(Answering ${MACRO_EXTEN}) exten => s,n,System(/usr/local/bin/jabber-send user8@lab0.xgu.ru ${CALLERID(num)} is calling) exte=>s,n,Set(CALLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${EPOCH}) exten=>s,n,Monitor(wav,${CALLFILENAME},m) exten=>s,n,Dial(SIP/${ARG1},8)" 174L, 4088C exten=>s,n,NoOp(Dial Status: ${DIALSTATUS}) exten=>s,n,Goto(s-${DIALSTATUS},1) ;;;;exten=>s-NOANSWER,1,Dial(SIP/3202) |