Major rework of how SIP utilises sockets, using new "socket bundling" subsystem.
[opal/cbnco.git] / include / iax2 / overview.h
blob71ec2d2633f586339d40d24f5c15e518c85cbf18
1 /*
2 * overview.cxx
4 * Inter Asterisk Exchange 2
5 *
6 * documentation overview.
7 *
8 * Open Phone Abstraction Library (OPAL)
10 * Copyright (c) 2005 Indranet Technologies Ltd.
12 * The contents of this file are subject to the Mozilla Public License
13 * Version 1.0 (the "License"); you may not use this file except in
14 * compliance with the License. You may obtain a copy of the License at
15 * http://www.mozilla.org/MPL/
17 * Software distributed under the License is distributed on an "AS IS"
18 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
19 * the License for the specific language governing rights and limitations
20 * under the License.
22 * The Original Code is Open Phone Abstraction Library.
24 * The Initial Developer of the Original Code is Indranet Technologies Ltd.
26 * The author of this code is Derek J Smithies
29 * $Log$
30 * Revision 1.1 2006/03/11 06:29:55 dereksmithies
31 * Place IAX2 documentation in the include directory, in a .h file
33 * Revision 1.1 2005/07/30 07:01:33 csoutheren
34 * Added implementation of IAX2 (Inter Asterisk Exchange 2) protocol
35 * Thanks to Derek Smithies of Indranet Technologies Ltd. for
36 * writing and contributing this code
44 /*! \page pageIAX2Protocol IAX2 section of the OPAL library.
46 \section secOverview Overview
48 This is the IAX2 section of the OPAL library.
50 It is an implementation of the IAX2 voip protocol.
53 \version 1.0
54 \author Derek J Smithies
59 \section secArchitecture Architecture
62 There is one instance of a IAX2Receiver class, which listens on port 4569 for incoming IAX2
63 packets. Incoming packets (from all calls) go via the one instance of the IAX2Receiver class.
65 Incoming packets may be used to generate a new IAX2Connection class (if
66 it is a request to open a call). Incoming packets are then passed on to the
67 IAX2Connection class for handling. Note that all connections listen to the same
68 IAX2Receiver.
70 There is one instance of a IAX2Transmit class, which sends data out port 4569 to the remote
71 endpoint. Outgoing packets (from all calls) go via the one instance of a IAX2Transmit class.
72 Note that all connections send data to the same IAX2Transmit.
75 \section secClassListings Available classes
77 \subsection subsecKeyClasses The following classes are key to the implementation of IAX2 in the opal library
79 \li IAX2FrameIdValue - Element of an internal list, used to keep track of incoming IAX2FullFrame out sequence numbers.
80 \li IAX2FrameList - A list of frames, which can be accessed in a thread safe fashion.
81 \li IAX2Connection - Manage the IAX2 protocol for one call, and connect to Opal
82 \li IAX2EndPoint - Manage the IAX2 protocol specific issues which are common to all calls, and connect to Opal.
83 \li IAX2Processor - Separate thread to handle all IAX2 protocol requests, and transfer media frames.
84 \li IAX2IncomingEthernetFrames - Separate thread to transfer all frames from the IAX2Receiver to the
85 appropriate IAX2Connection.
86 \li IAX2OpalMediaStream - Transfer media frames between IAX2Connection to Opal.
87 \li IAX2PacketIdList - A list of IAX2FrameIdValue elements, which is used to keep track of incoming IAX2FullFrame out sequence numbers
88 \li IAX2Receiver - Handles the reception of data from the remote node
89 \li IAX2Remote - contain information about the remote node.
90 \li SafeString - handle a PString in a thread safe fashion.
91 \li SafeStrings - Handle a PStringArray in a thread safe fashion.
92 \li IAX2SoundList - Maintain a list of the sound packets as read from the microphone.
93 \li IAX2Transmit - Send IAX2 packets to the remote node, and handle retransmit issues.
94 \li IAX2WaitingForAck - A predefined action, that is to carried out (by one particular IAX2Processor) on receiving an ack.
97 \subsection subsecFrame classes for holding the UDP data about to be sent to (or received from) the network.
99 \li IAX2Frame - the parent class of all frames.
100 \li IAX2MiniFrame - a UDP frame of data for sending voice/audio. Not as large as a IAX2FullFrame
101 \li IAX2FullFrame - the parent class of all full frames.
102 \li IAX2FullFrameCng - Transfers Cng (comfort noise generation)
103 \li IAX2FullFrameDtmf
104 \li IAX2FullFrameHtml
105 \li IAX2FullFrameImage
106 \li IAX2FullFrameNull
107 \li IAX2FullFrameProtocol - managing the session (and doesn't really do anything in IAX2)
108 \li IAX2FullFrameSessionControl - carries information about call control, registration, authentication etc.
109 \li IAX2FullFrameText
110 \li IAX2FullFrameVideo
111 \li IAX2FullFrameVoice
114 \subsection subsecIe classes for carrying information in the IAX2FullFrameSessionControl UDP frames
116 \li IAX2Ie - the parent of all information element types
118 \subsection subsecIeData classes for the different data types expressed in an Ie
119 \li IAX2IeByte - Byte of data in data field.
120 \li IAX2IeChar - character of data in the data field
121 \li IAX2IeDateAndTime - data field contains a 32 bit number with date and time (2 sec resolution)
122 \li IAX2IeInt - data field contains an integer.
123 \li IAX2IeNone - there is no data field.
124 \li IAX2IeShort - data field contains a short
125 \li IAX2IeSockaddrIn - data field contains a sockaddr_in, which is address and port
126 \li IAX2IeString - data field contains a string - there is no zero byte at the end.
127 \li IAX2IeUInt - data field contains an unsigned int.
128 \li IAX2IeUShort - data field contains an unsigned short.
130 \subsection subsecIeAllTypes Classes for each of the possible Ie types
132 \li IAX2IeAdsicpe
133 \li IAX2IeAesProvisioning
134 \li IAX2IeApparentAddr
135 \li IAX2IeAuthMethods
136 \li IAX2IeAutoAnswer
137 \li IAX2IeBlockOfData
138 \li IAX2IeCallNo
139 \li IAX2IeCalledContext
140 \li IAX2IeCalledNumber
141 \li IAX2IeCallingAni
142 \li IAX2IeCallingName
143 \li IAX2IeCallingNumber
144 \li IAX2IeCallingPres
145 \li IAX2IeCallingTns
146 \li IAX2IeCallingTon
147 \li IAX2IeCapability
148 \li IAX2IeCause - text description of what happened (typically used at call completion, explaining why the call was finished)
149 \li IAX2IeCauseCode - numeric value describing why the call was completed.
150 \li IAX2IeChallenge
151 \li IAX2IeCodecPrefs
152 \li IAX2IeData
153 \li IAX2IeDateAndTime
154 \li IAX2IeDateTime - 32 bit value (2 sec accuracy) of the date and time. Year is in range of 2000-2127.
155 \li IAX2IeDeviceType
156 \li IAX2IeDnid
157 \li IAX2IeDpStatus
158 \li IAX2IeDroppedFrames
159 \li IAX2IeEncKey
160 \li IAX2IeEncryption
161 \li IAX2IeFirmwareVer
162 \li IAX2IeFormat
163 \li IAX2IeFwBlockData
164 \li IAX2IeFwBlockDesc
165 \li IAX2IeIaxUnknown
166 \li IAX2IeInvalidElement
167 \li IAX2IeLanguage
168 \li IAX2IeList
169 \li IAX2IeMd5Result
170 \li IAX2IeMsgCount
171 \li IAX2IeMusicOnHold
172 \li IAX2IePassword
173 \li IAX2IeProvVer
174 \li IAX2IeProvisioning
175 \li IAX2IeRdnis
176 \li IAX2IeReceivedDelay
177 \li IAX2IeReceivedFrames
178 \li IAX2IeReceivedJitter
179 \li IAX2IeReceivedLoss
180 \li IAX2IeReceivedOoo
181 \li IAX2IeRefresh
182 \li IAX2IeRsaResult
183 \li IAX2IeSamplingRate - sampling rate in hertz. Typically, the value is 8000
184 \li IAX2IeServiceIdent
185 \li IAX2IeTransferId
186 \li IAX2IeUserName - data field contains the username of the transmitting node
187 \li IAX2IeVersion - version of IAX in opertion, typically the value is 2