/l3/users/YOUR-L3BACKEND-USER/SET-YOUR-FIRSTLAB-NAME-HERE/debian6/root :1 :2 :3 :4 |
|
#grep AGI /etc/asterisk/extensions.conf
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 => 8103,1,AGI(/usr/local/bin/asterisk-festival.pl,Я рад вас слышать. Добрый |
#/usr/local/bin/asterisk-festival.pl /home/user/belka.txt
![]() Can't locate Asterisk/AGI.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /usr/local/bin/asterisk-festival.pl line 3. BEGIN failed--compilation aborted at /usr/local/bin/asterisk-festival.pl line 3. |
#/usr/local/bin/asterisk-festival.pl /home/user/belka.txt
![]() Can't locate Asterisk/AGI.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /usr/local/bin/asterisk-festival.pl line 3. BEGIN failed--compilation aborted at /usr/local/bin/asterisk-festival.pl line 3. |
#фapt-get install perl
![]() Reading package lists... Done Building dependency tree Reading state information... Done perl is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
#фapt-get install perl
Reading package lists... Done Building dependency tree Reading state information... Done perl is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
#apt-get install libasterisk-agi-perl
![]() Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: libasterisk-agi-perl 0 upgraded, 1 newly installed, 0 to remove and 0 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,541 kB/s) Selecting previously unselected package libasterisk-agi-perl. (Reading database ... 134220 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 NEW packages will be installed: libasterisk-agi-perl 0 upgraded, 1 newly installed, 0 to remove and 0 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,541 kB/s) Selecting previously unselected package libasterisk-agi-perl. (Reading database ... 134220 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 extra packages will be installed: libauthen-sasl-perl libnet-xmpp-perl libxml-stream-perl Suggested packages: libdigest-hmac-perl libgssapi-perl libnet-dns-perl The following NEW packages will be installed: libauthen-sasl-perl libnet-xmpp-perl libxml-stream-perl sendxmpp 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. ... 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 extra packages will be installed: libauthen-sasl-perl libnet-xmpp-perl libxml-stream-perl Suggested packages: libdigest-hmac-perl libgssapi-perl libnet-dns-perl The following NEW packages will be installed: libauthen-sasl-perl libnet-xmpp-perl libxml-stream-perl sendxmpp 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. ... 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
![]() GNU nano 2.2.6 File: /etc/asterisk/extensions.conf Modified [macro-outgoingcall] exten => s,1,Answer exten => s,n,Set(CALLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${EPOCH}) exten => s,n,Monitor(wav,${CALLFILENAME},m) exten => s,n,Dial(${ARG1}) [macro-localcall] exten => s,1,NoOp(Answering ${MACRO_EXTEN} exten => s,n,Dial(SIP/${ARG1},2) exten => s,n,NoOp(Dial Status: ${DIALSTATUS}) exten => s,n,Goto(s-${DIALSTATUS},1) exten => s-NOANSWER,1,NoOp(No Answer) exten => s-NOANSWER,n,VoiceMail({MACRO_EXTEN}@default) ^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos ^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text^T To Spell |
#apt-get install sendxmpp
![]() GNU nano 2.2.6 File: /etc/asterisk/extensions.conf Modified [macro-outgoingcall] exten => s,1,Answer exten => s,n,Set(CALLFILENAME=${MACRO_EXTEN}-${CALLERID(num)}-${EPOCH}) exten => s,n,Monitor(wav,${CALLFILENAME},m) exten => s,n,Dial(${ARG1}) [macro-localcall] exten => s,1,NoOp(Answering ${MACRO_EXTEN} exten => s,n,Dial(SIP/${ARG1},2) exten => s,n,NoOp(Dial Status: ${DIALSTATUS}) exten => s,n,Goto(s-${DIALSTATUS},1) exten => s-NOANSWER,1,NoOp(No Answer) exten => s-NOANSWER,n,VoiceMail({MACRO_EXTEN}@default) ^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos ^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text^T To Spell |
#cat /usr/local/bin/jabber-send
![]() #!/bin/sh # $1 -- JID (Jabber-ID) of recipient # STDIN -- message /usr/bin/sendxmpp -i /var/lib/asterisk/.sendxmpprc "$1" |
#cat /usr/local/bin/jabber-send
#!/bin/sh # $1 -- JID (Jabber-ID) of recipient # STDIN -- message /usr/bin/sendxmpp -i /var/lib/asterisk/.sendxmpprc "$1" |
#apt-get install sendxmpp
![]() asterisk -rv 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. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian6 (pid = 6128) Verbosity is at least 4 ... -- Registered extension context 'ael-dundi-e164-customers'; registrar: pbx_ael -- merging incls/swits/igpats from old(ael-dundi-e164-customers) to new(ael-dundi-e164-customers) context, registrar = pbx_config -- Registered extension context 'ael-dundi-e164-canonical'; registrar: pbx_ael -- merging incls/swits/igpats from old(ael-dundi-e164-canonical) to new(ael-dundi-e164-canonical) context, registrar = pbx_config -- Time to scan old dialplan and merge leftovers back into the new: 0.000828 sec -- Time to restore hints and swap in new dialplan: 0.000003 sec -- Time to delete the old dialplan: 0.000090 sec -- Total time merge_contexts_delete: 0.000921 sec debian6*CLI> quit Executing last minute cleanups |
#apt-get install sendxmpp
asterisk -rv 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. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian6 (pid = 6128) Verbosity is at least 4 ... -- Registered extension context 'ael-dundi-e164-customers'; registrar: pbx_ael -- merging incls/swits/igpats from old(ael-dundi-e164-customers) to new(ael-dundi-e164-customers) context, registrar = pbx_config -- Registered extension context 'ael-dundi-e164-canonical'; registrar: pbx_ael -- merging incls/swits/igpats from old(ael-dundi-e164-canonical) to new(ael-dundi-e164-canonical) context, registrar = pbx_config -- Time to scan old dialplan and merge leftovers back into the new: 0.000828 sec -- Time to restore hints and swap in new dialplan: 0.000003 sec -- Time to delete the old dialplan: 0.000090 sec -- Total time merge_contexts_delete: 0.000921 sec debian6*CLI> quit Executing last minute cleanups |
#[macro-outgoingcall]
![]() |
#nano /etc/asterisk/extensions.conf
![]() |
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-16910.30009.1687 2014-04-24 16:58:04.387349548 +0300 +++ /etc/asterisk/extensions.conf 2014-04-24 17:00:31.583347573 +0300 @@ -7,7 +7,7 @@ [macro-localcall] exten => s,1,NoOp(Answering ${MACRO_EXTEN}) -exten => s,n,System(echo ${CALLERID}(num) is calling | /usr/local/bin/jabber-send user6@lab0.xgu.ru) +exten => s,n,System(echo ${CALLERID(num)} is calling | /usr/local/bin/jabber-send user6@lab0.xgu.ru) exten => s,n,Set(CALLFILENAME={MACRO_EXTEN}-${CALLFILERID(num)}-${EPOCH}) exten => s,n,Monitor(wav,${CALLFILENAME},m) exten => s,n,Dial(SIP/${ARG1},2) |
#asterisk -rv
![]() 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. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian6 (pid = 6128) Verbosity is at least 4 debian6*CLI> dialplan reload ... [Apr 24 17:00:46] WARNING[6166]: chan_sip.c:14460 check_auth: username mismatch, have <2301>, digest has <berlin> [Apr 24 17:00:46] NOTICE[6166]: chan_sip.c:22653 handle_request_invite: Failed to authenticate device "2301" <sip:2301@192.168.12.3>;tag=as7755b5fa -- Got SIP response 503 "Service Unavailable" back from 192.168.12.3:5060 -- SIP/berlin-000000fc is circuit-busy == Everyone is busy/congested at this time (1:0/1/0) -- Auto fallthrough, channel 'SIP/2301-000000fb' status is 'CONGESTION' [Apr 24 17:00:57] WARNING[23957]: pbx.c:4466 pbx_extension_helper: No application 'Playback/var/tmp/asterisk/message)' for extension (gr1, h, 1) == Spawn extension (gr1, h, 1) exited non-zero on 'SIP/2301-000000fb' debian6*CLI> quit Executing last minute cleanups |
#asterisk -rv
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. ========================================================================= Connected to Asterisk 1.8.13.1~dfsg1-3+deb7u3 currently running on debian6 (pid = 6128) Verbosity is at least 4 debian6*CLI> dialplan reload ... [Apr 24 17:00:46] WARNING[6166]: chan_sip.c:14460 check_auth: username mismatch, have <2301>, digest has <berlin> [Apr 24 17:00:46] NOTICE[6166]: chan_sip.c:22653 handle_request_invite: Failed to authenticate device "2301" <sip:2301@192.168.12.3>;tag=as7755b5fa -- Got SIP response 503 "Service Unavailable" back from 192.168.12.3:5060 -- SIP/berlin-000000fc is circuit-busy == Everyone is busy/congested at this time (1:0/1/0) -- Auto fallthrough, channel 'SIP/2301-000000fb' status is 'CONGESTION' [Apr 24 17:00:57] WARNING[23957]: pbx.c:4466 pbx_extension_helper: No application 'Playback/var/tmp/asterisk/message)' for extension (gr1, h, 1) == Spawn extension (gr1, h, 1) exited non-zero on 'SIP/2301-000000fb' debian6*CLI> quit Executing last minute cleanups |
#echo hi | /usr/local/bin/jabber-send user6@lab0.xgu.ru
![]() cannot read /root/.sendxmpprc: No such file or directory |
#echo hi | /usr/local/bin/jabber-send user6@lab0.xgu.ru
![]() cannot read /root/.sendxmpprc: No such file or directory |
#echo hi | /usr/local/bin/jabber-send user6@lab0.xgu.ru
![]() you must own /var/lib/asterisk/.sendxmpprc |
#echo hi | /usr/local/bin/jabber-send user6@lab0.xgu.ru
![]() you must own /var/lib/asterisk/.sendxmpprc |
#echo hi | /usr/local/bin/jabber-send user6@lab0.xgu.ru
![]() you must own /var/lib/asterisk/.sendxmpprc |
#echo hi | /usr/local/bin/jabber-send user6@lab0.xgu.ru
![]() you must own /var/lib/asterisk/.sendxmpprc |