Asterisk 13 + chan_dongle. Уточнения

По следам заметки chan_dongle + asterisk 10
Текущая версия dongle уже не поддерживается на сайте google
Форк можно взять тут https://github.com/bg111/asterisk-chan-dongle
Особо ничего не поменялось.
Собирать будем под Asterisk 13.7

Asterisk 13.7.0, Copyright (C) 1999 - 2014, Digium, Inc. and others

Читати далі

Mysql: errno: 24 – Too many open files) (1018)

При создании бекапа выскочина ошибка

mysqldump: Couldn't execute 'SHOW TRIGGERS LIKE 'logs'': Can't read dir of './mydatabase/' (errno: 24 - Too many open files) (1018)

Хотя в limits.conf указано значение 30000 и в my.cnf

open-files-limit = 20000

И процесс запущен с правильными параметрами

/usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/lib/mysql/error.log --open-files-limit=20000 --pid-file=/var/run/mysql.run  --port=3306

Читати далі

Error install nokogiri

Fetching: mini_portile-0.6.2.gem (100%)
Fetching: nokogiri-1.6.6.3.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing nokogiri:
	ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.9.1 extconf.rb
checking if the C compiler accepts ... yes
Building nokogiri using packaged libraries.
checking for gzdopen() in -lz... no
zlib is missing; necessary for building libxml2
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
	--with-opt-dir
	--without-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/usr/bin/ruby1.9.1
	--help
	--clean
	--use-system-libraries
	--enable-static
	--disable-static
	--with-zlib-dir
	--without-zlib-dir
	--with-zlib-include
	--without-zlib-include=${zlib-dir}/include
	--with-zlib-lib
	--without-zlib-lib=${zlib-dir}/lib
	--enable-cross-build
	--disable-cross-build


Gem files will remain installed in /var/lib/gems/1.9.1/gems/nokogiri-1.6.6.3 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/nokogiri-1.6.6.3/ext/nokogiri/gem_make.out

Fix

Читати далі

Telegram Bot on ruby

apt-get install ruby gem ruby-dev make gem install telegram-bot-ruby Теперь необходимо получить токен для бота. Заходим в Telegram, добавляем бота @BotFather, и создаем бота: So, let’s write to out bot and get updates curl -s -X POST https://api.telegram.org/botNNNNN:NZNZNNZNZNZNNZNZ/getUpdates And we have: {“ok”:true,”result”:[{“update_id”:923096141, “message”:{“message_id”:2130,”from”:{“id”:,”first_name”:””,”username”:””},”chat”:{“id”:,”first_name”:””,”username”:””,”type”:”private”},”date”:1447842513,”text”:”test”}}]} # encoding: utf-8 # require ‘telegram/bot’ #require_relative ‘getimg’ token = ‘NNNNNN:XNXNXNXNXNXNXNXNX’ #inputMess … Читати далі

ESP8266 first launch in Linux Mint

esp8266-01 pin
esp8266-01 pin

For flashing firmware you need connect GPIO0 to GND and CH_PD to VCC
I have this TTL converter

Bus 003 Device 026: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port

But they have 5v output, so i used 5v to 3.3v converter

5v-to-3.3v
5v-to-3.3v

Prepare notebook for flashing
Go to https://github.com/themadinventor/esptool
and download esptool

wget https://github.com/themadinventor/esptool/archive/master.zip

install Python pip

apt-get -y install python-pip

Inzip our master.zip

unzip esptool-master.zip

Run installing dependency

python setup.py install

Читати далі