Установлена FreePBX Distro последняя (3 дня назад). Asterisk 11.12.0. Ядро 2.6.32-431.el6.x86_64
Хотел перенести chan_dongle.so со старрого Elastix (Asterisk 11.7.0), но модуль не грузится.
Собираю модуль, как написано http://wiki.e1550.mobi/doku.php?id=installation
Делаю
DESTDIR=”/usr/lib64/asterisk/modules” ./configure --disable-debug --with-asterisk=/tmp/asterisk-11.12.0/include
вроде нет ошибок.
Делаю make, пишет вот такое
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:
gcc -g -O2 -O6 -I. -D_GNU_SOURCE -I/tmp/asterisk-11.12.0/include -I/usr/include -DASTERISK_VERSION_NUM=110000 -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:17:
/tmp/asterisk-11.12.0/include/asterisk.h:21:33: error: asterisk/autoconfig.h: No such file or directory
In file included from /tmp/asterisk-11.12.0/include/asterisk.h:27,
from app.c:17:
/tmp/asterisk-11.12.0/include/asterisk/compat.h:117: error: expected identifier or ‘(’ before ‘__extension__’
/tmp/asterisk-11.12.0/include/asterisk/compat.h:125: error: expected identifier or ‘(’ before ‘__extension__’
/tmp/asterisk-11.12.0/include/asterisk/compat.h:125: error: expected identifier or ‘(’ before ‘)’ token
/tmp/asterisk-11.12.0/include/asterisk/compat.h:129: error: conflicting types for ‘strtoq’
/usr/include/stdlib.h:196: note: previous declaration of ‘strtoq’ was here
In file included from /tmp/asterisk-11.12.0/include/asterisk/utils.h:26,
from /tmp/asterisk-11.12.0/include/asterisk/strings.h:30,
from /tmp/asterisk-11.12.0/include/asterisk/app.h:27,
from app.c:18:
/tmp/asterisk-11.12.0/include/asterisk/network.h:57:2: error: #error "don't know how to handle network functions here."
In file included from /tmp/asterisk-11.12.0/include/asterisk/utils.h:26,
from /tmp/asterisk-11.12.0/include/asterisk/strings.h:30,
from /tmp/asterisk-11.12.0/include/asterisk/app.h:27,
from app.c:18:
/tmp/asterisk-11.12.0/include/asterisk/network.h:61: warning: ‘struct in_addr’ declared inside parameter list
/tmp/asterisk-11.12.0/include/asterisk/network.h:61: warning: its scope is only this definition or declaration, which is probably not what you want
/tmp/asterisk-11.12.0/include/asterisk/network.h:82: warning: ‘struct in_addr’ declared inside parameter list
/tmp/asterisk-11.12.0/include/asterisk/network.h:90: warning: ‘struct sockaddr_in’ declared inside parameter list
/tmp/asterisk-11.12.0/include/asterisk/network.h: In function ‘inaddrcmp’:
/tmp/asterisk-11.12.0/include/asterisk/network.h:92: error: dereferencing pointer to incomplete type
/tmp/asterisk-11.12.0/include/asterisk/network.h:92: error: dereferencing pointer to incomplete type
/tmp/asterisk-11.12.0/include/asterisk/network.h:93: error: dereferencing pointer to incomplete type
/tmp/asterisk-11.12.0/include/asterisk/network.h:93: error: dereferencing pointer to incomplete type
In file included from /tmp/asterisk-11.12.0/include/asterisk/utils.h:35,
from /tmp/asterisk-11.12.0/include/asterisk/strings.h:30,
from /tmp/asterisk-11.12.0/include/asterisk/app.h:27,
from app.c:18:
/tmp/asterisk-11.12.0/include/asterisk/localtime.h: At top level:
/tmp/asterisk-11.12.0/include/asterisk/localtime.h:32: error: conflicting types for ‘locale_t’
/usr/include/xlocale.h:43: note: previous declaration of ‘locale_t’ was here
In file included from /tmp/asterisk-11.12.0/include/asterisk/strings.h:30,
from /tmp/asterisk-11.12.0/include/asterisk/app.h:27,
from app.c:18:
/tmp/asterisk-11.12.0/include/asterisk/utils.h:209: error: field ‘hp’ has incomplete type
In file included from /tmp/asterisk-11.12.0/include/asterisk/poll-compat.h:82,
from /tmp/asterisk-11.12.0/include/asterisk/channel.h:129,
from /tmp/asterisk-11.12.0/include/asterisk/pbx.h:26,
from app.c:19:
/tmp/asterisk-11.12.0/include/asterisk/select.h:43: error: expected specifier-qualifier-list before ‘TYPEOF_FD_SET_FDS_BITS’
In file included from /tmp/asterisk-11.12.0/include/asterisk/cdr.h:31,
from /tmp/asterisk-11.12.0/include/asterisk/channel.h:145,
from /tmp/asterisk-11.12.0/include/asterisk/pbx.h:26,
from app.c:19:
/tmp/asterisk-11.12.0/include/asterisk/data.h:233: error: field ‘AST_DATA_IPADDR’ has incomplete type
/tmp/asterisk-11.12.0/include/asterisk/data.h:794: error: return type is an incomplete type
/tmp/asterisk-11.12.0/include/asterisk/data.h: In function ‘ast_data_retrieve_ipaddr’:
/tmp/asterisk-11.12.0/include/asterisk/data.h:799: warning: ‘return’ with a value, in function returning void
app.c: In function ‘app_status_exec’:
app.c:37: warning: missing initializer
app.c:37: warning: (near initialization for ‘args.resource’)
app.c:49: warning: implicit declaration of function ‘offsetof’
app.c:49: error: expected expression before ‘typeof’
app.c: In function ‘app_send_sms_exec’:
app.c:82: warning: missing initializer
app.c:82: warning: (near initialization for ‘args.device’)
app.c:97: error: expected expression before ‘typeof’
app.c:75: warning: unused parameter ‘channel’
make: *** [app.o] Error 1
In file included from app.c:17:
/tmp/asterisk-11.12.0/include/asterisk.h:21:33: error: asterisk/autoconfig.h: No such file or directory
In file included from /tmp/asterisk-11.12.0/include/asterisk.h:27,
from app.c:17:
/tmp/asterisk-11.12.0/include/asterisk/compat.h:117: error: expected identifier or ‘(’ before ‘__extension__’
/tmp/asterisk-11.12.0/include/asterisk/compat.h:125: error: expected identifier or ‘(’ before ‘__extension__’
/tmp/asterisk-11.12.0/include/asterisk/compat.h:125: error: expected identifier or ‘(’ before ‘)’ token
/tmp/asterisk-11.12.0/include/asterisk/compat.h:129: error: conflicting types for ‘strtoq’
/usr/include/stdlib.h:196: note: previous declaration of ‘strtoq’ was here
In file included from /tmp/asterisk-11.12.0/include/asterisk/utils.h:26,
from /tmp/asterisk-11.12.0/include/asterisk/strings.h:30,
from /tmp/asterisk-11.12.0/include/asterisk/app.h:27,
from app.c:18:
/tmp/asterisk-11.12.0/include/asterisk/network.h:57:2: error: #error "don't know how to handle network functions here."
In file included from /tmp/asterisk-11.12.0/include/asterisk/utils.h:26,
from /tmp/asterisk-11.12.0/include/asterisk/strings.h:30,
from /tmp/asterisk-11.12.0/include/asterisk/app.h:27,
from app.c:18:
/tmp/asterisk-11.12.0/include/asterisk/network.h:61: warning: ‘struct in_addr’ declared inside parameter list
/tmp/asterisk-11.12.0/include/asterisk/network.h:61: warning: its scope is only this definition or declaration, which is probably not what you want
/tmp/asterisk-11.12.0/include/asterisk/network.h:82: warning: ‘struct in_addr’ declared inside parameter list
/tmp/asterisk-11.12.0/include/asterisk/network.h:90: warning: ‘struct sockaddr_in’ declared inside parameter list
/tmp/asterisk-11.12.0/include/asterisk/network.h: In function ‘inaddrcmp’:
/tmp/asterisk-11.12.0/include/asterisk/network.h:92: error: dereferencing pointer to incomplete type
/tmp/asterisk-11.12.0/include/asterisk/network.h:92: error: dereferencing pointer to incomplete type
/tmp/asterisk-11.12.0/include/asterisk/network.h:93: error: dereferencing pointer to incomplete type
/tmp/asterisk-11.12.0/include/asterisk/network.h:93: error: dereferencing pointer to incomplete type
In file included from /tmp/asterisk-11.12.0/include/asterisk/utils.h:35,
from /tmp/asterisk-11.12.0/include/asterisk/strings.h:30,
from /tmp/asterisk-11.12.0/include/asterisk/app.h:27,
from app.c:18:
/tmp/asterisk-11.12.0/include/asterisk/localtime.h: At top level:
/tmp/asterisk-11.12.0/include/asterisk/localtime.h:32: error: conflicting types for ‘locale_t’
/usr/include/xlocale.h:43: note: previous declaration of ‘locale_t’ was here
In file included from /tmp/asterisk-11.12.0/include/asterisk/strings.h:30,
from /tmp/asterisk-11.12.0/include/asterisk/app.h:27,
from app.c:18:
/tmp/asterisk-11.12.0/include/asterisk/utils.h:209: error: field ‘hp’ has incomplete type
In file included from /tmp/asterisk-11.12.0/include/asterisk/poll-compat.h:82,
from /tmp/asterisk-11.12.0/include/asterisk/channel.h:129,
from /tmp/asterisk-11.12.0/include/asterisk/pbx.h:26,
from app.c:19:
/tmp/asterisk-11.12.0/include/asterisk/select.h:43: error: expected specifier-qualifier-list before ‘TYPEOF_FD_SET_FDS_BITS’
In file included from /tmp/asterisk-11.12.0/include/asterisk/cdr.h:31,
from /tmp/asterisk-11.12.0/include/asterisk/channel.h:145,
from /tmp/asterisk-11.12.0/include/asterisk/pbx.h:26,
from app.c:19:
/tmp/asterisk-11.12.0/include/asterisk/data.h:233: error: field ‘AST_DATA_IPADDR’ has incomplete type
/tmp/asterisk-11.12.0/include/asterisk/data.h:794: error: return type is an incomplete type
/tmp/asterisk-11.12.0/include/asterisk/data.h: In function ‘ast_data_retrieve_ipaddr’:
/tmp/asterisk-11.12.0/include/asterisk/data.h:799: warning: ‘return’ with a value, in function returning void
app.c: In function ‘app_status_exec’:
app.c:37: warning: missing initializer
app.c:37: warning: (near initialization for ‘args.resource’)
app.c:49: warning: implicit declaration of function ‘offsetof’
app.c:49: error: expected expression before ‘typeof’
app.c: In function ‘app_send_sms_exec’:
app.c:82: warning: missing initializer
app.c:82: warning: (near initialization for ‘args.device’)
app.c:97: error: expected expression before ‘typeof’
app.c:75: warning: unused parameter ‘channel’
make: *** [app.o] Error 1
На Elastix собрался и успешно работал несколько месяцев.