/l3/users/oleglevitskiy/lab-nt-voip/aster-3/root :1 :2 :3 :4 :5 :6 :7 |
|
#nano /etc/asterisk/musiconhold.conf
|
#; Other (non-native) playback methods
GNU nano 2.2.6 File: /etc/asterisk/musiconhold.conf Modified ; sound adjustments are available. If the file is available in ; the same format as the channel's codec, then it will be played ; without transcoding (same as Playback would do in the dialplan). ; Files can be present in as many formats as you wish, and the ; 'best' format will be chosen at playback time. ; ; The path specified can be either an absolute path (starts with '/'), ; or a relative path; relative paths are interpreted as being relative ; to the 'astdatalibdir' in asterisk.conf, which defaults to ... ;[native-alphabetical] ;mode=files ;directory=moh ;sort=alpha ; Sort the files in alphabetical order. If this option is ; ; not specified, the sort order is undefined. ; ========= ; Other (non-native) playback methods ; ========= ^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 |
#grep dir /etc/asterisk/musiconhold.conf
; files -- read files from a directory in any Asterisk supported ; This plays files directly from the specified directory, no external ; (same as a sorted directory listing), and no volume or other ; to the 'astdatalibdir' in asterisk.conf, which defaults to ;directory=moh directory=/var/lib/asterisk/moh/ ;directory=moh ;directory=moh ; Note that with mode=custom, a directory is not required, such as when reading ;directory=/var/lib/asterisk/mohmp3 ;directory=/var/lib/asterisk/mohmp3 |
#cd /etc/asterisk/
|
#ls
adsi.conf cdr_tds.conf extconfig.conf mgcp.conf res_pktccops.conf agents.conf cel.conf extensions.conf minivm.conf res_snmp.conf ais.conf cel_custom.conf extensions.conf.local misdn.conf res_stun_monitor.conf alarmreceiver.conf cel_odbc.conf extensions_minivm.conf modules.conf rtp.conf alsa.conf cel_pgsql.conf features.conf musiconhold.conf say.conf amd.conf cel_sqlite3_custom.conf festival.conf muted.conf sip.conf app_mysql.conf cel_tds.conf followme.conf OLDCONFIGS sip_notify.conf asterisk.adsi chan_dahdi.conf func_odbc.conf osp.conf skinny.conf asterisk.conf chan_mobile.conf gtalk.conf oss.conf sla.conf calendar.conf chan_ooh323.conf h323.conf phone.conf smdi.conf ccss.conf cli_aliases.conf http.conf phoneprov.conf telcordia-1.adsi cdr_adaptive_odbc.conf cli.conf iax.conf queuerules.conf udptl.conf cdr.conf cli_permissions.conf iaxprov.conf queues.conf unistim.conf cdr_custom.conf codecs.conf indications.conf res_config_mysql.conf users.conf cdr_manager.conf console.conf jabber.conf res_config_sqlite.conf voicemail.conf cdr_mysql.conf dbsep.conf jingle.conf res_curl.conf vpb.conf cdr_odbc.conf dnsmgr.conf logger.conf res_fax.conf cdr_pgsql.conf dsp.conf manager.conf res_ldap.conf cdr_sqlite3_custom.conf dundi.conf manager.d res_odbc.conf cdr_syslog.conf enum.conf meetme.conf res_pgsql.conf |
#nano extensions.conf
--- /tmp/l3-saved-6997.5530.1619 2014-04-25 15:35:45.779743684 +0300 +++ extensions.conf 2014-04-25 15:36:40.731742949 +0300 @@ -131,7 +131,7 @@ exten => 0,1,Goto(menu,s,menu) - +; Перехват звонка |
#[default]
|
#[general]
/etc/asterisk |
#ls fea
ls: cannot access fea: No such file or directory |
#ls|grep fea
features.conf |
#nano features.conf
--- /tmp/l3-saved-6997.24800.12962 2014-04-25 15:39:30.603740683 +0300 +++ features.conf 2014-04-25 15:40:18.703740024 +0300 @@ -80,7 +80,7 @@ ; (default is 3 seconds) ;xfersound = beep ; to indicate an attended transfer is complete ;xferfailsound = beeperr ; to indicate a failed transfer -;pickupexten = *8 ; Configure the pickup extension. (default is *8) +pickupexten = *8 ; Configure the pickup extension. (default is *8) ;pickupsound = beep ; to indicate a successful pickup (default: no sound) ;pickupfailsound = beeperr ; to indicate that the pickup failed (default: no sound) ;featuredigittimeout = 1000 ; Max time (ms) between digits for |
# ; one of: callee, caller, both, no (default is no)
Reloading Asterisk PBX configuration files. |
#nano extensions.conf.local
--- /tmp/l3-saved-6997.25092.19006 2014-04-25 15:41:19.919739211 +0300 +++ extensions.conf.local 2014-04-25 15:42:38.883738152 +0300 @@ -1,11 +1,15 @@ [local] | ;exten => _13XX,1,Answer ;exten => _13XX,n,Monitor(wav,monitor,m) -;exten => _13XX,n,Dial(SIP/${EXTEN}) | + +; прямое направление звонка +exten => _13XX,n,Dial(SIP/${EXTEN}) | ;exten => _1301,1,Dial(SIP/1301,2) | ;exten => _1301,n,NoOp(Dial Status: ${DIALSTATUS}) | ;exten => _1301,n,Dial(SIP/1302) | -exten => _13XX,1,Macro(localcall,${EXTEN}) + +; макрос внутреннего вызова +;exten => _13XX,1,Macro(localcall,${EXTEN}) |
#nano extensions.conf.local
|
#[local] |
|
#nano extensions.conf
--- /tmp/l3-saved-6997.25113.7661 2014-04-25 15:44:09.579736936 +0300 +++ extensions.conf 2014-04-25 15:45:39.271735720 +0300 @@ -156,7 +156,7 @@ exten => s,n,Monitor(wav,${CALLFILENAME},m) exten => s,n,Dial(SIP/${ARG1},2) exten => s,n,NoOp(Dial Status: ${DIALSTATUS}) -exten => s,n,Goto(s-${DIALSTATUS},1) +exten => s,n,Goto(s-${DIALSTATUS},10) exten => s-NOANSWER,1,NoOp(No Answer) exten => s-NOANSWER,n,VoiceMail(${MACRO_EXTEN}@default) |
#[default] 8100,n,Set(CHANNEL(language)=ru)
Reloading Asterisk PBX configuration files. |
#nano extensions.conf
--- /tmp/l3-saved-6997.3958.16471 2014-04-25 15:46:40.555734914 +0300 +++ extensions.conf 2014-04-25 15:48:47.815733204 +0300 @@ -154,9 +154,9 @@ exten => s,n,Monitor(wav,${CALLFILENAME},m) -exten => s,n,Dial(SIP/${ARG1},2) +exten => s,n,Dial(SIP/${ARG1},5) exten => s,n,NoOp(Dial Status: ${DIALSTATUS}) -exten => s,n,Goto(s-${DIALSTATUS},10) +exten => s,n,Goto(s-${DIALSTATUS},1) exten => s-NOANSWER,1,NoOp(No Answer) exten => s-NOANSWER,n,VoiceMail(${MACRO_EXTEN}@default) |
#{DB(order/${ORDER_ID})})
Reloading Asterisk PBX configuration files. |
#nano features.conf
--- /tmp/l3-saved-6997.18806.16146 2014-04-25 15:56:47.391726788 +0300 +++ features.conf 2014-04-25 16:03:51.867721097 +0300 @@ -119,10 +119,10 @@ [featuremap] -;blindxfer => #1 ; Blind transfer (default is #) -- Make sure to set the T and/or t option in the Dial() or Queue() app call! +blindxfer => #1 ; Blind transfer (default is #) -- Make sure to set the T and/or t option in the Dial() or Queue() app call! ;disconnect => *0 ; Disconnect (default is *) -- Make sure to set the H and/or h option in the Dial() or Queue() app call! ;automon => *1 ; One Touch Record a.k.a. Touch Monitor -- Make sure to set the W and/or w option in the Dial() or Queue() app call! -;atxfer => *2 ; Attended transfer -- Make sure to set the T and/or t option in the Dial() or Queue() app call! +atxfer => *2 ; Attended transfer -- Make sure to set the T and/or t option in the Dial() or Queue() app call! ;parkcall => #72 ; Park call (one step parking) -- Make sure to set the K and/or k option in the Dial() app call! ;automixmon => *3 ; One Touch Record a.k.a. Touch MixMonitor -- Make sure to set the X and/or x option in the Dial() or Queue() app call! |
#; or by setting 'parkinglot' directly in the channel configuration file.
|
# ; feature activation (default is 1000 ms)
GNU nano 2.2.6 File: extensions.conf Modified [default] 8100,n,Set(CHANNEL(language)=ru)es)ssage2${DB(order/${ORDER_ID})}) ;exten => 8100,1,VoiceMailMain() ;exten => 1301,1,Answernd),Playback(/var/tmp/asterisk/message25) ;exten => 1301,n,Dial(SIP/1301)in() ;exten => 1301,n,Hangup exten => 8100,1,Answer ;exten => _13XX,1,Dial(SIP/${EXTEN})ID(num):0:1}) ;exten => _23XX,1,Dial(SIP/frankfurt/${EXTEN})message26)(num)}-${EPOCH}) ;exten => _1XXX,1,Dial(SIP/kiev/${EXTEN})sk-festival.pl,/home/user/belka.txt) ... exten => i,n,Goto(s,menu)bile/${CALLERID(num)})=${MOBILE})ome/user/belka.txt) exten => 1,1,AGI(/usr/local/bin/asterisk-festival.pl,/home/user/belka.txt)лÑÑаÑÑ. ÐобÑÑй денÑ) include => local1,Busyav,${CALLFILENAME},m)message28) include =2,1,AGI(/usr/local/bin/asterisk-festival.pl,/home/user/burunduki.txt) include =3,1,Answer include =3,n,Read(ORDER_ID,/var/tmp/asterisk/message20) include =3,n,Playback(/var/tmp/asterisk/message21)r3@lab0.xgu.ru ${CALLERID(num)} is calling) [gr1]rnat3,n,GotoIf($[${DB(order/${ORDER_ID})}z=z]?not_found)local/bin/jabber-send user3@lab0.xgu.ru) ^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 |
#{DB(order/${ORDER_ID})})
Reloading Asterisk PBX configuration files. |
#nano extensions.conf
--- /tmp/l3-saved-6997.25756.3251 2014-04-25 16:36:07.015695187 +0300 +++ extensions.conf 2014-04-25 16:39:03.427692812 +0300 @@ -83,6 +83,7 @@ exten => 8200,1,Goto(menu,s,1) + [menu] exten => s,1,Answer |
#[local] |
Reloading Asterisk PBX configuration files. |
#nano extensions.conf^C
|
#apterisk -rcvvvvvvv
l3script: apterisk: command not found |
#asterisk -rcvvvvvvv
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 aster-3 (pid = 2445) ... -- Executing [h@gr1:1] Playback("SIP/1301-000000be", "/var/tmp/asterisk/message") in new stack [Apr 25 16:42:48] WARNING[9991]: file.c:766 ast_readaudio_callback: Failed to write frame -- <SIP/1301-000000be> Playing '/var/tmp/asterisk/message.gsm' (language 'ru') [Apr 25 16:42:48] WARNING[9991]: app_playback.c:475 playback_exec: ast_streamfile failed on SIP/1301-000000be for /var/tmp/asterisk/message == Spawn extension (macro-localcall, s, 5) exited non-zero on 'SIP/1301-000000be' in macro 'localcall' == Spawn extension (gr1, 1302, 1) exited non-zero on 'SIP/1301-000000be' aster-3*CLI> Disconnected from Asterisk server Executing last minute cleanups Asterisk cleanly ending (0). |
#nano extensions.conf.local
--- /tmp/l3-saved-6997.845.25511 2014-04-25 16:42:58.451689662 +0300 +++ extensions.conf.local 2014-04-25 16:43:15.759689425 +0300 @@ -1,6 +1,6 @@ [local] | -exten => 1399,1,Dial(SIP/1301&SIP/1302) +exten => 1399,1,Dial(SIP/3201&SIP/1302) exten => 1399,n,Hangup ;exten => _13XX,1,Answer |
#service asterisk reload
Reloading Asterisk PBX configuration files. |
#nano extensions.conf.local
|
#nano queues.conf
--- /tmp/l3-saved-6997.1406.28604 2014-04-25 16:53:27.083681237 +0300 +++ queues.conf 2014-04-25 16:54:16.883680572 +0300 @@ -535,3 +535,6 @@ ;member => Agent/:1,1 ; Any agent in group 1, wait for first ; available, but consider with penalty +[queue1] +member => SIP/1401 +member => SIP/1402 |
#[default]
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#nano queues.conf
--- /tmp/l3-saved-6997.16609.15269 2014-04-25 16:56:08.859679075 +0300 +++ queues.conf 2014-04-25 16:56:21.399678914 +0300 @@ -536,5 +536,5 @@ ; available, but consider with penalty [queue1] -member => SIP/1401 -member => SIP/1402 +member => SIP/1301 +member => SIP/1302 |
#nano extensions.conf
|
#[default]
|
#[local] |
|
#[default]8100,n,Goto(vm)
queuerules.conf queues.conf |
#nano queues.conf
|
#;member => Agent/@1 ; Any agent in group 1
Reloading Asterisk PBX configuration files. |
#nano extensions.conf.local
|
#poweroff
|
#ls -al
total 664 drwxr-xr-x 4 asterisk asterisk 4096 Apr 24 13:17 . drwxr-xr-x 135 root root 12288 Apr 26 08:34 .. -rw-r----- 1 asterisk asterisk 140 Jan 4 03:07 adsi.conf -rw-r----- 1 asterisk asterisk 2760 Jan 4 03:07 agents.conf -rw-r----- 1 asterisk asterisk 2904 Jan 4 03:07 ais.conf -rw-r----- 1 asterisk asterisk 2084 Jan 4 03:07 alarmreceiver.conf -rw-r----- 1 asterisk asterisk 3498 Jan 4 03:07 alsa.conf -rw-r----- 1 asterisk asterisk 767 Jan 4 03:07 amd.conf -rw-r----- 1 asterisk asterisk 1044 Jan 4 03:07 app_mysql.conf ... -rw-r----- 1 asterisk asterisk 742 Jan 4 03:07 sip_notify.conf -rw-r----- 1 asterisk asterisk 9185 Jan 4 03:07 skinny.conf -rw-r----- 1 asterisk asterisk 6774 Jan 4 03:07 sla.conf -rw-r----- 1 asterisk asterisk 2669 Jan 4 03:07 smdi.conf -rw-r----- 1 asterisk asterisk 1384 Jan 4 03:07 telcordia-1.adsi -rw-r----- 1 asterisk asterisk 656 Jan 4 03:07 udptl.conf -rw-r----- 1 asterisk asterisk 5096 Jan 4 03:07 unistim.conf -rw-r----- 1 asterisk asterisk 2423 Jan 4 03:07 users.conf -rw-r--r-- 1 root root 139 Apr 24 13:24 voicemail.conf -rw-r----- 1 asterisk asterisk 5939 Jan 4 03:07 vpb.conf |
#ls -al|grep qu
-rw-r----- 1 asterisk asterisk 1440 Jan 4 03:07 queuerules.conf -rw-r----- 1 asterisk asterisk 23890 Apr 25 16:56 queues.conf |
#nano extensions.conf
--- /tmp/l3-saved-4283.25232.3547 2014-04-26 09:20:27.873418119 +0300 +++ extensions.conf 2014-04-26 09:21:48.145417044 +0300 @@ -86,6 +86,11 @@ exten => 8200,1,Goto(menu,s,1) +exten => _83XX,1,Answer +exten => _83XX,n,AgentLogin(0${EXTEN:2}) + + + [menu] exten => s,1,Answer |
#; Note that using agent groups is probably not what you want. Strategies do
|
#;
Reloading Asterisk PBX configuration files. |
#asterisk -rcvvvvvvvvvvvvvvvv
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 aster-3 (pid = 2448) ... == Agent '007' logged out == Spawn extension (gr1, 8307, 2) exited non-zero on 'SIP/1302-00000007' -- Executing [h@gr1:1] Playback("SIP/1302-00000007", "/var/tmp/asterisk/message") in new stack [Apr 26 09:27:24] WARNING[17729]: file.c:766 ast_readaudio_callback: Failed to write frame -- <SIP/1302-00000007> Playing '/var/tmp/asterisk/message.gsm' (language 'ru') [Apr 26 09:27:24] WARNING[17729]: app_playback.c:475 playback_exec: ast_streamfile failed on SIP/1302-00000007 for /var/tmp/asterisk/message aster-3*CLI> Disconnected from Asterisk server Executing last minute cleanups Asterisk cleanly ending (0). |
#cat /tmp/1.call
cat: /tmp/1.call: No such file or directory |
#lsmod|less
|
#history
1 apt-cache install festvox-ru 2 apt-get install festvox-ru 3 cat > /home/1.txt 4 cat /home/1.txt 5 cnano /home/1.txt 6 nano /home/1.txt 7 festival /home/1.txt 8 cat /home/1.txt | text2wave > /home/1.wav 9 LANG=C man ls | text2wave > home/2.wav 10 LANG=C man ls | text2wave > /home/2.wav ... 421 ls -al 422 ls -al|grep qu 423 nano extensions.conf 424 nano queues.conf 425 nano agents.conf 426 service asterisk reload 427 asterisk -rcvvvvvvvvvvvvvvvv 428 cat /tmp/1.call 429 lsmod|less 430 history |
#ls
adsi.conf cel_pgsql.conf gtalk.conf queues.conf agents.conf cel_sqlite3_custom.conf h323.conf res_config_mysql.conf ais.conf cel_tds.conf http.conf res_config_sqlite.conf alarmreceiver.conf chan_dahdi.conf iax.conf res_curl.conf alsa.conf chan_mobile.conf iaxprov.conf res_fax.conf amd.conf chan_ooh323.conf indications.conf res_ldap.conf app_mysql.conf cli_aliases.conf jabber.conf res_odbc.conf asterisk.adsi cli.conf jingle.conf res_pgsql.conf asterisk.conf cli_permissions.conf logger.conf res_pktccops.conf calendar.conf codecs.conf manager.conf res_snmp.conf ... cdr_manager.conf dundi.conf misdn.conf sip_notify.conf cdr_mysql.conf enum.conf modules.conf skinny.conf cdr_odbc.conf extconfig.conf musiconhold.conf sla.conf cdr_pgsql.conf extensions.conf muted.conf smdi.conf cdr_sqlite3_custom.conf extensions.conf.local OLDCONFIGS telcordia-1.adsi cdr_syslog.conf extensions_minivm.conf osp.conf udptl.conf cdr_tds.conf features.conf oss.conf unistim.conf cel.conf festival.conf phone.conf users.conf cel_custom.conf followme.conf phoneprov.conf voicemail.conf cel_odbc.conf func_odbc.conf queuerules.conf vpb.conf |
#ls -al|grep dah
-rw-r----- 1 asterisk asterisk 56496 Jan 4 03:07 chan_dahdi.conf |
#less chan_dahdi.conf
|
#less /var/log/asterisk/messages
|
#tail -f /var/log/asterisk/messages
[Apr 26 11:46:15] WARNING[10189] file.c: Failed to write frame [Apr 26 11:46:15] WARNING[10189] app_playback.c: ast_streamfile failed on SIP/kiev-00000094 for /var/tmp/asterisk/message [Apr 26 11:46:15] WARNING[10198] file.c: Failed to write frame [Apr 26 11:46:15] WARNING[10198] app_playback.c: ast_streamfile failed on SIP/kiev-0000009a for /var/tmp/asterisk/message [Apr 26 11:46:15] WARNING[10201] file.c: Failed to write frame [Apr 26 11:46:15] WARNING[10201] app_playback.c: ast_streamfile failed on SIP/kiev-0000009b for /var/tmp/asterisk/message [Apr 26 11:46:15] WARNING[10197] file.c: Failed to write frame [Apr 26 11:46:15] WARNING[10197] app_playback.c: ast_streamfile failed on SIP/kiev-00000099 for /var/tmp/asterisk/message [Apr 26 11:46:16] WARNING[10191] file.c: Failed to write frame [Apr 26 11:46:16] WARNING[10191] app_playback.c: ast_streamfile failed on SIP/kiev-00000096 for /var/tmp/asterisk/message ^C |
#cd /var/log/asterisk/
|
#ls
cdr-csv cdr-custom messages queue_log |
#cat cdr-csv/
cat: cdr-csv/: Is a directory |
#mc
|
#svn checkout http://chan-datacard.googlecode.com/svn/trunk/ chan-datacard-read-on
l3script: svn: command not found |
##apt-get install subversion
|
#apt-get install subversion
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libsvn1 Suggested packages: subversion-tools The following NEW packages will be installed: libsvn1 subversion 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. ... Get:2 http://192.168.12.254/debian/ wheezy/main subversion amd64 1.6.17dfsg-4+deb7u4 [1,320 kB] Fetched 2,253 kB in 0s (11.0 MB/s) Selecting previously unselected package libsvn1:amd64. (Reading database ... 141438 files and directories currently installed.) Unpacking libsvn1:amd64 (from .../libsvn1_1.6.17dfsg-4+deb7u4_amd64.deb) ... Selecting previously unselected package subversion. Unpacking subversion (from .../subversion_1.6.17dfsg-4+deb7u4_amd64.deb) ... Processing triggers for man-db ... Setting up libsvn1:amd64 (1.6.17dfsg-4+deb7u4) ... Setting up subversion (1.6.17dfsg-4+deb7u4) ... |
#svn checkout http://chan-datacard.googlecode.com/svn/trunk/ chan-datacard-read-on
A chan-datacard-read-on/__helpers.c A chan-datacard-read-on/__char_conv.c A chan-datacard-read-on/configure A chan-datacard-read-on/chan_datacard.h A chan-datacard-read-on/Makefile.in A chan-datacard-read-on/__cli.c A chan-datacard-read-on/COPYRIGHT.txt A chan-datacard-read-on/__channel.c A chan-datacard-read-on/__manager.c A chan-datacard-read-on/__at_fifo_queue.c ... A chan-datacard-read-on/__at_response.c A chan-datacard-read-on/__ringbuffer.c A chan-datacard-read-on/README.txt A chan-datacard-read-on/etc A chan-datacard-read-on/etc/datacard.conf A chan-datacard-read-on/__ringbuffer.h A chan-datacard-read-on/chan_datacard.c A chan-datacard-read-on/__at_parse.c A chan-datacard-read-on/__at_read.c Checked out revision 191. |
#lysvn checkout http://chan-datacard.googlecode.com/svn/trunk/chan-datacard-read-only^C
|
#svn checkout http://chan-datacard.googlecode.com/svn/trunk/chan-datacard-read-only
svn: URL 'http://chan-datacard.googlecode.com/svn/trunk/chan-datacard-read-only' doesn't exist |
#svn checkout http://chan-datacard.googlecode.com/svn/trunk/ chan-datacard-read-only
A chan-datacard-read-only/__helpers.c A chan-datacard-read-only/__char_conv.c A chan-datacard-read-only/configure A chan-datacard-read-only/chan_datacard.h A chan-datacard-read-only/Makefile.in A chan-datacard-read-only/__cli.c A chan-datacard-read-only/COPYRIGHT.txt A chan-datacard-read-only/__channel.c A chan-datacard-read-only/__manager.c A chan-datacard-read-only/__at_fifo_queue.c ... A chan-datacard-read-only/__at_response.c A chan-datacard-read-only/__ringbuffer.c A chan-datacard-read-only/README.txt A chan-datacard-read-only/etc A chan-datacard-read-only/etc/datacard.conf A chan-datacard-read-only/__ringbuffer.h A chan-datacard-read-only/chan_datacard.c A chan-datacard-read-only/__at_parse.c A chan-datacard-read-only/__at_read.c Checked out revision 191. |
#apt-get install asterisk-dev
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: asterisk-dev 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 959 kB of archives. After this operation, 2,131 kB of additional disk space will be used. Get:1 http://192.168.12.254/debian/ wheezy/main asterisk-dev all 1:1.8.13.1~dfsg1-3+deb7u3 [959 kB] Fetched 959 kB in 0s (10.4 MB/s) Selecting previously unselected package asterisk-dev. (Reading database ... 141526 files and directories currently installed.) Unpacking asterisk-dev (from .../asterisk-dev_1%3a1.8.13.1~dfsg1-3+deb7u3_all.deb) ... Setting up asterisk-dev (1:1.8.13.1~dfsg1-3+deb7u3) ... |
#apt-get install asterisk-dev^C
|
#cd chan-datacard-read-only/
|
#./configure
configure complete, now type 'make' |
#make
gcc -Wextra -fPIC -DAST_MODULE=\"chan_datacard\" -D_THREAD_SAFE -I. -I/usr/include -O2 -DICONV_CONST="" -D__DEBUG__ -D__MANAGER__ -D__APP__ -c chan_datacard.c gcc -shared -Xlinker -x chan_datacard.o -o chan_datacard.so chmod 755 chan_datacard.so |
#make install
gcc -Wextra -fPIC -DAST_MODULE=\"chan_datacard\" -D_THREAD_SAFE -I. -I/usr/include -O2 -DICONV_CONST="" -D__DEBUG__ -D__MANAGER__ -D__APP__ -c chan_datacard.c gcc -shared -Xlinker -x chan_datacard.o -o chan_datacard.so chmod 755 chan_datacard.so install -d /usr/lib/asterisk/modules/ install -m 755 chan_datacard.so /usr/lib/asterisk/modules/ |
#lsmod
Module Size Used by rfcomm 33700 0 bnep 17567 2 bluetooth 119455 10 bnep,rfcomm rfkill 19012 2 bluetooth binfmt_misc 12957 1 nfsd 216170 2 nfs 308313 0 nfs_acl 12511 2 nfs,nfsd auth_rpcgss 37143 2 nfs,nfsd ... crc_t10dif 12348 1 sd_mod ahci 24997 2 libahci 22941 1 ahci libata 140630 2 libahci,ahci scsi_mod 162269 4 libata,sd_mod,sr_mod,sg xhci_hcd 73434 0 ehci_hcd 40215 0 usbcore 128741 4 ehci_hcd,xhci_hcd,usbhid usb_common 12354 1 usbcore e1000e 120822 0 |
#lsmod |grep gsm
|
#lsmod |grep card
|
#ls -al
total 572 drwxr-xr-x 4 root root 4096 Apr 26 12:31 . drwxr-xr-x 6 asterisk asterisk 4096 Apr 26 12:30 .. -rw-r--r-- 1 root root 2996 Apr 26 12:30 __app.c -rw-r--r-- 1 root root 2816 Apr 26 12:30 __at_fifo_queue.c -rw-r--r-- 1 root root 14613 Apr 26 12:30 __at_parse.c -rw-r--r-- 1 root root 7456 Apr 26 12:30 __at_read.c -rw-r--r-- 1 root root 39050 Apr 26 12:30 __at_response.c -rw-r--r-- 1 root root 13257 Apr 26 12:30 __at_send.c -rw-r--r-- 1 root root 16995 Apr 26 12:30 chan_datacard.c ... -rw-r--r-- 1 root root 1793 Apr 26 12:30 __helpers.c -rw-r--r-- 1 root root 18671 Apr 26 12:30 LICENSE.txt -rw-r--r-- 1 root root 656 Apr 26 12:31 Makefile -rw-r--r-- 1 root root 567 Apr 26 12:30 Makefile.in -rw-r--r-- 1 root root 11478 Apr 26 12:30 __manager.c -rw-r--r-- 1 root root 2291 Apr 26 12:30 __memmem.c -rw-r--r-- 1 root root 2184 Apr 26 12:30 README.txt -rw-r--r-- 1 root root 6920 Apr 26 12:30 __ringbuffer.c -rw-r--r-- 1 root root 1187 Apr 26 12:30 __ringbuffer.h drwxr-xr-x 6 root root 4096 Apr 26 12:30 .svn |
#history
1 apt-cache install festvox-ru 2 apt-get install festvox-ru 3 cat > /home/1.txt 4 cat /home/1.txt 5 cnano /home/1.txt 6 nano /home/1.txt 7 festival /home/1.txt 8 cat /home/1.txt | text2wave > /home/1.wav 9 LANG=C man ls | text2wave > home/2.wav 10 LANG=C man ls | text2wave > /home/2.wav ... 446 apt-get install asterisk-dev 447 cd chan-datacard-read-only/ 448 ./configure 449 make 450 make install 451 lsmod 452 lsmod |grep gsm 453 lsmod |grep card 454 ls -al 455 history |
#ls etc/
datacard.conf |
#cp etc/datacard.conf /etc/asterisk/
|
#cd /etc/asterisk/
|
#nano datacard.conf
|
#[general]
|
#ls
agent-alreadyon.wav Mail vm-intro.wav agent-incorrect.wav minutes.wav vm-invalid-password.wav agent-loggedoff.wav pbx-invalidpark.wav vm-invalidpassword.wav agent-loginok.wav pbx-invalid.wav vm-isonphone.wav agent-newlocation.wav pbx-parkingfailed.wav vm-isunavail.wav agent-pass.wav pbx-transfer.wav vm-last.wav agent-user.wav phonetic vm-leavemsg.wav ascending-2tone.wav phone.wav vm-login.wav asterisk-core-sounds-ru-wav-current.tar.gz privacy-incorrect.wav vm-mailboxfull.wav auth-incorrect.wav privacy-prompt.wav vm-marked-nonurgent.wav ... dir-pls-enter.wav vm-Friends.wav vm-tooshort.wav dir-usingkeypad.wav vm-from-extension.wav vm-toreply.wav dir-welcome.wav vm-from-phonenumber.wav vm-torerecord.wav followme vm-from.wav vm-undeleted.wav hello-world.wav vm-goodbye.wav vm-undelete.wav hours.wav vm-helpexit.wav vm-unknown-caller.wav install vm-INBOX.wav vm-Urgent.wav invalid.wav vm-incorrect-mailbox.wav vm-whichbox.wav letters vm-incorrect.wav vm-Work.wav LICENSE-asterisk-core-ru-1.4.25 vm-instructions.wav vm-youhave.wav |
#rm *.wav
|
#ls
asterisk-core-sounds-ru-wav-current.tar.gz dictate letters ru-sounds CHANGES-asterisk-core-ru-1.4.25 digits LICENSE-asterisk-core-ru-1.4.25 silence core-sounds-ru.txt followme Mail CREDITS-asterisk-core-ru-1.4.25 install phonetic |
#cd /etc/asterisk/
|
#ls
adsi.conf cel_sqlite3_custom.conf h323.conf res_config_sqlite.conf agents.conf cel_tds.conf http.conf res_curl.conf ais.conf chan_dahdi.conf iax.conf res_fax.conf alarmreceiver.conf chan_mobile.conf iaxprov.conf res_ldap.conf alsa.conf chan_ooh323.conf indications.conf res_odbc.conf amd.conf cli_aliases.conf jabber.conf res_pgsql.conf app_mysql.conf cli.conf jingle.conf res_pktccops.conf asterisk.adsi cli_permissions.conf logger.conf res_snmp.conf asterisk.conf codecs.conf manager.conf res_stun_monitor.conf calendar.conf console.conf manager.d rtp.conf ... cdr_mysql.conf enum.conf musiconhold.conf smdi.conf cdr_odbc.conf extconfig.conf muted.conf telcordia-1.adsi cdr_pgsql.conf extensions.conf OLDCONFIGS udptl.conf cdr_sqlite3_custom.conf extensions.conf.local osp.conf unistim.conf cdr_syslog.conf extensions_minivm.conf oss.conf users.conf cdr_tds.conf features.conf phone.conf voicemail.conf cel.conf festival.conf phoneprov.conf vpb.conf cel_custom.conf followme.conf queuerules.conf cel_odbc.conf func_odbc.conf queues.conf cel_pgsql.conf gtalk.conf res_config_mysql.conf |
#ls -d
. |
#cd ../
|
#ls
acpi gai.conf logcheck rc5.d adduser.conf gconf login.defs rc6.d adjtime gdm3 logrotate.conf rc.local aliases ghostscript logrotate.d rcS.d alternatives gimp lynx-cur reportbug.conf anacrontab gnashpluginrc magic resolvconf apache2 gnashrc magic.mime resolv.conf apg.conf gnashthumbnailrc mailcap rmt apm gnome mailcap.order rpc apt gnome-vfs-2.0 mailname rsyslog.conf ... email-addresses ld.so.conf.d purple vim environment libao.conf python w3m esound libaudit.conf python2.6 wgetrc exim4 libnl-3 python2.7 wildmidi festival.scm libpaper.d radiusclient-ng wpa_supplicant fonts libreoffice rc0.d X11 freetds lilalo rc1.d xdg fstab locale.alias rc2.d xml fstab.d locale.gen rc3.d fuse.conf localtime rc4.d |
#cd -d
l3script: cd: -d: invalid option cd: usage: cd [-L|[-P [-e]]] [dir] |
#ls -d
. |
#tail -f /var/log/messages
Apr 26 08:33:59 aster-3 kernel: [ 19.615133] Bluetooth: RFCOMM TTY layer initialized Apr 26 08:33:59 aster-3 kernel: [ 19.615136] Bluetooth: RFCOMM socket layer initialized Apr 26 08:33:59 aster-3 kernel: [ 19.615138] Bluetooth: RFCOMM ver 1.11 Apr 26 08:34:01 aster-3 kernel: [ 21.756051] ADDRCONF(NETDEV_UP): eth0: link is not ready Apr 26 08:34:11 aster-3 rsyslogd-2177: imuxsock begins to drop messages from pid 3076 due to rate-limiting Apr 26 08:34:12 aster-3 rsyslogd-2177: imuxsock lost 47 messages from pid 3076 due to rate-limiting Apr 26 08:34:22 aster-3 kernel: [ 42.792944] e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: None Apr 26 08:34:22 aster-3 kernel: [ 42.792951] e1000e 0000:00:19.0: eth0: 10/100 speed: disabling TSO Apr 26 08:34:22 aster-3 kernel: [ 42.794435] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready Apr 26 08:38:52 aster-3 rsyslogd: [origin software="rsyslogd" swVersion="5.8.11" x-pid="2196" x-info="http://www.rsyslog.com"] rsyslogd was HUPed ^C |
#cd /etc/aster
l3script: cd: /etc/aster: No such file or directory |
#cd /etc/asterisk/
|
#nano extensions.conf
|
#[default]
|
#nano extensions.conf
--- /tmp/l3-saved-4283.4182.452 2014-04-26 13:38:21.841210804 +0300 +++ extensions.conf 2014-04-26 13:39:46.613209667 +0300 @@ -12,6 +12,12 @@ #include "/etc/asterisk/extensions.conf.local" + +[ukraine-gateway] +exten => _380XXXXXXXXX,1,Dial(SIP/kiev/${EXTEN)) + + + [internal] include => parkedcalls exten => _80XX,1,Answer @@ -197,11 +203,13 @@ exten => _.,1,Playback(/var/tmp/asterisk/message) [gr_relay] + include => internal include => local include => national include => international include => failback +include=>ukraine-gateway [gr1] include => internal @@ -209,14 +217,17 @@ include => national include => international include => failback +include=>ukraine-gateway [gr2] include => internal include => local include => national include => failback +include=>ukraine-gateway [gr3] include => internal include => local include => failback +include=>ukraine-gateway |
Время первой команды журнала | 14:00:46 2014- 4-25 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 12:38:19 2014- 4-26 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 7.92 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 2.97 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 5.31 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.32 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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