From 5dad6f431952e676de90a573fb036e6473467487 Mon Sep 17 00:00:00 2001 From: Mark Spencer Date: Sun, 19 Sep 2004 16:17:18 +0000 Subject: 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 --- include/asterisk/callerid.h | 21 ++++++++++++++++++++- include/asterisk/channel.h | 6 ++++-- 2 files changed, 24 insertions(+), 3 deletions(-) (limited to 'include') 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 + * Mark Spencer * * 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 */ -- cgit v1.2.3