diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2002-12-26 19:38:27 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2002-12-26 19:38:27 +0000 |
commit | 1285380bcc5c43ef77ed82c4fddd61d04c331c6c (patch) | |
tree | 4efd4ab47390e740057c67f93a475808406dc747 | |
parent | 8751a1d5673b0c577fbca9277e6c5c5f7a84930b (diff) |
Version 0.3.0 from FTP
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@572 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-x | include/asterisk/app.h | 6 | ||||
-rwxr-xr-x | include/asterisk/channel.h | 37 | ||||
-rwxr-xr-x | sounds/digits/dollars.gsm | bin | 1617 -> 1353 bytes | |||
-rwxr-xr-x | sounds/digits/hundred.gsm | bin | 1155 -> 1122 bytes | |||
-rwxr-xr-x | sounds/digits/million.gsm | bin | 1320 -> 1320 bytes | |||
-rwxr-xr-x | sounds/digits/thousand.gsm | bin | 1155 -> 1155 bytes |
6 files changed, 39 insertions, 4 deletions
diff --git a/include/asterisk/app.h b/include/asterisk/app.h index bf9c5b0b4..44c4186d2 100755 --- a/include/asterisk/app.h +++ b/include/asterisk/app.h @@ -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 diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index 8122bde36..9673fb099 100755 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -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 diff --git a/sounds/digits/dollars.gsm b/sounds/digits/dollars.gsm Binary files differindex ce972187e..2a0a67f5d 100755 --- a/sounds/digits/dollars.gsm +++ b/sounds/digits/dollars.gsm diff --git a/sounds/digits/hundred.gsm b/sounds/digits/hundred.gsm Binary files differindex 890cd90c7..beb7ddfe1 100755 --- a/sounds/digits/hundred.gsm +++ b/sounds/digits/hundred.gsm diff --git a/sounds/digits/million.gsm b/sounds/digits/million.gsm Binary files differindex 9d69ad548..bab5dd536 100755 --- a/sounds/digits/million.gsm +++ b/sounds/digits/million.gsm diff --git a/sounds/digits/thousand.gsm b/sounds/digits/thousand.gsm Binary files differindex b0591089e..bf4d3554e 100755 --- a/sounds/digits/thousand.gsm +++ b/sounds/digits/thousand.gsm |