23 #ifndef _ASTERISK_ADSI_H
24 #define _ASTERISK_ADSI_H
32 #define ADSI_MSG_DISPLAY 132
33 #define ADSI_MSG_DOWNLOAD 133
36 #define ADSI_LOAD_SOFTKEY 128
37 #define ADSI_INIT_SOFTKEY_LINE 129
38 #define ADSI_LOAD_VIRTUAL_DISP 130
39 #define ADSI_LINE_CONTROL 131
40 #define ADSI_INFORMATION 132
41 #define ADSI_DISC_SESSION 133
42 #define ADSI_SWITCH_TO_DATA 134
43 #define ADSI_SWITCH_TO_VOICE 135
44 #define ADSI_CLEAR_SOFTKEY 136
45 #define ADSI_INPUT_CONTROL 137
46 #define ADSI_INPUT_FORMAT 138
47 #define ADSI_SWITCH_TO_PERIPH 139
48 #define ADSI_MOVE_DATA 140
49 #define ADSI_LOAD_DEFAULT 141
50 #define ADSI_CONNECT_SESSION 142
51 #define ADSI_CLEAR_TYPE_AHEAD 143
52 #define ADSI_DISPLAY_CALL_BUF 144
53 #define ADSI_CLEAR_CALL_BUF 145
54 #define ADSI_SWITCH_TO_ALT 146
55 #define ADSI_SWITCH_TO_GRAPHICS 147
56 #define ADSI_CLEAR_SCREEN 148
57 #define ADSI_QUERY_CONFIG 149
58 #define ADSI_QUERY_CPEID 150
59 #define ADSI_SWITCH_TO_APP 151
62 #define ADSI_LOAD_SOFTKEY_TABLE 128
63 #define ADSI_LOAD_PREDEF_DISP 129
64 #define ADSI_LOAD_SCRIPT 130
65 #define ADSI_DOWNLOAD_CONNECT 131
66 #define ADSI_DOWNLOAD_DISC 132
69 #define ADSI_ENCODED_DTMF 0x80
70 #define ADSI_ON_HOOK 0x81
71 #define ADSI_OFF_HOOK 0x82
72 #define ADSI_FLASH 0x83
73 #define ADSI_DIAL_TONE_DETECT 0x84
74 #define ADSI_LINE_NUMBER 0x85
75 #define ADSI_BLANK 0x86
76 #define ADSI_SEND_CHARS 0x87
77 #define ADSI_CLEAR_CHARS 0x88
78 #define ADSI_BACKSPACE 0x89
79 #define ADSI_TAB_COLUMN 0x8A
80 #define ADSI_GOTO_LINE 0x8B
81 #define ADSI_GOTO_LINE_REL 0x8C
82 #define ADSI_PAGE_UP 0x8D
83 #define ADSI_PAGE_DOWN 0x8E
84 #define ADSI_EXTENDED_DTMF 0x8F
85 #define ADSI_DELAY 0x90
86 #define ADSI_DIAL_PULSE_ONE 0x91
87 #define ADSI_SWITCH_TO_DATA2 0x92
88 #define ADSI_SWITCH_TO_VOICE2 0x93
89 #define ADSI_DISP_CALL_BUF 0x94
90 #define ADSI_CLEAR_CALL_B 0x95
94 #define ADSI_DISPLAY_CONTROL 0x98
95 #define ADSI_DISPLAY_SOFT_KEYS 0x99
96 #define ADSI_CHANGE_STATE 0x9A
97 #define ADSI_START_CLEAR_TIMER 0x9B
98 #define ADSI_SET_SCRIPT_FLAG 0x9C
99 #define ADSI_JUMP_TO_SUBSCRIPT 0x9D
100 #define ADSI_EVENT_22_TRIGGER 0x9E
101 #define ADSI_EVENT_23_TRIGGER 0x9f
102 #define ADSI_EXIT 0xA0
106 #define ADSI_INFO_PAGE 0x0
107 #define ADSI_COMM_PAGE 0x1
109 #define ADSI_KEY_APPS 16
112 #define ADSI_JUST_LEFT 0x2
113 #define ADSI_JUST_RIGHT 0x1
114 #define ADSI_JUST_CENT 0x0
115 #define ADSI_JUST_IND 0x3
117 #define ADSI_KEY_SKT 0x80
118 #define ADSI_KEY_HILITE 0x40
120 #define ADSI_DIR_FROM_LEFT (0)
121 #define ADSI_DIR_FROM_RIGHT (1)
123 #define AST_ADSI_VERSION 1
278 int ast_adsi_display(
unsigned char *buf,
int page,
int line,
int just,
int wrap,
char *col1,
char *col2);
304 int ast_adsi_load_soft_key(
unsigned char *buf,
int key,
const char *llabel,
const char *slabel,
char *ret,
int data);
343 int ast_adsi_input_format(
unsigned char *buf,
int num,
int dir,
int wrap,
char *format1,
char *format2);
369 int (*
display) (
unsigned char *buf,
int page,
int line,
int just,
int wrap,
char *col1,
char *col2);
370 int (*
set_line) (
unsigned char *buf,
int page,
int line);
371 int (*
load_soft_key) (
unsigned char *buf,
int key,
const char *llabel,
const char *slabel,
char *ret,
int data);
374 int (*
input_format) (
unsigned char *buf,
int num,
int dir,
int wrap,
char *format1,
char *format2);
static struct lines lines
Main Channel structure associated with a channel.
int ast_adsi_voice_mode(unsigned char *buf, int when)
Puts CPE in voice mode.
int(* voice_mode)(unsigned char *buf, int when)
int ast_adsi_begin_download(struct ast_channel *chan, char *service, unsigned char *fdn, unsigned char *sec, int version)
int(* get_cpeid)(struct ast_channel *chan, unsigned char *cpeid, int voice)
int(* end_download)(struct ast_channel *chan)
CallerID (and other GR30) management and generation Includes code and algorithms from the Zapata libr...
int ast_adsi_data_mode(unsigned char *buf)
Puts CPE in data mode.
int(* load_soft_key)(unsigned char *buf, int key, const char *llabel, const char *slabel, char *ret, int data)
int(* input_control)(unsigned char *buf, int page, int line, int display, int format, int just)
int(* input_format)(unsigned char *buf, int num, int dir, int wrap, char *format1, char *format2)
int(* query_cpeid)(unsigned char *buf)
int(* set_line)(unsigned char *buf, int page, int line)
int(* disconnect_session)(unsigned char *buf)
int ast_adsi_download_connect(unsigned char *buf, char *service, unsigned char *fdn, unsigned char *sec, int ver)
Begin an ADSI script download.
int(* set_keys)(unsigned char *buf, unsigned char *keys)
int ast_adsi_set_keys(unsigned char *buf, unsigned char *keys)
Set which soft keys should be displayed.
int ast_adsi_transmit_message_full(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype, int dowait)
int ast_adsi_load_session(struct ast_channel *chan, unsigned char *app, int ver, int data)
Check if scripts for a given app are already loaded. Version may be -1, if any version is okay...
enum ast_cc_service_type service
int ast_adsi_download_disconnect(unsigned char *buf)
Disconnects (and hopefully saves) a downloaded script.
int ast_adsi_disconnect_session(unsigned char *buf)
Disconnects a running session.
int ast_adsi_clear_soft_keys(unsigned char *buf)
int ast_adsi_get_cpeid(struct ast_channel *chan, unsigned char *cpeid, int voice)
int(* query_cpeinfo)(unsigned char *buf)
int ast_adsi_set_line(unsigned char *buf, int page, int line)
Sets the current line and page.
int ast_adsi_clear_screen(unsigned char *buf)
int(* download_disconnect)(unsigned char *buf)
int ast_adsi_input_format(unsigned char *buf, int num, int dir, int wrap, char *format1, char *format2)
Set input format.
int(* begin_download)(struct ast_channel *chan, char *service, unsigned char *fdn, unsigned char *sec, int version)
int(* display)(unsigned char *buf, int page, int line, int just, int wrap, char *col1, char *col2)
int(* read_encoded_dtmf)(struct ast_channel *chan, unsigned char *buf, int maxlen)
int(* available)(struct ast_channel *chan)
int(* clear_soft_keys)(unsigned char *buf)
int(* clear_screen)(unsigned char *buf)
int(* connect_session)(unsigned char *buf, unsigned char *fdn, int ver)
int ast_adsi_display(unsigned char *buf, int page, int line, int just, int wrap, char *col1, char *col2)
Loads a line of info into the display.
int(* get_cpeinfo)(struct ast_channel *chan, int *width, int *height, int *buttons, int voice)
int ast_adsi_transmit_message(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype)
int(* transmit_message_full)(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype, int dowait)
int ast_adsi_connect_session(unsigned char *buf, unsigned char *fdn, int ver)
Connects an ADSI Display Session.
int(* load_session)(struct ast_channel *chan, unsigned char *app, int ver, int data)
int ast_adsi_end_download(struct ast_channel *chan)
int ast_adsi_load_soft_key(unsigned char *buf, int key, const char *llabel, const char *slabel, char *ret, int data)
Creates "load soft key" parameters.
void ast_adsi_install_funcs(const struct adsi_funcs *funcs)
int(* download_connect)(unsigned char *buf, char *service, unsigned char *fdn, unsigned char *sec, int ver)
int ast_adsi_query_cpeid(unsigned char *buf)
int ast_adsi_available(struct ast_channel *chan)
Returns non-zero if Channel does or might support ADSI.
int(* unload_session)(struct ast_channel *chan)
int ast_adsi_query_cpeinfo(unsigned char *buf)
int ast_adsi_channel_restore(struct ast_channel *chan)
int(* channel_restore)(struct ast_channel *chan)
int ast_adsi_input_control(unsigned char *buf, int page, int line, int display, int format, int just)
Set input information.
int ast_adsi_unload_session(struct ast_channel *chan)
static snd_pcm_format_t format
int(* data_mode)(unsigned char *buf)
int(* transmit_message)(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype)
int ast_adsi_read_encoded_dtmf(struct ast_channel *chan, unsigned char *buf, int maxlen)
int ast_adsi_get_cpeinfo(struct ast_channel *chan, int *width, int *height, int *buttons, int voice)
int ast_adsi_print(struct ast_channel *chan, char **lines, int *align, int voice)
Display some stuff on the screen.
int(* print)(struct ast_channel *chan, char **lines, int *align, int voice)