This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Defines | |
#define | MAX_CALLERID_SIZE 32000 |
#define | CID_PRIVATE_NAME (1 << 0) |
#define | CID_PRIVATE_NUMBER (1 << 1) |
#define | CID_UNKNOWN_NAME (1 << 2) |
#define | CID_UNKNOWN_NUMBER (1 << 3) |
#define | AST_LIN2X(a) ((codec == AST_FORMAT_ALAW) ? (AST_LIN2A(a)) : (AST_LIN2MU(a))) |
#define | AST_XLAW(a) ((codec == AST_FORMAT_ALAW) ? (AST_ALAW(a)) : (AST_MULAW(a))) |
#define | PUT_BYTE(a) |
#define | PUT_AUDIO_SAMPLE(y) |
#define | PUT_CLID_MARKMS |
#define | PUT_CLID_BAUD(bit) |
#define | PUT_CLID(byte) |
Typedefs | |
typedef callerid_state | CIDSTATE |
Functions | |
void | callerid_init (void) |
CallerID Initialization. | |
int | callerid_generate (unsigned char *buf, char *number, char *name, int flags, int callwaiting, int codec) |
Generates a CallerID FSK stream in ulaw format suitable for transmission. | |
callerid_state * | callerid_new (void) |
Create a callerID state machine. | |
int | callerid_feed (struct callerid_state *cid, unsigned char *ubuf, int samples, int codec) |
Read samples into the state machine. | |
void | callerid_get (struct callerid_state *cid, char **number, char **name, int *flags) |
Extract info out of callerID state machine. Flags are listed above. | |
void | callerid_free (struct callerid_state *cid) |
Free a callerID state. | |
int | ast_callerid_generate (unsigned char *buf, char *astcid, int codec) |
Generate Caller-ID spill from the "callerid" field of asterisk (in e-mail address like format). | |
int | vmwi_generate (unsigned char *buf, int active, int mdmf, int codec) |
Generate message waiting indicator. | |
int | ast_callerid_callwaiting_generate (unsigned char *buf, char *astcid, int codec) |
Generate Caller-ID spill from the "callerid" field of asterisk (in e-mail address like format) but in a format suitable for Call Waiting(tm)'s Caller*ID(tm). | |
int | ast_callerid_parse (char *instr, char **name, char **location) |
Destructively parse inbuf into name and location (or number). | |
int | ast_gen_cas (unsigned char *outbuf, int sas, int len, int codec) |
Generate a CAS (CPE Alert Signal) tone for 'n' samples. | |
void | ast_shrink_phone_number (char *n) |
Shrink a phone number in place to just digits (more accurately it just removes ()'s, .'s, and -'s... | |
int | ast_isphonenumber (char *n) |
Check if a string consists only of digits. Returns non-zero if so. | |
Variables | |
float | cid_dr [4] |
float | cid_di [4] |
float | clidsb |
|
Definition at line 27 of file callerid.h. |
|
Definition at line 28 of file callerid.h. Referenced by callerid_feed(). |
|
Definition at line 22 of file callerid.h. Referenced by callerid_feed(). |
|
Definition at line 23 of file callerid.h. Referenced by callerid_feed(), and callerid_get(). |
|
Definition at line 24 of file callerid.h. Referenced by callerid_feed(), callerid_get(), and callerid_new(). |
|
Definition at line 25 of file callerid.h. Referenced by callerid_feed(), callerid_get(), and callerid_new(). |
|
Definition at line 20 of file callerid.h. |
|
Value:
Definition at line 176 of file callerid.h. |
|
Value:
Definition at line 171 of file callerid.h. |
|
Definition at line 197 of file callerid.h. Referenced by callerid_generate(), and vmwi_generate(). |
|
Definition at line 188 of file callerid.h. |
|
Value:
Definition at line 182 of file callerid.h. Referenced by callerid_generate(), and vmwi_generate(). |
|
Definition at line 32 of file callerid.h. |
|
Generate Caller-ID spill from the "callerid" field of asterisk (in e-mail address like format) but in a format suitable for Call Waiting(tm)'s Caller*ID(tm). See ast_callerid_generate for other details Definition at line 591 of file callerid.c.
|
|
Generate Caller-ID spill from the "callerid" field of asterisk (in e-mail address like format).
Definition at line 586 of file callerid.c.
|
|
Destructively parse inbuf into name and location (or number).
Definition at line 520 of file callerid.c. References ast_isphonenumber(), and ast_shrink_phone_number(). Referenced by ast_cdr_init(), ast_cdr_setcid(), ast_cdr_update(), ast_privacy_check(), and ast_privacy_set().
|
|
Generate a CAS (CPE Alert Signal) tone for 'n' samples.
Definition at line 150 of file callerid.c. References casdi1, casdi2, casdr1, casdr2, sasdi, and sasdr.
|
|
Check if a string consists only of digits. Returns non-zero if so.
Definition at line 509 of file callerid.c. Referenced by ast_callerid_parse().
|
|
Shrink a phone number in place to just digits (more accurately it just removes ()'s, .'s, and -'s...
Definition at line 500 of file callerid.c. Referenced by ast_callerid_parse(), ast_cdr_init(), ast_cdr_setcid(), ast_cdr_update(), ast_privacy_check(), and ast_privacy_set().
|
|
Read samples into the state machine.
Definition at line 171 of file callerid.c. References ast_log(), AST_XLAW, CID_PRIVATE_NAME, CID_PRIVATE_NUMBER, CID_UNKNOWN_NAME, CID_UNKNOWN_NUMBER, callerid_state::cksum, callerid_state::flags, free, fsk_serie(), callerid_state::fskd, callerid_state::len, LOG_ERROR, LOG_NOTICE, LOG_WARNING, malloc, callerid_state::name, callerid_state::number, callerid_state::oldlen, callerid_state::oldstuff, callerid_state::pos, callerid_state::rawdata, callerid_state::sawflag, and callerid_state::type.
|
|
Free a callerID state.
Definition at line 322 of file callerid.c. References free.
|
|
Generates a CallerID FSK stream in ulaw format suitable for transmission.
Definition at line 458 of file callerid.c. References PUT_BYTE, PUT_CLID, and PUT_CLID_MARKMS.
|
|
Extract info out of callerID state machine. Flags are listed above.
Returns nothing. Definition at line 137 of file callerid.c. References CID_PRIVATE_NUMBER, CID_UNKNOWN_NAME, CID_UNKNOWN_NUMBER, callerid_state::flags, callerid_state::name, and callerid_state::number.
|
|
CallerID Initialization. Initializes the callerid system. Mostly stuff for inverse FFT Definition at line 95 of file callerid.c. References CALLERID_MARK, CALLERID_SPACE, CAS_FREQ1, CAS_FREQ2, casdi1, casdi2, casdr1, casdr2, cid_di, cid_dr, SAS_FREQ, sasdi, and sasdr. Referenced by main().
|
|
Create a callerID state machine. This function returns a malloc'd instance of the callerid_state data structure. Returns a pointer to a malloc'd callerid_state structure, or NULL on error. Definition at line 110 of file callerid.c. References ast_log(), CID_UNKNOWN_NAME, CID_UNKNOWN_NUMBER, LOG_WARNING, and malloc.
|
|
Generate message waiting indicator.
Definition at line 396 of file callerid.c. References PUT_BYTE, PUT_CLID, and PUT_CLID_MARKMS.
|
|
Definition at line 154 of file callerid.h. Referenced by callerid_init(). |
|
Definition at line 153 of file callerid.h. Referenced by callerid_init(). |
|
Definition at line 155 of file callerid.h. |