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

Проблема с chan_datacard

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

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

Проблема с chan_datacard

Сообщение Menjoy » 21 июн 2012, 12:45

Добрый день.

Версия Asterisk 10.6.0-rc1.
Пытаюсь установить модуль chan_datacard выдает следующие ошибки и модуль в /usr/lib/asterisk/ не появляется:

Код: выделить все
]0;root@Aster: ~root@Aster:~# cd ~/chan_datacard/
]0;root@Aster: ~/chan_datacardroot@Aster:~/chan_datacard# ./configure
configure complete, now type 'make'
]0;root@Aster: ~/chan_datacardroot@Aster:~/chan_datacard# 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
In file included from chan_datacard.c:73:0:
chan_datacard.h:224:60: error: unknown type name ‘format_t’
chan_datacard.h:251:2: warning: initialization makes pointer from integer without a cast [enabled by default]
chan_datacard.h:251:2: warning: (near initialization for ‘channel_tech.capabilities’) [enabled by default]
chan_datacard.h:252:16: error: ‘channel_request’ undeclared here (not in a function)
In file included from chan_datacard.c:82:0:
__app.c: In function ‘app_status_exec’:
__app.c:21:2: warning: missing initializer [-Wmissing-field-initializers]
__app.c:21:2: warning: (near initialization for ‘args.device’) [-Wmissing-field-initializers]
__app.c: In function ‘app_send_sms_exec’:
__app.c:79:2: warning: missing initializer [-Wmissing-field-initializers]
__app.c:79:2: warning: (near initialization for ‘args.device’) [-Wmissing-field-initializers]
In file included from chan_datacard.c:89:0:
__channel.c: In function ‘channel_new’:
__channel.c:35:21: warning: assignment makes pointer from integer without a cast [enabled by default]
__channel.c:36:19: error: incompatible types when assigning to type ‘struct ast_format’ from type ‘int’
__channel.c:37:19: error: incompatible types when assigning to type ‘struct ast_format’ from type ‘int’
__channel.c: At top level:
__channel.c:83:63: error: unknown type name ‘format_t’
__channel.c: In function ‘channel_read’:
__channel.c:588:29: error: ‘union ast_frame_subclass’ has no member named ‘codec’
__channel.c: In function ‘channel_write’:
__channel.c:716:52: error: ‘union ast_frame_subclass’ has no member named ‘codec’
__channel.c: In function ‘channel_local_request’:
__channel.c:991:40: error: ‘AST_FORMAT_AUDIO_MASK’ undeclared (first use in this function)
__channel.c:991:40: note: each undeclared identifier is reported only once for each function it appears in
make: *** [chan_datacard.o] Error 1
]0;root@Aster: ~/chan_datacardroot@Aster:~/chan_datacard# 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
In file included from chan_datacard.c:73:0:
chan_datacard.h:224:60: error: unknown type name ‘format_t’
chan_datacard.h:251:2: warning: initialization makes pointer from integer without a cast [enabled by default]
chan_datacard.h:251:2: warning: (near initialization for ‘channel_tech.capabilities’) [enabled by default]
chan_datacard.h:252:16: error: ‘channel_request’ undeclared here (not in a function)
In file included from chan_datacard.c:82:0:
__app.c: In function ‘app_status_exec’:
__app.c:21:2: warning: missing initializer [-Wmissing-field-initializers]
__app.c:21:2: warning: (near initialization for ‘args.device’) [-Wmissing-field-initializers]
__app.c: In function ‘app_send_sms_exec’:
__app.c:79:2: warning: missing initializer [-Wmissing-field-initializers]
__app.c:79:2: warning: (near initialization for ‘args.device’) [-Wmissing-field-initializers]
In file included from chan_datacard.c:89:0:
__channel.c: In function ‘channel_new’:
__channel.c:35:21: warning: assignment makes pointer from integer without a cast [enabled by default]
__channel.c:36:19: error: incompatible types when assigning to type ‘struct ast_format’ from type ‘int’
__channel.c:37:19: error: incompatible types when assigning to type ‘struct ast_format’ from type ‘int’
__channel.c: At top level:
__channel.c:83:63: error: unknown type name ‘format_t’
__channel.c: In function ‘channel_read’:
__channel.c:588:29: error: ‘union ast_frame_subclass’ has no member named ‘codec’
__channel.c: In function ‘channel_write’:
__channel.c:716:52: error: ‘union ast_frame_subclass’ has no member named ‘codec’
__channel.c: In function ‘channel_local_request’:
__channel.c:991:40: error: ‘AST_FORMAT_AUDIO_MASK’ undeclared (first use in this function)
__channel.c:991:40: note: each undeclared identifier is reported only once for each function it appears in
make: *** [chan_datacard.o] Error 1
]0;root@Aster: ~/chan_datacardroot@Aster:~/chan_datacard#

Устанавливал следующим способом:

Код: выделить все
# svn co http://www.makhutov.org/svn/chan_datacard/trunk/ chan_datacard
# cd ~/chan_datacard/
# ./configure
# make install
# cp ~/chan_datacard/etc/datacard.conf /etc/asterisk


В чем может быть проблема?
Видимо что-то дополнительно не установил...
Menjoy
 
Сообщений: 65
Зарегистрирован: 13 фев 2012, 12:09

Re: Проблема с chan_datacard

Сообщение Menjoy » 21 июн 2012, 12:48

upd

Когда гуглил по данной теме, наткнулся на несколько утверждений, мол обновите астериск, но там речь шла про 1.4 -> 1.6
Menjoy
 
Сообщений: 65
Зарегистрирован: 13 фев 2012, 12:09

Re: Проблема с chan_datacard

Сообщение defekt » 21 июн 2012, 13:08

После выхода новой версии Asterisk - 10, chan_datacard не захотел собираться, да и вообще проект давно не обновлялся и на GoogleCode стоит урл на asterisk-chan-dongle

+ патч
http://mysyura.in.ua/wp-content/uploads/2012/01/patch3.patch_.txt
Код: выделить все
patch -p0 -i patch3.patch.txt
Аватар пользователя
defekt
 
Сообщений: 391
Зарегистрирован: 29 сен 2011, 10:41

Re: Проблема с chan_datacard

Сообщение Menjoy » 21 июн 2012, 13:15

2 defekt, спасибо, буду пробовать.
О результатах отпишусь.
Menjoy
 
Сообщений: 65
Зарегистрирован: 13 фев 2012, 12:09

Re: Проблема с chan_datacard

Сообщение Menjoy » 21 июн 2012, 15:00

Вопрос решен, скачиваем:

Код: выделить все
svn checkout http://asterisk-chan-dongle.googlecode.com/svn/trunk/ asterisk-chan-dongle-read-only


должен быть установлен subversion
далее качаем патч

Код: выделить все
wget http://mysyura.in.ua/wp-content/uploads/2012/01/patch3.patch_.txt


патчим

Код: выделить все
patch -p0 -i patch3.patch.txt


Код: выделить все
aclocal && autoconf && automake -a
./configure
make
make install
cp etc/dongle.conf /etc/asterisk/
asterisk -vr
Aster*CLI> core restart now


и удостоверяемся, что все ок:

Код: выделить все
Aster*CLI> dongle show devices


Код: выделить все
ID           Group State      RSSI Mode Submode Provider Name  Model      Firmware          IMEI             IMSI             Number   
dongle0      0     Free       8   0    0       life:) BY     E1550      11.609.18.00.00  **************     ***************   *******************
Menjoy
 
Сообщений: 65
Зарегистрирован: 13 фев 2012, 12:09

Re: Проблема с chan_datacard

Сообщение arlekin_s » 09 апр 2013, 02:43

Парни.. что то совсем никак.. делаю со всех сторон.. и все никак.. показываю..
Версия системы
Код: выделить все
Linux ubuntu 3.5.0-23-generic #35~precise1-Ubuntu SMP Fri Jan 25 17:13:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Версия Asteriska
Код: выделить все
ubuntu*CLI> core show version
Asterisk 11.3.0 built by root @ ubuntu on a x86_64 running Linux on 2013-04-08 17:18:47 UTC


делаю так

Код: выделить все
apt-get install subversion
svn checkout http://asterisk-chan-dongle.googlecode.com/svn/trunk/ asterisk-chan-dongle-read-only


далее делаю так ( не знаю почему тут это пропущено )
Код: выделить все
cd asterisk-chan-dongle-read-only/


в эту же папку качаем патч.
но вот вопрос патч качается patch3.patch_.txt с дефисом а патчим без дефиса ?
ну ладно

Код: выделить все
patch -p0 -i patch3.patch_.txt


получаем
Код: выделить все
root@ubuntu:/usr/src/asterisk-chan-dongle-read-only# patch -p0 -i patch3.patch_.txt
patching file chan_dongle.c
patching file chan_dongle.h
patching file channel.c
Hunk #6 succeeded at 1167 (offset -2 lines).
Hunk #7 succeeded at 1263 (offset -2 lines).
Hunk #8 succeeded at 1341 (offset -2 lines).
Hunk #9 succeeded at 1349 (offset -2 lines).
Hunk #10 succeeded at 1391 (offset -2 lines).
patching file channel.h


дальше

Код: выделить все
apt-get install autoconf automake
aclocal && autoconf && automake -a


получаем

Код: выделить все
configure.in:6: installing `./config.guess'
configure.in:6: installing `./config.sub'
configure.in:7: installing `./install-sh'
configure.in:7: installing `./missing'
automake: no `Makefile.am' found for any configure output

и вот это строка
Код: выделить все
automake: no `Makefile.am' found for any configure output

меня преследует везде.. ставлю я через свн.. или через архив (хотя через архив оно у меня скомпилировалось, но в папке etc/dongle.conf небыло, соответсвенно и модуля в астериске тоже )

ну думаю так и надо что выводится это строка .. .делаю
Код: выделить все
./configure

и получаем
Код: выделить все
root@ubuntu:/usr/src/asterisk-chan-dongle-read-only# ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-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... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... 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 for style of include used by make... GNU
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... /bin/grep
checking for egrep... /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... yes
checking asterisk.h presence... yes
checking for asterisk.h... yes
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
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
root@ubuntu:/usr/src/asterisk-chan-dongle-read-only# make
gcc -g -O2 -O6 -I.  -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
In file included from app.c:21:0:
/usr/include/asterisk/version.h:1:2: ошибка: #error "Do not include 'asterisk/version.h'; use 'asterisk/ast_version.h' instead."
app.c: В функции «app_status_exec»:
app.c:37:2: предупреждение: пропущен инициализатор [-Wmissing-field-initializers]
app.c:37:2: предупреждение: (где-то рядом с инициализацией для «args.resource») [-Wmissing-field-initializers]
app.c: В функции «app_send_sms_exec»:
app.c:82:2: предупреждение: пропущен инициализатор [-Wmissing-field-initializers]
app.c:82:2: предупреждение: (где-то рядом с инициализацией для «args.device») [-Wmissing-field-initializers]
app.c: В функции «app_register»:
app.c:162:3: предупреждение: в передаче аргумента 2 «ast_register_application2»: несовместимый тип указателя [по умолчанию включена]
/usr/include/asterisk/module.h:458:5: замечание: expected «int (*)(struct ast_channel *, const char *)» but argument is of type «int (*)(struct ast_channel *, void *)»
make: *** [app.o] Ошибка 1
arlekin_s
 
Сообщений: 35
Зарегистрирован: 05 фев 2013, 18:08

Re: Проблема с chan_datacard

Сообщение Vlad1983 » 09 апр 2013, 07:07

почитайте здесь
http://wiki.e1550.mobi/doku.php
ЛС: @rostel
Vlad1983
 
Сообщений: 4251
Зарегистрирован: 09 авг 2011, 11:51

Re: Проблема с chan_datacard

Сообщение awsswa » 09 апр 2013, 07:16

Как то вы оригинально читаете инструкцию.
Ставите патч от десятой версии на одиннадцатую.
Для 11 версии свой патч.
платный суппорт по мере возможностей
awsswa
 
Сообщений: 2390
Зарегистрирован: 09 июн 2012, 10:52
Откуда: Россия, Пермь skype: yarick_perm

Re: Проблема с chan_datacard

Сообщение arlekin_s » 10 апр 2013, 18:00

Кому интересно вот этот chan-dongle ставится на версию asterisk 11.3.0

ход установки
Код: выделить все
cd /usr/src/
wget http://кушеев.рф/wp-content/uploads/asterisk-chan-dongle-asterisk11.zip
unzip asterisk-chan-dongle-asterisk11.zip
cd asterisk-chan-dongle-asterisk11
aclocal
autoconf
automake -a
./configure
make
make install
cp etc/dongle.conf /etc/asterisk

arlekin_s
 
Сообщений: 35
Зарегистрирован: 05 фев 2013, 18:08

Re: Проблема с chan_datacard

Сообщение xminos » 08 июл 2013, 14:55

Помогите с решение проблемки всё делаю по инструкции но в ответ получаю следующее :
пакет взят выше http://кушеев.рф/wp-content/uploads/asterisk-chan-dongle-asterisk11.zip

[root@hoover asterisk-chan-dongle-asterisk11]# aclocal
configure.in:10: warning: AC_ARG_PROGRAM was called before AC_CANONICAL_TARGET
../../lib/autoconf/general.m4:1795: AC_CANONICAL_TARGET is expanded from...
../../lib/autoconf/general.m4:1819: AC_CANONICAL_SYSTEM is expanded from...

configure.in:10: the top level
[root@hoover asterisk-chan-dongle-asterisk11]# autoconf
configure.in:10: warning: AC_ARG_PROGRAM was called before AC_CANONICAL_TARGET
../../lib/autoconf/general.m4:1795: AC_CANONICAL_TARGET is expanded from...
../../lib/autoconf/general.m4:1819: AC_CANONICAL_SYSTEM is expanded from...

configure.in:10: the top level
[root@hoover asterisk-chan-dongle-asterisk11]# automake -a
configure.in:10: warning: AC_ARG_PROGRAM was called before AC_CANONICAL_TARGET
../../lib/autoconf/general.m4:1795: AC_CANONICAL_TARGET is expanded from...
../../lib/autoconf/general.m4:1819: AC_CANONICAL_SYSTEM is expanded from...

configure.in:10: the top level
automake: no `Makefile.am' found for any configure output

инфо о системе

CentOS 5 2.6.18-348.6.1.e15

hoover*CLI> core show version
Asterisk 11.4.0 built by palosanto @ rpmbuild64-2.elastix.palosanto.com on a x86_64 running Linux on 2013-05-20 16:19:37 UTC

[root@hoover asterisk-chan-dongle-asterisk11]# rpm -qa automake
automake-1.9.6-2.3.el5
[root@hoover asterisk-chan-dongle-asterisk11]# rpm -qa autoconf
autoconf-2.63-1
[root@hoover asterisk-chan-dongle-asterisk11]# rpm -qa gcc
gcc-4.1.2-54.el5
xminos
 
Сообщений: 1
Зарегистрирован: 04 июл 2013, 17:29

След.

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

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

Сейчас этот форум просматривают: Google [Bot] и гости: 25

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