aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/callerid.h
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-09-19 16:17:18 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-09-19 16:17:18 +0000
commit701d17cfbf6ab8d1c31a4b8e392c255e571b9b67 (patch)
tree775a8130a447a0fe37d0b656bcb9e5995b183c86 /include/asterisk/callerid.h
parent091afae7615c15425e2f35b73378bb127d067db6 (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/asterisk/callerid.h')
-rwxr-xr-xinclude/asterisk/callerid.h21
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