diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-09-19 16:17:18 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-09-19 16:17:18 +0000 |
commit | 701d17cfbf6ab8d1c31a4b8e392c255e571b9b67 (patch) | |
tree | 775a8130a447a0fe37d0b656bcb9e5995b183c86 /include | |
parent | 091afae7615c15425e2f35b73378bb127d067db6 (diff) |
Merge UK + DTMF Caller*ID stuff and fix app_test description
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3808 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rwxr-xr-x | include/asterisk/callerid.h | 21 | ||||
-rwxr-xr-x | include/asterisk/channel.h | 6 |
2 files changed, 24 insertions, 3 deletions
diff --git a/include/asterisk/callerid.h b/include/asterisk/callerid.h index 486c8100a..19a6eeb9d 100755 --- a/include/asterisk/callerid.h +++ b/include/asterisk/callerid.h @@ -24,6 +24,14 @@ #define CID_UNKNOWN_NAME (1 << 2) #define CID_UNKNOWN_NUMBER (1 << 3) +#define CID_SIG_BELL 1 +#define CID_SIG_V23 2 +#define CID_SIG_DTMF 3 + +#define CID_START_RING 1 +#define CID_START_POLARITY 2 + + #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))) @@ -51,10 +59,12 @@ extern int callerid_generate(unsigned char *buf, char *number, char *name, int f //! Create a callerID state machine /*! + * \param cid_signalling Type of signalling in use + * * 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. */ -extern struct callerid_state *callerid_new(void); +extern struct callerid_state *callerid_new(int cid_signalling); //! Read samples into the state machine. /*! @@ -84,6 +94,15 @@ extern int callerid_feed(struct callerid_state *cid, unsigned char *ubuf, int sa */ void callerid_get(struct callerid_state *cid, char **number, char **name, int *flags); +//! Get and parse DTMF-based callerid +/*! + * \param cidstring The actual transmitted string. + * \param number The cid number is returned here. + * \param flags The cid flags are returned here. + * This function parses DTMF callerid. + */ +void callerid_get_dtmf(char *cidstring, char *number, int *flags); + //! Free a callerID state /*! * \param cid This is the callerid_state state machine to free diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index 5eb25dabb..75627cda7 100755 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -3,9 +3,9 @@ * * General Asterisk channel definitions. * - * Copyright (C) 1999, Mark Spencer + * Copyright (C) 1999-2004, Digium, Inc. * - * Mark Spencer <markster@linux-support.net> + * Mark Spencer <markster@digium.com> * * This program is free software, distributed under the terms of * the GNU General Public License @@ -338,6 +338,8 @@ struct outgoing_helper { #define AST_STATE_BUSY 7 /*! Digits (or equivalent) have been dialed while offhook */ #define AST_STATE_DIALING_OFFHOOK 8 +/*! Channel has detected an incoming call and is waiting for ring */ +#define AST_STATE_PRERING 9 /* Bits 16-32 of state are reserved for flags */ /*! Do not transmit voice data */ |