35 #ifndef OPAL_OPAL_CONNECTION_H
36 #define OPAL_OPAL_CONNECTION_H
48 #include <ptclib/dtmf.h>
49 #include <ptlib/safecoll.h>
59 #include <ptclib/lua.h>
71 #define OPAL_URL_PARAM_PREFIX "OPAL-"
73 #define OPAL_OPT_AUTO_START "AutoStart"
74 #define OPAL_OPT_CALL_IDENTIFIER "Call-Identifier"
75 #define OPAL_OPT_CALLING_PARTY_URL "Calling-Party-URL"
76 #define OPAL_OPT_CALLING_PARTY_NUMBER "Calling-Party-Number"
77 #define OPAL_OPT_CALLING_PARTY_NAME "Calling-Party-Name"
78 #define OPAL_OPT_CALLING_PARTY_DOMAIN "Calling-Party-Domain"
79 #define OPAL_OPT_CALLING_DISPLAY_NAME "Calling-Display-Name"
80 #define OPAL_OPT_CALLED_PARTY_NAME "Called-Party-Name"
81 #define OPAL_OPT_CALLED_DISPLAY_NAME "Called-Display-Name"
82 #define OPAL_OPT_REDIRECTING_PARTY "Redirecting-Party"
83 #define OPAL_OPT_PRESENTATION_BLOCK "Presentation-Block"
84 #define OPAL_OPT_ORIGINATOR_ADDRESS "Originator-Address"
85 #define OPAL_OPT_INTERFACE "Interface"
86 #define OPAL_OPT_USER_INPUT_MODE "User-Input-Mode"
88 #define OPAL_OPT_ENABLE_INBAND_DTMF "EnableInbandDTMF"
89 #define OPAL_OPT_ENABLE_INBAND_DTMF "EnableInbandDTMF"
90 #define OPAL_OPT_DETECT_INBAND_DTMF "DetectInBandDTMF"
91 #define OPAL_OPT_SEND_INBAND_DTMF "SendInBandDTMF"
92 #define OPAL_OPT_DTMF_MULT "dtmfmult"
93 #define OPAL_OPT_DTMF_DIV "dtmfdiv"
94 #define OPAL_OPT_DISABLE_JITTER "Disable-Jitter"
95 #define OPAL_OPT_MAX_JITTER "Max-Jitter"
96 #define OPAL_OPT_MIN_JITTER "Min-Jitter"
97 #define OPAL_OPT_RECORD_AUDIO "Record-Audio"
98 #define OPAL_OPT_ALERTING_TYPE "Alerting-Type"
99 #define OPAL_OPT_REMOVE_CODEC "Remove-Codec"
481 const PString & token,
482 unsigned options = 0,
618 const PString & remoteParty
733 const PString & calleeName,
754 const PString & callerName
860 const PStringToString & info,
919 const PString & forwardParty
1088 const PString & streamID,
1196 PVideoInputDevice * & device,
1197 PBoolean & autoDelete
1206 PVideoOutputDevice * & device,
1207 PBoolean & autoDelete
1216 unsigned sessionID = 0,
1247 unsigned newBandwidth,
1248 PBoolean force =
false
1266 unsigned releasedBandwidth,
1267 unsigned requiredBandwidth
1310 const PString & value
1331 unsigned duration = 0
1341 const PString & value
1359 unsigned duration = 500
1365 unsigned timeout = 30
1373 const PString & input
1379 const char * terminators =
"#\r\n",
1380 unsigned lastDigitTimeout = 4,
1381 unsigned firstDigitTimeout = 30
1676 const StringOptions & options,
1694 virtual bool TransmitInternalIM(
1702 virtual void OnReceiveInternalIM(
1710 virtual bool TransmitExternalIM(
1718 virtual bool OnReceiveExternalIM(
1727 RFC4103Context & GetRFC4103Context(PINDEX i) {
return m_rfc4103Context[i]; };
1753 PMutex m_phaseMutex;
1794 PDTMFDecoder m_dtmfDecoder;
1795 bool m_detectInBandDTMF;
1796 unsigned m_dtmfScaleMultiplier;
1797 unsigned m_dtmfScaleDivisor;
1798 PNotifier m_dtmfDetectNotifier;
1801 bool m_sendInBandDTMF;
1803 PBYTEArray m_inBandDTMF;
1804 PINDEX m_emittedInBandDTMF;
1805 PMutex m_inBandMutex;
1806 PNotifier m_dtmfSendNotifier;
1859 bool m_luaScriptLoaded;
1863 PLUA_BINDING2(LuaSetOption, "SetOption")
1865 PLUA_DECLARE_FUNCTION(LuaSetOption);
1879 P_REMOVE_VIRTUAL(PBoolean, IsConnectionOnHold(),
false);
1880 P_REMOVE_VIRTUAL_VOID(OnMediaPatchStart(
unsigned,
bool));
1881 P_REMOVE_VIRTUAL_VOID(OnMediaPatchStop(
unsigned,
bool));
1886 P_REMOVE_VIRTUAL(
bool, HoldConnection(),
false);
1887 P_REMOVE_VIRTUAL(
bool, RetrieveConnection(),
false);
1888 P_REMOVE_VIRTUAL(
bool, IsConnectionOnHold(
bool),
false);
1893 #endif // OPAL_OPAL_CONNECTION_H