/l3/users/makswell/nt-voip/unix7.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 |
|
#modinfo
![]() Usage: modinfo [-0][-F field][-k kernelversion][-b basedir] module... Prints out the information about one or more module(s). If a fieldname is given, just print out that field (or nothing if not found). Otherwise, print all information out in a readable form If -0 is given, separate with nul, not newline. If -b is given, use an image of the module tree. |
#modinfo wcte12xp
filename: /lib/modules/3.2.0-0.bpo.3-686-pae/dahdi/wcte12xp/wcte12xp.ko license: GPL v2 author: Digium Incorporated <support@digium.com> description: Wildcard VoiceBus Digital Card Driver alias: pci:v0000D161d00008001sv*sd*bc*sc*i* alias: pci:v0000D161d00008000sv*sd*bc*sc*i* alias: pci:v0000D161d00000120sv*sd*bc*sc*i* depends: dahdi_voicebus,dahdi vermagic: 3.2.0-0.bpo.3-686-pae SMP mod_unload modversions 686 parm: debug:int ... parm: losalarmdebounce:int parm: aisalarmdebounce:int parm: yelalarmdebounce:int parm: latency:int parm: max_latency:int parm: vpmsupport:int parm: vpmtsisupport:int parm: vpmnlptype:int parm: vpmnlpthresh:int parm: vpmnlpmaxsupp:int |
#dahdi_genconf
|
#cat /etc/dahdi/system.conf
# Autogenerated by /usr/sbin/dahdi_genconf on Fri Oct 26 12:24:09 2012 # If you edit this file and execute /usr/sbin/dahdi_genconf again, # your manual changes will be LOST. # Dahdi Configuration File # # This file is parsed by the Dahdi Configurator, dahdi_cfg # # Span 1: WCT1/0 "Wildcard TE121 Card 0" (MASTER) HDB3/CCS/CRC4 span=1,1,0,ccs,hdb3,crc4 # termtype: te bchan=1-15,17-31 dchan=16 echocanceller=mg2,1-15,17-31 # Global data loadzone = us defaultzone = us |
#~
; This file documents many configuration variables. Normally unless you know ; what a variable means or that it should be changed, there's no reason to ; un-comment those lines. ; ; Examples below that are commented out (those lines that begin with a ';' but ; no space afterwards) typically show a value that is not the default value, ; but would make sense under certain circumstances. The default values are ; usually sane. Thus you should typically not touch them unless you know what ; they mean or you know you should change them. [trunkgroups] ... ;dahdichan = 2 ;faxdetect = no ;context = fax ; ;[phone-3](phones) (phones) ;dahdichan = 3 ;pickupgroup = 3,4 ~ "/etc/asterisk/chan_dahdi.conf" 1226L, 47005C записано |
#~
[default] ;room exten => 2244,1,MeetMe(100) пÑоÑеÑÑ: 18925 [internal]кÑÑÑии Ñайла: "/etc/asterisk/extensions.conf" exten => 8000,1,Playback(welcome)6 12:18:02 2012 exten => _81XX,1,Record(/var/tmp/asterisk/message${EXTEN:2}:gsm,1)¹Ð»! exten => _81XX,n,Playback(/var/tmp/asterisk/message${EXTEN:2}) exten => 8001,1,VoicemailMain()ºÑиÑование Ñайла вÑполнÑеÑÑÑ Ð² дÑÑгой пÑогÑамме. ;exten => _89XX,n,Playback(/tmp/message${EXTEN:2})имаÑелÑÐ½Ñ Ð¿Ñи внеÑении изменений, ... exten => 2,n(play),AGI(/usr/local/bin/asterisk-festival.pl,/var/tmp/${file}) exten => 3,1,GotoIfTime(9:00-14:00|mon-fri|*|*?day:night) exten => 3,n(day),Queue(que1) exten => 3,n,Hangup exten => 3,n(night),Voicemail(2201) exten => 3,n,Hangup ;exten => 3,1,System(sudo eject) exten => 0,1,Goto(menu,s,1) [submenu] include => localnal 119,1 54% |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze8, 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+squeeze8 currently running on linux7 (pid = 3411) ... [Oct 26 13:38:43] WARNING[3452]: chan_dahdi.c:13544 pri_dchannel: PRI Error on span 0: We think we're the network, but they think they're the network, too. [Oct 26 13:38:44] WARNING[3452]: chan_dahdi.c:13544 pri_dchannel: PRI Error on span 0: We think we're the network, but they think they're the network, too. [Oct 26 13:38:45] WARNING[3452]: chan_dahdi.c:13544 pri_dchannel: PRI Error on span 0: We think we're the network, but they think they're the network, too. == Primary D-Channel on span 1 down [Oct 26 13:38:46] WARNING[3452]: chan_dahdi.c:4160 pri_find_dchan: No D-channels available! Using Primary channel 16 as D-channel anyway! == Primary D-Channel on span 1 up [Oct 26 13:38:46] WARNING[3452]: chan_dahdi.c:13544 pri_dchannel: PRI Error on span 0: We think we're the network, but they think they're the network, too. [Oct 26 13:38:47] WARNING[3452]: chan_dahdi.c:13544 pri_dchannel: PRI Error on span 0: We think we're the network, but they think they're the network, too. linux7*CLI> quit Executing last minute cleanups |
#apt
![]() apt-cache apt-ftparchive apt-key apt-cdrom apt-get apt-listchanges apt-config aptitude apt-mark aptd aptitude-create-state-bundle apt-sortpkgs aptdcon aptitude-curses apt-extracttemplates aptitude-run-state-bundle |
#. /etc/bash_completion
|
#apt-get install ast
![]() asterisk asterisk-dbg asterisk-prompt-de asterisk-chan-capi asterisk-dev asterisk-prompt-es-co asterisk-config asterisk-doc asterisk-prompt-fr-armelle asterisk-core-sounds-en-g722 asterisk-h323 asterisk-prompt-fr-proformatique asterisk-core-sounds-en-gsm asterisk-mobile asterisk-prompt-it asterisk-core-sounds-en-wav asterisk-modules asterisk-prompt-se asterisk-core-sounds-es-g722 asterisk-moh-opsound-g722 asterisk-sounds-extra asterisk-core-sounds-es-gsm asterisk-moh-opsound-gsm asterisk-sounds-main asterisk-core-sounds-es-wav asterisk-moh-opsound-wav asterisk-voicemail asterisk-core-sounds-fr-g722 asterisk-mp3 asterisk-voicemail-imapstorage asterisk-core-sounds-fr-gsm asterisk-mysql asterisk-voicemail-odbcstorage asterisk-core-sounds-fr-wav asterisk-ooh323 astronomical-almanac asterisk-dahdi asterisk-ooh323c astyle |
#apt-get install asterisk-d
![]() asterisk-dahdi asterisk-dbg asterisk-dev asterisk-doc |
#apt-get install asterisk-dev
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово Следующие пакеты устанавливались автоматически и больше не требуются: mysql-common libmysqlclient16 Для их удаления используйте 'apt-get autoremove'. НОВЫЕ пакеты, которые будут установлены: asterisk-dev обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 3 пакетов не обновлено. Необходимо скачать 636 kБ архивов. После данной операции, объём занятого дискового пространства возрастёт на 1.741 kB. Получено:1 http://security.debian.org/ squeeze/updates/main asterisk-dev all 1:1.6.2.9-2+squeeze8 [636 kB] Получено 636 kБ за 3с (162 kБ/c) Выбор ранее не выбранного пакета asterisk-dev. (Чтение базы данных ... на данный момент установлен 134551 файл и каталог.) Распаковывается пакет asterisk-dev (из файла .../asterisk-dev_1%3a1.6.2.9-2+squeeze8_all.deb)... Настраивается пакет asterisk-dev (1:1.6.2.9-2+squeeze8) ... |
#apt-get install subversion
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово Следующие пакеты устанавливались автоматически и больше не требуются: mysql-common libmysqlclient16 Для их удаления используйте 'apt-get autoremove'. Будут установлены следующие дополнительные пакеты: libserf-0-0 libsvn1 Предлагаемые пакеты: subversion-tools db4.8-util ... (Чтение базы данных ... на данный момент установлен 134671 файл и каталог.) Распаковывается пакет libserf-0-0 (из файла .../libserf-0-0_0.3.1-1_i386.deb)... Выбор ранее не выбранного пакета libsvn1. Распаковывается пакет libsvn1 (из файла .../libsvn1_1.6.12dfsg-6_i386.deb)... Выбор ранее не выбранного пакета subversion. Распаковывается пакет subversion (из файла .../subversion_1.6.12dfsg-6_i386.deb)... Обрабатываются триггеры для man-db ... Настраивается пакет libserf-0-0 (0.3.1-1) ... Настраивается пакет libsvn1 (1.6.12dfsg-6) ... Настраивается пакет subversion (1.6.12dfsg-6) ... |
#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. |
#cd chan-datacard-read-only/
|
#./configure
configure complete, now type 'make' |
#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/ |
#vim /etc/d
![]() |
#vim /etc/d
![]() |
#ls -l etc/datacard.conf
-rw-r--r-- 1 root root 3373 Окт 26 13:54 etc/datacard.conf |
#cp etc/datacard.conf /etc/asterisk/
|
#vim /etc/asterisk/datacard.conf
![]() |
#vim /etc/asterisk/datacard.conf
--- /tmp/l3-saved-3605.8038.31737 2012-10-26 13:58:13.655873051 +0300 +++ /etc/asterisk/datacard.conf 2012-10-26 14:04:48.223867764 +0300 @@ -53,19 +53,19 @@ group=1 ; calling group -[datacard1] -context=incoming-datacard ; context for incoming calls +;[datacard1] +;context=incoming-datacard ; context for incoming calls ;language=de ; Use German as default language -audio=/dev/ttyUSB4 ; tty port for audio connection -data=/dev/ttyUSB5 ; tty port for AT commands -group=2 ; calling group -rxgain=10 ; increase the incoming volume -txgain=10 ; increase the outgoint volume -autodeletesms=yes ; auto delete incoming sms -resetdatacard=yes ; reset datacard during initialization -u2diag=0 ; set U2DIAG parameter (0 = disable everything except modem function) -usecallingpres=yes ; use the caller ID presentation or not -callingpres=allowed_passed_screen ; set caller ID presentation -disablesms=yes ; chan_datacard has currently a bug with SMS reception. When a SMS gets in during a +;audio=/dev/ttyUSB4 ; tty port for audio connection +;data=/dev/ttyUSB5 ; tty port for AT commands +;group=2 ; calling group +;rxgain=10 ; increase the incoming volume +;txgain=10 ; increase the outgoint volume +;autodeletesms=yes ; auto delete incoming sms +;resetdatacard=yes ; reset datacard during initialization +;u2diag=0 ; set U2DIAG parameter (0 = disable everything except modem function) +;usecallingpres=yes ; use the caller ID presentation or not +;callingpres=allowed_passed_screen ; set caller ID presentation +;disablesms=yes ; chan_datacard has currently a bug with SMS reception. When a SMS gets in during a ; call chan_datacard might crash. Enable this option to disable sms reception. ; Default = no |
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze8, 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+squeeze8 currently running on linux7 (pid = 3411) ... -- Registered SIP '2202' at 192.168.70.100 port 5060 [Oct 26 14:32:48] NOTICE[3448]: chan_sip.c:18480 handle_response_peerpoke: Peer '2202' is now Reachable. (7ms / 2000ms) [Oct 26 14:33:52] NOTICE[3448]: chan_sip.c:23119 sip_poke_noanswer: Peer '2202' is now UNREACHABLE! Last qualify: 7 [Oct 26 15:23:10] NOTICE[3448]: chan_sip.c:23119 sip_poke_noanswer: Peer 'manchester' is now UNREACHABLE! Last qualify: 1 -- Remote UNIX connection Executing last minute cleanups == Destroying musiconhold processes linux7*CLI> Disconnected from Asterisk server Executing last minute cleanups |
#vim /etc/asterisk/ext
![]() |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3605.8388.20829 2012-10-26 14:12:39.391861452 +0300 +++ /etc/asterisk/extensions.conf 2012-10-26 14:21:25.735854399 +0300 @@ -38,6 +38,12 @@ [local] +;@@@@@@@@ + +;exten => _050XXXXXXX,1,Dial(Datacard/datacard0/${EXTEN}) + +;exten => _050XXXXXXX,1,Dial(SIP/manchester/${EXTEN}) + ;room exten => 2244,1,MeetMe(100) @@ -63,6 +69,9 @@ ;---------------------------------------- +exten => _050XXXXXXX,1,Dial(SIP/manchester/${EXTEN}) + + exten => _21XX,1,Dial(SIP/manchester/${EXTEN}) [international] |
#apt-get install mys
![]() myspell-af myspell-fi myspell-pl mysql-mmm-agent myspell-bg myspell-fo myspell-pt mysql-mmm-common myspell-ca myspell-fr myspell-pt-br mysql-mmm-monitor myspell-cs myspell-fr-gut myspell-pt-pt mysql-mmm-tools myspell-da myspell-ga myspell-ru mysql-navigator myspell-de-at myspell-gd myspell-sk mysql-proxy myspell-de-ch myspell-gv myspell-sl mysql-query-browser myspell-de-de myspell-he myspell-sv-se mysql-server myspell-de-de-oldspell myspell-hr myspell-sw mysql-server-5.1 myspell-el-gr myspell-hu myspell-th mysql-server-core-5.1 myspell-en-au myspell-hy myspell-tl mysqltcl myspell-en-gb myspell-it myspell-tools mysqltuner myspell-en-us myspell-ku myspell-uk mysqmail myspell-en-za myspell-lt mysql-admin mysqmail-courier-logger myspell-eo myspell-lv mysql-client mysqmail-dovecot-logger myspell-es myspell-nb mysql-client-5.1 mysqmail-postfix-logger myspell-et myspell-nl mysql-common mysqmail-pure-ftpd-logger myspell-fa myspell-nn mysql-gui-tools-common |
#apt-get install mysq
![]() mysql-admin mysql-mmm-common mysql-server mysqmail-courier-logger mysql-client mysql-mmm-monitor mysql-server-5.1 mysqmail-dovecot-logger mysql-client-5.1 mysql-mmm-tools mysql-server-core-5.1 mysqmail-postfix-logger mysql-common mysql-navigator mysqltcl mysqmail-pure-ftpd-logger mysql-gui-tools-common mysql-proxy mysqltuner mysql-mmm-agent mysql-query-browser mysqmail |
#apt-get install mysql-server
ÐаÑÑÑойка пакеÑа ââââââââ⤠ÐаÑÑÑаиваеÑÑÑ Ð¿Ð°ÐºÐµÑ mysql-server-5.1 ââââââââââ â â â â â ÐовÑоÑиÑе ввод паÑÐ¾Ð»Ñ Ð´Ð»Ñ MySQL полÑзоваÑÐµÐ»Ñ "root": â â â â********_______________________________________________ â â â â <Ok> â â â ... 121026 15:04:12 [Note] Plugin 'FEDERATED' is disabled. 121026 15:04:12 InnoDB: Initializing buffer pool, size = 8.0M 121026 15:04:12 InnoDB: Completed initialization of buffer pool 121026 15:04:12 InnoDB: Started; log sequence number 0 44233 121026 15:04:12 InnoDB: Starting shutdown... 121026 15:04:18 InnoDB: Shutdown completed; log sequence number 0 44233 Starting MySQL database server: mysqld. Checking for corrupt, not cleanly closed and upgrade needing tables.. ÐаÑÑÑаиваеÑÑÑ Ð¿Ð°ÐºÐµÑ libhtml-template-perl (2.9-2) ... ÐаÑÑÑаиваеÑÑÑ Ð¿Ð°ÐºÐµÑ mysql-server (5.1.63-0+squeeze1) ... |
#mysql
![]() ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) |
#mysql -u root -p
Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 41 Server version: 5.1.63-0+squeeze1 (Debian) Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> ... status (\s) Get status information from the server. system (\!) Execute a system shell command. tee (\T) Set outfile [to_outfile]. Append everything into given outfile. use (\u) Use another database. Takes database name as argument. charset (\C) Switch to another charset. Might be needed for processing binlog with multi-byte charsets. warnings (\W) Show warnings after every statement. nowarning (\w) Don't show warnings after every statement. For server side help, type 'help contents' mysql> exit Bye |
#touch 1.sql
|
#touch 1.sql < CREATE DATABASE asterisk;
![]() bash: CREATE: Нет такого файла или каталога |
#USE asterisk;
![]() bash: USE: команда не найдена |
#CREATE TABLE `asterisk`.`cdr` (
![]() bash: syntax error near unexpected token `(' |
#`calldate` datetime NOT NULL default '0000-00-00 00:00:00',
![]() bash: calldate: команда не найдена bash: datetime: команда не найдена |
#`clid` varchar(80) NOT NULL default '',
![]() bash: syntax error near unexpected token `(' |
#`src` varchar(80) NOT NULL default '',
![]() bash: syntax error near unexpected token `(' |
#`dst` varchar(80) NOT NULL default '',
![]() bash: syntax error near unexpected token `(' |
#`dcontext` varchar(80) NOT NULL default '',
![]() bash: syntax error near unexpected token `(' |
#`channel` varchar(80) NOT NULL default '',
![]() bash: syntax error near unexpected token `(' |
#`dstchannel` varchar(80) NOT NULL default '',
![]() bash: syntax error near unexpected token `(' |
#`lastapp` varchar(80) NOT NULL default '',
![]() bash: syntax error near unexpected token `(' |
#`lastdata` varchar(80) NOT NULL default '',
![]() bash: syntax error near unexpected token `(' |
#`duration` int(11) NOT NULL default '0',
![]() bash: syntax error near unexpected token `(' |
#`billsec` int(11) NOT NULL default '0',
![]() bash: syntax error near unexpected token `(' |
#`disposition` varchar(45) NOT NULL default '',
![]() bash: syntax error near unexpected token `(' |
#`amaflags` int(11) NOT NULL default '0',
![]() bash: syntax error near unexpected token `(' |
#`accountcode` varchar(20) NOT NULL default '',
![]() bash: syntax error near unexpected token `(' |
#`uniqueid` varchar(32) NOT NULL default '',
![]() bash: syntax error near unexpected token `(' |
#`userfield` varchar(255) NOT NULL default ''
![]() bash: syntax error near unexpected token `(' |
#);
bash: syntax error near unexpected token `)' |
#touch 1.sql
|
#touch 1.sql < 1.sql
|
#nano 1.sql
--- /tmp/l3-saved-3605.13253.29422 2012-10-26 15:11:08.843814434 +0300 +++ 1.sql 2012-10-26 15:11:19.367814293 +0300 @@ -0,0 +1,21 @@ +CREATE DATABASE asterisk; +USE asterisk; +CREATE TABLE `asterisk`.`cdr` ( + `calldate` datetime NOT NULL default '0000-00-00 00:00:00', + `clid` varchar(80) NOT NULL default '', + `src` varchar(80) NOT NULL default '', + `dst` varchar(80) NOT NULL default '', + `dcontext` varchar(80) NOT NULL default '', + `channel` varchar(80) NOT NULL default '', + `dstchannel` varchar(80) NOT NULL default '', + `lastapp` varchar(80) NOT NULL default '', + `lastdata` varchar(80) NOT NULL default '', + `duration` int(11) NOT NULL default '0', + `billsec` int(11) NOT NULL default '0', + `disposition` varchar(45) NOT NULL default '', + `amaflags` int(11) NOT NULL default '0', + `accountcode` varchar(20) NOT NULL default '', + `uniqueid` varchar(32) NOT NULL default '', + `userfield` varchar(255) NOT NULL default '' +); + |
#CREATE DATABASE asterisk;
Enter password: |
#mysql -u root -p
Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 43 Server version: 5.1.63-0+squeeze1 (Debian) Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> use asterisk Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> exit Bye |
#cat /etc/asterisk/create-asterisk-db.sql
![]() cat: /etc/asterisk/create-asterisk-db.sql: Нет такого файла или каталога |
#mysql -u root -p
![]() Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 44 Server version: 5.1.63-0+squeeze1 (Debian) Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> use asterisk Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> select * from cdrggg -> -> -> -> ^CCtrl-C -- exit! Aborted |
#mysql -u root -p
![]() Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 45 Server version: 5.1.63-0+squeeze1 (Debian) Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> select * from cdr -> -> -> -> ^CCtrl-C -- exit! Aborted |
#mysql -u root -p
Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 46 Server version: 5.1.63-0+squeeze1 (Debian) Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> select * from cdr; ERROR 1046 (3D000): No database selected mysql> use asterisk Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> select * from cdr; Empty set (0.00 sec) mysql> exit Bye |
#apt-get install asterisk-mysql
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово НОВЫЕ пакеты, которые будут установлены: asterisk-mysql обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 3 пакетов не обновлено. Необходимо скачать 47,4 kБ архивов. После данной операции, объём занятого дискового пространства возрастёт на 176 kB. Получено:1 http://192.168.15.254/debian/ squeeze/main asterisk-mysql i386 1.6.2.1-1 [47,4 kB] Получено 47,4 kБ за 0с (2.212 kБ/c) Выбор ранее не выбранного пакета asterisk-mysql. (Чтение базы данных ... на данный момент установлено 135219 файлов и каталогов.) Распаковывается пакет asterisk-mysql (из файла .../asterisk-mysql_1.6.2.1-1_i386.deb)... Настраивается пакет asterisk-mysql (1.6.2.1-1) ... |
#mysql -u root -p
![]() Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) |
#mysql -u root -p
![]() Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) |
#mysql -u root -p
![]() Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) |
#mysql -u root -p
![]() Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) |
#mysql -u root -p
![]() Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) |
#mysql -u root -p
Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 52 Server version: 5.1.63-0+squeeze1 (Debian) Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> mysql> mysql> exit Bye |
#wc -l /etc/asterisk/cdr_mysql.conf
61 /etc/asterisk/cdr_mysql.conf |
#vim /etc/asterisk//cdr_mysql.conf
|
#;alias lastdata => lastdata
![]() |
#wc -l /etc/asterisk/cdr_mysql.conf
;password=rootpass usertic "<value>" => <column> ;port=3306rvar> => <column> socks start => calldate ;lias callerid => clid ; If you need your CDRs recorded in GMT instead of local time [ ] ;usegmtime=yesdst ;alias dcontext => dcontext ; If your system's locale differs from mysql database character set, ... ;static "<value>" => <column> ;alias <cdrvar> => <column> ;alias src => src ;alias dst => dst ;alias dcontext => dcontext ;alias channel => channel ;alias dstchannel => dstchannel ;alias lastapp => lastapp ;alias lastdata => lastdata "/etc/asterisk/cdr_mysql.conf" 61L, 1955C записано |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -r
![]() Asterisk 1.6.2.9-2+squeeze8, 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. ========================================================================= Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?) |