Asterisk - The Open Source Telephony Project  18.5.0
Data Structures | Functions
adsi.h File Reference

ADSI Support (built upon Caller*ID) More...

#include "asterisk/callerid.h"
Include dependency graph for adsi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  adsi_funcs
 

Macros

ADSI parameters
#define ADSI_MSG_DISPLAY   132
 
#define ADSI_MSG_DOWNLOAD   133
 
#define ADSI_LOAD_SOFTKEY   128
 
#define ADSI_INIT_SOFTKEY_LINE   129
 
#define ADSI_LOAD_VIRTUAL_DISP   130
 
#define ADSI_LINE_CONTROL   131
 
#define ADSI_INFORMATION   132
 
#define ADSI_DISC_SESSION   133
 
#define ADSI_SWITCH_TO_DATA   134
 
#define ADSI_SWITCH_TO_VOICE   135
 
#define ADSI_CLEAR_SOFTKEY   136
 
#define ADSI_INPUT_CONTROL   137
 
#define ADSI_INPUT_FORMAT   138
 
#define ADSI_SWITCH_TO_PERIPH   139
 
#define ADSI_MOVE_DATA   140
 
#define ADSI_LOAD_DEFAULT   141
 
#define ADSI_CONNECT_SESSION   142
 
#define ADSI_CLEAR_TYPE_AHEAD   143
 
#define ADSI_DISPLAY_CALL_BUF   144
 
#define ADSI_CLEAR_CALL_BUF   145
 
#define ADSI_SWITCH_TO_ALT   146
 
#define ADSI_SWITCH_TO_GRAPHICS   147
 
#define ADSI_CLEAR_SCREEN   148
 
#define ADSI_QUERY_CONFIG   149
 
#define ADSI_QUERY_CPEID   150
 
#define ADSI_SWITCH_TO_APP   151
 
#define ADSI_LOAD_SOFTKEY_TABLE   128 /* Conveniently identical to the soft version */
 
#define ADSI_LOAD_PREDEF_DISP   129 /* Load predefined display */
 
#define ADSI_LOAD_SCRIPT   130
 
#define ADSI_DOWNLOAD_CONNECT   131
 
#define ADSI_DOWNLOAD_DISC   132
 
#define ADSI_ENCODED_DTMF   0x80 /* Transmit following chars with encoded dtmf */
 
#define ADSI_ON_HOOK   0x81 /* Open switch-hook */
 
#define ADSI_OFF_HOOK   0x82 /* Close switch-hook */
 
#define ADSI_FLASH   0x83 /* Flash switch-hook */
 
#define ADSI_DIAL_TONE_DETECT   0x84 /* Wait for dialtone */
 
#define ADSI_LINE_NUMBER   0x85 /* Send current line number using DTMF/encoded DTMF */
 
#define ADSI_BLANK   0x86 /* Blank (does nothing) */
 
#define ADSI_SEND_CHARS   0x87 /* Send collected digits/characters */
 
#define ADSI_CLEAR_CHARS   0x88 /* Clear characters/digits collected */
 
#define ADSI_BACKSPACE   0x89 /* Erase last collected digit */
 
#define ADSI_TAB_COLUMN   0x8A /* Display specified display column of current line */
 
#define ADSI_GOTO_LINE   0x8B /* Go to given page and line number */
 
#define ADSI_GOTO_LINE_REL   0x8C /* Go to given line (relative to current) */
 
#define ADSI_PAGE_UP   0x8D /* Go up one page */
 
#define ADSI_PAGE_DOWN   0x8E /* Go down one page */
 
#define ADSI_EXTENDED_DTMF   0x8F /* Send DTMF tones for 250ms instead of 60 ms */
 
#define ADSI_DELAY   0x90 /* Delay for given # (times 10) of ms */
 
#define ADSI_DIAL_PULSE_ONE   0x91 /* Send a dial pulse "1" */
 
#define ADSI_SWITCH_TO_DATA2   0x92 /* Switch CPE to data mode */
 
#define ADSI_SWITCH_TO_VOICE2   0x93 /* Switch CPE to voice mode */
 
#define ADSI_DISP_CALL_BUF   0x94 /* Display specified call buffer */
 
#define ADSI_CLEAR_CALL_B   0x95 /* Clear specified call buffer */
 
#define ADSI_INFO_PAGE   0x0
 
#define ADSI_COMM_PAGE   0x1
 
#define ADSI_KEY_APPS   16 /* 16 to 33 reserved for applications */
 
#define ADSI_JUST_LEFT   0x2
 
#define ADSI_JUST_RIGHT   0x1
 
#define ADSI_JUST_CENT   0x0 /* Center */
 
#define ADSI_JUST_IND   0x3 /* Indent */
 
#define ADSI_KEY_SKT   0x80 /* Load from SKT */
 
#define ADSI_KEY_HILITE   0x40 /* Highlight key */
 
#define ADSI_DIR_FROM_LEFT   (0)
 
#define ADSI_DIR_FROM_RIGHT   (1)
 
#define AST_ADSI_VERSION   1
 

Functions

int ast_adsi_available (struct ast_channel *chan)
 Returns non-zero if Channel does or might support ADSI. More...
 
int ast_adsi_begin_download (struct ast_channel *chan, char *service, unsigned char *fdn, unsigned char *sec, int version)
 
int ast_adsi_channel_restore (struct ast_channel *chan)
 
int ast_adsi_clear_screen (unsigned char *buf)
 
int ast_adsi_clear_soft_keys (unsigned char *buf)
 
int ast_adsi_connect_session (unsigned char *buf, unsigned char *fdn, int ver)
 Connects an ADSI Display Session. More...
 
int ast_adsi_data_mode (unsigned char *buf)
 Puts CPE in data mode. More...
 
int ast_adsi_disconnect_session (unsigned char *buf)
 Disconnects a running session. More...
 
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. More...
 
int ast_adsi_download_connect (unsigned char *buf, char *service, unsigned char *fdn, unsigned char *sec, int ver)
 Begin an ADSI script download. More...
 
int ast_adsi_download_disconnect (unsigned char *buf)
 Disconnects (and hopefully saves) a downloaded script. More...
 
int ast_adsi_end_download (struct ast_channel *chan)
 
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)
 
int ast_adsi_input_control (unsigned char *buf, int page, int line, int display, int format, int just)
 Set input information. More...
 
int ast_adsi_input_format (unsigned char *buf, int num, int dir, int wrap, char *format1, char *format2)
 Set input format. More...
 
void ast_adsi_install_funcs (const struct adsi_funcs *funcs)
 
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, or 0-255 for a specific version. More...
 
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. More...
 
int ast_adsi_print (struct ast_channel *chan, char **lines, int *align, int voice)
 Display some stuff on the screen. More...
 
int ast_adsi_query_cpeid (unsigned char *buf)
 
int ast_adsi_query_cpeinfo (unsigned char *buf)
 
int ast_adsi_read_encoded_dtmf (struct ast_channel *chan, unsigned char *buf, int maxlen)
 
int ast_adsi_set_keys (unsigned char *buf, unsigned char *keys)
 Set which soft keys should be displayed. More...
 
int ast_adsi_set_line (unsigned char *buf, int page, int line)
 Sets the current line and page. More...
 
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)
 
int ast_adsi_unload_session (struct ast_channel *chan)
 
int ast_adsi_voice_mode (unsigned char *buf, int when)
 Puts CPE in voice mode. More...
 

Detailed Description

ADSI Support (built upon Caller*ID)

Definition in file adsi.h.

Macro Definition Documentation

◆ ADSI_BACKSPACE

#define ADSI_BACKSPACE   0x89 /* Erase last collected digit */

Definition at line 78 of file adsi.h.

◆ ADSI_BLANK

#define ADSI_BLANK   0x86 /* Blank (does nothing) */

Definition at line 75 of file adsi.h.

◆ ADSI_CLEAR_CALL_B

#define ADSI_CLEAR_CALL_B   0x95 /* Clear specified call buffer */

Definition at line 90 of file adsi.h.

◆ ADSI_CLEAR_CALL_BUF

#define ADSI_CLEAR_CALL_BUF   145

Definition at line 53 of file adsi.h.

◆ ADSI_CLEAR_CHARS

#define ADSI_CLEAR_CHARS   0x88 /* Clear characters/digits collected */

Definition at line 77 of file adsi.h.

◆ ADSI_CLEAR_SCREEN

#define ADSI_CLEAR_SCREEN   148

Definition at line 56 of file adsi.h.

Referenced by adsi_clear_screen().

◆ ADSI_CLEAR_SOFTKEY

#define ADSI_CLEAR_SOFTKEY   136

Definition at line 44 of file adsi.h.

Referenced by adsi_clear_soft_keys().

◆ ADSI_CLEAR_TYPE_AHEAD

#define ADSI_CLEAR_TYPE_AHEAD   143

Definition at line 51 of file adsi.h.

◆ ADSI_COMM_PAGE

#define ADSI_COMM_PAGE   0x1

◆ ADSI_CONNECT_SESSION

#define ADSI_CONNECT_SESSION   142

Definition at line 50 of file adsi.h.

Referenced by adsi_connect_session().

◆ ADSI_DELAY

#define ADSI_DELAY   0x90 /* Delay for given # (times 10) of ms */

Definition at line 85 of file adsi.h.

◆ ADSI_DIAL_PULSE_ONE

#define ADSI_DIAL_PULSE_ONE   0x91 /* Send a dial pulse "1" */

Definition at line 86 of file adsi.h.

◆ ADSI_DIAL_TONE_DETECT

#define ADSI_DIAL_TONE_DETECT   0x84 /* Wait for dialtone */

Definition at line 73 of file adsi.h.

◆ ADSI_DIR_FROM_LEFT

#define ADSI_DIR_FROM_LEFT   (0)

Definition at line 120 of file adsi.h.

Referenced by adsi_login(), and adsi_password().

◆ ADSI_DIR_FROM_RIGHT

#define ADSI_DIR_FROM_RIGHT   (1)

Definition at line 121 of file adsi.h.

◆ ADSI_DISC_SESSION

#define ADSI_DISC_SESSION   133

Definition at line 41 of file adsi.h.

Referenced by adsi_disconnect_session().

◆ ADSI_DISP_CALL_BUF

#define ADSI_DISP_CALL_BUF   0x94 /* Display specified call buffer */

Definition at line 89 of file adsi.h.

◆ ADSI_DISPLAY_CALL_BUF

#define ADSI_DISPLAY_CALL_BUF   144

Definition at line 52 of file adsi.h.

◆ ADSI_DOWNLOAD_CONNECT

#define ADSI_DOWNLOAD_CONNECT   131

Definition at line 65 of file adsi.h.

Referenced by adsi_download_connect().

◆ ADSI_DOWNLOAD_DISC

#define ADSI_DOWNLOAD_DISC   132

Definition at line 66 of file adsi.h.

Referenced by adsi_download_disconnect().

◆ ADSI_ENCODED_DTMF

#define ADSI_ENCODED_DTMF   0x80 /* Transmit following chars with encoded dtmf */

Definition at line 69 of file adsi.h.

◆ ADSI_EXTENDED_DTMF

#define ADSI_EXTENDED_DTMF   0x8F /* Send DTMF tones for 250ms instead of 60 ms */

Definition at line 84 of file adsi.h.

◆ ADSI_FLASH

#define ADSI_FLASH   0x83 /* Flash switch-hook */

Definition at line 72 of file adsi.h.

◆ ADSI_GOTO_LINE

#define ADSI_GOTO_LINE   0x8B /* Go to given page and line number */

Definition at line 80 of file adsi.h.

◆ ADSI_GOTO_LINE_REL

#define ADSI_GOTO_LINE_REL   0x8C /* Go to given line (relative to current) */

Definition at line 81 of file adsi.h.

◆ ADSI_INFO_PAGE

#define ADSI_INFO_PAGE   0x0

Definition at line 106 of file adsi.h.

Referenced by adsi_channel_restore(), adsi_print(), and adsi_prog().

◆ ADSI_INFORMATION

#define ADSI_INFORMATION   132

Definition at line 40 of file adsi.h.

◆ ADSI_INIT_SOFTKEY_LINE

#define ADSI_INIT_SOFTKEY_LINE   129

Definition at line 37 of file adsi.h.

Referenced by adsi_set_keys().

◆ ADSI_INPUT_CONTROL

#define ADSI_INPUT_CONTROL   137

Definition at line 45 of file adsi.h.

Referenced by adsi_input_control().

◆ ADSI_INPUT_FORMAT

#define ADSI_INPUT_FORMAT   138

Definition at line 46 of file adsi.h.

Referenced by adsi_input_format().

◆ ADSI_JUST_CENT

#define ADSI_JUST_CENT   0x0 /* Center */

◆ ADSI_JUST_IND

#define ADSI_JUST_IND   0x3 /* Indent */

Definition at line 115 of file adsi.h.

Referenced by str2align().

◆ ADSI_JUST_LEFT

#define ADSI_JUST_LEFT   0x2

◆ ADSI_JUST_RIGHT

#define ADSI_JUST_RIGHT   0x1

Definition at line 113 of file adsi.h.

Referenced by str2align().

◆ ADSI_KEY_APPS

#define ADSI_KEY_APPS   16 /* 16 to 33 reserved for applications */

◆ ADSI_KEY_HILITE

#define ADSI_KEY_HILITE   0x40 /* Highlight key */

Definition at line 118 of file adsi.h.

◆ ADSI_KEY_SKT

#define ADSI_KEY_SKT   0x80 /* Load from SKT */

Definition at line 117 of file adsi.h.

Referenced by adsi_delete(), adsi_folders(), adsi_message(), adsi_status(), and adsi_status2().

◆ ADSI_LINE_CONTROL

#define ADSI_LINE_CONTROL   131

Definition at line 39 of file adsi.h.

Referenced by adsi_set_line().

◆ ADSI_LINE_NUMBER

#define ADSI_LINE_NUMBER   0x85 /* Send current line number using DTMF/encoded DTMF */

Definition at line 74 of file adsi.h.

◆ ADSI_LOAD_DEFAULT

#define ADSI_LOAD_DEFAULT   141

Definition at line 49 of file adsi.h.

◆ ADSI_LOAD_PREDEF_DISP

#define ADSI_LOAD_PREDEF_DISP   129 /* Load predefined display */

Definition at line 63 of file adsi.h.

◆ ADSI_LOAD_SCRIPT

#define ADSI_LOAD_SCRIPT   130

Definition at line 64 of file adsi.h.

◆ ADSI_LOAD_SOFTKEY

#define ADSI_LOAD_SOFTKEY   128

Definition at line 36 of file adsi.h.

Referenced by adsi_load_soft_key().

◆ ADSI_LOAD_SOFTKEY_TABLE

#define ADSI_LOAD_SOFTKEY_TABLE   128 /* Conveniently identical to the soft version */

Definition at line 62 of file adsi.h.

◆ ADSI_LOAD_VIRTUAL_DISP

#define ADSI_LOAD_VIRTUAL_DISP   130

Definition at line 38 of file adsi.h.

Referenced by adsi_display().

◆ ADSI_MOVE_DATA

#define ADSI_MOVE_DATA   140

Definition at line 48 of file adsi.h.

◆ ADSI_MSG_DISPLAY

#define ADSI_MSG_DISPLAY   132

◆ ADSI_MSG_DOWNLOAD

#define ADSI_MSG_DOWNLOAD   133

Definition at line 33 of file adsi.h.

Referenced by adsi_begin_download(), adsi_end_download(), adsi_load_vmail(), and adsi_prog().

◆ ADSI_OFF_HOOK

#define ADSI_OFF_HOOK   0x82 /* Close switch-hook */

Definition at line 71 of file adsi.h.

◆ ADSI_ON_HOOK

#define ADSI_ON_HOOK   0x81 /* Open switch-hook */

Definition at line 70 of file adsi.h.

◆ ADSI_PAGE_DOWN

#define ADSI_PAGE_DOWN   0x8E /* Go down one page */

Definition at line 83 of file adsi.h.

◆ ADSI_PAGE_UP

#define ADSI_PAGE_UP   0x8D /* Go up one page */

Definition at line 82 of file adsi.h.

◆ ADSI_QUERY_CONFIG

#define ADSI_QUERY_CONFIG   149

Definition at line 57 of file adsi.h.

Referenced by adsi_query_cpeinfo().

◆ ADSI_QUERY_CPEID

#define ADSI_QUERY_CPEID   150

Definition at line 58 of file adsi.h.

Referenced by adsi_query_cpeid().

◆ ADSI_SEND_CHARS

#define ADSI_SEND_CHARS   0x87 /* Send collected digits/characters */

Definition at line 76 of file adsi.h.

◆ ADSI_SWITCH_TO_ALT

#define ADSI_SWITCH_TO_ALT   146

Definition at line 54 of file adsi.h.

◆ ADSI_SWITCH_TO_APP

#define ADSI_SWITCH_TO_APP   151

Definition at line 59 of file adsi.h.

◆ ADSI_SWITCH_TO_DATA

#define ADSI_SWITCH_TO_DATA   134

Definition at line 42 of file adsi.h.

Referenced by adsi_data_mode(), and adsi_transmit_message_full().

◆ ADSI_SWITCH_TO_DATA2

#define ADSI_SWITCH_TO_DATA2   0x92 /* Switch CPE to data mode */

Definition at line 87 of file adsi.h.

Referenced by adsi_load_soft_key().

◆ ADSI_SWITCH_TO_GRAPHICS

#define ADSI_SWITCH_TO_GRAPHICS   147

Definition at line 55 of file adsi.h.

◆ ADSI_SWITCH_TO_PERIPH

#define ADSI_SWITCH_TO_PERIPH   139

Definition at line 47 of file adsi.h.

◆ ADSI_SWITCH_TO_VOICE

#define ADSI_SWITCH_TO_VOICE   135

Definition at line 43 of file adsi.h.

Referenced by adsi_transmit_message_full(), and adsi_voice_mode().

◆ ADSI_SWITCH_TO_VOICE2

#define ADSI_SWITCH_TO_VOICE2   0x93 /* Switch CPE to voice mode */

Definition at line 88 of file adsi.h.

◆ ADSI_TAB_COLUMN

#define ADSI_TAB_COLUMN   0x8A /* Display specified display column of current line */

Definition at line 79 of file adsi.h.

◆ AST_ADSI_VERSION

#define AST_ADSI_VERSION   1

Definition at line 123 of file adsi.h.

Function Documentation

◆ ast_adsi_available()

int ast_adsi_available ( struct ast_channel chan)

Returns non-zero if Channel does or might support ADSI.

Parameters
chanChannel to check

Definition at line 263 of file adsi.c.

References ast_rwlock_rdlock, ast_rwlock_unlock, adsi_funcs::available, and func_lock.

Referenced by adsi_begin(), adsi_delete(), adsi_exec(), adsi_folders(), adsi_goodbye(), adsi_login(), adsi_message(), adsi_password(), adsi_status(), adsi_status2(), AST_TEST_DEFINE(), vm_newuser_setup(), vm_options(), and vm_tempgreeting().

264 {
265  int res = 0;
268  res = installed_funcs->available(chan);
269  }
271  return res;
272 }
#define ast_rwlock_rdlock(a)
Definition: lock.h:233
int(* available)(struct ast_channel *chan)
Definition: adsi.h:368
#define ast_rwlock_unlock(a)
Definition: lock.h:232
static ast_rwlock_t func_lock
Definition: adsi.c:30
static const struct adsi_funcs * installed_funcs
Definition: adsi.c:28

◆ ast_adsi_begin_download()

int ast_adsi_begin_download ( struct ast_channel chan,
char *  service,
unsigned char *  fdn,
unsigned char *  sec,
int  version 
)

Definition at line 32 of file adsi.c.

References ast_rwlock_rdlock, ast_rwlock_unlock, adsi_funcs::begin_download, and func_lock.

Referenced by adsi_load_vmail(), and adsi_prog().

33 {
34  int res = 0;
37  res = installed_funcs->begin_download(chan, service, fdn, sec, version);
38  }
40  return res;
41 }
#define ast_rwlock_rdlock(a)
Definition: lock.h:233
enum ast_cc_service_type service
Definition: chan_sip.c:949
#define ast_rwlock_unlock(a)
Definition: lock.h:232
static ast_rwlock_t func_lock
Definition: adsi.c:30
int(* begin_download)(struct ast_channel *chan, char *service, unsigned char *fdn, unsigned char *sec, int version)
Definition: adsi.h:347
static char version[AST_MAX_EXTENSION]
Definition: chan_ooh323.c:391
static const struct adsi_funcs * installed_funcs
Definition: adsi.c:28

◆ ast_adsi_channel_restore()

int ast_adsi_channel_restore ( 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 have to use the ast_adsi_channel_init again instead.

Parameters
chanChannel to restore
Return values
0on success (or adsi unavailable)
-1on hangup

Definition at line 54 of file adsi.c.

References ast_rwlock_rdlock, ast_rwlock_unlock, adsi_funcs::channel_restore, and func_lock.

55 {
56  int res = 0;
59  res = installed_funcs->channel_restore(chan);
60  }
62  return res;
63 }
#define ast_rwlock_rdlock(a)
Definition: lock.h:233
#define ast_rwlock_unlock(a)
Definition: lock.h:232
static ast_rwlock_t func_lock
Definition: adsi.c:30
int(* channel_restore)(struct ast_channel *chan)
Definition: adsi.h:349
static const struct adsi_funcs * installed_funcs
Definition: adsi.c:28

◆ ast_adsi_clear_screen()

int ast_adsi_clear_screen ( unsigned char *  buf)

Definition at line 241 of file adsi.c.

References ast_rwlock_rdlock, ast_rwlock_unlock, adsi_funcs::clear_screen, and func_lock.

242 {
243  int res = 0;
247  }
249  return res;
250 }
#define ast_rwlock_rdlock(a)
Definition: lock.h:233
char buf[BUFSIZE]
Definition: eagi_proxy.c:66
#define ast_rwlock_unlock(a)
Definition: lock.h:232
static ast_rwlock_t func_lock
Definition: adsi.c:30
int(* clear_screen)(unsigned char *buf)
Definition: adsi.h:366
static const struct adsi_funcs * installed_funcs
Definition: adsi.c:28

◆ ast_adsi_clear_soft_keys()

int ast_adsi_clear_soft_keys ( unsigned char *  buf)

Definition at line 230 of file adsi.c.

References ast_rwlock_rdlock, ast_rwlock_unlock, adsi_funcs::clear_soft_keys, and func_lock.

231 {
232  int res = 0;
236  }
238  return res;
239 }
#define ast_rwlock_rdlock(a)
Definition: lock.h:233
char buf[BUFSIZE]
Definition: eagi_proxy.c:66
#define ast_rwlock_unlock(a)
Definition: lock.h:232
static ast_rwlock_t func_lock
Definition: adsi.c:30
int(* clear_soft_keys)(unsigned char *buf)
Definition: adsi.h:365
static const struct adsi_funcs * installed_funcs
Definition: adsi.c:28

◆ ast_adsi_connect_session()

int ast_adsi_connect_session ( unsigned char *  buf,
unsigned char *  fdn,
int  ver 
)

Connects an ADSI Display Session.

Parameters
bufCharacter buffer to create parameter in (must have at least 256 free)
fdnOptional 4 byte Feature Download Number (for loading soft keys)
verOptional version number (0-255, or -1 to omit)
Return values
numberof bytes added to buffer
-1on error.

Definition at line 131 of file adsi.c.

References ast_rwlock_rdlock, ast_rwlock_unlock, adsi_funcs::connect_session, and func_lock.

132 {
133  int res = 0;
136  res = installed_funcs->connect_session(buf, fdn, ver);
137  }
139  return res;
140 }
#define ast_rwlock_rdlock(a)
Definition: lock.h:233
char buf[BUFSIZE]
Definition: eagi_proxy.c:66
#define ast_rwlock_unlock(a)
Definition: lock.h:232
static ast_rwlock_t func_lock
Definition: adsi.c:30
static const struct adsi_funcs * installed_funcs
Definition: adsi.c:28
int(* connect_session)(unsigned char *buf, unsigned char *fdn, int ver)
Definition: adsi.h:356

◆ ast_adsi_data_mode()

int ast_adsi_data_mode ( unsigned char *  buf)

Puts CPE in data mode.

Parameters
bufCharacter buffer to create parameter in (must have at least 256 free)
Return values
numberof bytes added to buffer
-1on error.

Definition at line 219 of file adsi.c.

References ast_rwlock_rdlock, ast_rwlock_unlock, adsi_funcs::data_mode, and func_lock.

Referenced by adsi_load_vmail().

220 {
221  int res = 0;
224  res = installed_funcs->data_mode(buf);
225  }
227  return res;
228 }
#define ast_rwlock_rdlock(a)
Definition: lock.h:233
char buf[BUFSIZE]
Definition: eagi_proxy.c:66
int(* data_mode)(unsigned char *buf)
Definition: adsi.h:364
#define ast_rwlock_unlock(a)
Definition: lock.h:232
static ast_rwlock_t func_lock
Definition: adsi.c:30
static const struct adsi_funcs * installed_funcs
Definition: adsi.c:28

◆ ast_adsi_disconnect_session()

int ast_adsi_disconnect_session ( unsigned char *  buf)

Disconnects a running session.

Parameters
bufCharacter buffer to create parameter in (must have at least 256 free)
Return values
numberof bytes added to buffer
-1on error.

Definition at line 197 of file adsi.c.

References ast_rwlock_rdlock, ast_rwlock_unlock, adsi_funcs::disconnect_session, and func_lock.

198 {
199  int res = 0;
203  }
205  return res;
206 }
#define ast_rwlock_rdlock(a)
Definition: lock.h:233
char buf[BUFSIZE]
Definition: eagi_proxy.c:66
#define ast_rwlock_unlock(a)
Definition: lock.h:232
int(* disconnect_session)(unsigned char *buf)
Definition: adsi.h:362
static ast_rwlock_t func_lock
Definition: adsi.c:30
static const struct adsi_funcs * installed_funcs
Definition: adsi.c:28

◆ ast_adsi_display()

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.

Parameters
bufCharacter buffer to create parameter in (must have at least 256 free)
pagePage to load (ADSI_COMM_PAGE or ADSI_INFO_PAGE)
lineLine number to load (1-4 for Comm page, 1-33 for info page)
justLine justification (ADSI_JUST_LEFT, ADSI_JUST_RIGHT, ADSI_JUST_CENT, ADSI_JUST_IND)
wrapWrap (1 = yes, 0 = no)
col1Text to place in first column
col2Text to place in second column
Return values
numberof bytes added to buffer
-1on error.

Definition at line 274 of file adsi.c.

References ast_rwlock_rdlock, ast_rwlock_unlock, adsi_funcs::display, and func_lock.

Referenced by adsi_folders(), adsi_goodbye(), adsi_load_vmail(), adsi_login(), adsi_logo(), adsi_message(), adsi_prog(), adsi_status(), adsi_status2(), vm_newuser_setup(), vm_options(), and vm_tempgreeting().

275 {
276  int res = 0;
279  res = installed_funcs->display(buf, page, line, just, wrap, col1, col2);
280  }
282  return res;
283 }
#define ast_rwlock_rdlock(a)
Definition: lock.h:233
char buf[BUFSIZE]
Definition: eagi_proxy.c:66
int(* display)(unsigned char *buf, int page, int line, int just, int wrap, char *col1, char *col2)
Definition: adsi.h:369
#define ast_rwlock_unlock(a)
Definition: lock.h:232
static ast_rwlock_t func_lock
Definition: adsi.c:30
static const struct adsi_funcs * installed_funcs
Definition: adsi.c:28

◆ ast_adsi_download_connect()

int ast_adsi_download_connect ( unsigned char *  buf,
char *  service,
unsigned char *  fdn,
unsigned char *  sec,
int  ver 
)

Begin an ADSI script download.

Parameters
bufCharacter buffer to create parameter in (must have at least 256 free)
servicea 1-18 byte name of the feature
fdn4 byte Feature Download Number (for loading soft keys)
sec4 byte vendor security code
verversion number (0-255, or -1 to omit)
Return values
numberof bytes added to buffer
-1on error.

Definition at line 186 of file adsi.c.

References ast_rwlock_rdlock, ast_rwlock_unlock, adsi_funcs::download_connect, and func_lock.

187 {
188  int res = 0;
191  res = installed_funcs->download_connect(buf, service, fdn, sec, ver);
192  }
194  return res;
195 }
#define ast_rwlock_rdlock(a)
Definition: lock.h:233
int(* download_connect)(unsigned char *buf, char *service, unsigned char *fdn, unsigned char *sec, int ver)
Definition: adsi.h:361
char buf[BUFSIZE]
Definition: eagi_proxy.c:66
enum ast_cc_service_type service
Definition: chan_sip.c:949
#define ast_rwlock_unlock(a)
Definition: lock.h:232
static ast_rwlock_t func_lock
Definition: adsi.c:30
static const struct adsi_funcs * installed_funcs
Definition: adsi.c:28

◆ ast_adsi_download_disconnect()

int ast_adsi_download_disconnect ( unsigned char *  buf)

Disconnects (and hopefully saves) a downloaded script.

Parameters
bufCharacter buffer to create parameter in (must have at least 256 free)
Return values
numberof bytes added to buffer
-1on error.

Definition at line 208 of file adsi.c.

References ast_rwlock_rdlock, ast_rwlock_unlock, adsi_funcs::download_disconnect, and func_lock.

Referenced by adsi_load_vmail().

209 {
210  int res = 0;
214  }
216  return res;
217 }
#define ast_rwlock_rdlock(a)
Definition: lock.h:233
char buf[BUFSIZE]
Definition: eagi_proxy.c:66
#define ast_rwlock_unlock(a)
Definition: lock.h:232
static ast_rwlock_t func_lock
Definition: adsi.c:30
static const struct adsi_funcs * installed_funcs
Definition: adsi.c:28
int(* download_disconnect)(unsigned char *buf)
Definition: adsi.h:363

◆ ast_adsi_end_download()

int ast_adsi_end_download ( struct ast_channel chan)

Definition at line 43 of file adsi.c.

References ast_rwlock_rdlock, ast_rwlock_unlock, adsi_funcs::end_download, and func_lock.

Referenced by adsi_load_vmail(), and adsi_prog().

44 {
45  int res = 0;
48  res = installed_funcs->end_download(chan);
49  }
51  return res;
52 }
#define ast_rwlock_rdlock(a)
Definition: lock.h:233
int(* end_download)(struct ast_channel *chan)
Definition: adsi.h:348
#define ast_rwlock_unlock(a)
Definition: lock.h:232
static ast_rwlock_t func_lock
Definition: adsi.c:30
static const struct adsi_funcs * installed_funcs
Definition: adsi.c:28

◆ ast_adsi_get_cpeid()

int ast_adsi_get_cpeid ( struct ast_channel chan,
unsigned char *  cpeid,
int  voice 
)

Get CPE ID from an attached ADSI compatible CPE. Returns 1 on success, storing 4 bytes of CPE ID at 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.

Definition at line 164 of file adsi.c.

References ast_rwlock_rdlock, ast_rwlock_unlock, func_lock, and adsi_funcs::get_cpeid.

Referenced by cpeid_exec().

165 {
166  int res = 0;
169  res = installed_funcs->get_cpeid(chan, cpeid, voice);
170  }
172  return res;
173 }
#define ast_rwlock_rdlock(a)
Definition: lock.h:233
#define ast_rwlock_unlock(a)
Definition: lock.h:232
static ast_rwlock_t func_lock
Definition: adsi.c:30
int(* get_cpeid)(struct ast_channel *chan, unsigned char *cpeid, int voice)
Definition: adsi.h:359
static const struct adsi_funcs * installed_funcs
Definition: adsi.c:28

◆ ast_adsi_get_cpeinfo()

int ast_adsi_get_cpeinfo ( struct ast_channel chan,
int *  width,
int *  height,
int *  buttons,
int  voice 
)

Definition at line 175 of file adsi.c.

References ast_rwlock_rdlock, ast_rwlock_unlock, func_lock, and adsi_funcs::get_cpeinfo.

Referenced by cpeid_exec().

176 {
177  int res = 0;
180  res = installed_funcs->get_cpeinfo(chan, width, height, buttons, voice);
181  }
183  return res;
184 }
#define ast_rwlock_rdlock(a)
Definition: lock.h:233
#define ast_rwlock_unlock(a)
Definition: lock.h:232
static ast_rwlock_t func_lock
Definition: adsi.c:30
int(* get_cpeinfo)(struct ast_channel *chan, int *width, int *height, int *buttons, int voice)
Definition: adsi.h:360
static const struct adsi_funcs * installed_funcs
Definition: adsi.c:28

◆ ast_adsi_input_control()

int ast_adsi_input_control ( unsigned char *  buf,
int  page,
int  line,
int  display,
int  format,
int  just 
)

Set input information.

Parameters
bufCharacter buffer to create parameter in (must have at least 256 free)
pageWhich page to input on (ADSI_COMM_PAGE or ADSI_INFO_PAGE)
lineLine number to input on
displaySet to zero to obscure input, or 1 to leave visible
formatFormat number to use (0-7)
justJustification (left, right center, indent)
Return values
numberof bytes added to buffer
-1on error.

Definition at line 318 of file adsi.c.

References ast_rwlock_rdlock, ast_rwlock_unlock, func_lock, and adsi_funcs::input_control.

Referenced by adsi_login(), and adsi_password().

319 {
320  int res = 0;
323  res = installed_funcs->input_control(buf, page, line, display, format, just);
324  }
326  return res;
327 }
#define ast_rwlock_rdlock(a)
Definition: lock.h:233
char buf[BUFSIZE]
Definition: eagi_proxy.c:66
#define ast_rwlock_unlock(a)
Definition: lock.h:232
static ast_rwlock_t func_lock
Definition: adsi.c:30
int(* input_control)(unsigned char *buf, int page, int line, int display, int format, int just)
Definition: adsi.h:373
static const struct adsi_funcs * installed_funcs
Definition: adsi.c:28
static snd_pcm_format_t format
Definition: chan_alsa.c:102

◆ ast_adsi_input_format()

int ast_adsi_input_format ( unsigned char *  buf,
int  num,
int  dir,
int  wrap,
char *  format1,
char *  format2 
)

Set input format.

Parameters
bufCharacter buffer to create parameter in (must have at least 256 free)
numWhich format we are setting
dirWhich direction (ADSI_DIR_FROM_LEFT or ADSI_DIR_FROM_RIGHT)
wrapSet to 1 to permit line wrap, or 0 if not
format1Format for column 1
format2Format for column 2
Return values
numberof bytes added to buffer
-1on error.

Definition at line 329 of file adsi.c.

References ast_rwlock_rdlock, ast_rwlock_unlock, func_lock, and adsi_funcs::input_format.

Referenced by adsi_login(), and adsi_password().

330 {
331  int res = 0;
334  res = installed_funcs->input_format(buf, num, dir, wrap, format1, format2);
335  }
337  return res;
338 }
#define ast_rwlock_rdlock(a)
Definition: lock.h:233
char buf[BUFSIZE]
Definition: eagi_proxy.c:66
int(* input_format)(unsigned char *buf, int num, int dir, int wrap, char *format1, char *format2)
Definition: adsi.h:374
#define ast_rwlock_unlock(a)
Definition: lock.h:232
static ast_rwlock_t func_lock
Definition: adsi.c:30
static const struct adsi_funcs * installed_funcs
Definition: adsi.c:28

◆ ast_adsi_install_funcs()

void ast_adsi_install_funcs ( const struct adsi_funcs funcs)

Definition at line 340 of file adsi.c.

References ast_log, ast_rwlock_unlock, ast_rwlock_wrlock, current_adsi_version, func_lock, LOG_WARNING, and adsi_funcs::version.

Referenced by load_module(), and unload_module().

341 {
342  if (funcs && funcs->version < current_adsi_version) {
343  ast_log(LOG_WARNING, "Cannot install ADSI function pointers due to version mismatch."
344  "Ours: %d, Theirs: %u\n", current_adsi_version, funcs->version);
345  return;
346  }
347 
349  installed_funcs = funcs;
351 }
static const int current_adsi_version
Definition: adsi.c:29
#define LOG_WARNING
Definition: logger.h:274
#define ast_rwlock_unlock(a)
Definition: lock.h:232
static ast_rwlock_t func_lock
Definition: adsi.c:30
#define ast_log
Definition: astobj2.c:42
unsigned int version
Definition: adsi.h:346
static const struct adsi_funcs * installed_funcs
Definition: adsi.c:28
#define ast_rwlock_wrlock(a)
Definition: lock.h:234

◆ ast_adsi_load_session()

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, or 0-255 for a specific version.

Parameters
chanChannel to test for loaded app
appFour character app name (must be unique to your application)
veroptional version number
dataNon-zero if you want to be put in data mode
Return values
0if scripts is not loaded or not an ADSI CPE
-1on hangup
1if script already loaded.

Definition at line 76 of file adsi.c.

References ast_rwlock_rdlock, ast_rwlock_unlock, func_lock, and adsi_funcs::load_session.

Referenced by adsi_begin(), adsi_load_vmail(), adsi_prog(), and cpeid_exec().

77 {
78  int res = 0;
81  res = installed_funcs->load_session(chan, app, ver, data);
82  }
84  return res;
85 }
#define ast_rwlock_rdlock(a)
Definition: lock.h:233
#define ast_rwlock_unlock(a)
Definition: lock.h:232
static ast_rwlock_t func_lock
Definition: adsi.c:30
static const struct adsi_funcs * installed_funcs
Definition: adsi.c:28
int(* load_session)(struct ast_channel *chan, unsigned char *app, int ver, int data)
Definition: adsi.h:351
static const char app[]
Definition: app_mysql.c:62

◆ ast_adsi_load_soft_key()

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.

Parameters
bufCharacter buffer to create parameter in (must have at least 256 free)
keyKey code from 2 to 33, for which key we are loading
llabelLong label for key (1-18 bytes)
slabelShort label for key (1-7 bytes)
retOptional return sequence (NULL for none)
datawhether to put CPE in data mode before sending digits
Return values
numberof bytes added to buffer
-1on error.

Definition at line 296 of file adsi.c.

References ast_rwlock_rdlock, ast_rwlock_unlock, func_lock, and adsi_funcs::load_soft_key.

Referenced by adsi_load_vmail(), and adsi_login().

297 {
298  int res = 0;
301  res = installed_funcs->load_soft_key(buf, key, llabel, slabel, ret, data);
302  }
304  return res;
305 }
#define ast_rwlock_rdlock(a)
Definition: lock.h:233
char buf[BUFSIZE]
Definition: eagi_proxy.c:66
#define ast_rwlock_unlock(a)
Definition: lock.h:232
static ast_rwlock_t func_lock
Definition: adsi.c:30
static const struct adsi_funcs * installed_funcs
Definition: adsi.c:28
int(* load_soft_key)(unsigned char *buf, int key, const char *llabel, const char *slabel, char *ret, int data)
Definition: adsi.h:371

◆ ast_adsi_print()

int ast_adsi_print ( struct ast_channel chan,
char **  lines,
int *  align,
int  voice 
)

Display some stuff on the screen.

Parameters
chanChannel to display on
linesNULL-terminated list of things to print (no more than 4 recommended)
alignlist of alignments to use (ADSI_JUST_LEFT, ADSI_JUST_RIGHT, ADSI_JUST_CEN, etc..)
voicewhether to jump into voice mode when finished
Return values
0on success (or adsi unavailable)
-1on hangup

Definition at line 65 of file adsi.c.

References ast_rwlock_rdlock, ast_rwlock_unlock, func_lock, and adsi_funcs::print.

Referenced by cpeid_setstatus().

66 {
67  int res = 0;
70  res = installed_funcs->print(chan, lines, align, voice);
71  }
73  return res;
74 }
#define ast_rwlock_rdlock(a)
Definition: lock.h:233
#define ast_rwlock_unlock(a)
Definition: lock.h:232
static ast_rwlock_t func_lock
Definition: adsi.c:30
int(* print)(struct ast_channel *chan, char **lines, int *align, int voice)
Definition: adsi.h:350
static const struct adsi_funcs * installed_funcs
Definition: adsi.c:28

◆ ast_adsi_query_cpeid()

int ast_adsi_query_cpeid ( unsigned char *  buf)

Build Query CPE ID of equipment. Returns number of bytes added to message

Definition at line 142 of file adsi.c.

References ast_rwlock_rdlock, ast_rwlock_unlock, func_lock, and adsi_funcs::query_cpeid.

143 {
144  int res = 0;
148  }
150  return res;
151 }
#define ast_rwlock_rdlock(a)
Definition: lock.h:233
char buf[BUFSIZE]
Definition: eagi_proxy.c:66
#define ast_rwlock_unlock(a)
Definition: lock.h:232
static ast_rwlock_t func_lock
Definition: adsi.c:30
int(* query_cpeid)(unsigned char *buf)
Definition: adsi.h:357
static const struct adsi_funcs * installed_funcs
Definition: adsi.c:28

◆ ast_adsi_query_cpeinfo()

int ast_adsi_query_cpeinfo ( unsigned char *  buf)

Definition at line 153 of file adsi.c.

References ast_rwlock_rdlock, ast_rwlock_unlock, func_lock, and adsi_funcs::query_cpeinfo.

154 {
155  int res = 0;
159  }
161  return res;
162 }
#define ast_rwlock_rdlock(a)
Definition: lock.h:233
int(* query_cpeinfo)(unsigned char *buf)
Definition: adsi.h:358
char buf[BUFSIZE]
Definition: eagi_proxy.c:66
#define ast_rwlock_unlock(a)
Definition: lock.h:232
static ast_rwlock_t func_lock
Definition: adsi.c:30
static const struct adsi_funcs * installed_funcs
Definition: adsi.c:28

◆ ast_adsi_read_encoded_dtmf()

int ast_adsi_read_encoded_dtmf ( struct ast_channel chan,
unsigned char *  buf,
int  maxlen 
)

Read some encoded DTMF data. Returns number of bytes received

Definition at line 120 of file adsi.c.

References ast_rwlock_rdlock, ast_rwlock_unlock, func_lock, and adsi_funcs::read_encoded_dtmf.

121 {
122  int res = 0;
125  res = installed_funcs->read_encoded_dtmf(chan, buf, maxlen);
126  }
128  return res;
129 }
#define ast_rwlock_rdlock(a)
Definition: lock.h:233
char buf[BUFSIZE]
Definition: eagi_proxy.c:66
#define ast_rwlock_unlock(a)
Definition: lock.h:232
static ast_rwlock_t func_lock
Definition: adsi.c:30
static const struct adsi_funcs * installed_funcs
Definition: adsi.c:28
int(* read_encoded_dtmf)(struct ast_channel *chan, unsigned char *buf, int maxlen)
Definition: adsi.h:355

◆ ast_adsi_set_keys()

int ast_adsi_set_keys ( unsigned char *  buf,
unsigned char *  keys 
)

Set which soft keys should be displayed.

Parameters
bufCharacter buffer to create parameter in (must have at least 256 free)
keysArray of 8 unsigned chars with the key numbers, may be OR'd with ADSI_KEY_HILITE But remember, the last two keys aren't real keys, they're for scrolling
Return values
numberof bytes added to buffer
-1on error.

Definition at line 307 of file adsi.c.

References ast_rwlock_rdlock, ast_rwlock_unlock, func_lock, and adsi_funcs::set_keys.

Referenced by adsi_delete(), adsi_folders(), adsi_login(), adsi_message(), adsi_password(), adsi_status(), and adsi_status2().

308 {
309  int res = 0;
312  res = installed_funcs->set_keys(buf, keys);
313  }
315  return res;
316 }
#define ast_rwlock_rdlock(a)
Definition: lock.h:233
char buf[BUFSIZE]
Definition: eagi_proxy.c:66
#define ast_rwlock_unlock(a)
Definition: lock.h:232
static ast_rwlock_t func_lock
Definition: adsi.c:30
static const struct adsi_funcs * installed_funcs
Definition: adsi.c:28
int(* set_keys)(unsigned char *buf, unsigned char *keys)
Definition: adsi.h:372

◆ ast_adsi_set_line()

int ast_adsi_set_line ( unsigned char *  buf,
int  page,
int  line 
)

Sets the current line and page.

Parameters
bufCharacter buffer to create parameter in (must have at least 256 free)
pageWhich page (ADSI_COMM_PAGE or ADSI_INFO_PAGE)
lineLine number (1-33 for info page, 1-4 for comm page)
Return values
numberof bytes added to buffer
-1on error.

Definition at line 285 of file adsi.c.

References ast_rwlock_rdlock, ast_rwlock_unlock, func_lock, and adsi_funcs::set_line.

Referenced by adsi_folders(), adsi_goodbye(), adsi_load_vmail(), adsi_login(), adsi_message(), adsi_password(), adsi_prog(), adsi_status(), adsi_status2(), vm_newuser_setup(), vm_options(), and vm_tempgreeting().

286 {
287  int res = 0;
290  res = installed_funcs->set_line(buf, page, line);
291  }
293  return res;
294 }
#define ast_rwlock_rdlock(a)
Definition: lock.h:233
char buf[BUFSIZE]
Definition: eagi_proxy.c:66
#define ast_rwlock_unlock(a)
Definition: lock.h:232
static ast_rwlock_t func_lock
Definition: adsi.c:30
static const struct adsi_funcs * installed_funcs
Definition: adsi.c:28
int(* set_line)(unsigned char *buf, int page, int line)
Definition: adsi.h:370

◆ ast_adsi_transmit_message()

int ast_adsi_transmit_message ( struct ast_channel chan,
unsigned char *  msg,
int  msglen,
int  msgtype 
)

Definition at line 98 of file adsi.c.

References ast_rwlock_rdlock, ast_rwlock_unlock, func_lock, and adsi_funcs::transmit_message.

Referenced by adsi_delete(), adsi_folders(), adsi_goodbye(), adsi_load_vmail(), adsi_login(), adsi_message(), adsi_password(), adsi_prog(), adsi_status(), adsi_status2(), vm_newuser_setup(), vm_options(), and vm_tempgreeting().

99 {
100  int res = 0;
103  res = installed_funcs->transmit_message(chan, msg, msglen, msgtype);
104  }
106  return res;
107 }
#define ast_rwlock_rdlock(a)
Definition: lock.h:233
int(* transmit_message)(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype)
Definition: adsi.h:353
#define ast_rwlock_unlock(a)
Definition: lock.h:232
static ast_rwlock_t func_lock
Definition: adsi.c:30
static const struct adsi_funcs * installed_funcs
Definition: adsi.c:28

◆ ast_adsi_transmit_message_full()

int ast_adsi_transmit_message_full ( struct ast_channel chan,
unsigned char *  msg,
int  msglen,
int  msgtype,
int  dowait 
)

Definition at line 109 of file adsi.c.

References ast_rwlock_rdlock, ast_rwlock_unlock, func_lock, and adsi_funcs::transmit_message_full.

110 {
111  int res = 0;
114  res = installed_funcs->transmit_message_full(chan, msg, msglen, msgtype, dowait);
115  }
117  return res;
118 }
#define ast_rwlock_rdlock(a)
Definition: lock.h:233
#define ast_rwlock_unlock(a)
Definition: lock.h:232
static ast_rwlock_t func_lock
Definition: adsi.c:30
static const struct adsi_funcs * installed_funcs
Definition: adsi.c:28
int(* transmit_message_full)(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype, int dowait)
Definition: adsi.h:354

◆ ast_adsi_unload_session()

int ast_adsi_unload_session ( struct ast_channel chan)

Definition at line 87 of file adsi.c.

References ast_rwlock_rdlock, ast_rwlock_unlock, func_lock, and adsi_funcs::unload_session.

Referenced by adsi_prog(), cpeid_exec(), and vm_execmain().

88 {
89  int res = 0;
92  res = installed_funcs->unload_session(chan);
93  }
95  return res;
96 }
#define ast_rwlock_rdlock(a)
Definition: lock.h:233
int(* unload_session)(struct ast_channel *chan)
Definition: adsi.h:352
#define ast_rwlock_unlock(a)
Definition: lock.h:232
static ast_rwlock_t func_lock
Definition: adsi.c:30
static const struct adsi_funcs * installed_funcs
Definition: adsi.c:28

◆ ast_adsi_voice_mode()

int ast_adsi_voice_mode ( unsigned char *  buf,
int  when 
)

Puts CPE in voice mode.

Parameters
bufCharacter buffer to create parameter in (must have at least 256 free)
when(a time in seconds) to make the switch
Return values
numberof bytes added to buffer
-1on error.

Definition at line 252 of file adsi.c.

References ast_rwlock_rdlock, ast_rwlock_unlock, func_lock, and adsi_funcs::voice_mode.

Referenced by adsi_delete(), adsi_folders(), adsi_goodbye(), adsi_load_vmail(), adsi_login(), adsi_message(), adsi_password(), adsi_status(), adsi_status2(), vm_newuser_setup(), vm_options(), and vm_tempgreeting().

253 {
254  int res = 0;
257  res = installed_funcs->voice_mode(buf, when);
258  }
260  return res;
261 }
int(* voice_mode)(unsigned char *buf, int when)
Definition: adsi.h:367
#define ast_rwlock_rdlock(a)
Definition: lock.h:233
char buf[BUFSIZE]
Definition: eagi_proxy.c:66
#define ast_rwlock_unlock(a)
Definition: lock.h:232
static ast_rwlock_t func_lock
Definition: adsi.c:30
static const struct adsi_funcs * installed_funcs
Definition: adsi.c:28