mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-11 23:28:59 +00:00
Issue #5930 - Remove dependencies on res_adsi.so - clwade
A big THANK YOU to clwade for this patch. Minor modifications by me. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@64921 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -41,7 +41,6 @@ c-client (http://www.washington.edu/imap/
|
||||
*/
|
||||
|
||||
/*** MODULEINFO
|
||||
<depend>res_adsi</depend>
|
||||
***/
|
||||
|
||||
/*** MAKEOPTS
|
||||
|
@@ -125,11 +125,11 @@
|
||||
* Returns 0 on success (or adsi unavailable) and -1 on hangup
|
||||
*
|
||||
*/
|
||||
int ast_adsi_channel_init(struct ast_channel *chan);
|
||||
extern int (*ast_adsi_channel_init)(struct ast_channel *chan);
|
||||
|
||||
int ast_adsi_begin_download(struct ast_channel *chan, char *service, unsigned char *fdn, unsigned char *sec, int version);
|
||||
extern int (*ast_adsi_begin_download)(struct ast_channel *chan, char *service, unsigned char *fdn, unsigned char *sec, int version);
|
||||
|
||||
int ast_adsi_end_download(struct ast_channel *chan);
|
||||
extern int (*ast_adsi_end_download)(struct ast_channel *chan);
|
||||
|
||||
/*! Restore ADSI initialization (for applications that play with ADSI */
|
||||
/* and want to restore it to normal. If you touch "INFO" then you */
|
||||
@@ -140,7 +140,7 @@ int ast_adsi_end_download(struct ast_channel *chan);
|
||||
* Returns 0 on success (or adsi unavailable) and -1 on hangup
|
||||
*
|
||||
*/
|
||||
int ast_adsi_channel_restore(struct ast_channel *chan);
|
||||
extern int (*ast_adsi_channel_restore)(struct ast_channel *chan);
|
||||
|
||||
/*! Display some stuff on the screen */
|
||||
/*!
|
||||
@@ -152,7 +152,7 @@ int ast_adsi_channel_restore(struct ast_channel *chan);
|
||||
* Return 0 on success (or adsi unavailable) and -1 on hangup
|
||||
*
|
||||
*/
|
||||
int ast_adsi_print(struct ast_channel *chan, char **lines, int *align, int voice);
|
||||
extern int (*ast_adsi_print)(struct ast_channel *chan, char **lines, int *align, int voice);
|
||||
|
||||
/*! Check if scripts for a given app are already loaded. Version may be -1 */
|
||||
/* if any version is okay, or 0-255 for a specific version. */
|
||||
@@ -165,18 +165,18 @@ int ast_adsi_print(struct ast_channel *chan, char **lines, int *align, int voice
|
||||
* Returns 0 if scripts is not loaded or not an ADSI CPE. Returns -1
|
||||
* on hangup. Returns 1 if script already loaded.
|
||||
*/
|
||||
int ast_adsi_load_session(struct ast_channel *chan, unsigned char *app, int ver, int data);
|
||||
int ast_adsi_unload_session(struct ast_channel *chan);
|
||||
extern int (*ast_adsi_load_session)(struct ast_channel *chan, unsigned char *app, int ver, int data);
|
||||
extern int (*ast_adsi_unload_session)(struct ast_channel *chan);
|
||||
|
||||
/* ADSI Layer 2 transmission functions */
|
||||
int ast_adsi_transmit_messages(struct ast_channel *chan, unsigned char **msg, int *msglen, int *msgtype);
|
||||
int ast_adsi_transmit_message(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype);
|
||||
int ast_adsi_transmit_message_full(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype, int dowait);
|
||||
extern int (*ast_adsi_transmit_messages)(struct ast_channel *chan, unsigned char **msg, int *msglen, int *msgtype);
|
||||
extern int (*ast_adsi_transmit_message)(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype);
|
||||
extern int (*ast_adsi_transmit_message_full)(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype, int dowait);
|
||||
/*! Read some encoded DTMF data. */
|
||||
/*!
|
||||
* Returns number of bytes received
|
||||
*/
|
||||
int ast_adsi_read_encoded_dtmf(struct ast_channel *chan, unsigned char *buf, int maxlen);
|
||||
extern int (*ast_adsi_read_encoded_dtmf)(struct ast_channel *chan, unsigned char *buf, int maxlen);
|
||||
|
||||
/* ADSI Layer 3 creation functions */
|
||||
|
||||
@@ -190,14 +190,14 @@ int ast_adsi_read_encoded_dtmf(struct ast_channel *chan, unsigned char *buf, int
|
||||
*
|
||||
*/
|
||||
|
||||
int ast_adsi_connect_session(unsigned char *buf, unsigned char *fdn, int ver);
|
||||
extern int (*ast_adsi_connect_session)(unsigned char *buf, unsigned char *fdn, int ver);
|
||||
|
||||
/*! Build Query CPE ID of equipment */
|
||||
/*!
|
||||
* Returns number of bytes added to message
|
||||
*/
|
||||
int ast_adsi_query_cpeid(unsigned char *buf);
|
||||
int ast_adsi_query_cpeinfo(unsigned char *buf);
|
||||
extern int (*ast_adsi_query_cpeid)(unsigned char *buf);
|
||||
extern int (*ast_adsi_query_cpeinfo)(unsigned char *buf);
|
||||
|
||||
/*! Get CPE ID from an attached ADSI compatible CPE. */
|
||||
/*!
|
||||
@@ -205,9 +205,9 @@ int ast_adsi_query_cpeinfo(unsigned char *buf);
|
||||
* or -1 on hangup, or 0 if there was no hangup but it failed to find the
|
||||
* device ID. Returns to voice mode if "voice" is non-zero.
|
||||
*/
|
||||
int ast_adsi_get_cpeid(struct ast_channel *chan, unsigned char *cpeid, int voice);
|
||||
extern int (*ast_adsi_get_cpeid)(struct ast_channel *chan, unsigned char *cpeid, int voice);
|
||||
|
||||
int ast_adsi_get_cpeinfo(struct ast_channel *chan, int *width, int *height, int *buttons, int voice);
|
||||
extern int (*ast_adsi_get_cpeinfo)(struct ast_channel *chan, int *width, int *height, int *buttons, int voice);
|
||||
|
||||
/*! Begin an ADSI script download */
|
||||
/*!
|
||||
@@ -221,7 +221,7 @@ int ast_adsi_get_cpeinfo(struct ast_channel *chan, int *width, int *height, int
|
||||
*
|
||||
*/
|
||||
|
||||
int ast_adsi_download_connect(unsigned char *buf, char *service, unsigned char *fdn, unsigned char *sec, int ver);
|
||||
extern int (*ast_adsi_download_connect)(unsigned char *buf, char *service, unsigned char *fdn, unsigned char *sec, int ver);
|
||||
|
||||
/*! Disconnects a running session */
|
||||
/*!
|
||||
@@ -230,7 +230,7 @@ int ast_adsi_download_connect(unsigned char *buf, char *service, unsigned char *
|
||||
* Returns number of bytes added to buffer or -1 on error.
|
||||
*
|
||||
*/
|
||||
int ast_adsi_disconnect_session(unsigned char *buf);
|
||||
extern int (*ast_adsi_disconnect_session)(unsigned char *buf);
|
||||
|
||||
/*! Disconnects (and hopefully saves) a downloaded script */
|
||||
/*!
|
||||
@@ -239,7 +239,7 @@ int ast_adsi_disconnect_session(unsigned char *buf);
|
||||
* Returns number of bytes added to buffer or -1 on error.
|
||||
*
|
||||
*/
|
||||
int ast_adsi_download_disconnect(unsigned char *buf);
|
||||
extern int (*ast_adsi_download_disconnect)(unsigned char *buf);
|
||||
|
||||
/*! Puts CPE in data mode... */
|
||||
/*!
|
||||
@@ -248,9 +248,9 @@ int ast_adsi_download_disconnect(unsigned char *buf);
|
||||
* Returns number of bytes added to buffer or -1 on error.
|
||||
*
|
||||
*/
|
||||
int ast_adsi_data_mode(unsigned char *buf);
|
||||
int ast_adsi_clear_soft_keys(unsigned char *buf);
|
||||
int ast_adsi_clear_screen(unsigned char *buf);
|
||||
extern int (*ast_adsi_data_mode)(unsigned char *buf);
|
||||
extern int (*ast_adsi_clear_soft_keys)(unsigned char *buf);
|
||||
extern int (*ast_adsi_clear_screen)(unsigned char *buf);
|
||||
|
||||
/*! Puts CPE in voice mode... */
|
||||
/*!
|
||||
@@ -260,14 +260,14 @@ int ast_adsi_clear_screen(unsigned char *buf);
|
||||
* Returns number of bytes added to buffer or -1 on error.
|
||||
*
|
||||
*/
|
||||
int ast_adsi_voice_mode(unsigned char *buf, int when);
|
||||
extern int (*ast_adsi_voice_mode)(unsigned char *buf, int when);
|
||||
|
||||
/*! Returns non-zero if Channel does or might support ADSI */
|
||||
/*!
|
||||
* \param chan Channel to check
|
||||
*
|
||||
*/
|
||||
int ast_adsi_available(struct ast_channel *chan);
|
||||
extern int (*ast_adsi_available)(struct ast_channel *chan);
|
||||
|
||||
/*! Loads a line of info into the display */
|
||||
/*!
|
||||
@@ -283,7 +283,7 @@ int ast_adsi_available(struct ast_channel *chan);
|
||||
*
|
||||
*/
|
||||
|
||||
int ast_adsi_display(unsigned char *buf, int page, int line, int just, int wrap, char *col1, char *col2);
|
||||
extern int (*ast_adsi_display)(unsigned char *buf, int page, int line, int just, int wrap, char *col1, char *col2);
|
||||
|
||||
/*! Sets the current line and page */
|
||||
/*!
|
||||
@@ -295,7 +295,7 @@ int ast_adsi_display(unsigned char *buf, int page, int line, int just, int wrap,
|
||||
*
|
||||
*/
|
||||
|
||||
int ast_adsi_set_line(unsigned char *buf, int page, int line);
|
||||
extern int (*ast_adsi_set_line)(unsigned char *buf, int page, int line);
|
||||
|
||||
/*! Creates "load soft key" parameters */
|
||||
/*!
|
||||
@@ -309,7 +309,7 @@ int ast_adsi_set_line(unsigned char *buf, int page, int line);
|
||||
* Returns number of bytes added to buffer or -1 on error.
|
||||
*
|
||||
*/
|
||||
int ast_adsi_load_soft_key(unsigned char *buf, int key, const char *llabel, const char *slabel, const char *ret, int data);
|
||||
extern int (*ast_adsi_load_soft_key)(unsigned char *buf, int key, const char *llabel, const char *slabel, char *ret, int data);
|
||||
|
||||
/*! Set which soft keys should be displayed */
|
||||
/*!
|
||||
@@ -320,7 +320,7 @@ int ast_adsi_load_soft_key(unsigned char *buf, int key, const char *llabel, cons
|
||||
* Returns number of bytes added to buffer or -1 on error.
|
||||
*
|
||||
*/
|
||||
int ast_adsi_set_keys(unsigned char *buf, unsigned char *keys);
|
||||
extern int (*ast_adsi_set_keys)(unsigned char *buf, unsigned char *keys);
|
||||
|
||||
/*! Set input information */
|
||||
/*!
|
||||
@@ -334,7 +334,7 @@ int ast_adsi_set_keys(unsigned char *buf, unsigned char *keys);
|
||||
* Returns number of bytes added to buffer or -1 on error.
|
||||
*
|
||||
*/
|
||||
int ast_adsi_input_control(unsigned char *buf, int page, int line, int display, int format, int just);
|
||||
extern int (*ast_adsi_input_control)(unsigned char *buf, int page, int line, int display, int format, int just);
|
||||
|
||||
/*! Set input format */
|
||||
/*!
|
||||
@@ -348,6 +348,7 @@ int ast_adsi_input_control(unsigned char *buf, int page, int line, int display,
|
||||
* Returns number of bytes added to buffer or -1 on error.
|
||||
*
|
||||
*/
|
||||
int ast_adsi_input_format(unsigned char *buf, int num, int dir, int wrap, char *format1, char *format2);
|
||||
extern int (*ast_adsi_input_format)(unsigned char *buf, int num, int dir, int wrap, char *format1, char *format2);
|
||||
|
||||
#endif /* _ASTERISK_ADSI_H */
|
||||
|
||||
|
83
main/adsistub.c
Normal file
83
main/adsistub.c
Normal file
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* Asterisk -- An open source telephony toolkit.
|
||||
*
|
||||
* Copyright (C) 1999 - 2005, Digium, Inc.
|
||||
*
|
||||
* Christopher L. Wade <wade.christopher@gmail.com>
|
||||
*
|
||||
* See http://www.asterisk.org for more information about
|
||||
* the Asterisk project. Please do not directly contact
|
||||
* any of the maintainers of this project for assistance;
|
||||
* the project provides a web site, mailing lists and IRC
|
||||
* channels for your use.
|
||||
*
|
||||
* This program is free software, distributed under the terms of
|
||||
* the GNU General Public License Version 2. See the LICENSE file
|
||||
* at the top of the source tree.
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "asterisk.h"
|
||||
|
||||
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
|
||||
#include "asterisk/options.h"
|
||||
#include "asterisk/channel.h"
|
||||
#include "asterisk/adsi.h"
|
||||
#include "asterisk/logger.h"
|
||||
|
||||
#ifdef SKREP
|
||||
#define build_stub(func_name,...) \
|
||||
static int stub_ ## func_name(__VA_ARGS__) \
|
||||
{ \
|
||||
if (option_debug > 4) \
|
||||
ast_log(LOG_NOTICE, "ADSI support not loaded!\n"); \
|
||||
return -1; \
|
||||
} \
|
||||
\
|
||||
int (*func_name)(__VA_ARGS__) = \
|
||||
stub_ ## func_name;
|
||||
#endif
|
||||
#define build_stub(func_name,...) \
|
||||
static int stub_##func_name(__VA_ARGS__) \
|
||||
{ \
|
||||
if (option_debug > 4) \
|
||||
ast_log(LOG_DEBUG, "ADSI support not loaded!\n"); \
|
||||
return -1; \
|
||||
} \
|
||||
\
|
||||
int (*func_name)(__VA_ARGS__) = \
|
||||
stub_##func_name;
|
||||
|
||||
build_stub(ast_adsi_channel_init,struct ast_channel *chan)
|
||||
build_stub(ast_adsi_begin_download,struct ast_channel *chan, char *service, unsigned char *fdn, unsigned char *sec, int version)
|
||||
build_stub(ast_adsi_end_download,struct ast_channel *chan)
|
||||
build_stub(ast_adsi_channel_restore,struct ast_channel *chan)
|
||||
build_stub(ast_adsi_print,struct ast_channel *chan, char **lines, int *align, int voice)
|
||||
build_stub(ast_adsi_load_session,struct ast_channel *chan, unsigned char *app, int ver, int data)
|
||||
build_stub(ast_adsi_unload_session,struct ast_channel *chan)
|
||||
build_stub(ast_adsi_transmit_messages,struct ast_channel *chan, unsigned char **msg, int *msglen, int *msgtype)
|
||||
build_stub(ast_adsi_transmit_message,struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype)
|
||||
build_stub(ast_adsi_transmit_message_full,struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype, int dowait)
|
||||
build_stub(ast_adsi_read_encoded_dtmf,struct ast_channel *chan, unsigned char *buf, int maxlen)
|
||||
build_stub(ast_adsi_connect_session,unsigned char *buf, unsigned char *fdn, int ver)
|
||||
build_stub(ast_adsi_query_cpeid,unsigned char *buf)
|
||||
build_stub(ast_adsi_query_cpeinfo,unsigned char *buf)
|
||||
build_stub(ast_adsi_get_cpeid,struct ast_channel *chan, unsigned char *cpeid, int voice)
|
||||
build_stub(ast_adsi_get_cpeinfo,struct ast_channel *chan, int *width, int *height, int *buttons, int voice)
|
||||
build_stub(ast_adsi_download_connect,unsigned char *buf, char *service, unsigned char *fdn, unsigned char *sec, int ver)
|
||||
build_stub(ast_adsi_disconnect_session,unsigned char *buf)
|
||||
build_stub(ast_adsi_download_disconnect,unsigned char *buf)
|
||||
build_stub(ast_adsi_data_mode,unsigned char *buf)
|
||||
build_stub(ast_adsi_clear_soft_keys,unsigned char *buf)
|
||||
build_stub(ast_adsi_clear_screen,unsigned char *buf)
|
||||
build_stub(ast_adsi_voice_mode,unsigned char *buf, int when)
|
||||
build_stub(ast_adsi_available,struct ast_channel *chan)
|
||||
build_stub(ast_adsi_display,unsigned char *buf, int page, int line, int just, int wrap, char *col1, char *col2)
|
||||
build_stub(ast_adsi_set_line,unsigned char *buf, int page, int line)
|
||||
build_stub(ast_adsi_load_soft_key,unsigned char *buf, int key, char *llabel, char *slabel, char *ret, int data)
|
||||
build_stub(ast_adsi_set_keys,unsigned char *buf, unsigned char *keys)
|
||||
build_stub(ast_adsi_input_control,unsigned char *buf, int page, int line, int display, int format, int just)
|
||||
build_stub(ast_adsi_input_format,unsigned char *buf, int num, int dir, int wrap, char *format1, char *format2)
|
@@ -42,6 +42,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
#include <math.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "asterisk/adsi.h"
|
||||
#include "asterisk/ulaw.h"
|
||||
#include "asterisk/alaw.h"
|
||||
#include "asterisk/callerid.h"
|
||||
@@ -333,7 +334,7 @@ static int __adsi_transmit_messages(struct ast_channel *chan, unsigned char **ms
|
||||
|
||||
}
|
||||
|
||||
int ast_adsi_begin_download(struct ast_channel *chan, char *service, unsigned char *fdn, unsigned char *sec, int version)
|
||||
static int _ast_adsi_begin_download(struct ast_channel *chan, char *service, unsigned char *fdn, unsigned char *sec, int version)
|
||||
{
|
||||
int bytes;
|
||||
unsigned char buf[256];
|
||||
@@ -353,7 +354,7 @@ int ast_adsi_begin_download(struct ast_channel *chan, char *service, unsigned ch
|
||||
return -1;
|
||||
}
|
||||
|
||||
int ast_adsi_end_download(struct ast_channel *chan)
|
||||
static int _ast_adsi_end_download(struct ast_channel *chan)
|
||||
{
|
||||
int bytes;
|
||||
unsigned char buf[256];
|
||||
@@ -366,7 +367,7 @@ int ast_adsi_end_download(struct ast_channel *chan)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ast_adsi_transmit_message_full(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype, int dowait)
|
||||
static int _ast_adsi_transmit_message_full(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype, int dowait)
|
||||
{
|
||||
unsigned char *msgs[5] = { NULL, NULL, NULL, NULL, NULL };
|
||||
int msglens[5];
|
||||
@@ -447,7 +448,7 @@ int ast_adsi_transmit_message_full(struct ast_channel *chan, unsigned char *msg,
|
||||
return res;
|
||||
}
|
||||
|
||||
int ast_adsi_transmit_message(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype)
|
||||
static int _ast_adsi_transmit_message(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype)
|
||||
{
|
||||
return ast_adsi_transmit_message_full(chan, msg, msglen, msgtype, 1);
|
||||
}
|
||||
@@ -463,7 +464,7 @@ static inline int ccopy(unsigned char *dst, const unsigned char *src, int max)
|
||||
return x;
|
||||
}
|
||||
|
||||
int ast_adsi_load_soft_key(unsigned char *buf, int key, const char *llabel, const char *slabel, const char *ret, int data)
|
||||
static int _ast_adsi_load_soft_key(unsigned char *buf, int key, const char *llabel, const char *slabel, char *ret, int data)
|
||||
{
|
||||
int bytes=0;
|
||||
|
||||
@@ -502,7 +503,7 @@ int ast_adsi_load_soft_key(unsigned char *buf, int key, const char *llabel, cons
|
||||
|
||||
}
|
||||
|
||||
int ast_adsi_connect_session(unsigned char *buf, unsigned char *fdn, int ver)
|
||||
static int _ast_adsi_connect_session(unsigned char *buf, unsigned char *fdn, int ver)
|
||||
{
|
||||
int bytes=0;
|
||||
int x;
|
||||
@@ -525,7 +526,7 @@ int ast_adsi_connect_session(unsigned char *buf, unsigned char *fdn, int ver)
|
||||
|
||||
}
|
||||
|
||||
int ast_adsi_download_connect(unsigned char *buf, char *service, unsigned char *fdn, unsigned char *sec, int ver)
|
||||
static int _ast_adsi_download_connect(unsigned char *buf, char *service, unsigned char *fdn, unsigned char *sec, int ver)
|
||||
{
|
||||
int bytes=0;
|
||||
int x;
|
||||
@@ -555,7 +556,7 @@ int ast_adsi_download_connect(unsigned char *buf, char *service, unsigned char
|
||||
|
||||
}
|
||||
|
||||
int ast_adsi_disconnect_session(unsigned char *buf)
|
||||
static int _ast_adsi_disconnect_session(unsigned char *buf)
|
||||
{
|
||||
int bytes=0;
|
||||
|
||||
@@ -570,7 +571,7 @@ int ast_adsi_disconnect_session(unsigned char *buf)
|
||||
|
||||
}
|
||||
|
||||
int ast_adsi_query_cpeid(unsigned char *buf)
|
||||
static int _ast_adsi_query_cpeid(unsigned char *buf)
|
||||
{
|
||||
int bytes = 0;
|
||||
buf[bytes++] = ADSI_QUERY_CPEID;
|
||||
@@ -580,7 +581,7 @@ int ast_adsi_query_cpeid(unsigned char *buf)
|
||||
return bytes;
|
||||
}
|
||||
|
||||
int ast_adsi_query_cpeinfo(unsigned char *buf)
|
||||
static int _ast_adsi_query_cpeinfo(unsigned char *buf)
|
||||
{
|
||||
int bytes = 0;
|
||||
buf[bytes++] = ADSI_QUERY_CONFIG;
|
||||
@@ -590,7 +591,7 @@ int ast_adsi_query_cpeinfo(unsigned char *buf)
|
||||
return bytes;
|
||||
}
|
||||
|
||||
int ast_adsi_read_encoded_dtmf(struct ast_channel *chan, unsigned char *buf, int maxlen)
|
||||
static int _ast_adsi_read_encoded_dtmf(struct ast_channel *chan, unsigned char *buf, int maxlen)
|
||||
{
|
||||
int bytes = 0;
|
||||
int res;
|
||||
@@ -625,7 +626,7 @@ int ast_adsi_read_encoded_dtmf(struct ast_channel *chan, unsigned char *buf, int
|
||||
return bytes;
|
||||
}
|
||||
|
||||
int ast_adsi_get_cpeid(struct ast_channel *chan, unsigned char *cpeid, int voice)
|
||||
static int _ast_adsi_get_cpeid(struct ast_channel *chan, unsigned char *cpeid, int voice)
|
||||
{
|
||||
unsigned char buf[256];
|
||||
int bytes = 0;
|
||||
@@ -657,7 +658,7 @@ int ast_adsi_get_cpeid(struct ast_channel *chan, unsigned char *cpeid, int voice
|
||||
return res;
|
||||
}
|
||||
|
||||
int ast_adsi_get_cpeinfo(struct ast_channel *chan, int *width, int *height, int *buttons, int voice)
|
||||
static int _ast_adsi_get_cpeinfo(struct ast_channel *chan, int *width, int *height, int *buttons, int voice)
|
||||
{
|
||||
unsigned char buf[256];
|
||||
int bytes = 0;
|
||||
@@ -722,7 +723,7 @@ int ast_adsi_get_cpeinfo(struct ast_channel *chan, int *width, int *height, int
|
||||
return res;
|
||||
}
|
||||
|
||||
int ast_adsi_data_mode(unsigned char *buf)
|
||||
static int _ast_adsi_data_mode(unsigned char *buf)
|
||||
{
|
||||
int bytes=0;
|
||||
|
||||
@@ -737,7 +738,7 @@ int ast_adsi_data_mode(unsigned char *buf)
|
||||
|
||||
}
|
||||
|
||||
int ast_adsi_clear_soft_keys(unsigned char *buf)
|
||||
static int _ast_adsi_clear_soft_keys(unsigned char *buf)
|
||||
{
|
||||
int bytes=0;
|
||||
|
||||
@@ -752,7 +753,7 @@ int ast_adsi_clear_soft_keys(unsigned char *buf)
|
||||
|
||||
}
|
||||
|
||||
int ast_adsi_clear_screen(unsigned char *buf)
|
||||
static int _ast_adsi_clear_screen(unsigned char *buf)
|
||||
{
|
||||
int bytes=0;
|
||||
|
||||
@@ -767,7 +768,7 @@ int ast_adsi_clear_screen(unsigned char *buf)
|
||||
|
||||
}
|
||||
|
||||
int ast_adsi_voice_mode(unsigned char *buf, int when)
|
||||
static int _ast_adsi_voice_mode(unsigned char *buf, int when)
|
||||
{
|
||||
int bytes=0;
|
||||
|
||||
@@ -784,7 +785,7 @@ int ast_adsi_voice_mode(unsigned char *buf, int when)
|
||||
|
||||
}
|
||||
|
||||
int ast_adsi_available(struct ast_channel *chan)
|
||||
static int _ast_adsi_available(struct ast_channel *chan)
|
||||
{
|
||||
int cpe = chan->adsicpe & 0xff;
|
||||
if ((cpe == AST_ADSI_AVAILABLE) ||
|
||||
@@ -793,7 +794,7 @@ int ast_adsi_available(struct ast_channel *chan)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ast_adsi_download_disconnect(unsigned char *buf)
|
||||
static int _ast_adsi_download_disconnect(unsigned char *buf)
|
||||
{
|
||||
int bytes=0;
|
||||
|
||||
@@ -808,7 +809,7 @@ int ast_adsi_download_disconnect(unsigned char *buf)
|
||||
|
||||
}
|
||||
|
||||
int ast_adsi_display(unsigned char *buf, int page, int line, int just, int wrap,
|
||||
static int _ast_adsi_display(unsigned char *buf, int page, int line, int just, int wrap,
|
||||
char *col1, char *col2)
|
||||
{
|
||||
int bytes=0;
|
||||
@@ -854,7 +855,7 @@ int ast_adsi_display(unsigned char *buf, int page, int line, int just, int wrap,
|
||||
|
||||
}
|
||||
|
||||
int ast_adsi_input_control(unsigned char *buf, int page, int line, int display, int format, int just)
|
||||
static int _ast_adsi_input_control(unsigned char *buf, int page, int line, int display, int format, int just)
|
||||
{
|
||||
int bytes=0;
|
||||
|
||||
@@ -877,7 +878,7 @@ int ast_adsi_input_control(unsigned char *buf, int page, int line, int display,
|
||||
|
||||
}
|
||||
|
||||
int ast_adsi_input_format(unsigned char *buf, int num, int dir, int wrap, char *format1, char *format2)
|
||||
static int _ast_adsi_input_format(unsigned char *buf, int num, int dir, int wrap, char *format1, char *format2)
|
||||
{
|
||||
int bytes = 0;
|
||||
|
||||
@@ -896,7 +897,7 @@ int ast_adsi_input_format(unsigned char *buf, int num, int dir, int wrap, char *
|
||||
return bytes;
|
||||
}
|
||||
|
||||
int ast_adsi_set_keys(unsigned char *buf, unsigned char *keys)
|
||||
static int _ast_adsi_set_keys(unsigned char *buf, unsigned char *keys)
|
||||
{
|
||||
int bytes=0;
|
||||
int x;
|
||||
@@ -911,7 +912,7 @@ int ast_adsi_set_keys(unsigned char *buf, unsigned char *keys)
|
||||
return bytes;
|
||||
}
|
||||
|
||||
int ast_adsi_set_line(unsigned char *buf, int page, int line)
|
||||
static int _ast_adsi_set_line(unsigned char *buf, int page, int line)
|
||||
{
|
||||
int bytes=0;
|
||||
|
||||
@@ -942,7 +943,7 @@ int ast_adsi_set_line(unsigned char *buf, int page, int line)
|
||||
static int total = 0;
|
||||
static int speeds = 0;
|
||||
|
||||
int ast_adsi_channel_restore(struct ast_channel *chan)
|
||||
static int _ast_adsi_channel_restore(struct ast_channel *chan)
|
||||
{
|
||||
unsigned char dsp[256];
|
||||
int bytes;
|
||||
@@ -969,7 +970,7 @@ int ast_adsi_channel_restore(struct ast_channel *chan)
|
||||
|
||||
}
|
||||
|
||||
int ast_adsi_print(struct ast_channel *chan, char **lines, int *aligns, int voice)
|
||||
static int _ast_adsi_print(struct ast_channel *chan, char **lines, int *aligns, int voice)
|
||||
{
|
||||
unsigned char buf[4096];
|
||||
int bytes=0;
|
||||
@@ -989,7 +990,7 @@ int ast_adsi_print(struct ast_channel *chan, char **lines, int *aligns, int voic
|
||||
return res;
|
||||
}
|
||||
|
||||
int ast_adsi_load_session(struct ast_channel *chan, unsigned char *app, int ver, int data)
|
||||
static int _ast_adsi_load_session(struct ast_channel *chan, unsigned char *app, int ver, int data)
|
||||
{
|
||||
unsigned char dsp[256];
|
||||
int bytes;
|
||||
@@ -1033,7 +1034,7 @@ int ast_adsi_load_session(struct ast_channel *chan, unsigned char *app, int ver,
|
||||
|
||||
}
|
||||
|
||||
int ast_adsi_unload_session(struct ast_channel *chan)
|
||||
static int _ast_adsi_unload_session(struct ast_channel *chan)
|
||||
{
|
||||
unsigned char dsp[256];
|
||||
int bytes;
|
||||
@@ -1135,6 +1136,36 @@ static int reload(void)
|
||||
static int load_module(void)
|
||||
{
|
||||
adsi_load();
|
||||
|
||||
ast_adsi_begin_download = _ast_adsi_begin_download;
|
||||
ast_adsi_end_download = _ast_adsi_end_download;
|
||||
ast_adsi_channel_restore = _ast_adsi_channel_restore;
|
||||
ast_adsi_print = _ast_adsi_print;
|
||||
ast_adsi_load_session = _ast_adsi_load_session;
|
||||
ast_adsi_unload_session = _ast_adsi_unload_session;
|
||||
ast_adsi_transmit_message = _ast_adsi_transmit_message;
|
||||
ast_adsi_transmit_message_full = _ast_adsi_transmit_message_full;
|
||||
ast_adsi_read_encoded_dtmf = _ast_adsi_read_encoded_dtmf;
|
||||
ast_adsi_connect_session = _ast_adsi_connect_session;
|
||||
ast_adsi_query_cpeid = _ast_adsi_query_cpeid;
|
||||
ast_adsi_query_cpeinfo = _ast_adsi_query_cpeinfo;
|
||||
ast_adsi_get_cpeid = _ast_adsi_get_cpeid;
|
||||
ast_adsi_get_cpeinfo = _ast_adsi_get_cpeinfo;
|
||||
ast_adsi_download_connect = _ast_adsi_download_connect;
|
||||
ast_adsi_disconnect_session = _ast_adsi_disconnect_session;
|
||||
ast_adsi_download_disconnect = _ast_adsi_download_disconnect;
|
||||
ast_adsi_data_mode = _ast_adsi_data_mode;
|
||||
ast_adsi_clear_soft_keys = _ast_adsi_clear_soft_keys;
|
||||
ast_adsi_clear_screen = _ast_adsi_clear_screen;
|
||||
ast_adsi_voice_mode = _ast_adsi_voice_mode;
|
||||
ast_adsi_available = _ast_adsi_available;
|
||||
ast_adsi_display = _ast_adsi_display;
|
||||
ast_adsi_set_line = _ast_adsi_set_line;
|
||||
ast_adsi_load_soft_key = _ast_adsi_load_soft_key;
|
||||
ast_adsi_set_keys = _ast_adsi_set_keys;
|
||||
ast_adsi_input_control = _ast_adsi_input_control;
|
||||
ast_adsi_input_format = _ast_adsi_input_format;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user