diff options
author | Mark Spencer <markster@digium.com> | 2004-09-19 16:17:18 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2004-09-19 16:17:18 +0000 |
commit | 5dad6f431952e676de90a573fb036e6473467487 (patch) | |
tree | 775a8130a447a0fe37d0b656bcb9e5995b183c86 /include/asterisk/callerid.h | |
parent | 27e4a2ee57d878ea664bb4ab3d2e614b211b96c0 (diff) |
Merge UK + DTMF Caller*ID stuff and fix app_test description
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/callerid.h')
-rwxr-xr-x | include/asterisk/callerid.h | 21 |
1 files changed, 20 insertions, 1 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 |