@ -45,6 +45,8 @@
# ifndef _ASTERISK_CALLERID_H
# ifndef _ASTERISK_CALLERID_H
# define _ASTERISK_CALLERID_H
# define _ASTERISK_CALLERID_H
# include "asterisk/frame_defs.h"
# define MAX_CALLERID_SIZE 32000
# define MAX_CALLERID_SIZE 32000
# define CID_PRIVATE_NAME (1 << 0)
# define CID_PRIVATE_NAME (1 << 0)
@ -99,7 +101,7 @@ void callerid_init(void);
* \ return It returns the size
* \ return It returns the size
* ( in bytes ) of the data ( if it returns a size of 0 , there is probably an error )
* ( in bytes ) of the data ( if it returns a size of 0 , there is probably an error )
*/
*/
int callerid_generate ( unsigned char * buf , const char * number , const char * name , int flags , int callwaiting , in t codec ) ;
int callerid_generate ( unsigned char * buf , const char * number , const char * name , int flags , int callwaiting , format_ t codec ) ;
/*! \brief Create a callerID state machine
/*! \brief Create a callerID state machine
* \ param cid_signalling Type of signalling in use
* \ param cid_signalling Type of signalling in use
@ -122,7 +124,7 @@ struct callerid_state *callerid_new(int cid_signalling);
* \ retval 0 for " needs more samples "
* \ retval 0 for " needs more samples "
* \ retval 1 if the CallerID spill reception is complete .
* \ retval 1 if the CallerID spill reception is complete .
*/
*/
int callerid_feed ( struct callerid_state * cid , unsigned char * ubuf , int samples , in t codec ) ;
int callerid_feed ( struct callerid_state * cid , unsigned char * ubuf , int samples , format_ t codec ) ;
/*! \brief Read samples into the state machine.
/*! \brief Read samples into the state machine.
* \ param cid Which state machine to act upon
* \ param cid Which state machine to act upon
@ -136,7 +138,7 @@ int callerid_feed(struct callerid_state *cid, unsigned char *ubuf, int samples,
* \ retval 0 for " needs more samples "
* \ retval 0 for " needs more samples "
* \ retval 1 if the CallerID spill reception is complete .
* \ retval 1 if the CallerID spill reception is complete .
*/
*/
int callerid_feed_jp ( struct callerid_state * cid , unsigned char * ubuf , int samples , in t codec ) ;
int callerid_feed_jp ( struct callerid_state * cid , unsigned char * ubuf , int samples , format_ t codec ) ;
/*! \brief Extract info out of callerID state machine. Flags are listed above
/*! \brief Extract info out of callerID state machine. Flags are listed above
* \ param cid Callerid state machine to act upon
* \ param cid Callerid state machine to act upon
@ -175,7 +177,7 @@ void callerid_free(struct callerid_state *cid);
* \ details
* \ details
* Acts like callerid_generate except uses an asterisk format callerid string .
* Acts like callerid_generate except uses an asterisk format callerid string .
*/
*/
int ast_callerid_generate ( unsigned char * buf , const char * name , const char * number , in t codec ) ;
int ast_callerid_generate ( unsigned char * buf , const char * name , const char * number , format_ t codec ) ;
/*!
/*!
* \ brief Generate message waiting indicator
* \ brief Generate message waiting indicator
@ -185,13 +187,13 @@ int ast_callerid_generate(unsigned char *buf, const char *name, const char *numb
* \ see callerid_generate ( ) for more info as it uses the same encoding
* \ see callerid_generate ( ) for more info as it uses the same encoding
* \ version 1.6 .1 changed mdmf parameter to type , added name , number and flags for caller id message generation
* \ version 1.6 .1 changed mdmf parameter to type , added name , number and flags for caller id message generation
*/
*/
int ast_callerid_vmwi_generate ( unsigned char * buf , int active , int type , in t codec , const char * name ,
int ast_callerid_vmwi_generate ( unsigned char * buf , int active , int type , format_ t codec , const char * name ,
const char * number , int flags ) ;
const char * number , int flags ) ;
/*! \brief Generate Caller-ID spill but in a format suitable for Call Waiting(tm)'s Caller*ID(tm)
/*! \brief Generate Caller-ID spill but in a format suitable for Call Waiting(tm)'s Caller*ID(tm)
* \ see ast_callerid_generate ( ) for other details
* \ see ast_callerid_generate ( ) for other details
*/
*/
int ast_callerid_callwaiting_generate ( unsigned char * buf , const char * name , const char * number , in t codec ) ;
int ast_callerid_callwaiting_generate ( unsigned char * buf , const char * name , const char * number , format_ t codec ) ;
/*! \brief Destructively parse inbuf into name and location (or number)
/*! \brief Destructively parse inbuf into name and location (or number)
* \ details
* \ details
@ -216,7 +218,7 @@ int ast_callerid_parse(char *instr, char **name, char **location);
* \ param codec Which codec ( AST_FORMAT_ALAW or AST_FORMAT_ULAW )
* \ param codec Which codec ( AST_FORMAT_ALAW or AST_FORMAT_ULAW )
* \ return Returns - 1 on error ( if len is less than 2400 ) , 0 on success .
* \ return Returns - 1 on error ( if len is less than 2400 ) , 0 on success .
*/
*/
int ast_gen_cas ( unsigned char * outbuf , int sas , int len , in t codec ) ;
int ast_gen_cas ( unsigned char * outbuf , int sas , int len , format_ t codec ) ;
/*!
/*!
* \ brief Shrink a phone number in place to just digits ( more accurately it just removes ( ) ' s , . ' s , and - ' s . . .
* \ brief Shrink a phone number in place to just digits ( more accurately it just removes ( ) ' s , . ' s , and - ' s . . .