dect
/
asterisk
Archived
13
0
Fork 0

Version 0.3.0 from FTP

git-svn-id: http://svn.digium.com/svn/asterisk/trunk@572 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
markster 2002-12-26 19:38:27 +00:00
parent 8751a1d567
commit 1285380bcc
6 changed files with 39 additions and 4 deletions

View File

@ -33,6 +33,12 @@ extern "C" {
*/
extern int ast_app_getdata(struct ast_channel *c, char *prompt, char *s, int maxlen, int timeout);
//! Record voice (after playing prompt if specified), waiting for silence (in ms) up to a given timeout (in s) or '#'
int ast_app_getvoice(struct ast_channel *c, char *dest, char *dstfmt, char *prompt, int silence, int maxsec);
//! Determine if a given mailbox has any voicemail
extern int ast_app_has_voicemail(char *mailbox);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif

View File

@ -43,7 +43,7 @@ extern "C" {
struct ast_generator {
void *(*alloc)(struct ast_channel *chan, void *params);
void (*release)(struct ast_channel *chan, void *data);
int (*generate)(struct ast_channel *chan, void *data, int len);
int (*generate)(struct ast_channel *chan, void *data, int len, int samples);
};
//! Main Channel structure associated with a channel.
@ -135,6 +135,8 @@ struct ast_channel {
char *callerid;
/*! Malloc'd ANI */
char *ani;
/*! Malloc'd RDNIS */
char *rdnis;
/*! Current extension context */
@ -170,6 +172,13 @@ struct ast_channel {
/*! Where to forward to if asked to dial on this interface */
char call_forward[AST_MAX_EXTENSION];
/*! Tone zone */
struct tone_zone *zone;
/* Frames in/out counters */
unsigned int fin;
unsigned int fout;
/* A linked list for variables */
struct ast_var_t *vars;
AST_LIST_HEAD(varshead,ast_var_t) varshead;
@ -179,6 +188,8 @@ struct ast_channel {
};
struct chanmon;
#define AST_CDR_TRANSFER (1 << 0)
#define AST_CDR_FORWARD (1 << 1)
#define AST_CDR_CALLWAIT (1 << 2)
@ -240,7 +251,7 @@ struct ast_channel *ast_request(char *type, int format, void *data);
* Returns an ast_channel on success or no answer, NULL on failure. Check the value of chan->_state
* to know if the call was answered or not.
*/
struct ast_channel *ast_request_and_dial(char *type, int format, void *data, int timeout, int *reason);
struct ast_channel *ast_request_and_dial(char *type, int format, void *data, int timeout, int *reason, char *callerid);
//! Registers a channel
/*!
@ -349,6 +360,18 @@ int ast_waitfor(struct ast_channel *chan, int ms);
*/
int ast_safe_sleep(struct ast_channel *chan, int ms);
//! Wait for a specied amount of time, looking for hangups and a condition argument
/*!
* \param chan channel to wait for
* \param ms length of time in milliseconds to sleep
* \param cond a function pointer for testing continue condition
* \param data argument to be passed to the condition test function
* Waits for a specified amount of time, servicing the channel as required. If cond
* returns 0, this function returns.
* returns -1 on hangup, otherwise 0.
*/
int ast_safe_sleep_conditional(struct ast_channel *chan, int ms, int (*cond)(void*), void *data );
//! Waits for activity on a group of channels
/*!
* \param chan an array of pointers to channels
@ -574,7 +597,7 @@ int ast_activate_generator(struct ast_channel *chan, struct ast_generator *gen,
/*! Deactive an active generator */
void ast_deactivate_generator(struct ast_channel *chan);
void ast_set_callerid(struct ast_channel *chan, char *callerid);
void ast_set_callerid(struct ast_channel *chan, char *callerid, int anitoo);
/*! Start a tone going */
int ast_tonepair_start(struct ast_channel *chan, int freq1, int freq2, int duration, int vol);
@ -583,8 +606,14 @@ void ast_tonepair_stop(struct ast_channel *chan);
/*! Play a tone pair for a given amount of time */
int ast_tonepair(struct ast_channel *chan, int freq1, int freq2, int duration, int vol);
/*! Automatically service a channel for us... */
int ast_autoservice_start(struct ast_channel *chan);
/*! Stop servicing a channel for us... Returns -1 on error or if channel has been hungup */
int ast_autoservice_stop(struct ast_channel *chan);
#ifdef DO_CRASH
#define CRASH do { *((int *)0) = 0; } while(0)
#define CRASH do { fprintf(stderr, "!! Forcing immediate crash a-la abort !!\n"); *((int *)0) = 0; } while(0)
#else
#define CRASH do { } while(0)
#endif

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.