chan_dongle Installation Error Please help me

1 asterisk.h can’t find
2 make: *** [app.o] Error 1 (see the details)
[[email protected] chan_dongle-1.1.r14]# sudo make install
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
app.c:18:59: error: asterisk/app.h: No such file or directory
app.c:19:60: error: asterisk/pbx.h: No such file or directory
app.c:20:92: error: asterisk/module.h: No such file or directory
app.c:21:57: error: asterisk/version.h: No such file or directory
In file included from app.c:24:
chan_dongle.h:13:27: error: asterisk/lock.h: No such file or directory
chan_dongle.h:14:34: error: asterisk/linkedlists.h: No such file or directory
In file included from mixbuffer.h:11,
from chan_dongle.h:16,
from app.c:24:
ringbuffer.h: In function ‘rb_write’:
ringbuffer.h:71: error: ‘memmove’ undeclared (first use in this function)
ringbuffer.h:71: error: (Each undeclared identifier is reported only once
ringbuffer.h:71: error: for each function it appears in.)
In file included from chan_dongle.h:16,
from app.c:24:
mixbuffer.h: At top level:
mixbuffer.h:14: error: expected specifier-qualifier-list before ‘AST_LIST_ENTRY’
mixbuffer.h:20: error: expected specifier-qualifier-list before ‘AST_LIST_HEAD_NOLOCK’
mixbuffer.h: In function ‘mixb_init’:
mixbuffer.h:28: warning: implicit declaration of function ‘AST_LIST_HEAD_INIT_NOLOCK’
mixbuffer.h:28: error: ‘struct mixbuffer’ has no member named ‘streams’
mixbuffer.h:29: error: ‘struct mixbuffer’ has no member named ‘rb’
mixbuffer.h:30: error: ‘struct mixbuffer’ has no member named ‘attached’
mixbuffer.h: In function ‘mixb_free’:
mixbuffer.h:42: error: ‘const struct mixbuffer’ has no member named ‘rb’
mixbuffer.h:42: error: ‘const struct mixstream’ has no member named ‘used’
mixbuffer.h: In function ‘mixb_used’:
mixbuffer.h:48: error: ‘const struct mixbuffer’ has no member named ‘rb’
mixbuffer.h: In function ‘mixb_read_all_iov’:
mixbuffer.h:60: error: ‘const struct mixbuffer’ has no member named ‘rb’
mixbuffer.h: In function ‘mixb_read_n_iov’:
mixbuffer.h:66: error: ‘const struct mixbuffer’ has no member named ‘rb’
mixbuffer.h: In function ‘mixb_streams’:
mixbuffer.h:72: error: ‘const struct mixbuffer’ has no member named ‘attached’
In file included from chan_dongle.h:18,
from app.c:24:
cpvt.h:9:56: error: asterisk/frame.h: No such file or directory
In file included from cpvt.h:13,
from chan_dongle.h:18,
from app.c:24:
mutils.h: In function ‘str2enum’:
mutils.h:36: warning: implicit declaration of function ‘strcasecmp’
In file included from chan_dongle.h:18,
from app.c:24:
cpvt.h: At top level:
cpvt.h:50: error: expected specifier-qualifier-list before ‘AST_LIST_ENTRY’
In file included from chan_dongle.h:18,
from app.c:24:
cpvt.h:92: warning: ‘struct pvt’ declared inside parameter list
cpvt.h:92: warning: its scope is only this definition or declaration, which is probably not what you want
cpvt.h:95: warning: ‘struct pvt’ declared inside parameter list
cpvt.h:96: warning: ‘struct pvt’ declared inside parameter list
In file included from chan_dongle.h:20,
from app.c:24:
dc_config.h:8:66: error: asterisk/channel.h: No such file or directory
In file included from chan_dongle.h:20,
from app.c:24:
dc_config.h:65: error: ‘AST_MAX_CONTEXT’ undeclared here (not in a function)
dc_config.h:66: error: ‘AST_MAX_EXTENSION’ undeclared here (not in a function)
dc_config.h:67: error: ‘MAX_LANGUAGE’ undeclared here (not in a function)
dc_config.h:98: error: field ‘jbconf’ has incomplete type
dc_config.h:125: warning: ‘struct ast_config’ declared inside parameter list
dc_config.h:126: warning: ‘struct ast_config’ declared inside parameter list
dc_config.h:127: warning: ‘struct ast_config’ declared inside parameter list
In file included from app.c:24:
chan_dongle.h:48: error: expected specifier-qualifier-list before ‘uint32_t’
chan_dongle.h:59: error: expected specifier-qualifier-list before ‘uint32_t’
chan_dongle.h:95: error: expected specifier-qualifier-list before ‘AST_LIST_ENTRY’
In file included from app.c:24:
chan_dongle.h:203: error: expected specifier-qualifier-list before ‘AST_RWLIST_HEAD’
chan_dongle.h:243: warning: ‘struct ast_channel’ declared inside parameter list
chan_dongle.h:245: warning: ‘struct ast_channel’ declared inside parameter list
chan_dongle.h: In function ‘find_device_by_resource’:
chan_dongle.h:247: warning: passing argument 4 of ‘find_device_by_resource_ex’ from incompatible pointer type
chan_dongle.h:243: note: expected ‘const struct ast_channel *’ but argument is of type ‘const struct ast_channel *’
app.c: In function ‘app_status_exec’:
app.c:37: warning: implicit declaration of function ‘AST_DECLARE_APP_ARGS’
app.c:37: error: ‘args’ undeclared (first use in this function)
app.c:38: warning: implicit declaration of function ‘AST_APP_ARG’
app.c:38: error: ‘resource’ undeclared (first use in this function)
app.c:38: error: expected ‘)’ before ‘;’ token
app.c:42: warning: implicit declaration of function ‘ast_strlen_zero’
app.c:47: warning: implicit declaration of function ‘ast_strdupa’
app.c:47: warning: assignment makes pointer from integer without a cast
app.c:49: warning: implicit declaration of function ‘AST_STANDARD_APP_ARGS’
app.c:57: error: ‘NULL’ undeclared (first use in this function)
app.c:61: warning: implicit declaration of function ‘ast_mutex_unlock’
app.c:61: error: ‘struct pvt’ has no member named ‘lock’
app.c:69: warning: implicit declaration of function ‘snprintf’
app.c:69: warning: incompatible implicit declaration of built-in function ‘snprintf’
app.c:70: warning: implicit declaration of function ‘pbx_builtin_setvar_helper’
app.c: At top level:
app.c:75: error: expected ‘)’ before ‘struct’
app.c:139: error: ‘app_send_sms_exec’ undeclared here (not in a function)
app.c: In function ‘app_register’:
app.c:162: warning: implicit declaration of function ‘ast_register_application2’
app.c: In function ‘app_unregister’:
app.c:172: warning: implicit declaration of function ‘ast_unregister_application’
make: *** [app.o] Error 1
[[email protected] chan_dongle-1.1.r14]#