2 * Inter Asterisk Exchange 2
4 * The entity which receives all manages weirdo iax2 packets that are
5 * sent outside of a regular call.
7 * Open Phone Abstraction Library (OPAL)
9 * Copyright (c) 2006 Stephen Cook
11 * The contents of this file are subject to the Mozilla Public License
12 * Version 1.0 (the "License"); you may not use this file except in
13 * compliance with the License. You may obtain a copy of the License at
14 * http://www.mozilla.org/MPL/
16 * Software distributed under the License is distributed on an "AS IS"
17 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
18 * the License for the specific language governing rights and limitations
21 * The Original Code is Open Phone Abstraction Library.
23 * The Initial Developer of the Original Code is Indranet Technologies Ltd
25 * The author of this code is Stephen Cook
28 * Revision 1.4 2007/04/19 06:17:21 csoutheren
29 * Fixes for precompiled headers with gcc
31 * Revision 1.3 2007/01/17 03:48:13 dereksmithies
32 * Tidy up comments, remove leaks, improve reporting of packet types.
34 * Revision 1.2 2006/09/11 03:12:51 dereksmithies
35 * Add logging and MPL license statements.
40 #ifndef SPECIALPROCESSOR_H
41 #define SPECIALPROCESSOR_H
47 #include <opal/connection.h>
49 #include <iax2/processor.h>
50 #include <iax2/frame.h>
51 #include <iax2/iedata.h>
52 #include <iax2/remote.h>
53 #include <iax2/safestrings.h>
54 #include <iax2/sound.h>
56 /**This is the special processor which is created to handle the weirdo iax2 packets
57 that are sent outside of a particular call. Examples of weirdo packets are the
58 ping/pong/lagrq/lagrp.
60 class IAX2SpecialProcessor
: public IAX2Processor
62 PCLASSINFO(IAX2SpecialProcessor
, IAX2Processor
);
65 /**Construct this class */
66 IAX2SpecialProcessor(IAX2EndPoint
& ep
);
69 virtual ~IAX2SpecialProcessor();
72 /**Go through the three lists for incoming data (ethernet/sound/UI commands. */
73 virtual void ProcessLists();
75 /**Processes a full frame*/
76 virtual void ProcessFullFrame(IAX2FullFrame
& fullFrame
);
78 /**Processes are mini frame*/
79 virtual void ProcessNetworkFrame(IAX2MiniFrame
* src
);
81 /**Print information about the class on to a stream*/
82 virtual void PrintOn(ostream
& strm
) const;
84 /**Called when there is no response to a request*/
85 virtual void OnNoResponseTimeout();
87 /**Process an IAX2FullFrameProtocol. This special processor handles
88 things relative to special needs of full frame protocols.*/
89 virtual BOOL
ProcessNetworkFrame(IAX2FullFrameProtocol
* src
);
91 /**Process a poke command*/
92 void ProcessIaxCmdPoke(IAX2FullFrameProtocol
* src
);
95 #endif /*SPECIALPROCESSOR_H*/