<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Yate: yateiax.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.7.1 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> </ul> </div> <h1>yateiax.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <a name="l00024"></a>00024 <span class="preprocessor">#ifndef __YATEIAX_H</span> <a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#define __YATEIAX_H</span> <a name="l00026"></a>00026 <span class="preprocessor"></span> <a name="l00027"></a>00027 <span class="preprocessor">#include <yateclass.h></span> <a name="l00028"></a>00028 <a name="l00029"></a>00029 <span class="preprocessor">#ifdef _WINDOWS</span> <a name="l00030"></a>00030 <span class="preprocessor"></span> <a name="l00031"></a>00031 <span class="preprocessor">#ifdef LIBYIAX_EXPORTS</span> <a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#define YIAX_API __declspec(dllexport)</span> <a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#else</span> <a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#ifndef LIBYIAX_STATIC</span> <a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#define YIAX_API __declspec(dllimport)</span> <a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#endif</span> <a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#endif</span> <a name="l00038"></a>00038 <span class="preprocessor"></span> <a name="l00039"></a>00039 <span class="preprocessor">#endif </span><span class="comment">/* _WINDOWS */</span> <a name="l00040"></a>00040 <a name="l00041"></a>00041 <span class="preprocessor">#ifndef YIAX_API</span> <a name="l00042"></a>00042 <span class="preprocessor"></span><span class="preprocessor">#define YIAX_API</span> <a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor">#endif</span> <a name="l00044"></a>00044 <span class="preprocessor"></span> <a name="l00048"></a>00048 <span class="keyword">namespace </span>TelEngine { <a name="l00049"></a>00049 <a name="l00050"></a>00050 <span class="keyword">class </span>IAXInfoElement; <a name="l00051"></a>00051 <span class="keyword">class </span>IAXInfoElementString; <a name="l00052"></a>00052 <span class="keyword">class </span>IAXInfoElementNumeric; <a name="l00053"></a>00053 <span class="keyword">class </span>IAXInfoElementBinary; <a name="l00054"></a>00054 <span class="keyword">class </span>IAXFullFrame; <a name="l00055"></a>00055 <span class="keyword">class </span>IAXFrameOut; <a name="l00056"></a>00056 <span class="keyword">class </span>IAXEvent; <a name="l00057"></a>00057 <span class="keyword">class </span>IAXEngine; <a name="l00058"></a>00058 <a name="l00059"></a>00059 <span class="preprocessor">#define IAX_PROTOCOL_VERSION 0x0002 // Protocol version</span> <a name="l00060"></a>00060 <span class="preprocessor"></span><span class="preprocessor">#define IAX2_MAX_CALLNO 32767 // Max call number value</span> <a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor">#define IAX2_MAX_TRANSINFRAMELIST 127 // Max transaction incoming frame list</span> <a name="l00062"></a>00062 <span class="preprocessor"></span> <a name="l00067"></a><a class="code" href="classTelEngine_1_1IAXInfoElement.html">00067</a> <span class="keyword">class </span>YIAX_API <a class="code" href="classTelEngine_1_1IAXInfoElement.html" title="A single IAX2 Information Element.">IAXInfoElement</a> : <span class="keyword">public</span> <a class="code" href="classTelEngine_1_1RefObject.html">RefObject</a> <a name="l00068"></a>00068 { <a name="l00069"></a>00069 <span class="keyword">public</span>: <a name="l00073"></a><a class="code" href="classTelEngine_1_1IAXInfoElement.html#1d1cfd8ffb84e947f82999c682b666a7">00073</a> <span class="keyword">enum</span> <a class="code" href="classTelEngine_1_1IAXInfoElement.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> { <a name="l00074"></a>00074 textframe = 0x00, <span class="comment">// Text Used internally only to generate an event of type Text</span> <a name="l00075"></a>00075 CALLED_NUMBER = 0x01, <span class="comment">// Text</span> <a name="l00076"></a>00076 CALLING_NUMBER = 0x02, <span class="comment">// Text</span> <a name="l00077"></a>00077 CALLING_ANI = 0x03, <span class="comment">// Text</span> <a name="l00078"></a>00078 CALLING_NAME = 0x04, <span class="comment">// Text</span> <a name="l00079"></a>00079 CALLED_CONTEXT = 0x05, <span class="comment">// Text</span> <a name="l00080"></a>00080 USERNAME = 0x06, <span class="comment">// Text</span> <a name="l00081"></a>00081 PASSWORD = 0x07, <span class="comment">// Text</span> <a name="l00082"></a>00082 CAPABILITY = 0x08, <span class="comment">// DW</span> <a name="l00083"></a>00083 FORMAT = 0x09, <span class="comment">// DW</span> <a name="l00084"></a>00084 LANGUAGE = 0x0a, <span class="comment">// Text</span> <a name="l00085"></a>00085 VERSION = 0x0b, <span class="comment">// W Value: IAX_PROTOCOL_VERSION</span> <a name="l00086"></a>00086 ADSICPE = 0x0c, <span class="comment">// W</span> <a name="l00087"></a>00087 DNID = 0x0d, <span class="comment">// Text</span> <a name="l00088"></a>00088 AUTHMETHODS = 0x0e, <span class="comment">// W</span> <a name="l00089"></a>00089 CHALLENGE = 0x0f, <span class="comment">// Text</span> <a name="l00090"></a>00090 MD5_RESULT = 0x10, <span class="comment">// Text</span> <a name="l00091"></a>00091 RSA_RESULT = 0x11, <span class="comment">// Text</span> <a name="l00092"></a>00092 APPARENT_ADDR = 0x12, <span class="comment">// BIN</span> <a name="l00093"></a>00093 REFRESH = 0x13, <span class="comment">// W</span> <a name="l00094"></a>00094 DPSTATUS = 0x14, <span class="comment">// W</span> <a name="l00095"></a>00095 CALLNO = 0x15, <span class="comment">// W Max value: IAX2_MAX_CALLNO</span> <a name="l00096"></a>00096 CAUSE = 0x16, <span class="comment">// Text</span> <a name="l00097"></a>00097 IAX_UNKNOWN = 0x17, <span class="comment">// B</span> <a name="l00098"></a>00098 MSGCOUNT = 0x18, <span class="comment">// W</span> <a name="l00099"></a>00099 AUTOANSWER = 0x19, <span class="comment">// Null</span> <a name="l00100"></a>00100 MUSICONHOLD = 0x1a, <span class="comment">// Text</span> <a name="l00101"></a>00101 TRANSFERID = 0x1b, <span class="comment">// DW</span> <a name="l00102"></a>00102 RDNIS = 0x1c, <span class="comment">// Text</span> <a name="l00103"></a>00103 PROVISIONING = 0x1d, <span class="comment">// BIN</span> <a name="l00104"></a>00104 AESPROVISIONING = 0x1e, <span class="comment">// BIN</span> <a name="l00105"></a>00105 DATETIME = 0x1f, <span class="comment">// DW</span> <a name="l00106"></a>00106 DEVICETYPE = 0x20, <span class="comment">// Text</span> <a name="l00107"></a>00107 SERVICEIDENT = 0x21, <span class="comment">// BIN</span> <a name="l00108"></a>00108 FIRMWAREVER = 0x22, <span class="comment">// W</span> <a name="l00109"></a>00109 FWBLOCKDESC = 0x23, <span class="comment">// DW</span> <a name="l00110"></a>00110 FWBLOCKDATA = 0x24, <span class="comment">// BIN</span> <a name="l00111"></a>00111 PROVVER = 0x25, <span class="comment">// DW</span> <a name="l00112"></a>00112 CALLINGPRES = 0x26, <span class="comment">// B</span> <a name="l00113"></a>00113 CALLINGTON = 0x27, <span class="comment">// B</span> <a name="l00114"></a>00114 CALLINGTNS = 0x28, <span class="comment">// W</span> <a name="l00115"></a>00115 SAMPLINGRATE = 0x29, <span class="comment">// DW</span> <a name="l00116"></a>00116 CAUSECODE = 0x2a, <span class="comment">// B</span> <a name="l00117"></a>00117 ENCRYPTION = 0x2b, <span class="comment">// B</span> <a name="l00118"></a>00118 ENKEY = 0x2c, <span class="comment">// BIN</span> <a name="l00119"></a>00119 CODEC_PREFS = 0x2d, <span class="comment">// Text</span> <a name="l00120"></a>00120 RR_JITTER = 0x2e, <span class="comment">// DW</span> <a name="l00121"></a>00121 RR_LOSS = 0x2f, <span class="comment">// DW</span> <a name="l00122"></a>00122 RR_PKTS = 0x30, <span class="comment">// DW</span> <a name="l00123"></a>00123 RR_DELAY = 0x31, <span class="comment">// W</span> <a name="l00124"></a>00124 RR_DROPPED = 0x32, <span class="comment">// DW</span> <a name="l00125"></a>00125 RR_OOO = 0x33, <span class="comment">// DW</span> <a name="l00126"></a>00126 }; <a name="l00127"></a>00127 <a name="l00132"></a><a class="code" href="classTelEngine_1_1IAXInfoElement.html#2bbac2ce75d94cf0b4033eebed4ed084">00132</a> <span class="keyword">inline</span> <a class="code" href="classTelEngine_1_1IAXInfoElement.html#2bbac2ce75d94cf0b4033eebed4ed084">IAXInfoElement</a>(<a class="code" href="classTelEngine_1_1IAXInfoElement.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> type) : m_type(type) {} <a name="l00133"></a>00133 <a name="l00137"></a><a class="code" href="classTelEngine_1_1IAXInfoElement.html#ea224fe233f1565d60572561b648fd8d">00137</a> <span class="keyword">virtual</span> <a class="code" href="classTelEngine_1_1IAXInfoElement.html#ea224fe233f1565d60572561b648fd8d">~IAXInfoElement</a>() {} <a name="l00138"></a>00138 <a name="l00143"></a><a class="code" href="classTelEngine_1_1IAXInfoElement.html#fbd0fa31db28593e9669c3c56711c0a7">00143</a> <span class="keyword">inline</span> <a class="code" href="classTelEngine_1_1IAXInfoElement.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> type()<span class="keyword"> const</span> <a name="l00144"></a>00144 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_type; } <a name="l00145"></a>00145 <a name="l00150"></a>00150 <span class="keyword">virtual</span> <span class="keywordtype">void</span> toBuffer(<a class="code" href="classTelEngine_1_1DataBlock.html" title="A class that holds just a block of raw data.">DataBlock</a>& buf); <a name="l00151"></a>00151 <a name="l00156"></a>00156 <span class="keyword">virtual</span> <span class="keywordtype">void</span> toString(<a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a>& buf); <a name="l00157"></a>00157 <a name="l00163"></a><a class="code" href="classTelEngine_1_1IAXInfoElement.html#a2d5a88781da4ec63d945593c632f0d0">00163</a> <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* ieText(u_int8_t ieCode) <a name="l00164"></a>00164 { <span class="keywordflow">return</span> <a class="code" href="namespaceTelEngine.html#4668c9172c6ae5f59f5782ecc6e05516">lookup</a>(ieCode,s_ieData); } <a name="l00165"></a>00165 <a name="l00166"></a>00166 <a name="l00167"></a>00167 <span class="keyword">private</span>: <a name="l00168"></a>00168 <span class="keyword">static</span> <a class="code" href="structTelEngine_1_1TokenDict.html">TokenDict</a> s_ieData[];<span class="comment">// Association between IE type and text</span> <a name="l00169"></a>00169 Type m_type; <span class="comment">// Type of this IE</span> <a name="l00170"></a>00170 }; <a name="l00171"></a>00171 <a name="l00176"></a><a class="code" href="classTelEngine_1_1IAXInfoElementString.html">00176</a> <span class="keyword">class </span>YIAX_API <a class="code" href="classTelEngine_1_1IAXInfoElementString.html" title="A single IAX2 text Information Element.">IAXInfoElementString</a> : <span class="keyword">public</span> <a class="code" href="classTelEngine_1_1IAXInfoElement.html" title="A single IAX2 Information Element.">IAXInfoElement</a> <a name="l00177"></a>00177 { <a name="l00178"></a>00178 <span class="keyword">public</span>: <a name="l00185"></a><a class="code" href="classTelEngine_1_1IAXInfoElementString.html#0bcefe4185af943e192a69b50d115b89">00185</a> <span class="keyword">inline</span> <a class="code" href="classTelEngine_1_1IAXInfoElementString.html" title="A single IAX2 text Information Element.">IAXInfoElementString</a>(<a class="code" href="classTelEngine_1_1IAXInfoElement.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> type, <span class="keyword">const</span> <span class="keywordtype">char</span>* buf, <span class="keywordtype">unsigned</span> len) : <a class="code" href="classTelEngine_1_1IAXInfoElement.html" title="A single IAX2 Information Element.">IAXInfoElement</a>(type), m_strData(buf,(int)len) <a name="l00186"></a>00186 {} <a name="l00187"></a>00187 <a name="l00191"></a><a class="code" href="classTelEngine_1_1IAXInfoElementString.html#1ef1e1f668a2a48962883552884236e8">00191</a> <span class="keyword">virtual</span> <a class="code" href="classTelEngine_1_1IAXInfoElementString.html#1ef1e1f668a2a48962883552884236e8">~IAXInfoElementString</a>() {} <a name="l00192"></a>00192 <a name="l00197"></a><a class="code" href="classTelEngine_1_1IAXInfoElementString.html#57b988236ee6a3a5e572d126d3fbccc1">00197</a> <span class="keyword">inline</span> <span class="keywordtype">int</span> length()<span class="keyword"> const</span> <a name="l00198"></a>00198 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_strData.length(); } <a name="l00199"></a>00199 <a name="l00204"></a><a class="code" href="classTelEngine_1_1IAXInfoElementString.html#5ea9035504e049c97a4a06c857fa8ffd">00204</a> <span class="keyword">inline</span> <a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a>& data() <a name="l00205"></a>00205 { <span class="keywordflow">return</span> m_strData; } <a name="l00206"></a>00206 <a name="l00211"></a>00211 <span class="keyword">virtual</span> <span class="keywordtype">void</span> toBuffer(<a class="code" href="classTelEngine_1_1DataBlock.html" title="A class that holds just a block of raw data.">DataBlock</a>& buf); <a name="l00212"></a>00212 <a name="l00217"></a><a class="code" href="classTelEngine_1_1IAXInfoElementString.html#e012f02f9b353958b64122898b9e6b12">00217</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> toString(<a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a>& buf) <a name="l00218"></a>00218 { buf << m_strData; } <a name="l00219"></a>00219 <a name="l00220"></a>00220 <span class="keyword">private</span>: <a name="l00221"></a>00221 <a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a> m_strData; <span class="comment">// IE text data</span> <a name="l00222"></a>00222 }; <a name="l00223"></a>00223 <a name="l00228"></a><a class="code" href="classTelEngine_1_1IAXInfoElementNumeric.html">00228</a> <span class="keyword">class </span><a class="code" href="classTelEngine_1_1IAXInfoElementNumeric.html" title="A single IAX2 numeric Information Element.">IAXInfoElementNumeric</a> : <span class="keyword">public</span> <a class="code" href="classTelEngine_1_1IAXInfoElement.html" title="A single IAX2 Information Element.">IAXInfoElement</a> <a name="l00229"></a>00229 { <a name="l00230"></a>00230 <span class="keyword">public</span>: <a name="l00237"></a>00237 <a class="code" href="classTelEngine_1_1IAXInfoElementNumeric.html#cb12f4f1871f073f8a777b378e2be7f2">IAXInfoElementNumeric</a>(<a class="code" href="classTelEngine_1_1IAXInfoElement.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> <a class="code" href="classTelEngine_1_1IAXInfoElement.html#fbd0fa31db28593e9669c3c56711c0a7">type</a>, u_int32_t val, u_int8_t len); <a name="l00238"></a>00238 <a name="l00242"></a><a class="code" href="classTelEngine_1_1IAXInfoElementNumeric.html#ef1c853c3450158dc56d58de7d4a64ca">00242</a> <span class="keyword">virtual</span> <a class="code" href="classTelEngine_1_1IAXInfoElementNumeric.html#ef1c853c3450158dc56d58de7d4a64ca">~IAXInfoElementNumeric</a>() {} <a name="l00243"></a>00243 <a name="l00248"></a><a class="code" href="classTelEngine_1_1IAXInfoElementNumeric.html#57b988236ee6a3a5e572d126d3fbccc1">00248</a> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classTelEngine_1_1IAXInfoElementNumeric.html#57b988236ee6a3a5e572d126d3fbccc1">length</a>()<span class="keyword"> const</span> <a name="l00249"></a>00249 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_length; } <a name="l00250"></a>00250 <a name="l00255"></a><a class="code" href="classTelEngine_1_1IAXInfoElementNumeric.html#e3dac215fb86e11c3c1a2ea79e1be5e4">00255</a> <span class="keyword">inline</span> u_int32_t <a class="code" href="classTelEngine_1_1IAXInfoElementNumeric.html#e3dac215fb86e11c3c1a2ea79e1be5e4">data</a>()<span class="keyword"> const</span> <a name="l00256"></a>00256 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_numericData; } <a name="l00257"></a>00257 <a name="l00262"></a>00262 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTelEngine_1_1IAXInfoElementNumeric.html#7fe2a8da4e5d5ae2d4e6ca0d8a3d4be7">toBuffer</a>(<a class="code" href="classTelEngine_1_1DataBlock.html" title="A class that holds just a block of raw data.">DataBlock</a>& buf); <a name="l00263"></a>00263 <a name="l00268"></a>00268 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTelEngine_1_1GenObject.html#4a7bd56fb99593ace9379ed699f2719c">toString</a>(<a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a>& buf); <a name="l00269"></a>00269 <a name="l00270"></a>00270 <span class="keyword">private</span>: <a name="l00271"></a>00271 u_int8_t m_length; <span class="comment">// IE data length</span> <a name="l00272"></a>00272 u_int32_t m_numericData; <span class="comment">// IE numeric data</span> <a name="l00273"></a>00273 }; <a name="l00274"></a>00274 <a name="l00279"></a><a class="code" href="classTelEngine_1_1IAXInfoElementBinary.html">00279</a> <span class="keyword">class </span>YIAX_API <a class="code" href="classTelEngine_1_1IAXInfoElementBinary.html" title="A single IAX2 numeric Information Element.">IAXInfoElementBinary</a> : <span class="keyword">public</span> <a class="code" href="classTelEngine_1_1IAXInfoElement.html" title="A single IAX2 Information Element.">IAXInfoElement</a> <a name="l00280"></a>00280 { <a name="l00281"></a>00281 <span class="keyword">public</span>: <a name="l00288"></a><a class="code" href="classTelEngine_1_1IAXInfoElementBinary.html#0516c0271d2cb80e680b973cb62b79fe">00288</a> <a class="code" href="classTelEngine_1_1IAXInfoElementBinary.html" title="A single IAX2 numeric Information Element.">IAXInfoElementBinary</a>(<a class="code" href="classTelEngine_1_1IAXInfoElement.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> type, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* buf, <span class="keywordtype">unsigned</span> len) : <a class="code" href="classTelEngine_1_1IAXInfoElement.html" title="A single IAX2 Information Element.">IAXInfoElement</a>(type), m_data(buf,len) <a name="l00289"></a>00289 {} <a name="l00290"></a>00290 <a name="l00294"></a><a class="code" href="classTelEngine_1_1IAXInfoElementBinary.html#ebd0cbedac0a0ac918c4183580786924">00294</a> <span class="keyword">virtual</span> <a class="code" href="classTelEngine_1_1IAXInfoElementBinary.html#ebd0cbedac0a0ac918c4183580786924">~IAXInfoElementBinary</a>() {} <a name="l00295"></a>00295 <a name="l00300"></a><a class="code" href="classTelEngine_1_1IAXInfoElementBinary.html#57b988236ee6a3a5e572d126d3fbccc1">00300</a> <span class="keyword">inline</span> <span class="keywordtype">int</span> length()<span class="keyword"> const</span> <a name="l00301"></a>00301 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_data.length(); } <a name="l00302"></a>00302 <a name="l00307"></a><a class="code" href="classTelEngine_1_1IAXInfoElementBinary.html#ec5e47df053fce5ac19f56dcb130206c">00307</a> <span class="keyword">inline</span> <a class="code" href="classTelEngine_1_1DataBlock.html" title="A class that holds just a block of raw data.">DataBlock</a>& data() <a name="l00308"></a>00308 { <span class="keywordflow">return</span> m_data; } <a name="l00309"></a>00309 <a name="l00314"></a>00314 <span class="keyword">virtual</span> <span class="keywordtype">void</span> toBuffer(<a class="code" href="classTelEngine_1_1DataBlock.html" title="A class that holds just a block of raw data.">DataBlock</a>& buf); <a name="l00315"></a>00315 <a name="l00321"></a>00321 <span class="keyword">static</span> <a class="code" href="classTelEngine_1_1IAXInfoElementBinary.html" title="A single IAX2 numeric Information Element.">IAXInfoElementBinary</a>* packIP(<span class="keyword">const</span> <a class="code" href="classTelEngine_1_1SocketAddr.html" title="A socket address holder.">SocketAddr</a>& addr); <a name="l00322"></a>00322 <a name="l00329"></a>00329 <span class="keyword">static</span> <span class="keywordtype">bool</span> unpackIP(<a class="code" href="classTelEngine_1_1SocketAddr.html" title="A socket address holder.">SocketAddr</a>& addr, <a class="code" href="classTelEngine_1_1IAXInfoElementBinary.html" title="A single IAX2 numeric Information Element.">IAXInfoElementBinary</a>* ie); <a name="l00330"></a>00330 <a name="l00335"></a>00335 <span class="keyword">virtual</span> <span class="keywordtype">void</span> toString(<a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a>& buf); <a name="l00336"></a>00336 <a name="l00337"></a>00337 <span class="keyword">private</span>: <a name="l00338"></a>00338 <a class="code" href="classTelEngine_1_1DataBlock.html" title="A class that holds just a block of raw data.">DataBlock</a> m_data; <span class="comment">// IE binary data</span> <a name="l00339"></a>00339 }; <a name="l00340"></a>00340 <a name="l00345"></a><a class="code" href="classTelEngine_1_1IAXIEList.html">00345</a> <span class="keyword">class </span>YIAX_API <a class="code" href="classTelEngine_1_1IAXIEList.html" title="Information Element container.">IAXIEList</a> <a name="l00346"></a>00346 { <a name="l00347"></a>00347 <span class="keyword">public</span>: <a name="l00351"></a><a class="code" href="classTelEngine_1_1IAXIEList.html#67af09fcad0c3a959b5fce51ad2dfd55">00351</a> <span class="keyword">inline</span> <a class="code" href="classTelEngine_1_1IAXIEList.html" title="Information Element container.">IAXIEList</a>() : m_invalidIEList(false) <a name="l00352"></a>00352 {} <a name="l00353"></a>00353 <a name="l00359"></a><a class="code" href="classTelEngine_1_1IAXIEList.html#93fcb2a7c5846cb1afa1416e742af567">00359</a> <span class="keyword">inline</span> <a class="code" href="classTelEngine_1_1IAXIEList.html" title="Information Element container.">IAXIEList</a>(<span class="keyword">const</span> <a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a>* frame, <span class="keywordtype">bool</span> incoming = <span class="keyword">true</span>) : m_invalidIEList(false) <a name="l00360"></a>00360 { createFromFrame(frame,incoming); } <a name="l00361"></a>00361 <a name="l00365"></a><a class="code" href="classTelEngine_1_1IAXIEList.html#8b1472ec1306fa5e99b48ba622d209ad">00365</a> <span class="keyword">inline</span> ~<a class="code" href="classTelEngine_1_1IAXIEList.html" title="Information Element container.">IAXIEList</a>() <a name="l00366"></a>00366 {} <a name="l00367"></a>00367 <a name="l00372"></a><a class="code" href="classTelEngine_1_1IAXIEList.html#97deac08a9e6751da01ad33fb36891da">00372</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> invalidIEList()<span class="keyword"> const</span> <a name="l00373"></a>00373 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_invalidIEList; } <a name="l00374"></a>00374 <a name="l00378"></a><a class="code" href="classTelEngine_1_1IAXIEList.html#c8bb3912a3ce86b15842e79d0b421204">00378</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> clear() <a name="l00379"></a>00379 { m_list.clear(); } <a name="l00380"></a>00380 <a name="l00384"></a>00384 <span class="keywordtype">void</span> insertVersion(); <a name="l00385"></a>00385 <a name="l00390"></a><a class="code" href="classTelEngine_1_1IAXIEList.html#aa5f3e699cdad7c71f44f059f99ff4b1">00390</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classTelEngine_1_1IAXIEList.html#aa5f3e699cdad7c71f44f059f99ff4b1">validVersion</a>() { <a name="l00391"></a>00391 u_int32_t ver = 0xFFFF; <a name="l00392"></a>00392 getNumeric(IAXInfoElement::VERSION,ver); <a name="l00393"></a>00393 <span class="keywordflow">return</span> ver == IAX_PROTOCOL_VERSION; <a name="l00394"></a>00394 } <a name="l00395"></a>00395 <a name="l00400"></a><a class="code" href="classTelEngine_1_1IAXIEList.html#fab2e1c72a7fa16c4539085079429389">00400</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> appendIE(<a class="code" href="classTelEngine_1_1IAXInfoElement.html" title="A single IAX2 Information Element.">IAXInfoElement</a>* ie) <a name="l00401"></a>00401 { m_list.append(ie); } <a name="l00402"></a>00402 <a name="l00407"></a><a class="code" href="classTelEngine_1_1IAXIEList.html#d85fb7a33e876d0dcfd5182b1e4d70a9">00407</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> appendNull(<a class="code" href="classTelEngine_1_1IAXInfoElement.html#1d1cfd8ffb84e947f82999c682b666a7">IAXInfoElement::Type</a> type) <a name="l00408"></a>00408 { m_list.append(<span class="keyword">new</span> <a class="code" href="classTelEngine_1_1IAXInfoElement.html" title="A single IAX2 Information Element.">IAXInfoElement</a>(type)); } <a name="l00409"></a>00409 <a name="l00415"></a><a class="code" href="classTelEngine_1_1IAXIEList.html#aa886d32fb9ba6e7124a9323c7ac571d">00415</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> appendString(<a class="code" href="classTelEngine_1_1IAXInfoElement.html#1d1cfd8ffb84e947f82999c682b666a7">IAXInfoElement::Type</a> type, <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a>& src) <a name="l00416"></a>00416 { m_list.append(<span class="keyword">new</span> <a class="code" href="classTelEngine_1_1IAXInfoElementString.html" title="A single IAX2 text Information Element.">IAXInfoElementString</a>(type,src.<a class="code" href="classTelEngine_1_1String.html#89da6be964480b4c86334e4e337d3cf2">c_str</a>(),src.<a class="code" href="classTelEngine_1_1String.html#580388f31f60c46fac867ca48a48da1e">length</a>())); } <a name="l00417"></a>00417 <a name="l00424"></a><a class="code" href="classTelEngine_1_1IAXIEList.html#7ec3f616b470f39b196d39935cd28dd1">00424</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> appendString(<a class="code" href="classTelEngine_1_1IAXInfoElement.html#1d1cfd8ffb84e947f82999c682b666a7">IAXInfoElement::Type</a> type, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* src, <span class="keywordtype">unsigned</span> len) <a name="l00425"></a>00425 { m_list.append(<span class="keyword">new</span> <a class="code" href="classTelEngine_1_1IAXInfoElementString.html" title="A single IAX2 text Information Element.">IAXInfoElementString</a>(type,(<span class="keywordtype">char</span>*)src,len)); } <a name="l00426"></a>00426 <a name="l00433"></a><a class="code" href="classTelEngine_1_1IAXIEList.html#7102c3a1a5692a8c1e2b3e44e3bcc18d">00433</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> appendNumeric(<a class="code" href="classTelEngine_1_1IAXInfoElement.html#1d1cfd8ffb84e947f82999c682b666a7">IAXInfoElement::Type</a> type, u_int32_t value, u_int8_t len) <a name="l00434"></a>00434 { m_list.append(<span class="keyword">new</span> <a class="code" href="classTelEngine_1_1IAXInfoElementNumeric.html" title="A single IAX2 numeric Information Element.">IAXInfoElementNumeric</a>(type,value,len)); } <a name="l00435"></a>00435 <a name="l00442"></a><a class="code" href="classTelEngine_1_1IAXIEList.html#e17d3730c19d38adbb839c47646b5e33">00442</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> appendBinary(<a class="code" href="classTelEngine_1_1IAXInfoElement.html#1d1cfd8ffb84e947f82999c682b666a7">IAXInfoElement::Type</a> type, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* data, <span class="keywordtype">unsigned</span> len) <a name="l00443"></a>00443 { m_list.append(<span class="keyword">new</span> <a class="code" href="classTelEngine_1_1IAXInfoElementBinary.html" title="A single IAX2 numeric Information Element.">IAXInfoElementBinary</a>(type,data,len)); } <a name="l00444"></a>00444 <a name="l00452"></a>00452 <span class="keywordtype">bool</span> createFromFrame(<span class="keyword">const</span> <a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a>* frame, <span class="keywordtype">bool</span> incoming = <span class="keyword">true</span>); <a name="l00453"></a>00453 <a name="l00458"></a>00458 <span class="keywordtype">void</span> toBuffer(<a class="code" href="classTelEngine_1_1DataBlock.html" title="A class that holds just a block of raw data.">DataBlock</a>& buf); <a name="l00459"></a>00459 <a name="l00465"></a>00465 <span class="keywordtype">void</span> toString(<a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a>& dest, <span class="keyword">const</span> <span class="keywordtype">char</span>* indent = 0); <a name="l00466"></a>00466 <a name="l00472"></a>00472 <a class="code" href="classTelEngine_1_1IAXInfoElement.html" title="A single IAX2 Information Element.">IAXInfoElement</a>* getIE(<a class="code" href="classTelEngine_1_1IAXInfoElement.html#1d1cfd8ffb84e947f82999c682b666a7">IAXInfoElement::Type</a> type); <a name="l00473"></a>00473 <a name="l00480"></a>00480 <span class="keywordtype">bool</span> getString(<a class="code" href="classTelEngine_1_1IAXInfoElement.html#1d1cfd8ffb84e947f82999c682b666a7">IAXInfoElement::Type</a> type, <a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a>& dest); <a name="l00481"></a>00481 <a name="l00488"></a>00488 <span class="keywordtype">bool</span> getNumeric(<a class="code" href="classTelEngine_1_1IAXInfoElement.html#1d1cfd8ffb84e947f82999c682b666a7">IAXInfoElement::Type</a> type, u_int32_t& dest); <a name="l00489"></a>00489 <a name="l00496"></a>00496 <span class="keywordtype">bool</span> getBinary(<a class="code" href="classTelEngine_1_1IAXInfoElement.html#1d1cfd8ffb84e947f82999c682b666a7">IAXInfoElement::Type</a> type, <a class="code" href="classTelEngine_1_1DataBlock.html" title="A class that holds just a block of raw data.">DataBlock</a>& dest); <a name="l00497"></a>00497 <a name="l00498"></a>00498 <span class="keyword">private</span>: <a name="l00499"></a>00499 <span class="keywordtype">bool</span> m_invalidIEList; <span class="comment">// Invalid IE flag</span> <a name="l00500"></a>00500 <a class="code" href="classTelEngine_1_1ObjList.html" title="An object list class.">ObjList</a> m_list; <span class="comment">// The IE list</span> <a name="l00501"></a>00501 }; <a name="l00502"></a>00502 <a name="l00507"></a><a class="code" href="classTelEngine_1_1IAXAuthMethod.html">00507</a> <span class="keyword">class </span>YIAX_API <a class="code" href="classTelEngine_1_1IAXAuthMethod.html" title="Wrapper class for authentication methods values.">IAXAuthMethod</a> <a name="l00508"></a>00508 { <a name="l00509"></a>00509 <span class="keyword">public</span>: <a name="l00513"></a><a class="code" href="classTelEngine_1_1IAXAuthMethod.html#1d1cfd8ffb84e947f82999c682b666a7">00513</a> <span class="keyword">enum</span> <a class="code" href="classTelEngine_1_1IAXAuthMethod.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> { <a name="l00514"></a>00514 Text = 1, <a name="l00515"></a>00515 <a class="code" href="classTelEngine_1_1MD5.html" title="A standard MD5 digest calculator.">MD5</a> = 2, <a name="l00516"></a>00516 RSA = 4, <a name="l00517"></a>00517 }; <a name="l00518"></a>00518 <a name="l00525"></a>00525 <span class="keyword">static</span> <span class="keywordtype">void</span> authList(<a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a>& dest, u_int16_t auth, <span class="keywordtype">char</span> sep); <a name="l00526"></a>00526 <a name="l00527"></a>00527 <span class="keyword">static</span> <a class="code" href="structTelEngine_1_1TokenDict.html">TokenDict</a> s_texts[]; <a name="l00528"></a>00528 }; <a name="l00529"></a>00529 <a name="l00534"></a><a class="code" href="classTelEngine_1_1IAXFormat.html">00534</a> <span class="keyword">class </span>YIAX_API <a class="code" href="classTelEngine_1_1IAXFormat.html" title="Wrapper class for audio and video formats.">IAXFormat</a> <a name="l00535"></a>00535 { <a name="l00536"></a>00536 <span class="keyword">public</span>: <a name="l00540"></a><a class="code" href="classTelEngine_1_1IAXFormat.html#8ac332764b5228b78cc0d434bc3f4496">00540</a> <span class="keyword">enum</span> <a class="code" href="classTelEngine_1_1IAXFormat.html#8ac332764b5228b78cc0d434bc3f4496">Audio</a> { <a name="l00541"></a>00541 G723_1 = (1 << 0), <a name="l00542"></a>00542 GSM = (1 << 1), <a name="l00543"></a>00543 ULAW = (1 << 2), <a name="l00544"></a>00544 ALAW = (1 << 3), <a name="l00545"></a>00545 MP3 = (1 << 4), <a name="l00546"></a>00546 ADPCM = (1 << 5), <a name="l00547"></a>00547 SLIN = (1 << 6), <a name="l00548"></a>00548 LPC10 = (1 << 7), <a name="l00549"></a>00549 G729A = (1 << 8), <a name="l00550"></a>00550 SPEEX = (1 << 9), <a name="l00551"></a>00551 ILBC = (1 << 10), <a name="l00552"></a>00552 }; <a name="l00553"></a>00553 <a name="l00557"></a><a class="code" href="classTelEngine_1_1IAXFormat.html#121bfee6ba71defb0cf9470d797f1817">00557</a> <span class="keyword">enum</span> <a class="code" href="classTelEngine_1_1IAXFormat.html#121bfee6ba71defb0cf9470d797f1817">Video</a> { <a name="l00558"></a>00558 JPEG = (1 << 16), <a name="l00559"></a>00559 PNG = (1 << 17), <a name="l00560"></a>00560 H261 = (1 << 18), <a name="l00561"></a>00561 H263 = (1 << 19), <a name="l00562"></a>00562 }; <a name="l00563"></a>00563 <a name="l00570"></a>00570 <span class="keyword">static</span> <span class="keywordtype">void</span> formatList(<a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a>& dest, u_int32_t formats, <span class="keywordtype">char</span> sep = <span class="charliteral">','</span>); <a name="l00571"></a>00571 <a name="l00577"></a><a class="code" href="classTelEngine_1_1IAXFormat.html#d8359d4b4db596712ca9e616fc9d6fa6">00577</a> <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* audioText(u_int32_t audio) <a name="l00578"></a>00578 { <span class="keywordflow">return</span> <a class="code" href="namespaceTelEngine.html#4668c9172c6ae5f59f5782ecc6e05516">lookup</a>(audio,audioData); } <a name="l00579"></a>00579 <a name="l00585"></a><a class="code" href="classTelEngine_1_1IAXFormat.html#3dd6c93266f1162e3d1cfdadaf8cce36">00585</a> <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* videoText(u_int32_t video) <a name="l00586"></a>00586 { <span class="keywordflow">return</span> <a class="code" href="namespaceTelEngine.html#4668c9172c6ae5f59f5782ecc6e05516">lookup</a>(video,videoData); } <a name="l00587"></a>00587 <a name="l00591"></a><a class="code" href="classTelEngine_1_1IAXFormat.html#62a3c08b74ecbcb988a2034115ad1b08">00591</a> <span class="keyword">static</span> <a class="code" href="structTelEngine_1_1TokenDict.html">TokenDict</a> audioData[]; <a name="l00592"></a>00592 <a name="l00596"></a><a class="code" href="classTelEngine_1_1IAXFormat.html#db54dad0e5557c74ad30dfabe7afbb5e">00596</a> <span class="keyword">static</span> <a class="code" href="structTelEngine_1_1TokenDict.html">TokenDict</a> videoData[]; <a name="l00597"></a>00597 }; <a name="l00598"></a>00598 <a name="l00603"></a><a class="code" href="classTelEngine_1_1IAXControl.html">00603</a> <span class="keyword">class </span>YIAX_API <a class="code" href="classTelEngine_1_1IAXControl.html" title="Wrapper class for subclasses of frames of type IAX.">IAXControl</a> <a name="l00604"></a>00604 { <a name="l00605"></a>00605 <span class="keyword">public</span>: <a name="l00609"></a><a class="code" href="classTelEngine_1_1IAXControl.html#1d1cfd8ffb84e947f82999c682b666a7">00609</a> <span class="keyword">enum</span> <a class="code" href="classTelEngine_1_1IAXControl.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> { <a name="l00610"></a>00610 New = 0x01, <a name="l00611"></a>00611 Ping = 0x02, <a name="l00612"></a>00612 Pong = 0x03, <a name="l00613"></a>00613 Ack = 0x04, <a name="l00614"></a>00614 Hangup = 0x05, <a name="l00615"></a>00615 Reject = 0x06, <a name="l00616"></a>00616 Accept = 0x07, <a name="l00617"></a>00617 AuthReq = 0x08, <a name="l00618"></a>00618 AuthRep = 0x09, <a name="l00619"></a>00619 Inval = 0x0a, <a name="l00620"></a>00620 LagRq = 0x0b, <a name="l00621"></a>00621 LagRp = 0x0c, <a name="l00622"></a>00622 RegReq = 0x0d, <a name="l00623"></a>00623 RegAuth = 0x0e, <a name="l00624"></a>00624 RegAck = 0x0f, <a name="l00625"></a>00625 RegRej = 0x10, <a name="l00626"></a>00626 RegRel = 0x11, <a name="l00627"></a>00627 VNAK = 0x12, <a name="l00628"></a>00628 DpReq = 0x13, <a name="l00629"></a>00629 DpRep = 0x14, <a name="l00630"></a>00630 Dial = 0x15, <a name="l00631"></a>00631 TxReq = 0x16, <a name="l00632"></a>00632 TxCnt = 0x17, <a name="l00633"></a>00633 TxAcc = 0x18, <a name="l00634"></a>00634 TxReady = 0x19, <a name="l00635"></a>00635 TxRel = 0x1a, <a name="l00636"></a>00636 TxRej = 0x1b, <a name="l00637"></a>00637 Quelch = 0x1c, <a name="l00638"></a>00638 Unquelch = 0x1d, <a name="l00639"></a>00639 Poke = 0x1e, <a name="l00640"></a>00640 <span class="comment">//Reserved = 0x1f,</span> <a name="l00641"></a>00641 MWI = 0x20, <a name="l00642"></a>00642 Unsupport = 0x21, <a name="l00643"></a>00643 Transfer = 0x22, <a name="l00644"></a>00644 Provision = 0x23, <a name="l00645"></a>00645 FwDownl = 0x24, <a name="l00646"></a>00646 FwData = 0x25, <a name="l00647"></a>00647 }; <a name="l00648"></a>00648 <a name="l00654"></a><a class="code" href="classTelEngine_1_1IAXControl.html#2c30947987c8f6acd49167b9750342b9">00654</a> <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* typeText(<span class="keywordtype">int</span> type) <a name="l00655"></a>00655 { <span class="keywordflow">return</span> <a class="code" href="namespaceTelEngine.html#4668c9172c6ae5f59f5782ecc6e05516">lookup</a>(type,s_types,0); } <a name="l00656"></a>00656 <a name="l00657"></a>00657 <span class="keyword">private</span>: <a name="l00658"></a>00658 <span class="keyword">static</span> <a class="code" href="structTelEngine_1_1TokenDict.html">TokenDict</a> s_types[]; <span class="comment">// Keep the association between IAX control codes and their name</span> <a name="l00659"></a>00659 }; <a name="l00660"></a>00660 <a name="l00665"></a><a class="code" href="classTelEngine_1_1IAXFrame.html">00665</a> <span class="keyword">class </span>YIAX_API <a class="code" href="classTelEngine_1_1IAXFrame.html" title="This class holds an IAX frame.">IAXFrame</a> : <span class="keyword">public</span> <a class="code" href="classTelEngine_1_1RefObject.html">RefObject</a> <a name="l00666"></a>00666 { <a name="l00667"></a>00667 <span class="keyword">public</span>: <a name="l00671"></a><a class="code" href="classTelEngine_1_1IAXFrame.html#1d1cfd8ffb84e947f82999c682b666a7">00671</a> <span class="keyword">enum</span> <a class="code" href="classTelEngine_1_1IAXFrame.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> { <a name="l00672"></a>00672 DTMF = 0x01, <a name="l00673"></a>00673 Voice = 0x02, <a name="l00674"></a>00674 Video = 0x03, <a name="l00675"></a>00675 Control = 0x04, <a name="l00676"></a>00676 Null = 0x05, <a name="l00677"></a>00677 IAX = 0x06, <a name="l00678"></a>00678 Text = 0x07, <a name="l00679"></a>00679 Image = 0x08, <a name="l00680"></a>00680 HTML = 0x09, <a name="l00681"></a>00681 Noise = 0x0a, <a name="l00682"></a>00682 }; <a name="l00683"></a>00683 <a name="l00693"></a>00693 <a class="code" href="classTelEngine_1_1IAXFrame.html" title="This class holds an IAX frame.">IAXFrame</a>(Type type, u_int16_t sCallNo, u_int32_t tStamp, <span class="keywordtype">bool</span> retrans, <a name="l00694"></a>00694 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* buf, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> len); <a name="l00695"></a>00695 <a name="l00699"></a>00699 <span class="keyword">virtual</span> ~<a class="code" href="classTelEngine_1_1IAXFrame.html" title="This class holds an IAX frame.">IAXFrame</a>(); <a name="l00700"></a>00700 <a name="l00705"></a><a class="code" href="classTelEngine_1_1IAXFrame.html#fbd0fa31db28593e9669c3c56711c0a7">00705</a> <span class="keyword">inline</span> <a class="code" href="classTelEngine_1_1IAXFrame.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> type()<span class="keyword"> const</span> <a name="l00706"></a>00706 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_type; } <a name="l00707"></a>00707 <a name="l00712"></a><a class="code" href="classTelEngine_1_1IAXFrame.html#ec5e47df053fce5ac19f56dcb130206c">00712</a> <span class="keyword">inline</span> <a class="code" href="classTelEngine_1_1DataBlock.html" title="A class that holds just a block of raw data.">DataBlock</a>& data() <a name="l00713"></a>00713 { <span class="keywordflow">return</span> m_data; } <a name="l00714"></a>00714 <a name="l00719"></a><a class="code" href="classTelEngine_1_1IAXFrame.html#ce9a1b4b252bf8f3681f4ec30d81970d">00719</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> retrans()<span class="keyword"> const</span> <a name="l00720"></a>00720 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_retrans; } <a name="l00721"></a>00721 <a name="l00726"></a><a class="code" href="classTelEngine_1_1IAXFrame.html#5128e4769c843049cfc240d90eceda4d">00726</a> <span class="keyword">inline</span> u_int16_t sourceCallNo()<span class="keyword"> const</span> <a name="l00727"></a>00727 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_sCallNo; } <a name="l00728"></a>00728 <a name="l00733"></a><a class="code" href="classTelEngine_1_1IAXFrame.html#d2afe3a5ba96047c7aca5a7c5d31a129">00733</a> <span class="keyword">inline</span> u_int32_t timeStamp()<span class="keyword"> const</span> <a name="l00734"></a>00734 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_tStamp; } <a name="l00735"></a>00735 <a name="l00740"></a>00740 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a>* fullFrame() <span class="keyword">const</span>; <a name="l00741"></a>00741 <a name="l00750"></a>00750 <span class="keyword">static</span> <a class="code" href="classTelEngine_1_1IAXFrame.html" title="This class holds an IAX frame.">IAXFrame</a>* parse(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* buf, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> len, <a class="code" href="classTelEngine_1_1IAXEngine.html" title="IAX engine class.">IAXEngine</a>* engine = 0, <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1SocketAddr.html" title="A socket address holder.">SocketAddr</a>* addr = 0); <a name="l00751"></a>00751 <a name="l00757"></a>00757 <span class="keyword">static</span> u_int8_t packSubclass(u_int32_t value); <a name="l00758"></a>00758 <a name="l00764"></a>00764 <span class="keyword">static</span> u_int32_t unpackSubclass(u_int8_t value); <a name="l00765"></a>00765 <a name="l00771"></a><a class="code" href="classTelEngine_1_1IAXFrame.html#2c30947987c8f6acd49167b9750342b9">00771</a> <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* typeText(<span class="keywordtype">int</span> type) <a name="l00772"></a>00772 { <span class="keywordflow">return</span> <a class="code" href="namespaceTelEngine.html#4668c9172c6ae5f59f5782ecc6e05516">lookup</a>(type,s_types,0); } <a name="l00773"></a>00773 <a name="l00774"></a>00774 <span class="keyword">protected</span>: <a name="l00778"></a><a class="code" href="classTelEngine_1_1IAXFrame.html#d56abe48f5b150093823e30c0883328d">00778</a> <a class="code" href="classTelEngine_1_1DataBlock.html" title="A class that holds just a block of raw data.">DataBlock</a> m_data; <a name="l00779"></a>00779 <a name="l00783"></a><a class="code" href="classTelEngine_1_1IAXFrame.html#222f594ca85b9e1980cccb481db1eef4">00783</a> <span class="keywordtype">bool</span> m_retrans; <a name="l00784"></a>00784 <a name="l00785"></a>00785 <span class="keyword">private</span>: <a name="l00786"></a>00786 <span class="keyword">static</span> <a class="code" href="structTelEngine_1_1TokenDict.html">TokenDict</a> s_types[]; <span class="comment">// Keep the association between IAX frame types and their names</span> <a name="l00787"></a>00787 <a class="code" href="classTelEngine_1_1IAXFrame.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> m_type; <span class="comment">// Frame type</span> <a name="l00788"></a>00788 u_int16_t m_sCallNo; <span class="comment">// Source call number</span> <a name="l00789"></a>00789 u_int32_t m_tStamp; <span class="comment">// Frame timestamp</span> <a name="l00790"></a>00790 }; <a name="l00791"></a>00791 <a name="l00796"></a><a class="code" href="classTelEngine_1_1IAXFullFrame.html">00796</a> <span class="keyword">class </span>YIAX_API <a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a> : <span class="keyword">public</span> <a class="code" href="classTelEngine_1_1IAXFrame.html" title="This class holds an IAX frame.">IAXFrame</a> <a name="l00797"></a>00797 { <a name="l00798"></a>00798 <span class="keyword">public</span>: <a name="l00802"></a><a class="code" href="classTelEngine_1_1IAXFullFrame.html#8005f1f182fd0248a710ca64f72508d4">00802</a> <span class="keyword">enum</span> <a class="code" href="classTelEngine_1_1IAXFullFrame.html#8005f1f182fd0248a710ca64f72508d4">ControlType</a> { <a name="l00803"></a>00803 Hangup = 0x01, <a name="l00804"></a>00804 <span class="comment">//Ring = 0x02,</span> <a name="l00805"></a>00805 Ringing = 0x03, <a name="l00806"></a>00806 Answer = 0x04, <a name="l00807"></a>00807 Busy = 0x05, <a name="l00808"></a>00808 Congestion = 0x08, <a name="l00809"></a>00809 FlashHook = 0x09, <a name="l00810"></a>00810 Option = 0x0b, <a name="l00811"></a>00811 KeyRadio = 0x0c, <a name="l00812"></a>00812 UnkeyRadio = 0x0d, <a name="l00813"></a>00813 Progressing = 0x0e, <a name="l00814"></a>00814 Proceeding = 0x0f, <a name="l00815"></a>00815 Hold = 0x10, <a name="l00816"></a>00816 Unhold = 0x11, <a name="l00817"></a>00817 VidUpdate = 0x12, <a name="l00818"></a>00818 }; <a name="l00819"></a>00819 <a name="l00833"></a>00833 <a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a>(Type type, u_int32_t subclass, u_int16_t sCallNo, u_int16_t dCallNo, <a name="l00834"></a>00834 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> oSeqNo, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> iSeqNo, <a name="l00835"></a>00835 u_int32_t tStamp, <span class="keywordtype">bool</span> retrans, <a name="l00836"></a>00836 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* buf, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> len); <a name="l00837"></a>00837 <a name="l00850"></a>00850 <a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a>(Type type, u_int32_t subclass, u_int16_t sCallNo, u_int16_t dCallNo, <a name="l00851"></a>00851 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> oSeqNo, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> iSeqNo, <a name="l00852"></a>00852 u_int32_t tStamp, <a name="l00853"></a>00853 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* buf = 0, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> len = 0); <a name="l00854"></a>00854 <a name="l00858"></a>00858 <span class="keyword">virtual</span> ~<a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a>(); <a name="l00859"></a>00859 <a name="l00864"></a><a class="code" href="classTelEngine_1_1IAXFullFrame.html#efed35bfdf66a1d87e8889accd39b041">00864</a> <span class="keyword">inline</span> u_int16_t destCallNo()<span class="keyword"> const</span> <a name="l00865"></a>00865 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_dCallNo; } <a name="l00866"></a>00866 <a name="l00871"></a><a class="code" href="classTelEngine_1_1IAXFullFrame.html#bc4f11fd2801b7d640938d42859f1b48">00871</a> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> oSeqNo()<span class="keyword"> const</span> <a name="l00872"></a>00872 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_oSeqNo; } <a name="l00873"></a>00873 <a name="l00878"></a><a class="code" href="classTelEngine_1_1IAXFullFrame.html#de5838828bb2c88f92ef0d0076cb7987">00878</a> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> iSeqNo()<span class="keyword"> const</span> <a name="l00879"></a>00879 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_iSeqNo; } <a name="l00880"></a>00880 <a name="l00885"></a><a class="code" href="classTelEngine_1_1IAXFullFrame.html#3b4386fddb72a0f38cbe41ae94ece33a">00885</a> <span class="keyword">inline</span> u_int32_t subclass()<span class="keyword"> const</span> <a name="l00886"></a>00886 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_subclass; } <a name="l00887"></a>00887 <a name="l00892"></a>00892 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a>* fullFrame() <span class="keyword">const</span>; <a name="l00893"></a>00893 <a name="l00901"></a>00901 <span class="keywordtype">void</span> toString(<a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a>& dest, <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1SocketAddr.html" title="A socket address holder.">SocketAddr</a>& local, <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1SocketAddr.html" title="A socket address holder.">SocketAddr</a>& remote, <a name="l00902"></a>00902 <span class="keywordtype">bool</span> incoming) <span class="keyword">const</span>; <a name="l00903"></a>00903 <a name="l00909"></a><a class="code" href="classTelEngine_1_1IAXFullFrame.html#5e8502dbfa2e72ad27ba4623f84ef2bc">00909</a> <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* controlTypeText(<span class="keywordtype">int</span> type) <a name="l00910"></a>00910 { <span class="keywordflow">return</span> <a class="code" href="namespaceTelEngine.html#4668c9172c6ae5f59f5782ecc6e05516">lookup</a>(type,s_controlTypes,0); } <a name="l00911"></a>00911 <a name="l00912"></a>00912 <span class="keyword">private</span>: <a name="l00913"></a>00913 <span class="keyword">static</span> <a class="code" href="structTelEngine_1_1TokenDict.html">TokenDict</a> s_controlTypes[]; <span class="comment">// Keep the association between control types and their names</span> <a name="l00914"></a>00914 u_int16_t m_dCallNo; <span class="comment">// Destination call number</span> <a name="l00915"></a>00915 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> m_oSeqNo; <span class="comment">// Out sequence number</span> <a name="l00916"></a>00916 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> m_iSeqNo; <span class="comment">// In sequence number</span> <a name="l00917"></a>00917 u_int32_t m_subclass; <span class="comment">// Subclass</span> <a name="l00918"></a>00918 }; <a name="l00919"></a>00919 <a name="l00924"></a><a class="code" href="classTelEngine_1_1IAXFrameOut.html">00924</a> <span class="keyword">class </span>YIAX_API <a class="code" href="classTelEngine_1_1IAXFrameOut.html" title="This class holds an outgoing IAX full frame.">IAXFrameOut</a> : <span class="keyword">public</span> <a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a> <a name="l00925"></a>00925 { <a name="l00926"></a>00926 <span class="keyword">public</span>: <a name="l00942"></a><a class="code" href="classTelEngine_1_1IAXFrameOut.html#ac02e2d2f49d3d8cfe013c9538acb59a">00942</a> <span class="keyword">inline</span> <a class="code" href="classTelEngine_1_1IAXFrameOut.html" title="This class holds an outgoing IAX full frame.">IAXFrameOut</a>(<a class="code" href="classTelEngine_1_1IAXFrame.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> type, u_int32_t subclass, u_int16_t sCallNo, u_int16_t dCallNo, <a name="l00943"></a>00943 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> oSeqNo, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> iSeqNo, u_int32_t tStamp, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* buf, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> len, <a name="l00944"></a>00944 u_int16_t retransCount, u_int32_t retransInterval, <span class="keywordtype">bool</span> ackOnly) <a name="l00945"></a>00945 : <a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a>(type,subclass,sCallNo,dCallNo,oSeqNo,iSeqNo,tStamp,buf,len), <a name="l00946"></a>00946 m_ack(false), m_ackOnly(ackOnly), m_retransCount(retransCount), m_retransTimeInterval(retransInterval), <a name="l00947"></a>00947 m_nextTransTime(<a class="code" href="classTelEngine_1_1Time.html" title="A time holding class.">Time</a>::msecNow() + m_retransTimeInterval) <a name="l00948"></a>00948 {} <a name="l00949"></a>00949 <a name="l00953"></a><a class="code" href="classTelEngine_1_1IAXFrameOut.html#00578d76af67f9498e2f4350cda70c3c">00953</a> <span class="keyword">virtual</span> ~<a class="code" href="classTelEngine_1_1IAXFrameOut.html" title="This class holds an outgoing IAX full frame.">IAXFrameOut</a>() <a name="l00954"></a>00954 {} <a name="l00955"></a>00955 <a name="l00960"></a><a class="code" href="classTelEngine_1_1IAXFrameOut.html#9c437d53bf2d1e353a45486af2fd3343">00960</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> timeout()<span class="keyword"> const</span> <a name="l00961"></a>00961 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_retransCount == 0; } <a name="l00962"></a>00962 <a name="l00968"></a><a class="code" href="classTelEngine_1_1IAXFrameOut.html#b0bab6fd2271d118df74de7bec5e03c5">00968</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> timeForRetrans(u_int64_t time)<span class="keyword"> const</span> <a name="l00969"></a>00969 <span class="keyword"> </span>{ <span class="keywordflow">return</span> time > m_nextTransTime; } <a name="l00970"></a>00970 <a name="l00974"></a>00974 <span class="keywordtype">void</span> setRetrans(); <a name="l00975"></a>00975 <a name="l00979"></a>00979 <span class="keywordtype">void</span> transmitted(); <a name="l00980"></a>00980 <a name="l00985"></a><a class="code" href="classTelEngine_1_1IAXFrameOut.html#13d82bac8478ffd34bc2682d04190c8a">00985</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> ack()<span class="keyword"> const</span> <a name="l00986"></a>00986 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_ack; } <a name="l00987"></a>00987 <a name="l00991"></a><a class="code" href="classTelEngine_1_1IAXFrameOut.html#6063ca1297a08afac63ae7b6f24b9fa4">00991</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> setAck() <a name="l00992"></a>00992 { m_ack = <span class="keyword">true</span>; } <a name="l00993"></a>00993 <a name="l00998"></a><a class="code" href="classTelEngine_1_1IAXFrameOut.html#f604560600787ef595f41a70ab37711c">00998</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> ackOnly()<span class="keyword"> const</span> <a name="l00999"></a>00999 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_ackOnly; } <a name="l01000"></a>01000 <a name="l01005"></a>01005 <span class="keywordtype">void</span> adjustAuthTimeout(u_int64_t nextTransTime); <a name="l01006"></a>01006 <a name="l01007"></a>01007 <span class="keyword">private</span>: <a name="l01008"></a>01008 <span class="keywordtype">bool</span> m_ack; <span class="comment">// Acknoledge flag</span> <a name="l01009"></a>01009 <span class="keywordtype">bool</span> m_ackOnly; <span class="comment">// Frame need only ACK as a response</span> <a name="l01010"></a>01010 u_int16_t m_retransCount; <span class="comment">// Retransmission counter</span> <a name="l01011"></a>01011 u_int32_t m_retransTimeInterval; <span class="comment">// Retransmission interval</span> <a name="l01012"></a>01012 u_int64_t m_nextTransTime; <span class="comment">// Next transmission time</span> <a name="l01013"></a>01013 }; <a name="l01014"></a>01014 <a name="l01019"></a><a class="code" href="classTelEngine_1_1IAXMetaTrunkFrame.html">01019</a> <span class="keyword">class </span>YIAX_API <a class="code" href="classTelEngine_1_1IAXMetaTrunkFrame.html" title="Meta trunk frame.">IAXMetaTrunkFrame</a> : <span class="keyword">public</span> <a class="code" href="classTelEngine_1_1RefObject.html">RefObject</a>, <span class="keyword">public</span> <a class="code" href="classTelEngine_1_1Mutex.html" title="Mutex support.">Mutex</a> <a name="l01020"></a>01020 { <a name="l01021"></a>01021 <span class="keyword">public</span>: <a name="l01027"></a>01027 <a class="code" href="classTelEngine_1_1IAXMetaTrunkFrame.html" title="Meta trunk frame.">IAXMetaTrunkFrame</a>(<a class="code" href="classTelEngine_1_1IAXEngine.html" title="IAX engine class.">IAXEngine</a>* engine, <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1SocketAddr.html" title="A socket address holder.">SocketAddr</a>& addr); <a name="l01028"></a>01028 <a name="l01032"></a>01032 <span class="keyword">virtual</span> ~<a class="code" href="classTelEngine_1_1IAXMetaTrunkFrame.html" title="Meta trunk frame.">IAXMetaTrunkFrame</a>(); <a name="l01033"></a>01033 <a name="l01038"></a><a class="code" href="classTelEngine_1_1IAXMetaTrunkFrame.html#37daa045dcf7a1b182cda22f09ae61a4">01038</a> <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1SocketAddr.html" title="A socket address holder.">SocketAddr</a>& addr()<span class="keyword"> const</span> <a name="l01039"></a>01039 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_addr; } <a name="l01040"></a>01040 <a name="l01045"></a><a class="code" href="classTelEngine_1_1IAXMetaTrunkFrame.html#b44dae4b981d4ea77ff8e8ba3c7e099e">01045</a> <span class="keyword">inline</span> u_int32_t timestamp() <a name="l01046"></a>01046 { <span class="keywordflow">return</span> m_timestamp; } <a name="l01047"></a>01047 <a name="l01052"></a>01052 <span class="keywordtype">void</span> setTimestamp(u_int32_t tStamp); <a name="l01053"></a>01053 <a name="l01061"></a>01061 <span class="keywordtype">bool</span> <span class="keyword">add</span>(u_int16_t sCallNo, <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1DataBlock.html" title="A class that holds just a block of raw data.">DataBlock</a>& data, u_int32_t tStamp); <a name="l01062"></a>01062 <a name="l01068"></a>01068 <span class="keywordtype">bool</span> send(u_int32_t tStamp); <a name="l01069"></a>01069 <a name="l01070"></a>01070 <span class="keyword">private</span>: <a name="l01071"></a>01071 u_int8_t* m_data; <span class="comment">// Data buffer</span> <a name="l01072"></a>01072 u_int16_t m_dataAddIdx; <span class="comment">// Current add index</span> <a name="l01073"></a>01073 u_int32_t m_timestamp; <span class="comment">// Frame timestamp</span> <a name="l01074"></a>01074 <a class="code" href="classTelEngine_1_1IAXEngine.html" title="IAX engine class.">IAXEngine</a>* m_engine; <span class="comment">// The engine that owns this frame</span> <a name="l01075"></a>01075 <a class="code" href="classTelEngine_1_1SocketAddr.html" title="A socket address holder.">SocketAddr</a> m_addr; <span class="comment">// Remote peer address</span> <a name="l01076"></a>01076 }; <a name="l01077"></a>01077 <a name="l01083"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html">01083</a> <span class="keyword">class </span>YIAX_API <a class="code" href="classTelEngine_1_1IAXTransaction.html" title="An IAX2 transaction.">IAXTransaction</a> : <span class="keyword">public</span> <a class="code" href="classTelEngine_1_1RefObject.html">RefObject</a>, <span class="keyword">public</span> <a class="code" href="classTelEngine_1_1Mutex.html" title="Mutex support.">Mutex</a> <a name="l01084"></a>01084 { <a name="l01085"></a>01085 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>; <a name="l01086"></a>01086 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classTelEngine_1_1IAXEngine.html" title="IAX engine class.">IAXEngine</a>; <a name="l01087"></a>01087 <span class="keyword">public</span>: <a name="l01091"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#1d1cfd8ffb84e947f82999c682b666a7">01091</a> <span class="keyword">enum</span> <a class="code" href="classTelEngine_1_1IAXTransaction.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> { <a name="l01092"></a>01092 Incorrect, <span class="comment">// Unsupported/unknown type</span> <a name="l01093"></a>01093 New, <span class="comment">// Media exchange call</span> <a name="l01094"></a>01094 RegReq, <span class="comment">// Registration</span> <a name="l01095"></a>01095 RegRel, <span class="comment">// Registration release</span> <a name="l01096"></a>01096 Poke, <span class="comment">// Ping</span> <a name="l01097"></a>01097 <span class="comment">//FwDownl,</span> <a name="l01098"></a>01098 }; <a name="l01099"></a>01099 <a name="l01103"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#5d74787dedbc4e11c1ab15bf487e61f8">01103</a> <span class="keyword">enum</span> <a class="code" href="classTelEngine_1_1IAXTransaction.html#5d74787dedbc4e11c1ab15bf487e61f8">State</a> { <a name="l01104"></a>01104 Connected, <span class="comment">// Call leg established (Accepted) for transactions of type New</span> <a name="l01105"></a>01105 NewLocalInvite, <span class="comment">// New outgoing transaction: Poke/New/RegReq/RegRel</span> <a name="l01106"></a>01106 NewLocalInvite_AuthRecv, <span class="comment">// Auth request received for an outgoing transaction</span> <a name="l01107"></a>01107 NewLocalInvite_RepSent, <span class="comment">// Auth reply sent for an outgoing transaction</span> <a name="l01108"></a>01108 NewRemoteInvite, <span class="comment">// New incoming transaction: Poke/New/RegReq/RegRel</span> <a name="l01109"></a>01109 NewRemoteInvite_AuthSent, <span class="comment">// Auth sent for an incoming transaction</span> <a name="l01110"></a>01110 NewRemoteInvite_RepRecv, <span class="comment">// Auth reply received for an incoming transaction</span> <a name="l01111"></a>01111 Unknown, <span class="comment">// Initial state</span> <a name="l01112"></a>01112 Terminated, <span class="comment">// Terminated. No more frames accepted</span> <a name="l01113"></a>01113 Terminating, <span class="comment">// Terminating. Wait for ACK or timeout to terminate</span> <a name="l01114"></a>01114 }; <a name="l01115"></a>01115 <a name="l01125"></a>01125 <span class="keyword">static</span> <a class="code" href="classTelEngine_1_1IAXTransaction.html" title="An IAX2 transaction.">IAXTransaction</a>* factoryIn(<a class="code" href="classTelEngine_1_1IAXEngine.html" title="IAX engine class.">IAXEngine</a>* engine, <a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a>* frame, u_int16_t lcallno, <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1SocketAddr.html" title="A socket address holder.">SocketAddr</a>& addr, <a name="l01126"></a>01126 <span class="keywordtype">void</span>* data = 0); <a name="l01127"></a>01127 <a name="l01137"></a>01137 <span class="keyword">static</span> <a class="code" href="classTelEngine_1_1IAXTransaction.html" title="An IAX2 transaction.">IAXTransaction</a>* factoryOut(<a class="code" href="classTelEngine_1_1IAXEngine.html" title="IAX engine class.">IAXEngine</a>* engine, Type type, u_int16_t lcallno, <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1SocketAddr.html" title="A socket address holder.">SocketAddr</a>& addr, <a name="l01138"></a>01138 <a class="code" href="classTelEngine_1_1IAXIEList.html" title="Information Element container.">IAXIEList</a>& ieList, <span class="keywordtype">void</span>* data = 0); <a name="l01139"></a>01139 <a name="l01143"></a>01143 <span class="keyword">virtual</span> ~<a class="code" href="classTelEngine_1_1IAXTransaction.html" title="An IAX2 transaction.">IAXTransaction</a>(); <a name="l01144"></a>01144 <a name="l01149"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#79225998c9520ed88e238c4970bb41b4">01149</a> <span class="keyword">inline</span> <a class="code" href="classTelEngine_1_1IAXEngine.html" title="IAX engine class.">IAXEngine</a>* getEngine()<span class="keyword"> const</span> <a name="l01150"></a>01150 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_engine; } <a name="l01151"></a>01151 <a name="l01156"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#fbd0fa31db28593e9669c3c56711c0a7">01156</a> <span class="keyword">inline</span> <a class="code" href="classTelEngine_1_1IAXTransaction.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> type()<span class="keyword"> const</span> <a name="l01157"></a>01157 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_type; } <a name="l01158"></a>01158 <a name="l01163"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#3804c9648e6d1325751536cca350f2bf">01163</a> <span class="keyword">inline</span> <a class="code" href="classTelEngine_1_1IAXTransaction.html#5d74787dedbc4e11c1ab15bf487e61f8">State</a> state()<span class="keyword"> const</span> <a name="l01164"></a>01164 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_state; } <a name="l01165"></a>01165 <a name="l01170"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#5cdf58e3b5fe0e83e2678eed185da89c">01170</a> <span class="keyword">inline</span> u_int64_t timeStamp()<span class="keyword"> const</span> <a name="l01171"></a>01171 <span class="keyword"> </span>{ <span class="keywordflow">return</span> <a class="code" href="classTelEngine_1_1Time.html#fedf91537e85e72f09da0a8ffc598e53">Time::msecNow</a>() - m_timeStamp; } <a name="l01172"></a>01172 <a name="l01177"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#bf0a85f6a7ff9ab42c7f7d86b1bc0da8">01177</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> outgoing()<span class="keyword"> const</span> <a name="l01178"></a>01178 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_localInitTrans; } <a name="l01179"></a>01179 <a name="l01184"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#079b94ddfc1b7e6d6e25b69fafe283c1">01184</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> setUserData(<span class="keywordtype">void</span>* data) <a name="l01185"></a>01185 { m_userdata = data; } <a name="l01186"></a>01186 <a name="l01191"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#7ead208cc3c358a799bef54f4529548e">01191</a> <span class="keyword">inline</span> <span class="keywordtype">void</span>* getUserData()<span class="keyword"> const</span> <a name="l01192"></a>01192 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_userdata; } <a name="l01193"></a>01193 <a name="l01198"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#8732be352e7e9f18cd59a7faf3fd8f23">01198</a> <span class="keyword">inline</span> u_int16_t localCallNo()<span class="keyword"> const</span> <a name="l01199"></a>01199 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_lCallNo; } <a name="l01200"></a>01200 <a name="l01205"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#9805714d6a5bd4fc50fac2ecb0c43dde">01205</a> <span class="keyword">inline</span> u_int16_t remoteCallNo()<span class="keyword"> const</span> <a name="l01206"></a>01206 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_rCallNo; } <a name="l01207"></a>01207 <a name="l01212"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#bd9ce9296c8ed809a32784560b4f949c">01212</a> <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1SocketAddr.html" title="A socket address holder.">SocketAddr</a>& remoteAddr()<span class="keyword"> const</span> <a name="l01213"></a>01213 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_addr; } <a name="l01214"></a>01214 <a name="l01219"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#80f3614c01f013e8e5fafc3ea77adb67">01219</a> <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a>& username() <a name="l01220"></a>01220 { <span class="keywordflow">return</span> m_username; } <a name="l01221"></a>01221 <a name="l01226"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#fe2d29006c257a24a361a96e5537e41f">01226</a> <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a>& callingNo() <a name="l01227"></a>01227 { <span class="keywordflow">return</span> m_callingNo; } <a name="l01228"></a>01228 <a name="l01233"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#e1a21d0b7e89cb5d20720a567b1de3a5">01233</a> <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a>& callingName() <a name="l01234"></a>01234 { <span class="keywordflow">return</span> m_callingName; } <a name="l01235"></a>01235 <a name="l01240"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#90ad0bde79f84ad1f67f11c9a9a48ccb">01240</a> <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a>& calledNo() <a name="l01241"></a>01241 { <span class="keywordflow">return</span> m_calledNo; } <a name="l01242"></a>01242 <a name="l01247"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#af801497fe6b5ff325d8632f0a0e8f44">01247</a> <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a>& calledContext() <a name="l01248"></a>01248 { <span class="keywordflow">return</span> m_calledContext; } <a name="l01249"></a>01249 <a name="l01254"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#928c4899a20088f9768b4a2c85a56dc3">01254</a> <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a>& challenge() <a name="l01255"></a>01255 { <span class="keywordflow">return</span> m_challenge; } <a name="l01256"></a>01256 <a name="l01261"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#5e8b71390ebb65d673f444454640d2cf">01261</a> <span class="keyword">inline</span> u_int32_t format() <a name="l01262"></a>01262 { <span class="keywordflow">return</span> m_format; } <a name="l01263"></a>01263 <a name="l01268"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#1daa2d25b06a96d18a22532c27e032c0">01268</a> <span class="keyword">inline</span> u_int32_t formatIn() <a name="l01269"></a>01269 { <span class="keywordflow">return</span> m_formatIn; } <a name="l01270"></a>01270 <a name="l01275"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#0ad47cf232658f223f17c7df047e5c39">01275</a> <span class="keyword">inline</span> u_int32_t formatOut()<span class="keyword"> const </span> <a name="l01276"></a>01276 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_formatOut; } <a name="l01277"></a>01277 <a name="l01282"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#f0fd3b209ab9909ac020e61e5c65543e">01282</a> <span class="keyword">inline</span> u_int32_t capability()<span class="keyword"> const</span> <a name="l01283"></a>01283 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_capability; } <a name="l01284"></a>01284 <a name="l01289"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#146f545146568cfc55a565122eb8f4f1">01289</a> <span class="keyword">inline</span> u_int32_t expire()<span class="keyword"> const</span> <a name="l01290"></a>01290 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_expire; } <a name="l01291"></a>01291 <a name="l01296"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#aa0348eb243c551c0c8f79395638c6eb">01296</a> <span class="keyword">inline</span> <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a>& authdata() <a name="l01297"></a>01297 { <span class="keywordflow">return</span> m_authdata; } <a name="l01298"></a>01298 <a name="l01305"></a>01305 <a class="code" href="classTelEngine_1_1IAXTransaction.html" title="An IAX2 transaction.">IAXTransaction</a>* processFrame(<a class="code" href="classTelEngine_1_1IAXFrame.html" title="This class holds an IAX frame.">IAXFrame</a>* frame); <a name="l01306"></a>01306 <a name="l01314"></a>01314 <a class="code" href="classTelEngine_1_1IAXTransaction.html" title="An IAX2 transaction.">IAXTransaction</a>* processMedia(<a class="code" href="classTelEngine_1_1DataBlock.html" title="A class that holds just a block of raw data.">DataBlock</a>& data, u_int32_t tStamp, <span class="keywordtype">bool</span> voice = <span class="keyword">false</span>); <a name="l01315"></a>01315 <a name="l01322"></a>01322 <a class="code" href="classTelEngine_1_1IAXTransaction.html" title="An IAX2 transaction.">IAXTransaction</a>* sendMedia(<span class="keyword">const</span> <a class="code" href="classTelEngine_1_1DataBlock.html" title="A class that holds just a block of raw data.">DataBlock</a>& data, u_int32_t format); <a name="l01323"></a>01323 <a name="l01330"></a>01330 <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* getEvent(u_int64_t time); <a name="l01331"></a>01331 <a name="l01336"></a>01336 <span class="keyword">static</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> getMaxFrameList(); <a name="l01337"></a>01337 <a name="l01343"></a>01343 <span class="keyword">static</span> <span class="keywordtype">bool</span> setMaxFrameList(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> value); <a name="l01344"></a>01344 <a name="l01350"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#c89f32ccc247b5cc763f357c434ed19e">01350</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> sendAnswer() <a name="l01351"></a>01351 { <span class="keywordflow">return</span> sendConnected(IAXFullFrame::Answer); } <a name="l01352"></a>01352 <a name="l01358"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#14b8e1e38c45765e44a856c1ad6cead0">01358</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> sendRinging() <a name="l01359"></a>01359 { <span class="keywordflow">return</span> sendConnected(IAXFullFrame::Ringing); } <a name="l01360"></a>01360 <a name="l01366"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#5b66efc3a0b2d8733e026f9109c37ead">01366</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> sendProgress() <a name="l01367"></a>01367 { <span class="keywordflow">return</span> sendConnected(IAXFullFrame::Proceeding); } <a name="l01368"></a>01368 <a name="l01376"></a>01376 <span class="keywordtype">bool</span> sendAccept(); <a name="l01377"></a>01377 <a name="l01385"></a>01385 <span class="keywordtype">bool</span> sendHangup(<span class="keyword">const</span> <span class="keywordtype">char</span>* cause = 0, u_int8_t code = 0); <a name="l01386"></a>01386 <a name="l01394"></a>01394 <span class="keywordtype">bool</span> sendReject(<span class="keyword">const</span> <span class="keywordtype">char</span>* cause = 0, u_int8_t code = 0); <a name="l01395"></a>01395 <a name="l01401"></a>01401 <span class="keywordtype">bool</span> sendAuth(); <a name="l01402"></a>01402 <a name="l01409"></a>01409 <span class="keywordtype">bool</span> sendAuthReply(<span class="keyword">const</span> <a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a>& response); <a name="l01410"></a>01410 <a name="l01417"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#8799e54e2411a56a1822ba5637b1603f">01417</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> sendDtmf(u_int8_t dtmf) <a name="l01418"></a>01418 { <span class="keywordflow">return</span> dtmf <= 127 ? sendConnected((<a class="code" href="classTelEngine_1_1IAXFullFrame.html#8005f1f182fd0248a710ca64f72508d4">IAXFullFrame::ControlType</a>)dtmf,IAXFrame::DTMF) : <span class="keyword">false</span>; } <a name="l01419"></a>01419 <a name="l01426"></a>01426 <span class="keywordtype">bool</span> sendText(<span class="keyword">const</span> <span class="keywordtype">char</span>* text); <a name="l01427"></a>01427 <a name="l01434"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#099a01a65ca345c6a825a7756c5fded5">01434</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> sendNoise(u_int8_t noise) <a name="l01435"></a>01435 { <span class="keywordflow">return</span> noise <= 127 ? sendConnected((<a class="code" href="classTelEngine_1_1IAXFullFrame.html#8005f1f182fd0248a710ca64f72508d4">IAXFullFrame::ControlType</a>)noise,IAXFrame::Noise) : <span class="keyword">false</span>; } <a name="l01436"></a>01436 <a name="l01442"></a>01442 <span class="keywordtype">bool</span> abortReg(); <a name="l01443"></a>01443 <a name="l01449"></a>01449 <span class="keywordtype">bool</span> enableTrunking(<a class="code" href="classTelEngine_1_1IAXMetaTrunkFrame.html" title="Meta trunk frame.">IAXMetaTrunkFrame</a>* trunkFrame); <a name="l01450"></a>01450 <a name="l01454"></a>01454 <span class="keywordtype">void</span> print(); <a name="l01455"></a>01455 <a name="l01459"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#5af0ac4a84935e611ddc9789b98f1c5b">01459</a> <span class="keyword">static</span> <a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a> s_iax_modNoAuthMethod; <a name="l01460"></a>01460 <a name="l01464"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#d55ad2799453b6a91c2af3b63ffe800a">01464</a> <span class="keyword">static</span> <a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a> s_iax_modNoMediaFormat; <a name="l01465"></a>01465 <a name="l01469"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#b7cf2a95114f365aef8608f34f4462c7">01469</a> <span class="keyword">static</span> <a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a> s_iax_modInvalidAuth; <a name="l01470"></a>01470 <a name="l01474"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#9f2bb70df2beee4f7cb6a4c60fd743f6">01474</a> <span class="keyword">static</span> <a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a> s_iax_modNoUsername; <a name="l01475"></a>01475 <a name="l01476"></a>01476 <span class="keyword">protected</span>: <a name="l01486"></a>01486 <a class="code" href="classTelEngine_1_1IAXTransaction.html" title="An IAX2 transaction.">IAXTransaction</a>(<a class="code" href="classTelEngine_1_1IAXEngine.html" title="IAX engine class.">IAXEngine</a>* engine, <a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a>* frame, u_int16_t lcallno, <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1SocketAddr.html" title="A socket address holder.">SocketAddr</a>& addr, <a name="l01487"></a>01487 <span class="keywordtype">void</span>* data = 0); <a name="l01488"></a>01488 <a name="l01498"></a>01498 <a class="code" href="classTelEngine_1_1IAXTransaction.html" title="An IAX2 transaction.">IAXTransaction</a>(<a class="code" href="classTelEngine_1_1IAXEngine.html" title="IAX engine class.">IAXEngine</a>* engine, <a class="code" href="classTelEngine_1_1IAXTransaction.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> type, u_int16_t lcallno, <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1SocketAddr.html" title="A socket address holder.">SocketAddr</a>& addr, <a class="code" href="classTelEngine_1_1IAXIEList.html" title="Information Element container.">IAXIEList</a>& ieList, <a name="l01499"></a>01499 <span class="keywordtype">void</span>* data = 0); <a name="l01500"></a>01500 <a name="l01505"></a>01505 <span class="keywordtype">void</span> init(<a class="code" href="classTelEngine_1_1IAXIEList.html" title="Information Element container.">IAXIEList</a>& ieList); <a name="l01506"></a>01506 <a name="l01513"></a>01513 <span class="keywordtype">bool</span> incrementSeqNo(<span class="keyword">const</span> <a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a>* frame, <span class="keywordtype">bool</span> inbound); <a name="l01514"></a>01514 <a name="l01520"></a>01520 <span class="keywordtype">bool</span> isFrameAcceptable(<span class="keyword">const</span> <a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a>* frame); <a name="l01521"></a>01521 <a name="l01527"></a>01527 <span class="keywordtype">bool</span> changeState(<a class="code" href="classTelEngine_1_1IAXTransaction.html#5d74787dedbc4e11c1ab15bf487e61f8">State</a> newState); <a name="l01528"></a>01528 <a name="l01537"></a>01537 <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* terminate(u_int8_t evType, <span class="keywordtype">bool</span> local, <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a>* frame = 0, <span class="keywordtype">bool</span> createIEList = <span class="keyword">true</span>); <a name="l01538"></a>01538 <a name="l01546"></a>01546 <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* waitForTerminate(u_int8_t evType, <span class="keywordtype">bool</span> local, <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a>* frame); <a name="l01547"></a>01547 <a name="l01558"></a>01558 <span class="keywordtype">void</span> postFrame(<a class="code" href="classTelEngine_1_1IAXFrame.html#1d1cfd8ffb84e947f82999c682b666a7">IAXFrame::Type</a> type, u_int32_t subclass, <span class="keywordtype">void</span>* data = 0, u_int16_t len = 0, u_int32_t tStamp = 0, <a name="l01559"></a>01559 <span class="keywordtype">bool</span> ackOnly = <span class="keyword">false</span>); <a name="l01560"></a>01560 <a name="l01567"></a>01567 <span class="keywordtype">bool</span> sendFrame(<a class="code" href="classTelEngine_1_1IAXFrameOut.html" title="This class holds an outgoing IAX full frame.">IAXFrameOut</a>* frame, <span class="keywordtype">bool</span> vnak = <span class="keyword">false</span>); <a name="l01568"></a>01568 <a name="l01577"></a>01577 <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* createEvent(u_int8_t evType, <span class="keywordtype">bool</span> local, <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a>* frame, <a class="code" href="classTelEngine_1_1IAXTransaction.html#5d74787dedbc4e11c1ab15bf487e61f8">State</a> newState); <a name="l01578"></a>01578 <a name="l01590"></a>01590 <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* createResponse(<a class="code" href="classTelEngine_1_1IAXFrameOut.html" title="This class holds an outgoing IAX full frame.">IAXFrameOut</a>* frame, u_int8_t findType, u_int8_t findSubclass, u_int8_t evType, <span class="keywordtype">bool</span> local, <a class="code" href="classTelEngine_1_1IAXTransaction.html#5d74787dedbc4e11c1ab15bf487e61f8">State</a> newState); <a name="l01591"></a>01591 <a name="l01598"></a>01598 <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* getEventResponse(<a class="code" href="classTelEngine_1_1IAXFrameOut.html" title="This class holds an outgoing IAX full frame.">IAXFrameOut</a>* frame, <span class="keywordtype">bool</span>& delFrame); <a name="l01599"></a>01599 <a name="l01606"></a>01606 <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* getEventResponse_New(<a class="code" href="classTelEngine_1_1IAXFrameOut.html" title="This class holds an outgoing IAX full frame.">IAXFrameOut</a>* frame, <span class="keywordtype">bool</span>& delFrame); <a name="l01607"></a>01607 <a name="l01613"></a>01613 <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* processAuthReq(<a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* event); <a name="l01614"></a>01614 <a name="l01621"></a>01621 <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* processAccept(<a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* event); <a name="l01622"></a>01622 <a name="l01628"></a>01628 <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* processAuthRep(<a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* event); <a name="l01629"></a>01629 <a name="l01636"></a>01636 <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* getEventResponse_Reg(<a class="code" href="classTelEngine_1_1IAXFrameOut.html" title="This class holds an outgoing IAX full frame.">IAXFrameOut</a>* frame, <span class="keywordtype">bool</span>& delFrame); <a name="l01637"></a>01637 <a name="l01643"></a>01643 <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* processRegAck(<a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* event); <a name="l01644"></a>01644 <a name="l01651"></a>01651 <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* getEventStartTrans(<a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a>* frame, <span class="keywordtype">bool</span>& delFrame); <a name="l01652"></a>01652 <a name="l01659"></a>01659 <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* getEventRequest(<a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a>* frame, <span class="keywordtype">bool</span>& delFrame); <a name="l01660"></a>01660 <a name="l01667"></a>01667 <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* getEventRequest_New(<a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a>* frame, <span class="keywordtype">bool</span>& delFrame); <a name="l01668"></a>01668 <a name="l01675"></a>01675 <a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a>* findInFrame(<a class="code" href="classTelEngine_1_1IAXFrame.html#1d1cfd8ffb84e947f82999c682b666a7">IAXFrame::Type</a> type, u_int32_t subclass); <a name="l01676"></a>01676 <a name="l01684"></a>01684 <span class="keywordtype">bool</span> findInFrameTimestamp(<span class="keyword">const</span> <a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a>* frameOut, <a class="code" href="classTelEngine_1_1IAXFrame.html#1d1cfd8ffb84e947f82999c682b666a7">IAXFrame::Type</a> type, u_int32_t subclass); <a name="l01685"></a>01685 <a name="l01691"></a>01691 <span class="keywordtype">bool</span> findInFrameAck(<span class="keyword">const</span> <a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a>* frameOut); <a name="l01692"></a>01692 <a name="l01696"></a>01696 <span class="keywordtype">void</span> ackInFrames(); <a name="l01697"></a>01697 <a name="l01705"></a>01705 <span class="keywordtype">bool</span> sendConnected(<a class="code" href="classTelEngine_1_1IAXFullFrame.html#8005f1f182fd0248a710ca64f72508d4">IAXFullFrame::ControlType</a> subclass, <a class="code" href="classTelEngine_1_1IAXFrame.html#1d1cfd8ffb84e947f82999c682b666a7">IAXFrame::Type</a> frametype = IAXFrame::Control); <a name="l01706"></a>01706 <a name="l01711"></a>01711 <span class="keywordtype">void</span> sendAck(<span class="keyword">const</span> <a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a>* frame); <a name="l01712"></a>01712 <a name="l01716"></a>01716 <span class="keywordtype">void</span> sendInval(); <a name="l01717"></a>01717 <a name="l01721"></a>01721 <span class="keywordtype">void</span> sendVNAK(); <a name="l01722"></a>01722 <a name="l01727"></a>01727 <span class="keywordtype">void</span> sendUnsupport(u_int32_t subclass); <a name="l01728"></a>01728 <a name="l01735"></a>01735 <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* processInternalOutgoingRequest(<a class="code" href="classTelEngine_1_1IAXFrameOut.html" title="This class holds an outgoing IAX full frame.">IAXFrameOut</a>* frame, <span class="keywordtype">bool</span>& delFrame); <a name="l01736"></a>01736 <a name="l01743"></a>01743 <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* processInternalIncomingRequest(<span class="keyword">const</span> <a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a>* frame, <span class="keywordtype">bool</span>& delFrame); <a name="l01744"></a>01744 <a name="l01751"></a>01751 <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* processMidCallControl(<span class="keyword">const</span> <a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a>* frame, <span class="keywordtype">bool</span>& delFrame); <a name="l01752"></a>01752 <a name="l01759"></a>01759 <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* processMidCallIAXControl(<span class="keyword">const</span> <a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a>* frame, <span class="keywordtype">bool</span>& delFrame); <a name="l01760"></a>01760 <a name="l01767"></a>01767 <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* remoteRejectCall(<span class="keyword">const</span> <a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a>* frame, <span class="keywordtype">bool</span>& delFrame); <a name="l01768"></a>01768 <a name="l01774"></a>01774 <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* getEventTerminating(u_int64_t time); <a name="l01775"></a>01775 <a name="l01781"></a>01781 <a class="code" href="classTelEngine_1_1IAXTransaction.html" title="An IAX2 transaction.">IAXTransaction</a>* processVoiceFrame(<span class="keyword">const</span> <a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a>* frame); <a name="l01782"></a>01782 <a name="l01788"></a>01788 <a class="code" href="classTelEngine_1_1IAXTransaction.html" title="An IAX2 transaction.">IAXTransaction</a>* retransmitOnVNAK(u_int16_t seqNo); <a name="l01789"></a>01789 <a name="l01794"></a>01794 <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* internalAccept(); <a name="l01795"></a>01795 <a name="l01801"></a>01801 <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* internalReject(<a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a>& reason); <a name="l01802"></a>01802 <a name="l01808"></a>01808 <span class="keywordtype">void</span> eventTerminated(<a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* event); <a name="l01809"></a>01809 <a name="l01815"></a><a class="code" href="classTelEngine_1_1IAXTransaction.html#ed44090c5591d8d0ff7dccf8c8054ce8">01815</a> <span class="keyword">inline</span> <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* <a class="code" href="classTelEngine_1_1IAXTransaction.html#ed44090c5591d8d0ff7dccf8c8054ce8">keepEvent</a>(<a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* event) { <a name="l01816"></a>01816 m_currentEvent = event; <a name="l01817"></a>01817 <span class="keywordflow">return</span> event; <a name="l01818"></a>01818 } <a name="l01819"></a>01819 <a name="l01820"></a>01820 <span class="keyword">private</span>: <a name="l01821"></a>01821 <span class="comment">// Params</span> <a name="l01822"></a>01822 <span class="keywordtype">bool</span> m_localInitTrans; <span class="comment">// True: local initiated transaction</span> <a name="l01823"></a>01823 <span class="keywordtype">bool</span> m_localReqEnd; <span class="comment">// Local client requested terminate</span> <a name="l01824"></a>01824 Type m_type; <span class="comment">// Transaction type</span> <a name="l01825"></a>01825 State m_state; <span class="comment">// Transaction state</span> <a name="l01826"></a>01826 u_int64_t m_timeStamp; <span class="comment">// Transaction creation timestamp</span> <a name="l01827"></a>01827 u_int32_t m_timeout; <span class="comment">// Transaction timeout (in seconds) on remote termination request</span> <a name="l01828"></a>01828 <a class="code" href="classTelEngine_1_1SocketAddr.html" title="A socket address holder.">SocketAddr</a> m_addr; <span class="comment">// Socket</span> <a name="l01829"></a>01829 u_int16_t m_lCallNo; <span class="comment">// Local peer call id</span> <a name="l01830"></a>01830 u_int16_t m_rCallNo; <span class="comment">// Remote peer call id</span> <a name="l01831"></a>01831 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> m_oSeqNo; <span class="comment">// Outgoing frame sequence number</span> <a name="l01832"></a>01832 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> m_iSeqNo; <span class="comment">// Incoming frame sequence number</span> <a name="l01833"></a>01833 <a class="code" href="classTelEngine_1_1IAXEngine.html" title="IAX engine class.">IAXEngine</a>* m_engine; <span class="comment">// Engine that owns this transaction</span> <a name="l01834"></a>01834 <span class="keywordtype">void</span>* m_userdata; <span class="comment">// Arbitrary user data</span> <a name="l01835"></a>01835 u_int32_t m_lastFullFrameOut; <span class="comment">// Last transmitted full frame timestamp</span> <a name="l01836"></a>01836 u_int16_t m_lastMiniFrameOut; <span class="comment">// Last transmitted mini frame timestamp</span> <a name="l01837"></a>01837 u_int32_t m_lastMiniFrameIn; <span class="comment">// Last received mini frame timestamp</span> <a name="l01838"></a>01838 u_int16_t m_lastAck; <span class="comment">// Last ack'd received frame's oseqno</span> <a name="l01839"></a>01839 <a class="code" href="classTelEngine_1_1Mutex.html" title="Mutex support.">Mutex</a> m_mutexInMedia; <span class="comment">// Keep received media thread safe</span> <a name="l01840"></a>01840 <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* m_pendingEvent; <span class="comment">// Pointer to a pending event or 0</span> <a name="l01841"></a>01841 <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* m_currentEvent; <span class="comment">// Pointer to last generated event or 0</span> <a name="l01842"></a>01842 <span class="comment">// Outgoing frames management</span> <a name="l01843"></a>01843 <a class="code" href="classTelEngine_1_1ObjList.html" title="An object list class.">ObjList</a> m_outFrames; <span class="comment">// Transaction & protocol control outgoing frames</span> <a name="l01844"></a>01844 u_int16_t m_retransCount; <span class="comment">// Retransmission counter. 0 --> Timeout</span> <a name="l01845"></a>01845 u_int32_t m_retransInterval; <span class="comment">// Frame retransmission interval</span> <a name="l01846"></a>01846 <span class="comment">// Incoming frames management</span> <a name="l01847"></a>01847 <a class="code" href="classTelEngine_1_1ObjList.html" title="An object list class.">ObjList</a> m_inFrames; <span class="comment">// Transaction & protocol control incoming frames</span> <a name="l01848"></a>01848 <span class="keyword">static</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> m_maxInFrames; <span class="comment">// Max frames number allowed in m_inFrames</span> <a name="l01849"></a>01849 <span class="comment">// Call leg management</span> <a name="l01850"></a>01850 u_int32_t m_pingInterval; <span class="comment">// Ping remote peer interval</span> <a name="l01851"></a>01851 u_int64_t m_timeToNextPing; <span class="comment">// Time of the next Ping</span> <a name="l01852"></a>01852 <span class="comment">// Statistics</span> <a name="l01853"></a>01853 u_int32_t m_inTotalFramesCount; <span class="comment">// Total received frames</span> <a name="l01854"></a>01854 u_int32_t m_inOutOfOrderFrames; <span class="comment">// Total out of order frames</span> <a name="l01855"></a>01855 u_int32_t m_inDroppedFrames; <span class="comment">// Total dropped frames</span> <a name="l01856"></a>01856 <span class="comment">// Data</span> <a name="l01857"></a>01857 <a class="code" href="classTelEngine_1_1IAXAuthMethod.html#1d1cfd8ffb84e947f82999c682b666a7">IAXAuthMethod::Type</a> m_authmethod; <span class="comment">// Authentication method to use</span> <a name="l01858"></a>01858 <a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a> m_username; <span class="comment">// Username</span> <a name="l01859"></a>01859 <a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a> m_callingNo; <span class="comment">// Calling number</span> <a name="l01860"></a>01860 <a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a> m_callingName; <span class="comment">// Calling name</span> <a name="l01861"></a>01861 <a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a> m_calledNo; <span class="comment">// Called number</span> <a name="l01862"></a>01862 <a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a> m_calledContext; <span class="comment">// Called context</span> <a name="l01863"></a>01863 <a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a> m_challenge; <span class="comment">// Challenge</span> <a name="l01864"></a>01864 <a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a> m_authdata; <span class="comment">// Auth data received with auth reply</span> <a name="l01865"></a>01865 u_int32_t m_expire; <span class="comment">// Registration expiring time</span> <a name="l01866"></a>01866 u_int32_t m_format; <span class="comment">// Media format used for initial negotiation</span> <a name="l01867"></a>01867 u_int32_t m_formatIn; <span class="comment">// Incoming media format</span> <a name="l01868"></a>01868 u_int32_t m_formatOut; <span class="comment">// Outgoing media format</span> <a name="l01869"></a>01869 u_int32_t m_capability; <span class="comment">// Media capability of this transaction</span> <a name="l01870"></a>01870 <span class="comment">// Meta trunking</span> <a name="l01871"></a>01871 <a class="code" href="classTelEngine_1_1IAXMetaTrunkFrame.html" title="Meta trunk frame.">IAXMetaTrunkFrame</a>* m_trunkFrame; <span class="comment">// Reference to a trunk frame if trunking is enabled for this transaction</span> <a name="l01872"></a>01872 }; <a name="l01873"></a>01873 <a name="l01878"></a><a class="code" href="classTelEngine_1_1IAXEvent.html">01878</a> <span class="keyword">class </span>YIAX_API <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a> <a name="l01879"></a>01879 { <a name="l01880"></a>01880 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classTelEngine_1_1IAXTransaction.html" title="An IAX2 transaction.">IAXTransaction</a>; <a name="l01881"></a>01881 <span class="keyword">friend</span> <span class="keyword">class </span>IAXConnectionlessTransaction; <a name="l01882"></a>01882 <span class="keyword">public</span>: <a name="l01886"></a><a class="code" href="classTelEngine_1_1IAXEvent.html#1d1cfd8ffb84e947f82999c682b666a7">01886</a> <span class="keyword">enum</span> <a class="code" href="classTelEngine_1_1IAXEvent.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> { <a name="l01887"></a>01887 Invalid = 0, <span class="comment">// Invalid frame received</span> <a name="l01888"></a>01888 Terminated, <span class="comment">// Transaction terminated</span> <a name="l01889"></a>01889 Timeout, <span class="comment">// Transaction timeout</span> <a name="l01890"></a>01890 NotImplemented, <span class="comment">// Feature not implemented</span> <a name="l01891"></a>01891 New, <span class="comment">// New remote transaction</span> <a name="l01892"></a>01892 AuthReq, <span class="comment">// Auth request</span> <a name="l01893"></a>01893 AuthRep, <span class="comment">// Auth reply</span> <a name="l01894"></a>01894 Accept, <span class="comment">// Request accepted</span> <a name="l01895"></a>01895 Hangup, <span class="comment">// Remote hangup</span> <a name="l01896"></a>01896 Reject, <span class="comment">// Remote reject</span> <a name="l01897"></a>01897 Busy, <span class="comment">// Call busy</span> <a name="l01898"></a>01898 Text, <span class="comment">// Text frame received</span> <a name="l01899"></a>01899 Dtmf, <span class="comment">// DTMF frame received</span> <a name="l01900"></a>01900 Noise, <span class="comment">// Noise frame received</span> <a name="l01901"></a>01901 Answer, <span class="comment">// Call answered</span> <a name="l01902"></a>01902 Quelch, <span class="comment">// Quelch the call</span> <a name="l01903"></a>01903 Unquelch, <span class="comment">// Unquelch the call</span> <a name="l01904"></a>01904 Progressing, <span class="comment">// Call progressing</span> <a name="l01905"></a>01905 Ringing, <span class="comment">// Ringing</span> <a name="l01906"></a>01906 }; <a name="l01907"></a>01907 <a name="l01912"></a>01912 ~<a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>(); <a name="l01913"></a>01913 <a name="l01918"></a><a class="code" href="classTelEngine_1_1IAXEvent.html#fbd0fa31db28593e9669c3c56711c0a7">01918</a> <span class="keyword">inline</span> <a class="code" href="classTelEngine_1_1IAXEvent.html#1d1cfd8ffb84e947f82999c682b666a7">Type</a> type()<span class="keyword"> const</span> <a name="l01919"></a>01919 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_type; } <a name="l01920"></a>01920 <a name="l01925"></a><a class="code" href="classTelEngine_1_1IAXEvent.html#cb329726ce663d00b997df29a8b6e10e">01925</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> local()<span class="keyword"> const</span> <a name="l01926"></a>01926 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_local; } <a name="l01927"></a>01927 <a name="l01932"></a><a class="code" href="classTelEngine_1_1IAXEvent.html#32921c16f78fbf22e8f553ec5d355285">01932</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <span class="keyword">final</span>() <span class="keyword">const</span> <a name="l01933"></a>01933 { <span class="keywordflow">return</span> m_final; } <a name="l01934"></a>01934 <a name="l01938"></a><a class="code" href="classTelEngine_1_1IAXEvent.html#339ed32b2f06c48a1c1e5e59d4a08b1c">01938</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> setFinal() <a name="l01939"></a>01939 { m_final = <span class="keyword">true</span>; } <a name="l01940"></a>01940 <a name="l01946"></a><a class="code" href="classTelEngine_1_1IAXEvent.html#a83ae5b784afe65ba2578b68baaf0df0">01946</a> <span class="keyword">inline</span> u_int8_t frameType() <a name="l01947"></a>01947 { <span class="keywordflow">return</span> m_frameType; } <a name="l01948"></a>01948 <a name="l01953"></a><a class="code" href="classTelEngine_1_1IAXEvent.html#1e086f53ee60c383732c9477902841ac">01953</a> <span class="keyword">inline</span> u_int32_t subclass() <a name="l01954"></a>01954 { <span class="keywordflow">return</span> m_subClass; } <a name="l01955"></a>01955 <a name="l01960"></a><a class="code" href="classTelEngine_1_1IAXEvent.html#79225998c9520ed88e238c4970bb41b4">01960</a> <span class="keyword">inline</span> <a class="code" href="classTelEngine_1_1IAXEngine.html" title="IAX engine class.">IAXEngine</a>* getEngine()<span class="keyword"> const</span> <a name="l01961"></a>01961 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_transaction ? m_transaction->getEngine() : 0; } <a name="l01962"></a>01962 <a name="l01967"></a><a class="code" href="classTelEngine_1_1IAXEvent.html#af8d0f2f26c62b7df9cfe588115788fe">01967</a> <span class="keyword">inline</span> <a class="code" href="classTelEngine_1_1IAXTransaction.html" title="An IAX2 transaction.">IAXTransaction</a>* getTransaction()<span class="keyword"> const</span> <a name="l01968"></a>01968 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_transaction; } <a name="l01969"></a>01969 <a name="l01974"></a><a class="code" href="classTelEngine_1_1IAXEvent.html#7ead208cc3c358a799bef54f4529548e">01974</a> <span class="keyword">inline</span> <span class="keywordtype">void</span>* getUserData()<span class="keyword"> const</span> <a name="l01975"></a>01975 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_transaction ? m_transaction->getUserData() : 0; } <a name="l01976"></a>01976 <a name="l01981"></a><a class="code" href="classTelEngine_1_1IAXEvent.html#e715dc83a6e594302eb568d7516ad2f7">01981</a> <span class="keyword">inline</span> <a class="code" href="classTelEngine_1_1IAXIEList.html" title="Information Element container.">IAXIEList</a>& getList() <a name="l01982"></a>01982 { <span class="keywordflow">return</span> m_ieList; } <a name="l01983"></a>01983 <a name="l01984"></a>01984 <span class="keyword">protected</span>: <a name="l01994"></a>01994 <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>(Type type, <span class="keywordtype">bool</span> local, <span class="keywordtype">bool</span> <span class="keyword">final</span>, <a class="code" href="classTelEngine_1_1IAXTransaction.html" title="An IAX2 transaction.">IAXTransaction</a>* transaction, u_int8_t frameType = 0, u_int32_t subclass = 0); <a name="l01995"></a>01995 <a name="l02004"></a>02004 <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>(Type type, <span class="keywordtype">bool</span> local, <span class="keywordtype">bool</span> <span class="keyword">final</span>, <a class="code" href="classTelEngine_1_1IAXTransaction.html" title="An IAX2 transaction.">IAXTransaction</a>* transaction, <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a>* frame = 0); <a name="l02005"></a>02005 <a name="l02006"></a>02006 <span class="keyword">private</span>: <a name="l02007"></a>02007 <span class="keyword">inline</span> <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>() {} <span class="comment">// Default constructor</span> <a name="l02008"></a>02008 <a name="l02009"></a>02009 Type m_type; <span class="comment">// Event type</span> <a name="l02010"></a>02010 u_int8_t m_frameType; <span class="comment">// Frame type</span> <a name="l02011"></a>02011 u_int32_t m_subClass; <span class="comment">// Frame subclass</span> <a name="l02012"></a>02012 <span class="keywordtype">bool</span> m_local; <span class="comment">// If true the event is generated locally, the receiver MUST not respond</span> <a name="l02013"></a>02013 <span class="keywordtype">bool</span> m_final; <span class="comment">// Final event flag</span> <a name="l02014"></a>02014 IAXTransaction* m_transaction; <span class="comment">// Transaction that generated this event</span> <a name="l02015"></a>02015 IAXIEList m_ieList; <span class="comment">// IAXInfoElement list</span> <a name="l02016"></a>02016 }; <a name="l02017"></a>02017 <a name="l02022"></a><a class="code" href="classTelEngine_1_1IAXEngine.html">02022</a> <span class="keyword">class </span>YIAX_API <a class="code" href="classTelEngine_1_1IAXEngine.html" title="IAX engine class.">IAXEngine</a> : <span class="keyword">public</span> <a class="code" href="classTelEngine_1_1DebugEnabler.html" title="A holder for a debug level.">DebugEnabler</a>, <span class="keyword">public</span> <a class="code" href="classTelEngine_1_1Mutex.html" title="Mutex support.">Mutex</a> <a name="l02023"></a>02023 { <a name="l02024"></a>02024 <span class="keyword">public</span>: <a name="l02040"></a>02040 <a class="code" href="classTelEngine_1_1IAXEngine.html" title="IAX engine class.">IAXEngine</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* iface, <span class="keywordtype">int</span> port, u_int16_t transListCount, u_int16_t retransCount, u_int16_t retransInterval, <a name="l02041"></a>02041 u_int16_t authTimeout, u_int16_t transTimeout, u_int16_t maxFullFrameDataLen, <a name="l02042"></a>02042 u_int32_t format, u_int32_t capab, u_int32_t trunkSendInterval, <span class="keywordtype">bool</span> authRequired); <a name="l02043"></a>02043 <a name="l02048"></a>02048 <span class="keyword">virtual</span> ~<a class="code" href="classTelEngine_1_1IAXEngine.html" title="IAX engine class.">IAXEngine</a>(); <a name="l02049"></a>02049 <a name="l02056"></a>02056 <a class="code" href="classTelEngine_1_1IAXTransaction.html" title="An IAX2 transaction.">IAXTransaction</a>* addFrame(<span class="keyword">const</span> <a class="code" href="classTelEngine_1_1SocketAddr.html" title="A socket address holder.">SocketAddr</a>& addr, <a class="code" href="classTelEngine_1_1IAXFrame.html" title="This class holds an IAX frame.">IAXFrame</a>* frame); <a name="l02057"></a>02057 <a name="l02065"></a>02065 <a class="code" href="classTelEngine_1_1IAXTransaction.html" title="An IAX2 transaction.">IAXTransaction</a>* addFrame(<span class="keyword">const</span> <a class="code" href="classTelEngine_1_1SocketAddr.html" title="A socket address holder.">SocketAddr</a>& addr, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* buf, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> len); <a name="l02066"></a>02066 <a name="l02073"></a><a class="code" href="classTelEngine_1_1IAXEngine.html#2c6135b15065ee331b10b1671277966c">02073</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> processMedia(<a class="code" href="classTelEngine_1_1IAXTransaction.html" title="An IAX2 transaction.">IAXTransaction</a>* transaction, <a class="code" href="classTelEngine_1_1DataBlock.html" title="A class that holds just a block of raw data.">DataBlock</a>& data, u_int32_t tStamp) <a name="l02074"></a>02074 {} <a name="l02075"></a>02075 <a name="l02081"></a>02081 <span class="keywordtype">bool</span> process(); <a name="l02082"></a>02082 <a name="l02087"></a><a class="code" href="classTelEngine_1_1IAXEngine.html#6945585ed64ddfdb8decc24b2c2a0f61">02087</a> <span class="keyword">inline</span> u_int16_t retransCount()<span class="keyword"> const</span> <a name="l02088"></a>02088 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_retransCount; } <a name="l02089"></a>02089 <a name="l02094"></a><a class="code" href="classTelEngine_1_1IAXEngine.html#9e2f954db04105f48aa25b2029586ef4">02094</a> <span class="keyword">inline</span> u_int16_t retransInterval()<span class="keyword"> const</span> <a name="l02095"></a>02095 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_retransInterval; } <a name="l02096"></a>02096 <a name="l02101"></a><a class="code" href="classTelEngine_1_1IAXEngine.html#892c779c59d7898141218953cf924158">02101</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> authRequired()<span class="keyword"> const</span> <a name="l02102"></a>02102 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_authRequired; } <a name="l02103"></a>02103 <a name="l02108"></a><a class="code" href="classTelEngine_1_1IAXEngine.html#cbc0d38051497c703adf78b7a0f998e1">02108</a> <span class="keyword">inline</span> u_int16_t authTimeout()<span class="keyword"> const</span> <a name="l02109"></a>02109 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_authTimeout; } <a name="l02110"></a>02110 <a name="l02115"></a><a class="code" href="classTelEngine_1_1IAXEngine.html#cff1315c23dfe1891f7f9ae6a9dfae69">02115</a> <span class="keyword">inline</span> u_int32_t transactionTimeout()<span class="keyword"> const</span> <a name="l02116"></a>02116 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_transTimeout; } <a name="l02117"></a>02117 <a name="l02122"></a><a class="code" href="classTelEngine_1_1IAXEngine.html#ea653ee272fbd721ff0116da4c49758f">02122</a> <span class="keyword">inline</span> u_int16_t maxFullFrameDataLen()<span class="keyword"> const</span> <a name="l02123"></a>02123 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_maxFullFrameDataLen; } <a name="l02124"></a>02124 <a name="l02129"></a><a class="code" href="classTelEngine_1_1IAXEngine.html#a31e5b04439e36e4d13aeb38a1b4f45e">02129</a> <span class="keyword">inline</span> u_int32_t format()<span class="keyword"> const</span> <a name="l02130"></a>02130 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_format; } <a name="l02131"></a>02131 <a name="l02136"></a><a class="code" href="classTelEngine_1_1IAXEngine.html#f0fd3b209ab9909ac020e61e5c65543e">02136</a> <span class="keyword">inline</span> u_int32_t capability()<span class="keyword"> const</span> <a name="l02137"></a>02137 <span class="keyword"> </span>{ <span class="keywordflow">return</span> m_capability; } <a name="l02138"></a>02138 <a name="l02143"></a>02143 <span class="keywordtype">void</span> readSocket(<a class="code" href="classTelEngine_1_1SocketAddr.html" title="A socket address holder.">SocketAddr</a>& addr); <a name="l02144"></a>02144 <a name="l02153"></a>02153 <span class="keywordtype">bool</span> writeSocket(<span class="keyword">const</span> <span class="keywordtype">void</span>* buf, <span class="keywordtype">int</span> len, <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1SocketAddr.html" title="A socket address holder.">SocketAddr</a>& addr, <a class="code" href="classTelEngine_1_1IAXFullFrame.html" title="This class holds an IAX full frame.">IAXFullFrame</a>* frame = 0); <a name="l02154"></a>02154 <a name="l02158"></a>02158 <span class="keywordtype">void</span> runGetEvents(); <a name="l02159"></a>02159 <a name="l02165"></a>02165 <span class="keywordtype">void</span> removeTransaction(<a class="code" href="classTelEngine_1_1IAXTransaction.html" title="An IAX2 transaction.">IAXTransaction</a>* transaction); <a name="l02166"></a>02166 <a name="l02172"></a>02172 u_int32_t transactionCount(); <a name="l02173"></a>02173 <a name="l02178"></a>02178 <span class="keywordtype">void</span> keepAlive(<a class="code" href="classTelEngine_1_1SocketAddr.html" title="A socket address holder.">SocketAddr</a>& addr); <a name="l02179"></a>02179 <a name="l02186"></a><a class="code" href="classTelEngine_1_1IAXEngine.html#49a142a694cff58fd9ca9f3a9e0e9ae5">02186</a> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> voiceFormatChanged(<a class="code" href="classTelEngine_1_1IAXTransaction.html" title="An IAX2 transaction.">IAXTransaction</a>* trans, u_int32_t format) <a name="l02187"></a>02187 { <span class="keywordflow">return</span> <span class="keyword">false</span>; } <a name="l02188"></a>02188 <a name="l02194"></a>02194 <span class="keywordtype">bool</span> acceptFormatAndCapability(<a class="code" href="classTelEngine_1_1IAXTransaction.html" title="An IAX2 transaction.">IAXTransaction</a>* trans); <a name="l02195"></a>02195 <a name="l02200"></a>02200 <span class="keyword">virtual</span> <span class="keywordtype">void</span> defaultEventHandler(<a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* event); <a name="l02201"></a>02201 <a name="l02206"></a>02206 <span class="keywordtype">void</span> enableTrunking(<a class="code" href="classTelEngine_1_1IAXTransaction.html" title="An IAX2 transaction.">IAXTransaction</a>* trans); <a name="l02207"></a>02207 <a name="l02212"></a>02212 <span class="keywordtype">void</span> removeTrunkFrame(<a class="code" href="classTelEngine_1_1IAXMetaTrunkFrame.html" title="Meta trunk frame.">IAXMetaTrunkFrame</a>* metaFrame); <a name="l02213"></a>02213 <a name="l02217"></a>02217 <span class="keywordtype">void</span> runProcessTrunkFrames(); <a name="l02218"></a>02218 <a name="l02223"></a><a class="code" href="classTelEngine_1_1IAXEngine.html#d7d5c98aebb1d247f818ea7d14c4d33e">02223</a> <span class="keyword">inline</span> <a class="code" href="classTelEngine_1_1Socket.html" title="A generic socket class.">Socket</a>& socket() <a name="l02224"></a>02224 { <span class="keywordflow">return</span> m_socket; } <a name="l02225"></a>02225 <a name="l02232"></a>02232 <span class="keyword">static</span> <span class="keywordtype">void</span> getMD5FromChallenge(<a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a>& md5data, <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a>& challenge, <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a>& password); <a name="l02233"></a>02233 <a name="l02240"></a>02240 <span class="keyword">static</span> <span class="keywordtype">bool</span> isMD5ChallengeCorrect(<span class="keyword">const</span> <a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a>& md5data, <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a>& challenge, <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1String.html" title="A C-style string handling class.">String</a>& password); <a name="l02241"></a>02241 <a name="l02242"></a>02242 <span class="keyword">protected</span>: <a name="l02248"></a>02248 <span class="keywordtype">bool</span> processTrunkFrames(u_int32_t time = <a class="code" href="classTelEngine_1_1Time.html#fedf91537e85e72f09da0a8ffc598e53">Time::msecNow</a>()); <a name="l02249"></a>02249 <a name="l02256"></a>02256 <span class="keyword">virtual</span> <span class="keywordtype">void</span> processEvent(<a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* event); <a name="l02257"></a>02257 <a name="l02264"></a>02264 <a class="code" href="classTelEngine_1_1IAXEvent.html" title="Event class.">IAXEvent</a>* getEvent(u_int64_t time); <a name="l02265"></a>02265 <a name="l02270"></a>02270 u_int16_t generateCallNo(); <a name="l02271"></a>02271 <a name="l02276"></a>02276 <span class="keywordtype">void</span> releaseCallNo(u_int16_t lcallno); <a name="l02277"></a>02277 <a name="l02286"></a>02286 <a class="code" href="classTelEngine_1_1IAXTransaction.html" title="An IAX2 transaction.">IAXTransaction</a>* startLocalTransaction(<a class="code" href="classTelEngine_1_1IAXTransaction.html#1d1cfd8ffb84e947f82999c682b666a7">IAXTransaction::Type</a> type, <span class="keyword">const</span> <a class="code" href="classTelEngine_1_1SocketAddr.html" title="A socket address holder.">SocketAddr</a>& addr, <a class="code" href="classTelEngine_1_1IAXIEList.html" title="Information Element container.">IAXIEList</a>& ieList, <span class="keywordtype">bool</span> trunking = <span class="keyword">false</span>); <a name="l02287"></a>02287 <a name="l02288"></a>02288 <span class="keyword">private</span>: <a name="l02289"></a>02289 <a class="code" href="classTelEngine_1_1Socket.html" title="A generic socket class.">Socket</a> m_socket; <span class="comment">// Socket</span> <a name="l02290"></a>02290 <a class="code" href="classTelEngine_1_1ObjList.html" title="An object list class.">ObjList</a>** m_transList; <span class="comment">// Full transactions</span> <a name="l02291"></a>02291 <a class="code" href="classTelEngine_1_1ObjList.html" title="An object list class.">ObjList</a> m_incompleteTransList; <span class="comment">// Incomplete transactions (no remote call number)</span> <a name="l02292"></a>02292 <span class="keywordtype">bool</span> m_lUsedCallNo[IAX2_MAX_CALLNO + 1]; <span class="comment">// Used local call numnmbers flags</span> <a name="l02293"></a>02293 <span class="keywordtype">int</span> m_lastGetEvIndex; <span class="comment">// getEvent: keep last array entry</span> <a name="l02294"></a>02294 <span class="comment">// Parameters</span> <a name="l02295"></a>02295 <span class="keywordtype">bool</span> m_authRequired; <span class="comment">// Automatically request authentication</span> <a name="l02296"></a>02296 <span class="keywordtype">int</span> m_maxFullFrameDataLen; <span class="comment">// Max full frame data (IE list) length</span> <a name="l02297"></a>02297 u_int16_t m_startLocalCallNo; <span class="comment">// Start index of local call number allocation</span> <a name="l02298"></a>02298 u_int16_t m_transListCount; <span class="comment">// m_transList count</span> <a name="l02299"></a>02299 u_int16_t m_retransCount; <span class="comment">// Retransmission counter for each transaction belonging to this engine</span> <a name="l02300"></a>02300 u_int16_t m_retransInterval; <span class="comment">// Retransmission interval default value in miliseconds</span> <a name="l02301"></a>02301 u_int16_t m_authTimeout; <span class="comment">// Timeout (in seconds) of acknoledged auth frames sent</span> <a name="l02302"></a>02302 u_int32_t m_transTimeout; <span class="comment">// Timeout (in seconds) on remote request of transactions</span> <a name="l02303"></a>02303 <span class="comment">// belonging to this engine</span> <a name="l02304"></a>02304 <span class="comment">// Media</span> <a name="l02305"></a>02305 u_int32_t m_format; <span class="comment">// The default media format</span> <a name="l02306"></a>02306 u_int32_t m_capability; <span class="comment">// The media capability</span> <a name="l02307"></a>02307 <span class="comment">// Trunking</span> <a name="l02308"></a>02308 <a class="code" href="classTelEngine_1_1Mutex.html" title="Mutex support.">Mutex</a> m_mutexTrunk; <span class="comment">// Mutex for trunk operations</span> <a name="l02309"></a>02309 <a class="code" href="classTelEngine_1_1ObjList.html" title="An object list class.">ObjList</a> m_trunkList; <span class="comment">// Trunk frames list</span> <a name="l02310"></a>02310 u_int32_t m_trunkSendInterval; <span class="comment">// Trunk frame send interval</span> <a name="l02311"></a>02311 }; <a name="l02312"></a>02312 <a name="l02313"></a>02313 } <a name="l02314"></a>02314 <a name="l02315"></a>02315 <span class="preprocessor">#endif </span><span class="comment">/* __YATEIAX_H */</span> <a name="l02316"></a>02316 <a name="l02317"></a>02317 <span class="comment">/* vi: set ts=8 sw=4 sts=4 noet: */</span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Sun Dec 7 21:36:10 2008 for Yate by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address> </body> </html>