aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/frame.h
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2001-05-07 02:01:01 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2001-05-07 02:01:01 +0000
commit99b3bfd61d6bc5f9de4f8fa351e7b87d1b27ab02 (patch)
treee88beebab592f3101236cfdd4190fe6e8b7ff036 /include/asterisk/frame.h
parent90c3a1ec2ec9f47f0c1ab24a23fe783ccdb5dcb5 (diff)
Version 0.1.8 from FTP
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@315 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/frame.h')
-rwxr-xr-xinclude/asterisk/frame.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/include/asterisk/frame.h b/include/asterisk/frame.h
index bab5e0b56..11271ea95 100755
--- a/include/asterisk/frame.h
+++ b/include/asterisk/frame.h
@@ -20,6 +20,9 @@
extern "C" {
#endif
+#include <endian.h>
+#include <sys/types.h>
+
/* A frame of data read used to communicate between
between channels and applications */
struct ast_frame {
@@ -84,6 +87,37 @@ struct ast_frame_chain {
#define AST_CONTROL_TAKEOFFHOOK 6 /* Make it go off hook */
#define AST_CONTROL_OFFHOOK 7 /* Line is off hook */
#define AST_CONTROL_CONGESTION 8 /* Congestion (circuits busy) */
+#define AST_CONTROL_FLASH 9 /* Flash hook */
+#define AST_CONTROL_WINK 10 /* Wink */
+#define AST_CONTROL_OPTION 11 /* Set a low-level option */
+
+/* Option identifiers and flags */
+#define AST_OPTION_FLAG_REQUEST 0
+#define AST_OPTION_FLAG_ACCEPT 1
+#define AST_OPTION_FLAG_REJECT 2
+#define AST_OPTION_FLAG_QUERY 4
+#define AST_OPTION_FLAG_ANSWER 5
+#define AST_OPTION_FLAG_WTF 6
+
+#define AST_OPTION_TONE_VERIFY 1 /* Verify touchtones by muting audio
+ transmission (and reception) and
+ verify the tone is still present */
+
+struct ast_option_header {
+ /* Always keep in network byte order */
+#if __BYTE_ORDER == __BIG_ENDIAN
+ u_int16_t flag:3;
+ u_int16_t option:13;
+#else
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ u_int16_t option:13;
+ u_int16_t flag:3;
+#else
+#error Byte order not defined
+#endif
+#endif
+ u_int8_t data[0];
+};
/* Request a frame be allocated. source is an optional source of the frame,
len is the requested length, or "0" if the caller will supply the buffer */
@@ -110,6 +144,9 @@ struct ast_frame *ast_fr_fdread(int fd);
/* Write a frame to an fd */
int ast_fr_fdwrite(int fd, struct ast_frame *frame);
+/* Send a hangup (NULL equivalent) on an fd */
+int ast_fr_fdhangup(int fd);
+
/* Get a format by its name */
extern int ast_getformatbyname(char *name);