Summary:ASTERISK-04650: chan_sip2.c unable to compile
Reporter:Hitesh Sharma (hmadra)Labels:
Date Opened:2005-07-21 18:04:13Date Closed:2005-07-21 18:30:28
Versions:Frequency of
I have tried compiling chan_sip2.c . However, the compilation gives errors

In channels/Makefile
I have added

CHANNEL_LIBS=chan_modem.so chan_sip.so chan_sip2.so\ ****Channel_Sip 2 here
            chan_modem_aopen.so \
            chan_modem_bestdata.so \
            chan_agent.so chan_mgcp.so chan_iax2.so \
            chan_local.so chan_skinny.so chan_features.so

make gives .......

gcc -pipe  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -g  -Iinclude -I../include -D_REENTRANT -D_GNU_SOURCE  -O6 -march=i686  -DZAPTEL_OPTIMIZATIONS      -DBUSYDETECT_MARTIN     -fomit-frame-pointer  -Wno-missing-prototypes -Wno-missing-declarations   -DZAPATA_PRI   -DIAX_TRUNKING   -DCRYPTO -fPIC    -c -o chan_sip2.o chan_sip2.c
chan_sip2.c:495: parse error before "ASTERISK_VERSION"
chan_sip2.c: In function `initreqprep':
chan_sip2.c:4289: warning: suggest parentheses around + or - in operand of &
chan_sip2.c: In function `expire_register':
chan_sip2.c:5007: warning: implicit declaration of function `ast_device_state_changed'
chan_sip2.c: In function `sip_devicestate':
chan_sip2.c:9334: `AST_DEVICE_INVALID' undeclared (first use in this function)
chan_sip2.c:9334: (Each undeclared identifier is reported only once
chan_sip2.c:9334: for each function it appears in.)
chan_sip2.c:9361: `AST_DEVICE_UNAVAILABLE' undeclared (first use in this function)
chan_sip2.c:9365: `AST_DEVICE_UNKNOWN' undeclared (first use in this function)
chan_sip2.c: In function `load_module':
chan_sip2.c:11452: warning: implicit declaration of function `ast_channel_register_ex'
chan_sip2.c:11478: warning: assignment of read-only member `type'
chan_sip2.c: In function `unload_module':
chan_sip2.c:11533: warning: passing arg 1 of `ast_channel_unregister' from incompatible pointer type
chan_sip2.c: At top level:
chan_sip2.c:496: warning: `contact_text' defined but not used
chan_sip2.c:521: warning: `global_domain_strict' defined but not used
make[1]: *** [chan_sip2.o] Error 1
make[1]: Leaving directory `/downloads/asterisk/asterisk/channels'
make: *** [subdirs] Error 1

What am I doing wrong Here.....
Plz let me Know.
Comments:By: Michael Jerris (mikej) 2005-07-21 18:30:27

chan_sip2 is not a part of asterisk.  Please address this with the maintainer of that software.  You are not doing anything wrong, there have been updates to the tree and this out of tree module needs updates.