vmodem.h File Reference

#include <asterisk/frame.h>
#include <asterisk/channel.h>
#include <asterisk/channel_pvt.h>

Include dependency graph for vmodem.h:

Go to the source code of this file.

Data Structures

struct  ast_modem_driver
struct  ast_modem_pvt
 Private data that needs to be filled by modem driver. More...


#define CHAR_DLE   0x10
#define CHAR_ETX   0x03
#define CHAR_DC4   0x14
#define MODEM_DEV_TELCO   0
#define MODEM_DTMF_NONE   (1 << 0)
#define MODEM_DTMF_AST   (1 << 1)
#define MODEM_DTMF_I4L   (1 << 2)
#define MODEM_MAX_LEN   30
#define AST_MAX_INIT_STR   256


int ast_register_modem_driver (struct ast_modem_driver *mc)
 Register a modem driver.
int ast_unregister_modem_driver (struct ast_modem_driver *mc)
 Unregisters a modem driver.
int ast_modem_send (struct ast_modem_pvt *p, char *cmd, int len)
 Sends command.
int ast_modem_expect (struct ast_modem_pvt *p, char *result, int timeout)
 Waits for result.
int ast_modem_read_response (struct ast_modem_pvt *p, int timeout)
 Waits for result.
struct ast_channelast_modem_new (struct ast_modem_pvt *i, int state)
 Used to start up the PBX on a RING.
void ast_modem_trim (char *s)
 Trim string of trailing stuff.

Define Documentation

#define AST_MAX_INIT_STR   256

Definition at line 38 of file vmodem.h.

#define CHAR_DC4   0x14

Definition at line 23 of file vmodem.h.

#define CHAR_DLE   0x10

Definition at line 21 of file vmodem.h.

#define CHAR_ETX   0x03

Definition at line 22 of file vmodem.h.


Definition at line 28 of file vmodem.h.


Definition at line 27 of file vmodem.h.

#define MODEM_DEV_TELCO   0

Definition at line 25 of file vmodem.h.


Definition at line 26 of file vmodem.h.

#define MODEM_DTMF_AST   (1 << 1)

Definition at line 31 of file vmodem.h.

#define MODEM_DTMF_I4L   (1 << 2)

Definition at line 32 of file vmodem.h.

#define MODEM_DTMF_NONE   (1 << 0)

Definition at line 30 of file vmodem.h.


Definition at line 36 of file vmodem.h.

#define MODEM_MAX_LEN   30

Definition at line 35 of file vmodem.h.


Definition at line 66 of file vmodem.h.


Definition at line 68 of file vmodem.h.


Definition at line 67 of file vmodem.h.

Function Documentation

int ast_modem_expect ( struct ast_modem_pvt p,
char *  result,
int  timeout 

Waits for result.

Wait for result to occur. Return non-zero if times out or error, last response is stored in p->response

struct ast_channel* ast_modem_new ( struct ast_modem_pvt i,
int  state 
) [read]

Used to start up the PBX on a RING.

Used by modem drivers to start up the PBX on a RING

int ast_modem_read_response ( struct ast_modem_pvt p,
int  timeout 

Waits for result.

Wait for result to occur. response is stored in p->response

int ast_modem_send ( struct ast_modem_pvt p,
char *  cmd,
int  len 

Sends command.

Send the command cmd (length len, or 0 if pure ascii) on modem

void ast_modem_trim ( char *  s  ) 

Trim string of trailing stuff.

Trim off trailing mess

int ast_register_modem_driver ( struct ast_modem_driver mc  ) 

Register a modem driver.

Register a driver

int ast_unregister_modem_driver ( struct ast_modem_driver mc  ) 

Unregisters a modem driver.

Unregister a driver

Generated on Wed Oct 28 17:01:04 2009 for Asterisk by  doxygen 1.5.6