summaryrefslogtreecommitdiff
path: root/channels/iax.h
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>1999-12-27 19:20:20 +0000
committerMark Spencer <markster@digium.com>1999-12-27 19:20:20 +0000
commitd5e6ab1569aa12c522107bb721ced1af38a68f2b (patch)
treeed1e647fd6db241024c8fde8966c913db6100576 /channels/iax.h
parente2aa31c8ce772fecd4becbbf335bb98605a636b2 (diff)
Version 0.1.2 from FTP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@150 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/iax.h')
-rwxr-xr-xchannels/iax.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/channels/iax.h b/channels/iax.h
new file mode 100755
index 000000000..93335da8d
--- /dev/null
+++ b/channels/iax.h
@@ -0,0 +1,64 @@
+/*
+ * Asterisk -- A telephony toolkit for Linux.
+ *
+ * Implementation of Inter-Asterisk eXchange
+ *
+ * Copyright (C) 1999, Mark Spencer
+ *
+ * Mark Spencer <markster@linux-support.net>
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License
+ */
+
+#ifndef _ASTERISK_IAX_H
+#define _ASTERISK_IAX_H
+
+/* Max version of IAX protocol we support */
+#define AST_IAX_PROTO_VERSION 1
+
+#define AST_IAX_MAX_CALLS 32768
+
+#define AST_FLAG_FULL 0x8000
+
+#define AST_FLAG_SC_LOG 0x80
+
+#define AST_MAX_SHIFT 0x1F
+
+/* Subclass for AST_FRAME_IAX */
+#define AST_IAX_COMMAND_NEW 1
+#define AST_IAX_COMMAND_PING 2
+#define AST_IAX_COMMAND_PONG 3
+#define AST_IAX_COMMAND_ACK 4
+#define AST_IAX_COMMAND_HANGUP 5
+#define AST_IAX_COMMAND_REJECT 6
+#define AST_IAX_COMMAND_ACCEPT 7
+#define AST_IAX_COMMAND_AUTHREQ 8
+#define AST_IAX_COMMAND_AUTHREP 9
+#define AST_IAX_COMMAND_INVAL 10
+#define AST_IAX_COMMAND_LAGRQ 11
+#define AST_IAX_COMMAND_LAGRP 12
+
+#define AST_DEFAULT_IAX_PORTNO 5036
+
+/* Full frames are always delivered reliably */
+struct ast_iax_full_hdr {
+ short callno; /* Source call number -- high bit must be 1 */
+ short dcallno; /* Destination call number */
+ unsigned int ts; /* 32-bit timestamp in milliseconds */
+ unsigned short seqno; /* Packet number */
+ char type; /* Frame type */
+ unsigned char csub; /* Compressed subclass */
+ char data[0];
+};
+
+/* Mini header is used only for voice frames -- delivered unreliably */
+struct ast_iax_mini_hdr {
+ short callno; /* Source call number -- high bit must be 0 */
+ unsigned short ts; /* 16-bit Timestamp (high 32 bits from last ast_iax_full_hdr) */
+ /* Frametype implicitly VOICE_FRAME */
+ /* subclass implicit from last ast_iax_full_hdr */
+ char data[0];
+};
+
+#endif