[Asterisk-cvs] asterisk/include/asterisk callerid.h, 1.6,
1.7 channel.h, 1.54, 1.55
markster at lists.digium.com
markster at lists.digium.com
Sun Sep 19 12:13:25 CDT 2004
Update of /usr/cvsroot/asterisk/include/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv32738/include/asterisk
Modified Files:
callerid.h channel.h
Log Message:
Merge UK + DTMF Caller*ID stuff and fix app_test description
Index: callerid.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/callerid.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- callerid.h 7 Aug 2004 15:51:11 -0000 1.6
+++ callerid.h 19 Sep 2004 16:17:18 -0000 1.7
@@ -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 @@
//! 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 @@
*/
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
Index: channel.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/channel.h,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- channel.h 6 Aug 2004 14:43:25 -0000 1.54
+++ channel.h 19 Sep 2004 16:17:18 -0000 1.55
@@ -3,9 +3,9 @@
*
* General Asterisk channel definitions.
*
- * Copyright (C) 1999, Mark Spencer
+ * Copyright (C) 1999-2004, Digium, Inc.
*
- * Mark Spencer <markster at linux-support.net>
+ * Mark Spencer <markster at digium.com>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
@@ -338,6 +338,8 @@
#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 */
More information about the svn-commits
mailing list