/* * Oreka -- A media capture and retrieval platform * * Copyright (C) 2005, orecx LLC * * http://www.orecx.com * * This program is free software, distributed under the terms of * the GNU General Public License. * Please refer to http://www.gnu.org/copyleft/gpl.html * */ #ifndef __VOIPCONFIG_H__ #define __VOIPCONFIG_H__ #include #include "StdString.h" #include "Object.h" #include "boost/shared_ptr.hpp" #include "PacketHeaderDefs.h" #define DEVICE_PARAM "Device" /** This class defines various configuration parameters for the generator. */ class VoIpConfig : public Object { public: VoIpConfig(); void Define(Serializer* s); void Validate(); CStdString GetClassName(); ObjectRef NewInstance(); inline ObjectRef Process() {return ObjectRef();}; bool IsPartOfLan(struct in_addr); bool IsMediaGateway(struct in_addr); bool IsRtpTrackingIpAddress(struct in_addr addr); bool IsDeviceWanted(CStdString device); bool IsPacketWanted(IpHeaderStruct* ipHeader); CStdString m_device; // old style but can still be used for specifying single device std::list m_devices; // new style devices csv std::list m_mediaGateways; std::list m_asciiMediaGateways; std::list m_lanMasks; std::list m_asciiLanMasks; std::list m_rtpTrackUsingIpAddresses; std::list m_asciiRtpTrackUsingIpAddresses; std::list m_asciiAllowedIpRanges; // CIDR notation std::list m_allowedIpRangePrefixes; std::list m_allowedIpRangeBitWidths; std::list m_asciiBlockedIpRanges; // CIDR notation std::list m_blockedIpRangePrefixes; std::list m_blockedIpRangeBitWidths; CStdString m_pcapFile; CStdString m_pcapDirectory; bool m_pcapRepeat; bool m_sipDropIndirectInvite; int m_pcapSocketBufferSize; bool m_pcapFastReplay; int m_pcapFastReplaySleepUsPerSec; int m_rtpSessionTimeoutSec; int m_rtpSessionWithSignallingTimeoutSec; int m_rtpSessionOnHoldTimeOutSec; int m_rtpSessionWithSignallingInitialTimeoutSec; bool m_pcapTest; CStdString m_pcapFilter; bool m_rtpDiscontinuityDetect; int m_rtpDiscontinuityMinSeqDelta; bool m_rtpDetectOnOddPorts; bool m_rtpReportDtmf; IpRanges m_rtpBlockedIpRanges; bool m_rtpTrackByUdpPortOnly; bool m_iax2Support; bool m_sipOverTcpSupport; bool m_sipLogFailedCalls; bool m_sipUse200OkMediaAddress; bool m_sipDetectSessionProgress; bool m_sipReportFullAddress; bool m_sipDynamicMediaAddress; IpRanges m_sipIgnoredMediaAddresses; bool m_sipIgnoreBye; bool m_sipReportNamesAsTags; bool m_sipRequestUriAsLocalParty; bool m_sipTreat200OkAsInvite; bool m_sipAllowMultipleMediaAddresses; bool m_sip302MovedTemporarilySupport; bool m_rtcpDetect; bool m_inInMode; bool m_useMacIfNoLocalParty; bool m_localPartyForceLocalIp; bool m_localPartyForceLocalMac; bool m_localPartyUseName; bool m_partiesUseName; bool m_skinnyIgnoreStopMediaTransmission; bool m_skinnyIgnoreOpenReceiveChannelAck; bool m_skinnyDynamicMediaAddress; bool m_skinnyAllowCallInfoUpdate; bool m_skinnyAllowLateCallInfo; bool m_skinnyNameAsLocalParty; bool m_skinnyCallInfoStopsPrevious; bool m_cucm7_1Mode; std::list m_skinnyReportTags; std::list m_dnisNumbers; std::list m_sipExtractFields; bool m_sangomaEnable; // not a config parm, derived from the two following int m_sangomaTcpPortDelta; // not a config parm, derived from the two following int m_sangomaRxTcpPortStart; int m_sangomaTxTcpPortStart; int m_skinnyTcpPort; std::list m_sipDomains; std::list m_sipDirectionReferenceIpAddresses; std::list m_sipDirectionReferenceUserAgents; IpRanges m_lanIpRanges; IpRanges m_mediaAddressBlockedIpRanges; bool m_dahdiIntercept; }; //======================================== #define VOIP_CONFIG_PARAM "VoIpPlugin" /** This class represents the top of the configuration hierarchy for the generator. */ class VoIpConfigTopObject : public Object { public: void Define(Serializer* s); void Validate(); CStdString GetClassName(); ObjectRef NewInstance(); inline ObjectRef Process() {return ObjectRef();}; VoIpConfig m_config; }; typedef boost::shared_ptr VoIpConfigTopObjectRef; #endif