Testing app_dial.c file

Hello Friends,

When i try to compile this app_dial.c it is showing the following error:
Using gcc

app_dial.c:1824: error: AST_MODULE' undeclared here (not in a function) app_dial.c:1824: error: initializer element is not constant app_dial.c:1824: error: (near initialization for__mod_info.name’)

Error Shown here

AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, “Dialing Application”);

if I compile using g++ the following error is shown:

/usr/include/asterisk/file.h:135: error: expected unqualified-id before “private”
/usr/include/asterisk/file.h:135: error: abstract declarator void*' used as declaration /usr/include/asterisk/file.h:135: error: expected;’ before "private"
app_dial.c:261: error: expected primary-expression before ‘[’ token
app_dial.c:261: error: expected primary-expression before ‘{’ token
app_dial.c:261: error: expected }' before '{' token app_dial.c:261: error: expected,’ or `;’ before ‘{’ token
and so on…

Error shown here

[/code]:

AST_APP_OPTIONS(dial_exec_options, {
AST_APP_OPTION_ARG(‘A’, OPT_ANNOUNCE, OPT_ARG_ANNOUNCE),
AST_APP_OPTION(‘C’, OPT_RESETCDR),
AST_APP_OPTION(‘d’, OPT_DTMF_EXIT),
AST_APP_OPTION_ARG(‘D’, OPT_SENDDTMF, OPT_ARG_SENDDTMF),
AST_APP_OPTION(‘f’, OPT_FORCECLID),
AST_APP_OPTION(‘g’, OPT_GO_ON),
AST_APP_OPTION_ARG(‘G’, OPT_GOTO, OPT_ARG_GOTO),
AST_APP_OPTION(‘h’, OPT_CALLEE_HANGUP),
AST_APP_OPTION(‘H’, OPT_CALLER_HANGUP),
AST_APP_OPTION(‘i’, OPT_IGNORE_FORWARDING),
AST_APP_OPTION(‘j’, OPT_PRIORITY_JUMP),
AST_APP_OPTION_ARG(‘L’, OPT_DURATION_LIMIT, OPT_ARG_DURATION_LIMIT),
AST_APP_OPTION_ARG(‘m’, OPT_MUSICBACK, OPT_ARG_MUSICBACK),
AST_APP_OPTION_ARG(‘M’, OPT_CALLEE_MACRO, OPT_ARG_CALLEE_MACRO),
AST_APP_OPTION(‘n’, OPT_SCREEN_NOINTRO),
AST_APP_OPTION(‘N’, OPT_SCREEN_NOCLID),
AST_APP_OPTION_ARG(‘O’, OPT_OPERMODE,OPT_ARG_OPERMODE),
AST_APP_OPTION(‘o’, OPT_ORIGINAL_CLID),
AST_APP_OPTION(‘p’, OPT_SCREENING),
AST_APP_OPTION_ARG(‘P’, OPT_PRIVACY, OPT_ARG_PRIVACY),
AST_APP_OPTION(‘r’, OPT_RINGBACK),
AST_APP_OPTION_ARG(‘S’, OPT_DURATION_STOP, OPT_ARG_DURATION_STOP),
AST_APP_OPTION(‘t’, OPT_CALLEE_TRANSFER),
AST_APP_OPTION(‘T’, OPT_CALLER_TRANSFER),
AST_APP_OPTION(‘w’, OPT_CALLEE_MONITOR),
AST_APP_OPTION(‘W’, OPT_CALLER_MONITOR),
AST_APP_OPTION(‘k’, OPT_CALLEE_PARK),
AST_APP_OPTION(‘K’, OPT_CALLER_PARK)

});

Please help me out in this…