[Asterisk-cvs] asterisk/include/asterisk callerid.h,1.11,1.12

markster at lists.digium.com markster at lists.digium.com
Sat Feb 26 01:36:05 CST 2005


Update of /usr/cvsroot/asterisk/include/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv30423/include/asterisk

Modified Files:
	callerid.h 
Log Message:
Add new callerpres parsing API (bug #3648)


Index: callerid.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/callerid.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- callerid.h	21 Jan 2005 07:06:25 -0000	1.11
+++ callerid.h	26 Feb 2005 07:34:09 -0000	1.12
@@ -190,16 +190,6 @@
 	return *cr;
 }	
 
-#define AST_PRES_ALLOWED_USER_NUMBER_NOT_SCREENED	0x00
-#define AST_PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN	0x01
-#define AST_PRES_ALLOWED_USER_NUMBER_FAILED_SCREEN	0x02
-#define AST_PRES_ALLOWED_NETWORK_NUMBER				0x03
-#define AST_PRES_PROHIB_USER_NUMBER_NOT_SCREENED	0x20
-#define AST_PRES_PROHIB_USER_NUMBER_PASSED_SCREEN	0x21
-#define AST_PRES_PROHIB_USER_NUMBER_FAILED_SCREEN	0x22
-#define AST_PRES_PROHIB_NETWORK_NUMBER				0x23
-#define AST_PRES_NUMBER_NOT_AVAILABLE				0x43
-
 #define PUT_BYTE(a) do { \
 	*(buf++) = (a); \
 	bytes++; \
@@ -237,5 +227,48 @@
 	PUT_CLID_BAUD(1);	/* Stop bit */ \
 } while(0);	
 
+/* Various defines and bits for handling PRI- and SS7-type restriction */
+
+#define AST_PRES_NUMBER_TYPE				0x03
+#define AST_PRES_USER_NUMBER_UNSCREENED			0x00
+#define AST_PRES_USER_NUMBER_PASSED_SCREEN		0x01
+#define AST_PRES_USER_NUMBER_FAILED_SCREEN		0x02
+#define AST_PRES_NETWORK_NUMBER				0x03
+
+#define AST_PRES_RESTRICTION				0x60
+#define AST_PRES_ALLOWED				0x00
+#define AST_PRES_RESTRICTED				0x20
+#define AST_PRES_UNAVAILABLE				0x40
+#define AST_PRES_RESERVED				0x60
+
+#define AST_PRES_ALLOWED_USER_NUMBER_NOT_SCREENED \
+	AST_PRES_USER_NUMBER_UNSCREENED + AST_PRES_ALLOWED
+
+#define AST_PRES_ALLOWED_USER_NUMBER_PASSED_SCREEN \
+	AST_PRES_USER_NUMBER_PASSED_SCREEN + AST_PRES_ALLOWED
+
+#define AST_PRES_ALLOWED_USER_NUMBER_FAILED_SCREEN \
+	AST_PRES_USER_NUMBER_FAILED_SCREEN + AST_PRES_ALLOWED
+
+#define AST_PRES_ALLOWED_NETWORK_NUMBER	\
+	AST_PRES_NETWORK_NUMBER + AST_PRES_ALLOWED
+
+#define AST_PRES_PROHIB_USER_NUMBER_NOT_SCREENED \
+	AST_PRES_USER_NUMBER_UNSCREENED + AST_PRES_RESTRICTED
+
+#define AST_PRES_PROHIB_USER_NUMBER_PASSED_SCREEN \
+	AST_PRES_USER_NUMBER_PASSED_SCREEN + AST_PRES_RESTRICTED
+
+#define AST_PRES_PROHIB_USER_NUMBER_FAILED_SCREEN \
+	AST_PRES_USER_NUMBER_FAILED_SCREEN + AST_PRES_RESTRICTED
+
+#define AST_PRES_PROHIB_NETWORK_NUMBER \
+	AST_PRES_NETWORK_NUMBER + AST_PRES_RESTRICTED
+
+#define AST_PRES_NUMBER_NOT_AVAILABLE \
+	AST_PRES_NETWORK_NUMBER + AST_PRES_UNAVAILABLE
+
+int ast_parse_caller_presentation(const char *data);
+const char *ast_describe_caller_presentation(int data);
 
 #endif




More information about the svn-commits mailing list