Debian Codegraph @

3rdparty/iaxclient/lib/libiax2/src/iax.h

raw symbols SCIP
1 /*
2 * libIAX
3 *
4 * Implementation of Inter-IAXerisk eXchange
5 *
6 * Copyright (C) 1999, Mark Spencer
7 *
8 * Mark Spencer <[email protected]>
9 *
10 * This program is free software, distributed under the terms of
11 * the GNU Lesser (Library) General Public License
12 */
13
14 #ifndef _IAX_H
15 #define _IAX_H
16
17 /* Max version of IAX protocol we support */
18 #define IAX_PROTO_VERSION 1
19
20 #define IAX_MAX_CALLS 32768
21
22 #define IAX_FLAG_FULL 0x8000
23
24 #define IAX_FLAG_SC_LOG 0x80
25
26 #define IAX_MAX_SHIFT 0x1F
27
28 /* Maximum size of an IAX frame (max size of UDP frame) */
29 #define IAX_MAX_BUF_SIZE 65536
30
31 /* Subclass for IAX_FRAME_IAX */
32 #define IAX_COMMAND_NEW 1
33 #define IAX_COMMAND_PING 2
34 #define IAX_COMMAND_PONG 3
35 #define IAX_COMMAND_ACK 4
36 #define IAX_COMMAND_HANGUP 5
37 #define IAX_COMMAND_REJECT 6
38 #define IAX_COMMAND_ACCEPT 7
39 #define IAX_COMMAND_AUTHREQ 8
40 #define IAX_COMMAND_AUTHREP 9
41 #define IAX_COMMAND_INVAL 10
42 #define IAX_COMMAND_LAGRQ 11
43 #define IAX_COMMAND_LAGRP 12
44 #define IAX_COMMAND_REGREQ 13 /* Registration request */
45 #define IAX_COMMAND_REGAUTH 14 /* Registration authentication required */
46 #define IAX_COMMAND_REGACK 15 /* Registration accepted */
47 #define IAX_COMMAND_REGREJ 16 /* Registration rejected */
48 #define IAX_COMMAND_REGREL 17 /* Force release of registration */
49 #define IAX_COMMAND_VNAK 18 /* If we receive voice before valid first voice frame, send this */
50 #define IAX_COMMAND_DPREQ 19 /* Request status of a dialplan entry */
51 #define IAX_COMMAND_DPREP 20 /* Request status of a dialplan entry */
52 #define IAX_COMMAND_DIAL 21 /* Request a dial on channel brought up TBD */
53 #define IAX_COMMAND_TXREQ 22 /* Transfer Request */
54 #define IAX_COMMAND_TXCNT 23 /* Transfer Connect */
55 #define IAX_COMMAND_TXACC 24 /* Transfer Accepted */
56 #define IAX_COMMAND_TXREADY 25 /* Transfer ready */
57 #define IAX_COMMAND_TXREL 26 /* Transfer release */
58 #define IAX_COMMAND_TXREJ 27 /* Transfer reject */
59 #define IAX_COMMAND_QUELCH 28 /* Stop audio/video transmission */
60 #define IAX_COMMAND_UNQUELCH 29 /* Resume audio/video transmission */
61
62 #define IAX_DEFAULT_REG_EXPIRE 60
63
64 #define IAX_DEFAULT_PORTNO 5036
65
66 /* Full frames are always delivered reliably */
67 struct iax_full_hdr {
68 short callno; /* Source call number -- high bit must be 1 */
69 short dcallno; /* Destination call number */
70 unsigned int ts; /* 32-bit timestamp in milliseconds */
71 unsigned short seqno; /* Packet number */
72 char type; /* Frame type */
73 unsigned char csub; /* Compressed subclass */
74 char data[0];
75 };
76
77 /* Mini header is used only for voice frames -- delivered unreliably */
78 struct iax_mini_hdr {
79 short callno; /* Source call number -- high bit must be 0 */
80 unsigned short ts; /* 16-bit Timestamp (high 16 bits from last IAX_full_hdr) */
81 /* Frametype implicitly VOICE_FRAME */
82 /* subclass implicit from last IAX_full_hdr */
83 char data[0];
84 };
85
86 #endif