ВидеоКонф(ВКС)  ::   FAQ  ::   Поиск  ::   Регистрация  ::   Вход

Помогите установить chan_dongle

Новичком считается только что прочитавший «Астериск - будущее телефонии»
http://asterisk.ru/knowledgebase/books
и пытающийся сделать большее

Модераторы: april22, Zavr2008

Помогите установить chan_dongle

Сообщение FarshikARC » 18 апр 2022, 15:46

Кратко. Рухнула старая АТСка, собирал ее давно, по этому ни чего не помню. Есть 2 модема E171. Провлема при установке chan_dongle. Скачивал его разные версии результат везде 1. Астериск установлена на Ubuntu 20.4 (server). С репозитория. Тупо apt install astertisk. PBX мне не нужен. Версия астериск 16.2.1.
скачивал разные модули.
Последний раз от сюда https://github.com/haha8x/asterisk-chan-dongle-16
По началу не распаковывались пакеты. Но в итоге дошел до следующего результата
[Показать] Спойлер:
root@ats:~# cd ..
root@ats:/# cd 123
root@ats:/123# cd asterisk-chan-dongle-16
root@ats:/123/asterisk-chan-dongle-16# ./bootstrap
root@ats:/123/asterisk-chan-dongle-16# ./configure --with-astversion=13.7
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... none
checking how to run the C preprocessor... gcc -E
checking for strip... strip
checking for rm... rm
checking for library containing iconv... none required
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking whether asterisk.h in ../include... no
checking whether asterisk.h in /usr/include... yes
checking asterisk.h usability... no
checking asterisk.h presence... no
checking for asterisk.h... no
checking whether iconv.h in /usr/include... yes
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking for iconv use const inbuf... no
checking for iconv_t in iconv.h... yes
checking for AST_CONTROL_SRCCHANGE in asterisk/frame.h... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for size_t... yes
checking for ssize_t... yes
checking for uint64_t... yes
checking whether CC supports -fvisibility=hidden... yes
checking whether CC supports -fPIC... yes
checking whether CC supports -Wall... yes
checking whether CC supports -Wextra... yes
checking whether CC supports -MD -MT conftest.o -MF /dev/null -MP... yes
checking whether DESTDIR is /usr/lib/asterisk/modules... yes
checking for working memcmp... yes
checking for memchr... yes
checking for memmove... yes
checking for memset... yes
checking for memmem... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strncasecmp... yes
checking for strtol... yes
checking for realpath... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating stamp-h
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
root@ats:/123/asterisk-chan-dongle-16# ./configure --with-astversion=16.2.1
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... none
checking how to run the C preprocessor... gcc -E
checking for strip... strip
checking for rm... rm
checking for library containing iconv... none required
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking whether asterisk.h in ../include... no
checking whether asterisk.h in /usr/include... yes
checking asterisk.h usability... no
checking asterisk.h presence... no
checking for asterisk.h... no
checking whether iconv.h in /usr/include... yes
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking for iconv use const inbuf... no
checking for iconv_t in iconv.h... yes
checking for AST_CONTROL_SRCCHANGE in asterisk/frame.h... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for size_t... yes
checking for ssize_t... yes
checking for uint64_t... yes
checking whether CC supports -fvisibility=hidden... yes
checking whether CC supports -fPIC... yes
checking whether CC supports -Wall... yes
checking whether CC supports -Wextra... yes
checking whether CC supports -MD -MT conftest.o -MF /dev/null -MP... yes
checking whether DESTDIR is /usr/lib/asterisk/modules... yes
checking for working memcmp... yes
checking for memchr... yes
checking for memmove... yes
checking for memset... yes
checking for memmem... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strncasecmp... yes
checking for strtol... yes
checking for realpath... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating stamp-h
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
root@ats:/123/asterisk-chan-dongle-16# make
gcc -g -O2 -O6 -Wno-old-style-declaration -I. -DAST_MODULE_SELF_SYM=__internal_chan_dongle_self -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT app.o -MF .app.o.d -MP -o app.o -c app.c
gcc -g -O2 -O6 -Wno-old-style-declaration -I. -DAST_MODULE_SELF_SYM=__internal_chan_dongle_self -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT at_command.o -MF .at_command.o.d -MP -o at_command.o -c at_command.c
gcc -g -O2 -O6 -Wno-old-style-declaration -I. -DAST_MODULE_SELF_SYM=__internal_chan_dongle_self -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT at_parse.o -MF .at_parse.o.d -MP -o at_parse.o -c at_parse.c
gcc -g -O2 -O6 -Wno-old-style-declaration -I. -DAST_MODULE_SELF_SYM=__internal_chan_dongle_self -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT at_queue.o -MF .at_queue.o.d -MP -o at_queue.o -c at_queue.c
gcc -g -O2 -O6 -Wno-old-style-declaration -I. -DAST_MODULE_SELF_SYM=__internal_chan_dongle_self -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT at_read.o -MF .at_read.o.d -MP -o at_read.o -c at_read.c
gcc -g -O2 -O6 -Wno-old-style-declaration -I. -DAST_MODULE_SELF_SYM=__internal_chan_dongle_self -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT at_response.o -MF .at_response.o.d -MP -o at_response.o -c at_response.c
gcc -g -O2 -O6 -Wno-old-style-declaration -I. -DAST_MODULE_SELF_SYM=__internal_chan_dongle_self -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT chan_dongle.o -MF .chan_dongle.o.d -MP -o chan_dongle.o -c chan_dongle.c
chan_dongle.c: In function ‘lock_try’:
chan_dongle.c:119:47: warning: ‘%s’ directive output may be truncated writing up to 4095 bytes into a region of size 1009 [-Wformat-truncation=]
119 | return snprintf(buf, length, "/var/lock/LCK..%s", basename);
| ^~
In file included from /usr/include/stdio.h:867,
from /usr/include/asterisk/compat.h:49,
from /usr/include/asterisk.h:22,
from ast_config.h:10,
from chan_dongle.c:34:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 16 and 4111 bytes into a destination of size 1024
67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -g -O2 -O6 -Wno-old-style-declaration -I. -DAST_MODULE_SELF_SYM=__internal_chan_dongle_self -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT channel.o -MF .channel.o.d -MP -o channel.o -c channel.c
gcc -g -O2 -O6 -Wno-old-style-declaration -I. -DAST_MODULE_SELF_SYM=__internal_chan_dongle_self -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT char_conv.o -MF .char_conv.o.d -MP -o char_conv.o -c char_conv.c
gcc -g -O2 -O6 -Wno-old-style-declaration -I. -DAST_MODULE_SELF_SYM=__internal_chan_dongle_self -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT cli.o -MF .cli.o.d -MP -o cli.o -c cli.c
gcc -g -O2 -O6 -Wno-old-style-declaration -I. -DAST_MODULE_SELF_SYM=__internal_chan_dongle_self -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT helpers.o -MF .helpers.o.d -MP -o helpers.o -c helpers.c
helpers.c: In function ‘send_reset’:
helpers.c:158:111: warning: cast between incompatible function types from ‘int (*)(struct cpvt *)’ to ‘int (*)(struct cpvt *, const char *, const char *, unsigned int, int, void **)’ [-Wcast-function-type]
158 | return send2(dev_name, status, 0, "Error adding reset command to queue", "Reset command queued for execute", (at_cmd_f)at_enque_reset, 0, 0, 0, 0, NULL);
| ^
helpers.c: In function ‘send_ccwa_set’:
helpers.c:164:119: warning: cast between incompatible function types from ‘int (*)(struct cpvt *, const char *, const char *, unsigned int)’ to ‘int (*)(struct cpvt *, const char *, const char *, unsigned int, int, void **)’ [-Wcast-function-type]
164 | return send2(dev_name, status, 1, "Error adding CCWA commands to queue", "Call-Waiting commands queued for execute", (at_cmd_f)at_enque_set_ccwa, 0, 0, enable, 0, NULL);
| ^
helpers.c: In function ‘send_at_command’:
helpers.c:170:88: warning: cast between incompatible function types from ‘int (*)(struct cpvt *, const char *)’ to ‘int (*)(struct cpvt *, const char *, const char *, unsigned int, int, void **)’ [-Wcast-function-type]
170 | return send2(dev_name, NULL, 0, "Error adding command", "Command queued for execute", (at_cmd_f)at_enque_user_cmd, command, NULL, 0, 0, NULL);
| ^
gcc -g -O2 -O6 -Wno-old-style-declaration -I. -DAST_MODULE_SELF_SYM=__internal_chan_dongle_self -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT manager.o -MF .manager.o.d -MP -o manager.o -c manager.c
gcc -g -O2 -O6 -Wno-old-style-declaration -I. -DAST_MODULE_SELF_SYM=__internal_chan_dongle_self -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT memmem.o -MF .memmem.o.d -MP -o memmem.o -c memmem.c
gcc -g -O2 -O6 -Wno-old-style-declaration -I. -DAST_MODULE_SELF_SYM=__internal_chan_dongle_self -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT ringbuffer.o -MF .ringbuffer.o.d -MP -o ringbuffer.o -c ringbuffer.c
gcc -g -O2 -O6 -Wno-old-style-declaration -I. -DAST_MODULE_SELF_SYM=__internal_chan_dongle_self -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT cpvt.o -MF .cpvt.o.d -MP -o cpvt.o -c cpvt.c
gcc -g -O2 -O6 -Wno-old-style-declaration -I. -DAST_MODULE_SELF_SYM=__internal_chan_dongle_self -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT dc_config.o -MF .dc_config.o.d -MP -o dc_config.o -c dc_config.c
gcc -g -O2 -O6 -Wno-old-style-declaration -I. -DAST_MODULE_SELF_SYM=__internal_chan_dongle_self -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT pdu.o -MF .pdu.o.d -MP -o pdu.o -c pdu.c
gcc -g -O2 -O6 -Wno-old-style-declaration -I. -DAST_MODULE_SELF_SYM=__internal_chan_dongle_self -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT mixbuffer.o -MF .mixbuffer.o.d -MP -o mixbuffer.o -c mixbuffer.c
gcc -g -O2 -O6 -Wno-old-style-declaration -I. -DAST_MODULE_SELF_SYM=__internal_chan_dongle_self -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT pdiscovery.o -MF .pdiscovery.o.d -MP -o pdiscovery.o -c pdiscovery.c
gcc -shared -Xlinker -x -o chan_dongle.so app.o at_command.o at_parse.o at_queue.o at_read.o at_response.o chan_dongle.o channel.o char_conv.o cli.o helpers.o manager.o memmem.o ringbuffer.o cpvt.o dc_config.o pdu.o mixbuffer.o pdiscovery.o
root@ats:/123/asterisk-chan-dongle-16# make install
strip chan_dongle.so

но астериск так и не признает модуль. channel.c:6137 request_channel: No channel type registered for 'Dongle'
Чтобы голова не болела. Надо думать!!! А не делать вид, и жить инстинктами
FarshikARC
 
Сообщений: 12
Зарегистрирован: 14 ноя 2018, 20:26

Re: Помогите установить chan_dongle

Сообщение ded » 18 апр 2022, 21:34

Не видно чтобы вы загрузили собранный канал в работающий Астериск
Код: выделить все
CLI> module load chan_dongle.so
ded
 
Сообщений: 15801
Зарегистрирован: 26 авг 2010, 19:00

Re: Помогите установить chan_dongle

Сообщение FarshikARC » 19 апр 2022, 11:29

Ор. Все заработало. На такой мелочи споткнулся. спс помогло.
Чтобы голова не болела. Надо думать!!! А не делать вид, и жить инстинктами
FarshikARC
 
Сообщений: 12
Зарегистрирован: 14 ноя 2018, 20:26

Re: Помогите установить chan_dongle

Сообщение FarshikARC » 19 апр 2022, 11:32

Мало ли кто наткется. Если у вас не будет собираться модуль.
Проверьте стоит ли у вас asterisk-devel
Если нет установите
Код: выделить все
apt install asterisk-devel
Чтобы голова не болела. Надо думать!!! А не делать вид, и жить инстинктами
FarshikARC
 
Сообщений: 12
Зарегистрирован: 14 ноя 2018, 20:26

Re: Помогите установить chan_dongle

Сообщение Zavr2008 » 19 апр 2022, 12:42

Тут нужно понимать вот что - это модуль В asterisk, соответственно без разницы вы собрали сами астер или поставили из пакета нужно чтобы кодовая база сборки была одинакова.
модуль использует инклюды самого астера, поскольку это канальный драйвер итп.

Поэтому именно asterisk-devel или что-то подобное, плюс правильные опции из make menuconfig в помощь.
Российские шлюзы E1 Alvis-GW. Модернизация УПАТС с E1, Установка FreePBX, Системы антифрод "в разрыв" потоков E1 PRI / SS#7 ISUP.
Аватар пользователя
Zavr2008
 
Сообщений: 2158
Зарегистрирован: 27 янв 2011, 01:35


Вернуться в Вопросы новичков

Кто сейчас на форуме

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 26

© 2008 — 2024 Asterisk.ru
Digium, Asterisk and AsteriskNOW are registered trademarks of Digium, Inc.
Design and development by PostMet-Netzwerk GmbH