/l3/users/sergey-tymku-public/nt-voip-2014-apr/debian5/root :1 :2 :3 :4 :5 :6 |
|
#tail -F /var/log/asterisk/
![]() tail: error reading `/var/log/asterisk/': Is a directory tail: /var/log/asterisk/: cannot follow end of this type of file; giving up on this name ^[[A^[[A^Z [1]+ Stopped tail -F /var/log/asterisk/ |
#tail -F /var/log/asterisk/
![]() cdr-csv/ cdr-custom/ messages queue_log |
#tail -F /var/log/asterisk/messages
[Apr 26 10:57:59] NOTICE[15891] pbx_spool.c: Call failed to go through, reason (0) Call Failure (not BUSY, and not NO_ANSWER, maybe Circuit busy or down?) [Apr 26 10:57:59] NOTICE[15891] pbx_spool.c: Queued call to SIP/2102 expired without completion after 0 attempts [Apr 26 11:12:00] NOTICE[15995] pbx_spool.c: Call failed to go through, reason (5) Remote end is Busy [Apr 26 11:12:00] NOTICE[15995] pbx_spool.c: Queued call to SIP/graz/2101 expired without completion after 0 attempts [Apr 26 11:12:22] ERROR[16027] netsock2.c: getaddrinfo("vienna", "(null)", ...): No address associated with hostname [Apr 26 11:12:22] WARNING[16027] chan_sip.c: No such host: vienna [Apr 26 11:12:22] NOTICE[16027] channel.c: Unable to request channel SIP/vienna/2201 [Apr 26 11:12:22] NOTICE[16027] pbx_spool.c: Call failed to go through, reason (0) Call Failure (not BUSY, and not NO_ANSWER, maybe Circuit busy or down?) [Apr 26 11:12:22] NOTICE[16027] pbx_spool.c: Queued call to SIP/vienna/2201 expired without completion after 0 attempts [Apr 26 11:12:59] NOTICE[16059] pbx_spool.c: Call completed to SIP/2201 [Apr 26 11:17:14] NOTICE[16212] pbx_spool.c: Call completed to SIP/2201 ^C |
#ls /etc/asterisk/*dahdi*
/etc/asterisk/chan_dahdi.conf |
#cat /etc/asterisk/chan_
![]() chan_dahdi.conf chan_mobile.conf chan_ooh323.conf |
#cat /etc/asterisk/chan_dahdi.conf
; ; DAHDI Telephony Configuration file ; ; You need to restart Asterisk to re-configure the DAHDI channel ; CLI> module reload chan_dahdi.so ; will reload the configuration file, but not all configuration options ; are re-configured during a reload (signalling, as well as PRI and ; SS7-related settings cannot be changed on a reload). ; ; This file documents many configuration variables. Normally unless you know ... ; ; ;[fax](phones) ;dahdichan = 2 ;faxdetect = no ;context = fax ; ;[phone-3](phones) ;dahdichan = 3 ;pickupgroup = 3,4 |
#;
![]() extensions.conf extensions.conf.1 extensions.conf.local extensions.conf.SAVED |
#vi /etc/asterisk/extensions.conf
|
#./
![]() l3script: ./: Is a directory |
#ls >?
|
#ls ./
all asterisk-core-sounds-ru-wav-current.tar.gz copy_ssh dfdfadf install q |
#svn checkout http://chan-datacard.googlecode.com/svn/trunk datacard
A datacard/__helpers.c A datacard/__char_conv.c A datacard/configure A datacard/chan_datacard.h A datacard/Makefile.in A datacard/__cli.c A datacard/COPYRIGHT.txt A datacard/__channel.c A datacard/__manager.c A datacard/__at_fifo_queue.c ... A datacard/__at_response.c A datacard/__ringbuffer.c A datacard/README.txt A datacard/etc A datacard/etc/datacard.conf A datacard/__ringbuffer.h A datacard/chan_datacard.c A datacard/__at_parse.c A datacard/__at_read.c Checked out revision 191. |
#cd datacard/
|
#./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 chan_datacard.c:30:22: fatal error: asterisk.h: No such file or directory compilation terminated. make: *** [chan_datacard.o] Error 1 |
#apr-get install asterisk-dev
![]() l3script: apr-get: command not found |
#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 6 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://ftp.us.debian.org/debian/ wheezy/main asterisk-dev all 1:1.8.13.1~dfsg1-3+deb7u3 [959 kB] Fetched 959 kB in 2s (367 kB/s) Selecting previously unselected package asterisk-dev. (Reading database ... 136922 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) ... |
#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/ |
#ls
__app.c __at_send.c __channel.c etc __manager.c __at_fifo_queue.c chan_datacard.c __char_conv.c __helpers.c __memmem.c __at_parse.c chan_datacard.h __cli.c LICENSE.txt README.txt __at_read.c chan_datacard.o configure Makefile __ringbuffer.c __at_response.c chan_datacard.so COPYRIGHT.txt Makefile.in __ringbuffer.h |
#cd
![]() __app.c chan_datacard.c __cli.c Makefile __ringbuffer.h __at_fifo_queue.c chan_datacard.h configure Makefile.in .svn/ __at_parse.c chan_datacard.o COPYRIGHT.txt __manager.c __at_read.c chan_datacard.so etc/ __memmem.c __at_response.c __channel.c __helpers.c README.txt __at_send.c __char_conv.c LICENSE.txt __ringbuffer.c |
#cd
![]() __app.c chan_datacard.c __cli.c Makefile __ringbuffer.h __at_fifo_queue.c chan_datacard.h configure Makefile.in .svn/ __at_parse.c chan_datacard.o COPYRIGHT.txt __manager.c __at_read.c chan_datacard.so etc/ __memmem.c __at_response.c __channel.c __helpers.c README.txt __at_send.c __char_conv.c LICENSE.txt __ringbuffer.c |
#cd ./etc/datacard.conf
![]() l3script: cd: ./etc/datacard.conf: Not a directory |
#ls ./etc/datacard.conf
./etc/datacard.conf |
#cp ./etc/datacard.conf /etc/asterisk/
|
#ls /etc/asterisk/datacard.conf
/etc/asterisk/datacard.conf |
#./c
![]() chan_datacard.so configure |
#./c
![]() chan_datacard.so configure |
#./configure
configure complete, now type 'make' |
#make clean
|
#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/ |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#vi /etc/asterisk/datacard.conf
|
#vi /etc/asterisk/datacard.conf
--- /tmp/l3-saved-13163.861.1664 2014-04-26 13:34:43.533598574 +0300 +++ /etc/asterisk/datacard.conf 2014-04-26 13:38:31.293602851 +0300 @@ -48,8 +48,8 @@ [datacard0](E1550_t) -audio=/dev/ttyUSB0 ; tty for audio connection -data=/dev/ttyUSB1 ; tty for AT commands +audio=/dev/ttyUSB1 ; tty for audio connection +data=/dev/ttyUSB2 ; tty for AT commands group=1 ; calling group ;[datacard1] |
#vi /etc/asterisk/datacard.conf
--- /tmp/l3-saved-13163.22920.5660 2014-04-26 13:51:56.309617963 +0300 +++ /etc/asterisk/datacard.conf 2014-04-26 13:58:49.573625722 +0300 @@ -47,10 +47,10 @@ u2diag=0 ; set U2DIAG parameter (0 = disable everything except modem function) -[datacard0](E1550_t) -audio=/dev/ttyUSB1 ; tty for audio connection -data=/dev/ttyUSB2 ; tty for AT commands -group=1 ; calling group +;[datacard0](E1550_t) +;audio=/dev/ttyUSB1 ; tty for audio connection +;data=/dev/ttyUSB2 ; tty for AT commands +;group=1 ; calling group ;[datacard1] ;context=incoming-datacard ; context for incoming calls |
#apt-get install usb-modemswitsh
![]() Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package usb-modemswitsh |
#apt-get install usb-modeswitsh
![]() Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package usb-modeswitsh |
#apt-get install usb-modeswitch
Reading package lists... Done Building dependency tree Reading state information... Done usb-modeswitch is already the newest version. usb-modeswitch set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded. |
#apt-cache list usb-modeswitch
![]() E: Invalid operation list |
#apt-cache
apt 0.9.7.9 for amd64 compiled on Nov 16 2013 12:41:38 Usage: apt-cache [options] command apt-cache [options] showpkg pkg1 [pkg2 ...] apt-cache [options] showsrc pkg1 [pkg2 ...] apt-cache is a low-level tool used to query information from APT's binary cache files Commands: gencaches - Build both the package and source cache showpkg - Show some general information for a single package showsrc - Show source records ... policy - Show policy settings Options: -h This help text. -p=? The package cache. -s=? The source cache. -q Disable progress indicator. -i Show only important deps for the unmet command. -c=? Read this configuration file -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp See the apt-cache(8) and apt.conf(5) manual pages for more information. |
#apt-cache
apt 0.9.7.9 for amd64 compiled on Nov 16 2013 12:41:38 Usage: apt-cache [options] command apt-cache [options] showpkg pkg1 [pkg2 ...] apt-cache [options] showsrc pkg1 [pkg2 ...] apt-cache is a low-level tool used to query information from APT's binary cache files Commands: gencaches - Build both the package and source cache showpkg - Show some general information for a single package showsrc - Show source records ... policy - Show policy settings Options: -h This help text. -p=? The package cache. -s=? The source cache. -q Disable progress indicator. -i Show only important deps for the unmet command. -c=? Read this configuration file -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp See the apt-cache(8) and apt.conf(5) manual pages for more information. |
#apt-cache showsrc usb-modeswitch
Package: usb-modeswitch Binary: usb-modeswitch Version: 1.2.3+repack0-1 Maintainer: Didier Raboud <odyx@debian.org> Build-Depends: debhelper (>= 8.9.0~), libusb-dev, jimsh, libjim-dev Architecture: any Standards-Version: 3.9.2 Format: 3.0 (quilt) Files: dab5eebb782fb5b077c508c5a74150e1 1814 usb-modeswitch_1.2.3+repack0-1.dsc ... Checksums-Sha256: c754a67a4898f19071635d16c688667129e7587bec1cd1c649466d68322a901f 1814 usb-modeswitch_1.2.3+repack0-1.dsc f429ae027c0877bb9bb1a3cdc0be3b092136b79fc9b0e78b234b5dc4c0978af6 38909 usb-modeswitch_1.2.3+repack0.orig.tar.bz2 445a55d8c2fb5aed1e71953a3ffca63eff7da8af188a4c2417503f5756b47b33 9838 usb-modeswitch_1.2.3+repack0-1.debian.tar.gz Homepage: http://www.draisberghof.de/usb_modeswitch/ Package-List: usb-modeswitch deb comm extra Directory: pool/main/u/usb-modeswitch Priority: source Section: comm |
#apt-cache
apt 0.9.7.9 for amd64 compiled on Nov 16 2013 12:41:38 Usage: apt-cache [options] command apt-cache [options] showpkg pkg1 [pkg2 ...] apt-cache [options] showsrc pkg1 [pkg2 ...] apt-cache is a low-level tool used to query information from APT's binary cache files Commands: gencaches - Build both the package and source cache showpkg - Show some general information for a single package showsrc - Show source records ... policy - Show policy settings Options: -h This help text. -p=? The package cache. -s=? The source cache. -q Disable progress indicator. -i Show only important deps for the unmet command. -c=? Read this configuration file -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp See the apt-cache(8) and apt.conf(5) manual pages for more information. |
#apt-cache dump usb-modeswitch
![]() Using Versioning System: Standard .deb Package: libuuidm-ocaml-dev Version: 0.9.4-1 File: /var/lib/apt/lists/ftp.us.debian.org_debian_dists_wheezy_main_binary-amd64_Packages Depends: ocaml-nox-3.12.1 (null) Depends: libc6 2.7 Depends: ocaml-findlib (null) Description Language: File: /var/lib/apt/lists/ftp.us.debian.org_debian_dists_wheezy_main_binary-amd64_Packages MD5: 70445dff26b9433b873d0812f1164777 ... Version: 6.2.0-1 File: /var/lib/apt/lists/ftp.us.debian.org_debian_dists_wheezy_main_binary-amd64_Packages Depends: cl-sql 6.2.0-1 Depends: unixodbc-dev (null) Depends: cl-sql-mysql (null) Depends: cl-sql-postgresql (null) Depends: acl-pro-installer (null) Description Language: File: /var/lib/apt/lists/ftp.us.debian.org_debian_dists_wheezy_main_binary-amd64_Packages MD5: e0c127b2b735addb19b5fe086d91e62a |
#apt-cache dump
![]() Using Versioning System: Standard .deb Package: libuuidm-ocaml-dev Version: 0.9.4-1 File: /var/lib/apt/lists/ftp.us.debian.org_debian_dists_wheezy_main_binary-amd64_Packages Depends: ocaml-nox-3.12.1 (null) Depends: libc6 2.7 Depends: ocaml-findlib (null) Description Language: File: /var/lib/apt/lists/ftp.us.debian.org_debian_dists_wheezy_main_binary-amd64_Packages MD5: 70445dff26b9433b873d0812f1164777 ... Depends: tftpd-hpa (null) Description Language: File: /var/lib/apt/lists/ftp.us.debian.org_debian_dists_wheezy_main_binary-amd64_Packages MD5: 851985a9c3c6b9ebfe84ece1752a78eb Description Language: en File: /var/lib/apt/lists/ftp.us.debian.org_debian_dists_wheezy_main_i18n_Translation-en MD5: 851985a9c3c6b9ebfe84ece1752a78eb Package: console-setup-freebsd Version: 1.88 File: /var/lib/apt/lists/ftp.us.debian.org_debian_dists_wheezy_main_binary-amd64_Packages |
#mod
![]() modem-manager modinfo modprobe module-assistant |
#usb-devices
![]() usb-devices |
#usb
![]() usb-devices usb_modeswitch usbmuxd usbhid-dump usb_modeswitch_dispatcher |
#usb_modeswitch
![]() Usage: usb_modeswitch [<params>] [-c filename] -h, --help this help -e, --version print version information and exit -v, --default-vendor NUM vendor ID of original mode (mandatory) -p, --default-product NUM product ID of original mode (mandatory) -V, --target-vendor NUM target mode vendor ID (optional) -P, --target-product NUM target mode product ID (optional) -C, --target-class NUM target mode device class (optional) -b, --busnum NUM system bus number of device (for hard ID) -g, --devnum NUM system device number (for hard ID) ... -c, --config-file <filename> load long configuration from file -t, --stdinput read long configuration from stdin -f, --long-config <text> get long configuration from string -i, --interface NUM select initial USB interface (default 0) -u, --configuration NUM select USB configuration -a, --altsetting NUM select alternative USB interface setting * usb_modeswitch: handle USB devices with multiple modes * Version 1.2.3 (C) Josua Dietze 2012 * Based on libusb0 (0.1.12 and above) ! PLEASE REPORT NEW CONFIGURATIONS ! |
#usb_modeswitch -v
![]() usb_modeswitch: option requires an argument -- 'v' Usage: usb_modeswitch [<params>] [-c filename] -h, --help this help -e, --version print version information and exit -v, --default-vendor NUM vendor ID of original mode (mandatory) -p, --default-product NUM product ID of original mode (mandatory) -V, --target-vendor NUM target mode vendor ID (optional) -P, --target-product NUM target mode product ID (optional) -C, --target-class NUM target mode device class (optional) -b, --busnum NUM system bus number of device (for hard ID) ... -W, --verbose print all settings and debug output -D, --sysmode specific result and syslog message -s, --success <seconds> switching result check with timeout -I, --no-inquire do not get SCSI attributes (default on) -c, --config-file <filename> load long configuration from file -t, --stdinput read long configuration from stdin -f, --long-config <text> get long configuration from string -i, --interface NUM select initial USB interface (default 0) -u, --configuration NUM select USB configuration -a, --altsetting NUM select alternative USB interface setting |
#usb_modeswitch | less
|
#apt-get
![]() __app.c chan_datacard.c __cli.c Makefile __ringbuffer.h __at_fifo_queue.c chan_datacard.h configure Makefile.in .svn/ __at_parse.c chan_datacard.o COPYRIGHT.txt __manager.c __at_read.c chan_datacard.so etc/ __memmem.c __at_response.c __channel.c __helpers.c README.txt __at_send.c __char_conv.c LICENSE.txt __ringbuffer.c |
#apt-get
apt 0.9.7.9 for amd64 compiled on Nov 16 2013 12:41:41 Usage: apt-get [options] command apt-get [options] install|remove pkg1 [pkg2 ...] apt-get [options] source pkg1 [pkg2 ...] apt-get is a simple command line interface for downloading and installing packages. The most frequently used commands are update and install. Commands: update - Retrieve new lists of packages upgrade - Perform an upgrade ... -f Attempt to correct a system with broken dependencies in place -m Attempt to continue if archives are unlocatable -u Show a list of upgraded packages as well -b Build the source package after fetching it -V Show verbose version numbers -c=? Read this configuration file -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp See the apt-get(8), sources.list(5) and apt.conf(5) manual pages for more information and options. This APT has Super Cow Powers. |
#apt-get | less
|
#vi /etc/asterisk/datacard.conf
--- /tmp/l3-saved-13163.24769.16775 2014-04-26 14:25:13.233655453 +0300 +++ /etc/asterisk/datacard.conf 2014-04-26 14:26:12.197656560 +0300 @@ -47,10 +47,10 @@ u2diag=0 ; set U2DIAG parameter (0 = disable everything except modem function) -[datacard0](E1550_t) -audio=/dev/ttyUSB1 ; tty for audio connection -data=/dev/ttyUSB2 ; tty for AT commands -group=1 ; calling group +;[datacard0](E1550_t) +;audio=/dev/ttyUSB1 ; tty for audio connection +;data=/dev/ttyUSB2 ; tty for AT commands +;group=1 ; calling group ;[datacard1] ;context=incoming-datacar |