OPAL  Version 3.18.8
opal.h
Go to the documentation of this file.
1 /*
2  * opal.h
3  *
4  * "C" language interface for OPAL
5  *
6  * Open Phone Abstraction Library (OPAL)
7  *
8  * Copyright (c) 2008 Vox Lucida
9  *
10  * The contents of this file are subject to the Mozilla Public License
11  * Version 1.0 (the "License"); you may not use this file except in
12  * compliance with the License. You may obtain a copy of the License at
13  * http://www.mozilla.org/MPL/
14  *
15  * Software distributed under the License is distributed on an "AS IS"
16  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
17  * the License for the specific language governing rights and limitations
18  * under the License.
19  *
20  * The Original Code is Open Phone Abstraction Library.
21  *
22  * The Initial Developer of the Original Code is Vox Lucida (Robert Jongbloed)
23  *
24  * This code was initially written with the assisance of funding from
25  * Stonevoice. http://www.stonevoice.com.
26  *
27  * Contributor(s): ______________________________________.
28  */
29 
30 #ifndef OPAL_OPAL_H
31 #define OPAL_OPAL_H
32 
33 #include <stdlib.h>
34 
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
66 #ifdef _WIN32
67  #define OPAL_EXPORT __stdcall
68 #else
69  #define OPAL_EXPORT
70 #endif
71 
73 typedef struct OpalHandleStruct * OpalHandle;
74 
75 
76 typedef struct OpalMessage OpalMessage;
77 
79 #define OPAL_C_API_VERSION 40
80 
81 
83 
162 extern OpalHandle OPAL_EXPORT OpalInitialise(unsigned * version, const char * options);
163 
167 #if _WIN32
168  #define OPAL_INITIALISE_FUNCTION MAKEINTRESOURCE(1)
169 #else
170  #define OPAL_INITIALISE_FUNCTION "OpalInitialise"
171 #endif
172 
173 
177 typedef OpalHandle (OPAL_EXPORT *OpalInitialiseFunction)(unsigned * version, const char * options);
178 
179 
181 
190 extern void OPAL_EXPORT OpalShutDown(OpalHandle opal);
191 
195 #if _WIN32
196  #define OPAL_SHUTDOWN_FUNCTION MAKEINTRESOURCE(2)
197 #else
198  #define OPAL_SHUTDOWN_FUNCTION "OpalShutDown"
199 #endif
200 
204 typedef void (OPAL_EXPORT *OpalShutDownFunction)(OpalHandle opal);
205 
206 
208 
245 extern OpalMessage * OPAL_EXPORT OpalGetMessage(OpalHandle opal, unsigned timeout);
246 
250 #if _WIN32
251  #define OPAL_GET_MESSAGE_FUNCTION MAKEINTRESOURCE(3)
252 #else
253  #define OPAL_GET_MESSAGE_FUNCTION "OpalGetMessage"
254 #endif
255 
259 typedef OpalMessage * (OPAL_EXPORT *OpalGetMessageFunction)(OpalHandle opal, unsigned timeout);
260 
261 
263 
304 extern OpalMessage * OPAL_EXPORT OpalSendMessage(OpalHandle opal, const OpalMessage * message);
305 
309 typedef OpalMessage * (OPAL_EXPORT *OpalSendMessageFunction)(OpalHandle opal, const OpalMessage * message);
310 
314 #if _WIN32
315  #define OPAL_SEND_MESSAGE_FUNCTION MAKEINTRESOURCE(4)
316 #else
317  #define OPAL_SEND_MESSAGE_FUNCTION "OpalSendMessage"
318 #endif
319 
320 
322 
326 extern void OPAL_EXPORT OpalFreeMessage(OpalMessage * message);
327 
331 #if _WIN32
332  #define OPAL_FREE_MESSAGE_FUNCTION MAKEINTRESOURCE(5)
333 #else
334  #define OPAL_FREE_MESSAGE_FUNCTION "OpalFreeMessage"
335 #endif
336 
341 
342 
344 
345 #define OPAL_PREFIX_H323 "h323"
346 #define OPAL_PREFIX_H323S "h323s"
347 #define OPAL_PREFIX_SIP "sip"
348 #define OPAL_PREFIX_SIPS "sips"
349 #define OPAL_PREFIX_SDP "sdp"
350 #define OPAL_PREFIX_IAX2 "iax2"
351 #define OPAL_PREFIX_PCSS "pc"
352 #define OPAL_PREFIX_LOCAL "local"
353 #define OPAL_PREFIX_POTS "pots"
354 #define OPAL_PREFIX_PSTN "pstn"
355 #define OPAL_PREFIX_CAPI "isdn"
356 #define OPAL_PREFIX_FAX "fax"
357 #define OPAL_PREFIX_T38 "t38"
358 #define OPAL_PREFIX_IVR "ivr"
359 #define OPAL_PREFIX_MIXER "mcu"
360 #define OPAL_PREFIX_IM "im"
361 #define OPAL_PREFIX_GST "gst"
362 #define OPAL_PREFIX_SKINNY "sccp"
363 #define OPAL_PREFIX_LYNC "lync"
364 
365 #define OPAL_PREFIX_ALL OPAL_PREFIX_SIP " " \
366  OPAL_PREFIX_SIPS " " \
367  OPAL_PREFIX_H323 " " \
368  OPAL_PREFIX_H323S " " \
369  OPAL_PREFIX_IAX2 " " \
370  OPAL_PREFIX_SDP " " \
371  OPAL_PREFIX_SKINNY " " \
372  OPAL_PREFIX_LYNC " " \
373  OPAL_PREFIX_PCSS " " \
374  OPAL_PREFIX_LOCAL " " \
375  OPAL_PREFIX_GST " " \
376  OPAL_PREFIX_POTS " " \
377  OPAL_PREFIX_PSTN " " \
378  OPAL_PREFIX_FAX " " \
379  OPAL_PREFIX_T38 " " \
380  OPAL_PREFIX_IVR " " \
381  OPAL_PREFIX_MIXER " " \
382  OPAL_PREFIX_IM
383 
384 
387 typedef enum OpalMessageType {
501 // Always add new messages to ethe end to maintain backward compatibility
504 
505 
509 typedef enum OpalSilenceDetectMode {
515 
516 
520 typedef enum OpalEchoCancelMode {
525 
526 
560 typedef int (*OpalMediaDataFunction)(
561  const char * token,
563  const char * stream,
567  const char * format,
568  void * userData,
569  void * data,
570  int size
571 );
572 
573 
591  const OpalMessage * message
592 );
593 
594 
604 typedef enum OpalMediaDataType {
611 
612 
630 typedef enum OpalMediaTiming {
640 
641 
674 typedef struct OpalParamGeneral {
675  const char * m_audioRecordDevice;
679  const char * m_audioPlayerDevice;
683  const char * m_videoInputDevice;
688  const char * m_videoOutputDevice;
693  const char * m_videoPreviewDevice;
697  const char * m_mediaOrder;
700  const char * m_mediaMask;
703  const char * m_autoRxMedia;
707  const char * m_autoTxMedia;
711  const char * m_natMethod;
716  const char * m_natServer;
721  unsigned m_tcpPortBase;
723  unsigned m_tcpPortMax;
725  unsigned m_udpPortBase;
727  unsigned m_udpPortMax;
729  unsigned m_rtpPortBase;
731  unsigned m_rtpPortMax;
741  unsigned m_maxAudioJitter;
751  unsigned m_signalDeadband;
753  unsigned m_silenceDeadband;
760  unsigned m_audioBuffers;
774  const char * m_mediaOptions;
783  unsigned m_audioBufferTime;
786  unsigned m_manualAlerting;
799  const char * m_pcssMediaOverride;
809  unsigned m_noMediaTimeout;
811  const char * m_caFiles;
815  const char * m_certificate;
819  const char * m_privateKey;
827 
828 
831 typedef struct OpalProductDescription {
832  const char * m_vendor;
835  const char * m_name;
838  const char * m_version;
841  unsigned m_t35CountryCode;
846  unsigned m_t35Extension;
858 
859 
863 typedef enum OpalUserInputModes {
871 
872 
889 typedef struct OpalParamProtocol {
890  const char * m_prefix;
893  const char * m_userName;
896  const char * m_displayName;
899  const char * m_interfaceAddresses;
924  const char * m_defaultOptions;
926  const char * m_mediaCryptoSuites;
934  unsigned m_maxSizeUDP;
939 
940 
942 #define OPAL_MWI_EVENT_PACKAGE "message-summary"
943 
945 #define OPAL_LINE_APPEARANCE_EVENT_PACKAGE "dialog;sla;ma"
946 
1019 typedef struct OpalParamRegistration {
1020  const char * m_protocol;
1022  const char * m_identifier;
1028  const char * m_hostName;
1032  const char * m_authUserName;
1033  const char * m_password;
1034  const char * m_adminEntity;
1037  unsigned m_timeToLive;
1039  unsigned m_restoreTime;
1042  const char * m_eventPackage;
1050  const char * m_attributes;
1055 
1056 
1072 
1073 
1077 typedef struct OpalStatusRegistration {
1078  const char * m_protocol;
1080  const char * m_serverName;
1083  const char * m_error;
1090 
1091 
1095 typedef struct OpalMIME
1096 {
1097  const char * m_type;
1098  unsigned m_length;
1099  const char * m_data;
1100 } OpalMIME;
1101 
1102 
1139 typedef struct OpalParamSetUpCall {
1140  const char * m_partyA;
1158  const char * m_partyB;
1170  const char * m_callToken;
1175  const char * m_alertingType;
1194  const char * m_protocolCallId;
1201  unsigned m_extraCount;
1205  const OpalMIME * m_extras;
1207 
1208 
1212 typedef struct OpalStatusIncomingCall {
1213  const char * m_callToken;
1214  const char * m_localAddress;
1215  const char * m_remoteAddress;
1219  const char * m_remotePartyNumber;
1220  const char * m_remoteDisplayName;
1221  const char * m_calledAddress;
1222  const char * m_calledPartyNumber;
1224  const char * m_alertingType;
1236  const char * m_protocolCallId;
1238  const char * m_referredByAddress;
1239  const char * m_redirectingNumber;
1240  unsigned m_extraCount;
1244  const OpalMIME * m_extras;
1245  const char * m_remoteIdentity;
1250  const char * m_supportedFeatures;
1257 
1258 
1267 typedef struct OpalParamAnswerCall {
1268  const char * m_callToken;
1272  unsigned m_withMedia;
1275 
1280 typedef enum OpalMediaStates {
1290 } OpalMediaStates;
1291 
1292 
1299 typedef struct OpalStatusMediaStream {
1300  const char * m_callToken;
1301  const char * m_identifier;
1304  const char * m_type;
1309  const char * m_format;
1316  int m_volume;
1320  const char * m_watermark;
1325 
1326 
1329 typedef struct OpalParamSetUserData {
1330  const char * m_callToken;
1331  void * m_userData;
1333 
1334 
1340 typedef struct OpalStatusUserInput {
1341  const char * m_callToken;
1342  const char * m_userInput;
1343  unsigned m_duration;
1348 } OpalStatusUserInput, OpalParamUserInput;
1349 
1350 
1355  const char * m_party;
1356  const char * m_type;
1357  const char * m_extraInfo;
1361 
1362 
1376  OpalLineIdle = OpalLineTerminated // Kept for backward compatibility
1378 
1379 
1384  const char * m_line;
1389  const char * m_callId;
1393  const char * m_partyA;
1394  const char * m_partyB;
1396 
1397 
1401 typedef enum OpalPresenceStates {
1411 
1412 
1441 typedef struct OpalPresenceStatus {
1442  const char * m_entity;
1445  const char * m_target;
1447  const char * m_service;
1449  const char * m_contact;
1450  const char * m_capabilities;
1453  const char * m_activities;
1457  const char * m_note;
1461  const char * m_infoType;
1462  const char * m_infoData;
1464 
1465 
1474 typedef struct OpalInstantMessage {
1475  const char * m_from;
1476  const char * m_to;
1477  const char * m_host;
1479  const char * m_conversationId;
1483  const char * m_textBody;
1486  unsigned m_bodyCount;
1487  const char ** m_mimeType;
1488  const char ** m_bodies;
1490  unsigned m_messageId;
1494  const char * m_htmlBody;
1499 
1500 
1522 
1523 
1526 typedef struct OpalParamRecording {
1527  const char * m_callToken;
1528  const char * m_file;
1530  unsigned m_channels;
1533  const char * m_audioFormat;
1537  const char * m_videoFormat;
1541  unsigned m_videoWidth;
1542  unsigned m_videoHeight;
1543  unsigned m_videoRate;
1548 
1549 
1553 typedef struct OpalStatusTransferCall {
1554  const char * m_callToken;
1555  const char * m_protocolCallId;
1557  const char * m_result;
1572  const char * m_info;
1577 
1578 
1582 typedef struct OpalStatusIVR {
1583  const char * m_callToken;
1584  const char * m_variables;
1589 } OpalStatusIVR;
1590 
1591 
1605 typedef struct OpalProtocolMessage {
1606  const char * m_protocol;
1607  const char * m_callToken;
1608  const char * m_identifier;
1609  const void * m_payload;
1610  unsigned m_size;
1611  unsigned m_extraCount;
1615  const OpalMIME * m_extras;
1617 
1618 
1622 typedef struct OpalStatusCallCleared {
1623  const char * m_callToken;
1624  const char * m_reason;
1630 
1631 
1634 typedef enum OpalCallEndReason {
1672 
1673 
1676 typedef struct OpalParamCallCleared {
1677  const char * m_callToken;
1680  unsigned m_custom;
1683 
1684 
1686  const char * m_commandError;
1692  const char * m_callToken;
1695  OpalStatusUserInput m_userInput;
1708 };
1709 
1710 
1714 struct OpalMessage {
1717 };
1718 
1719 
1720 #define OPALMSG_INIT(msg,type,field) (memset(&(msg), 0, sizeof(msg)),(msg).m_type=type,&(msg).m_param.field)
1721 
1723 #define OPALMSG_GENERAL_PARAM(msg) OPALMSG_INIT(msg,OpalCmdSetGeneralParameters,m_general)
1724 
1726 #define OPALMSG_PROTO_PARAM(msg) OPALMSG_INIT(msg,OpalCmdSetProtocolParameters,m_protocol)
1727 
1729 #define OPALMSG_REGISTRATION(msg) OPALMSG_INIT(msg,OpalCmdRegistration,m_registrationInfo)
1730 
1732 #define OPALMSG_SETUP_CALL(msg) OPALMSG_INIT(msg,OpalCmdSetUpCall,m_callSetUp)
1733 
1735 #define OPALMSG_TRANSFER(msg) OPALMSG_INIT(msg,OpalCmdTransferCall,m_callSetUp)
1736 
1738 #define OPALMSG_ANSWER_CALL(msg) OPALMSG_INIT(msg,OpalCmdAnswerCall,m_answerCall)
1739 
1741 #define OPALMSG_CLEAR_CALL(msg) OPALMSG_INIT(msg,OpalCmdClearCall,m_clearCall)
1742 
1744 #define OPALMSG_SET_USER_DATA(msg) OPALMSG_INIT(msg,OpalCmdSetUserData,m_setUserData)
1745 
1747 #define OPALMSG_START_RECORDING(msg) OPALMSG_INIT(msg,OpalCmdStartRecording,m_recording)
1748 
1749 
1750 #ifdef __cplusplus
1751 };
1752 #endif
1753 
1754 #if defined(__cplusplus) || defined(DOC_PLUS_PLUS)
1755 
1758 {
1759  public:
1761  ~OpalMessagePtr();
1762 
1763  OpalMessageType GetType() const;
1765 
1766  const char * GetCallToken() const;
1767  void SetCallToken(const char * token);
1768 
1769  const char * GetCommandError() const;
1770 
1775  OpalParamSetUpCall * GetCallSetUp() const;
1778  OpalStatusUserInput * GetUserInput() const;
1785  OpalParamRecording * GetRecording() const;
1789 
1790 #ifndef SWIG
1791  operator OpalParamGeneral *() const { return GetGeneralParams(); }
1792  operator OpalParamProtocol *() const { return GetProtocolParams(); }
1793  operator OpalParamRegistration *() const { return GetRegistrationParams(); }
1794  operator OpalStatusRegistration *() const { return GetRegistrationStatus(); }
1795  operator OpalParamSetUpCall *() const { return GetCallSetUp(); }
1796  operator OpalStatusIncomingCall *() const { return GetIncomingCall(); }
1797  operator OpalParamAnswerCall *() const { return GetAnswerCall(); }
1798  operator OpalStatusUserInput *() const { return GetUserInput(); }
1799  operator OpalStatusMessageWaiting *() const { return GetMessageWaiting(); }
1800  operator OpalStatusLineAppearance *() const { return GetLineAppearance(); }
1801  operator OpalStatusCallCleared *() const { return GetCallCleared(); }
1802  operator OpalParamCallCleared *() const { return GetClearCall(); }
1803  operator OpalStatusMediaStream *() const { return GetMediaStream(); }
1804  operator OpalParamSetUserData *() const { return GetSetUserData(); }
1805  operator OpalParamRecording *() const { return GetRecording(); }
1806  operator OpalStatusTransferCall *() const { return GetTransferStatus(); }
1807  operator OpalPresenceStatus *() const { return GetPresenceStatus(); }
1808  operator OpalInstantMessage *() const { return GetInstantMessage(); }
1809 #endif // SWIG
1810 
1811  protected:
1813 
1814  private:
1815  OpalMessagePtr(const OpalMessagePtr &) { }
1816  void operator=(const OpalMessagePtr &) { }
1817 
1818  friend class OpalContext;
1819 };
1820 
1821 
1822 #ifdef GetMessage
1823 #undef GetMessage
1824 #endif
1825 #ifdef SendMessage
1826 #undef SendMessage
1827 #endif
1828 
1829 
1838 {
1839  public:
1841  OpalContext();
1842 
1844  virtual ~OpalContext();
1845 
1848  unsigned Initialise(
1849  const char * options,
1850  unsigned version = OPAL_C_API_VERSION
1851  );
1852 
1854  bool IsInitialised() const { return m_handle != NULL; }
1855 
1857  void ShutDown();
1858 
1860  bool GetMessage(
1861  OpalMessagePtr & message,
1862  unsigned timeout = 0
1863  );
1864 
1866  bool SendMessage(
1867  const OpalMessagePtr & message
1868  );
1869  bool SendMessage(
1870  const OpalMessagePtr & message,
1871  OpalMessagePtr & response
1872  );
1873 
1874 
1876  bool SetUpCall(
1877  OpalMessagePtr & response,
1878  const char * partyB,
1879  const char * partyA = NULL,
1880  const char * alertingType = NULL
1881  );
1882 
1884  bool AnswerCall(
1885  const char * callToken
1886  );
1887 
1889  bool ClearCall(
1890  const char * callToken,
1892  );
1893 
1895  bool SendUserInput(
1896  const char * callToken,
1897  const char * userInput,
1898  unsigned duration = 0
1899  );
1900 
1901 #ifndef SWIG
1902  // Windows API compatibility
1903  __inline bool GetMessageA(
1904  OpalMessagePtr & message,
1905  unsigned timeout = 0
1906  ) { return GetMessage(message, timeout); }
1907  __inline bool GetMessageW(
1908  OpalMessagePtr & message,
1909  unsigned timeout = 0
1910  ) { return GetMessage(message, timeout); }
1911  __inline bool SendMessageA(
1912  const OpalMessagePtr & message
1913  ) { return SendMessage(message); }
1914  __inline bool SendMessageA(
1915  const OpalMessagePtr & message,
1916  OpalMessagePtr & response
1917  ) { return SendMessage(message, response); }
1918  __inline bool SendMessageW(
1919  const OpalMessagePtr & message
1920  ) { return SendMessage(message); }
1921  __inline bool SendMessageW(
1922  const OpalMessagePtr & message,
1923  OpalMessagePtr & response
1924  ) { return SendMessage(message, response); }
1925 #endif // SWIG
1926 
1927  protected:
1929 };
1930 
1931 #endif // defined(__cplusplus)
1932 
1933 #endif // OPAL_OPAL_H
1934 
1935 
OpalStatusTransferCall m_transferStatus
Used by OpalIndTransferCall.
Definition: opal.h:1703
Definition: opal.h:452
const char * m_callToken
Call token for call being cleared.
Definition: opal.h:1583
Definition: opal.h:1281
Transport connection failed to establish call.
Definition: opal.h:1643
const char * m_mediaMask
Definition: opal.h:700
Definition: opal.h:512
OpalVideoRecordMixMode m_videoMixing
Definition: opal.h:1544
const char * m_audioFormat
Definition: opal.h:1533
const char * m_callToken
Call token for context of the message.
Definition: opal.h:1607
const char * m_type
Type for MWI, &quot;Voice&quot;, &quot;Fax&quot;, &quot;Pager&quot;, &quot;Multimedia&quot;, &quot;Text&quot;, &quot;None&quot;.
Definition: opal.h:1356
const char * m_autoTxMedia
Definition: opal.h:707
unsigned m_withMedia
Definition: opal.h:1272
OpalMediaStates
Definition: opal.h:1280
Use RFC 2833 for DTMF only.
Definition: opal.h:868
const char * m_entity
Definition: opal.h:1442
Call cleared because another call is answered.
Definition: opal.h:1664
unsigned m_rtpPortMax
Definition: opal.h:731
Definition: opal.h:1505
Definition: opal.h:458
const void * m_payload
Extra protocol and identifier specific data.
Definition: opal.h:1609
const char * m_natMethod
Definition: opal.h:711
const char * m_privateKey
Definition: opal.h:819
unsigned m_audioBuffers
Definition: opal.h:760
Definition: opal.h:412
const char * GetCallToken() const
Used by OpalCmdHoldCall/OpalCmdRetrieveCall/OpalCmdStopRecording.
const char * m_audioPlayerDevice
Definition: opal.h:679
OpalParamAnswerCall * GetAnswerCall() const
Used by OpalCmdAnswerCall/OpalCmdAlerting.
const char * m_callToken
Call token for call being recorded.
Definition: opal.h:1527
const char * m_protocolMessageIdentifiers
Definition: opal.h:935
bool IsInitialised() const
Indicate if the OPAL context has been initialised.
Definition: opal.h:1854
OpalStatusUserInput * GetUserInput() const
Used by OpalIndUserInput/OpalCmdUserInput.
const char * m_conversationId
Definition: opal.h:1479
const char ** m_mimeType
Definition: opal.h:1487
unsigned m_videoRate
Definition: opal.h:1543
Definition: opal.h:400
OpalMediaDataType m_mediaDataHeader
Definition: opal.h:767
const char * m_eventPackage
Definition: opal.h:1042
unsigned m_t35CountryCode
Definition: opal.h:841
unsigned m_channels
Definition: opal.h:1530
const char * m_partyB
Definition: opal.h:1394
const char * m_remoteAddress
Definition: opal.h:1215
const char * m_serverName
Definition: opal.h:1080
Use arbitrary strings (H.245 string, or INFO dtmf)
Definition: opal.h:866
Definition: opal.h:421
OpalHandle m_handle
Definition: opal.h:1928
Definition: opal.h:605
Definition: opal.h:435
Definition: opal.h:608
Definition: opal.h:470
unsigned m_maxAudioJitter
Definition: opal.h:741
const char * m_identifier
Protocol specific indentifier for what this message is about.
Definition: opal.h:1608
void OPAL_EXPORT OpalFreeMessage(OpalMessage *message)
OpalStatusMediaStream * GetMediaStream() const
Used by OpalIndMediaStream/OpalCmdMediaStream.
Definition: opal.h:487
OpalMessageType
Definition: opal.h:387
const char * m_watermark
Definition: opal.h:1320
const char * m_certificate
Definition: opal.h:815
const char * m_callToken
Call token for call being cleared.
Definition: opal.h:1623
const char * m_natServer
Definition: opal.h:716
OpalMessage * m_message
Definition: opal.h:1812
unsigned m_duration
Definition: opal.h:1343
No presence status - not the same as Unavailable or Away.
Definition: opal.h:1406
const char * m_data
Pointer to data.
Definition: opal.h:1099
unsigned m_videoWidth
Definition: opal.h:1541
const char * m_videoFormat
Definition: opal.h:1537
OpalHandle(OPAL_EXPORT * OpalInitialiseFunction)(unsigned *version, const char *options)
Definition: opal.h:177
Definition: opal.h:450
Definition: opal.h:1212
const char * m_partyA
Definition: opal.h:1140
OpalMessage *OPAL_EXPORT OpalGetMessage(OpalHandle opal, unsigned timeout)
unsigned m_videoHeight
Definition: opal.h:1542
Definition: opal.h:432
__inline bool SendMessageA(const OpalMessagePtr &message)
Definition: opal.h:1911
OpalMediaTiming m_mediaTiming
Definition: opal.h:792
Definition: opal.h:1095
unsigned m_rtpMaxPayloadSize
Definition: opal.h:735
Local endpoint application cleared call.
Definition: opal.h:1635
unsigned m_custom
Definition: opal.h:1680
Call failed a security check and was ended.
Definition: opal.h:1649
Definition: opal.h:511
Definition: opal.h:1685
const char * m_type
MIME type for data, e.g. &quot;text/html&quot;.
Definition: opal.h:1097
const char * m_protocol
Definition: opal.h:1078
Definition: opal.h:437
OpalParamCallCleared * GetClearCall() const
Used by OpalCmdClearCall.
Definition: opal.h:460
bool SendUserInput(const char *callToken, const char *userInput, unsigned duration=0)
Send user input using OpalCmdUserInput via OpalSendMessage()
Definition: opal.h:490
Call cleared due to missing dial tone.
Definition: opal.h:1661
__inline bool SendMessageW(const OpalMessagePtr &message)
Definition: opal.h:1918
Definition: opal.h:1474
__inline bool GetMessageA(OpalMessagePtr &message, unsigned timeout=0)
Definition: opal.h:1903
OpalUserInputModes
Definition: opal.h:863
OpalMessagePtr & SetType(OpalMessageType type)
const char * m_variables
Definition: opal.h:1584
unsigned m_extraCount
Definition: opal.h:1240
OpalVideoRecordMixMode
Definition: opal.h:1504
const char * m_target
Definition: opal.h:1445
const char * m_to
Definition: opal.h:1476
OpalParamSetUserData m_setUserData
Used by OpalCmdSetUserData.
Definition: opal.h:1701
Definition: opal.h:477
Definition: opal.h:442
OpalParamRegistration m_registrationInfo
Used by OpalCmdRegistration.
Definition: opal.h:1689
Definition: opal.h:483
Definition: opal.h:1622
Definition: opal.h:1354
union OpalMessageParam m_param
Context sensitive parameter based on m_type.
Definition: opal.h:1716
const char * m_adminEntity
Definition: opal.h:1034
Definition: opal.h:521
OpalStatusRegistration m_registrationStatus
Used by OpalIndRegistration.
Definition: opal.h:1690
Definition: opal.h:393
const char * m_authUserName
Definition: opal.h:1032
OpalPresenceStatus * GetPresenceStatus() const
Used by OpalCmdAuthorisePresence/OpalCmdSubscribePresence/OpalIndPresenceChange/OpalCmdSetLocalPresen...
const char * m_prefix
Definition: opal.h:890
Definition: opal.h:485
Call failed as could not get enough bandwidth.
Definition: opal.h:1646
Definition: opal.h:1371
const char * m_redirectingNumber
This is the E.164 number of the party doing transfer, if available.
Definition: opal.h:1239
OpalEchoCancelMode
Definition: opal.h:520
unsigned m_maxSizeUDP
Definition: opal.h:934
const char * m_videoOutputDevice
Definition: opal.h:688
unsigned m_tcpPortBase
Definition: opal.h:721
Definition: opal.h:474
Definition: opal.h:1062
const OpalMIME * m_extras
Definition: opal.h:1205
const char * m_mediaOptions
Definition: opal.h:774
const char * m_version
Definition: opal.h:838
const char * m_protocolCallId
Definition: opal.h:1236
const char * m_calledAddress
URL of called party the remote is trying to contact.
Definition: opal.h:1221
const char * m_mediaOrder
Definition: opal.h:697
const char * m_protocolCallId
Definition: opal.h:1555
const OpalMIME * m_extras
Definition: opal.h:1615
Definition: opal.h:1061
Use in-band generated audio tones for DTMF.
Definition: opal.h:869
void(OPAL_EXPORT * OpalFreeMessageFunction)(OpalMessage *message)
Definition: opal.h:340
const char * m_callToken
Call token for the call the media stream is.
Definition: opal.h:1330
Definition: opal.h:1019
Definition: opal.h:1837
void OPAL_EXPORT OpalShutDown(OpalHandle opal)
OpalParamProtocol * GetProtocolParams() const
Used by OpalCmdSetProtocolParameters.
OpalStatusMessageWaiting * GetMessageWaiting() const
Used by OpalIndMessageWaiting.
Definition: opal.h:391
Call cleared due to invalid conference ID.
Definition: opal.h:1660
unsigned m_audioBufferTime
Definition: opal.h:783
const char * m_pcssMediaOverride
Definition: opal.h:799
const char * m_extraInfo
Definition: opal.h:1357
Could not reach the remote party.
Definition: opal.h:1654
unsigned m_bodyCount
Definition: opal.h:1486
const char * m_videoPreviewDevice
Definition: opal.h:693
const OpalMIME * m_extras
Definition: opal.h:1244
OpalStatusUserInput m_userInput
Used by OpalIndUserInput/OpalCmdUserInput.
Definition: opal.h:1695
unsigned m_udpPortBase
Definition: opal.h:725
const char * m_localAddress
URL of local interface. e.g. &quot;sip:me@here.com&quot;.
Definition: opal.h:1214
OpalPresenceStatus m_presenceStatus
used by OpalCmdAuthorisePresence/OpalCmdSubscribePresence/OpalIndPresenceChange/OpalCmdSetLocalPresen...
Definition: opal.h:1705
unsigned m_manufacturerCode
Definition: opal.h:851
OpalMediaTiming
Definition: opal.h:630
const char * m_protocolCallId
Definition: opal.h:1194
The remote failed temporarily app may retry.
Definition: opal.h:1657
unsigned m_silenceDeadband
Definition: opal.h:753
const char * m_vendor
Definition: opal.h:832
Definition: opal.h:468
Definition: opal.h:1286
Definition: opal.h:1374
Definition: opal.h:674
Definition: opal.h:1329
unsigned m_length
Length of data, relevant mainly for if data is binary.
Definition: opal.h:1098
const char * m_reason
Definition: opal.h:1624
Definition: opal.h:1340
#define OPAL_C_API_VERSION
Current API version.
Definition: opal.h:79
Definition: opal.h:889
const char * m_error
Definition: opal.h:1083
Definition: opal.h:1370
The remote party host off line.
Definition: opal.h:1656
virtual ~OpalContext()
Destroy the OPAL context, calls ShutDown().
OpalParamSetUserData * GetSetUserData() const
Used by OpalCmdSetUserData.
Could not find common capabilities.
Definition: opal.h:1647
Call cleared due to missing ringback tone.
Definition: opal.h:1662
unsigned m_udpPortMax
Definition: opal.h:727
const char * m_password
Password for authentication with server.
Definition: opal.h:1033
Definition: opal.h:831
OpalStatusIncomingCall m_incomingCall
Used by OpalIndIncomingCall.
Definition: opal.h:1693
const char * m_info
Definition: opal.h:1572
Definition: opal.h:1441
OpalMediaDataFunction m_mediaWriteData
Definition: opal.h:765
Definition: opal.h:1376
OpalParamRecording * GetRecording() const
Used by OpalCmdStartRecording.
OpalSilenceDetectMode
Definition: opal.h:509
const char * m_name
Definition: opal.h:835
const char * m_textBody
Definition: opal.h:1483
Definition: opal.h:1509
const char * m_callToken
Call token for the call the media stream is.
Definition: opal.h:1300
const char * m_interfaceAddresses
Definition: opal.h:899
Local endpoint congested.
Definition: opal.h:1651
const char ** m_bodies
Definition: opal.h:1488
const char * m_calledPartyNumber
This is the E.164 number of the called party, if available.
Definition: opal.h:1222
unsigned m_autoCreateCertificate
Definition: opal.h:822
Remote endpoint refused call.
Definition: opal.h:1639
const char * m_remoteDisplayName
Display name calling party. e.g. &quot;Fred Nurk&quot;.
Definition: opal.h:1220
OpalParamGeneral * GetGeneralParams() const
Used by OpalCmdSetGeneralParameters.
Definition: opal.h:495
OpalLineAppearanceStates
Definition: opal.h:1367
OpalParamGeneral m_general
Used by OpalCmdSetGeneralParameters.
Definition: opal.h:1687
OpalCallEndReason
Definition: opal.h:1634
OpalParamProtocol m_overrides
Definition: opal.h:1198
OpalStatusTransferCall * GetTransferStatus() const
Used by OpalIndTransferCall.
const OpalMIME * m_bodyData
Definition: opal.h:1497
struct OpalHandleStruct * OpalHandle
Handle to initialised OPAL instance.
Definition: opal.h:73
Definition: opal.h:1582
OpalMediaStates m_state
Definition: opal.h:1313
__inline bool SendMessageW(const OpalMessagePtr &message, OpalMessagePtr &response)
Definition: opal.h:1921
Definition: opal.h:388
void SetCallToken(const char *token)
OpalMessage *(OPAL_EXPORT * OpalGetMessageFunction)(OpalHandle opal, unsigned timeout)
Definition: opal.h:259
bool ClearCall(const char *callToken, OpalCallEndReason reason=OpalCallEndedByLocalUser)
Clear a call using OpalCmdClearCall via OpalSendMessage()
Definition: opal.h:1383
__inline bool GetMessageW(OpalMessagePtr &message, unsigned timeout=0)
Definition: opal.h:1907
const char * m_callToken
Call token for call being cleared.
Definition: opal.h:1677
unsigned m_messageId
Definition: opal.h:1490
Call cleared due to an enforced duration limit.
Definition: opal.h:1659
OpalStatusCallCleared * GetCallCleared() const
Used by OpalIndCallCleared.
unsigned m_tcpPortMax
Definition: opal.h:723
const char * m_callToken
Call token for call being transferred.
Definition: opal.h:1554
Definition: opal.h:636
OpalStatusCallCleared m_callCleared
Used by OpalIndCallCleared.
Definition: opal.h:1698
Definition: opal.h:510
int(* OpalMessageAvailableFunction)(const OpalMessage *message)
Definition: opal.h:590
unsigned m_audioBufferSize
Definition: opal.h:1545
const char * m_capabilities
Definition: opal.h:1450
Definition: opal.h:1139
Definition: opal.h:1288
const char * m_partyA
Definition: opal.h:1393
Call cleared due to loss of media flow.
Definition: opal.h:1666
const char * m_callId
Definition: opal.h:1389
Definition: opal.h:1282
Remote endpoint stopped calling.
Definition: opal.h:1641
Presentity does not exist.
Definition: opal.h:1403
Definition: opal.h:1517
End call with custom protocol specific code (e.g. SIP)
Definition: opal.h:1670
const char * m_service
Definition: opal.h:1447
const char * m_party
Party for which the MWI is directed.
Definition: opal.h:1355
bool SendMessage(const OpalMessagePtr &message)
Calls OpalSendMessage() to send a message to the OPAL context.
unsigned Initialise(const char *options, unsigned version=OPAL_C_API_VERSION)
OpalStatusLineAppearance m_lineAppearance
Used by OpalIndLineAppearance.
Definition: opal.h:1697
const char * m_caFiles
Definition: opal.h:811
Definition: opal.h:405
When using TLS, the remote certifcate was not authenticated.
Definition: opal.h:1668
Definition: opal.h:444
OpalParamRegistration * GetRegistrationParams() const
Used by OpalCmdRegistration.
Definition: opal.h:480
OpalStatusMessageWaiting m_messageWaiting
Used by OpalIndMessageWaiting.
Definition: opal.h:1696
const char * m_defaultOptions
Definition: opal.h:924
OpalMessage *OPAL_EXPORT OpalSendMessage(OpalHandle opal, const OpalMessage *message)
const char * m_type
Definition: opal.h:1304
const char * m_allMediaCryptoSuites
Definition: opal.h:931
unsigned m_manualAlerting
Definition: opal.h:786
Definition: opal.h:409
OpalParamSetUpCall * GetCallSetUp() const
Used by OpalCmdSetUpCall/OpalIndProceeding/OpalIndAlerting/OpalIndEstablished.
Access to presence information was specifically forbidden.
Definition: opal.h:1405
Definition: opal.h:502
Call cleared because it was answered by another extension.
Definition: opal.h:1667
const char * m_autoRxMedia
Definition: opal.h:703
Definition: opal.h:1513
unsigned m_t35Extension
Definition: opal.h:846
OpalProductDescription m_product
Definition: opal.h:1223
Definition: opal.h:513
State has not changed from last time.
Definition: opal.h:1407
OpalEchoCancelMode m_echoCancellation
Definition: opal.h:758
OpalCallEndReason m_reason
Definition: opal.h:1678
#define OPAL_EXPORT
Definition: opal.h:69
unsigned m_extraCount
Definition: opal.h:1201
Definition: opal.h:1299
Definition: opal.h:425
void ShutDown()
Calls OpalShutDown() to dispose of the OPAL context.
OpalMessagePtr(OpalMessageType type=OpalIndCommandError)
Local endpoint busy.
Definition: opal.h:1650
unsigned m_size
Size of the above data.
Definition: opal.h:1610
unsigned m_signalDeadband
Definition: opal.h:751
OpalMessage *(OPAL_EXPORT * OpalSendMessageFunction)(OpalHandle opal, const OpalMessage *message)
Definition: opal.h:309
Remote endpoint did not answer in required time.
Definition: opal.h:1640
OpalPresenceStates m_state
Definition: opal.h:1452
Definition: opal.h:1373
const char * m_protocol
Protocol this message is from, e.g. &quot;sip&quot;.
Definition: opal.h:1606
OpalParamAnswerCall m_answerCall
Used by OpalCmdAnswerCall/OpalCmdAlerting.
Definition: opal.h:1694
Definition: opal.h:1267
const char * m_htmlBody
Definition: opal.h:1494
OpalContext()
Construct an unintialised OPAL context.
unsigned m_timeToLive
Definition: opal.h:1037
int(* OpalMediaDataFunction)(const char *token, const char *stream, const char *format, void *userData, void *data, int size)
Definition: opal.h:560
OpalStatusLineAppearance * GetLineAppearance() const
Used by OpalIndLineAppearance.
Call was forwarded using FACILITY message.
Definition: opal.h:1648
const char * m_supportedFeatures
Definition: opal.h:1250
Definition: opal.h:439
User has a presence and is available to be contacted.
Definition: opal.h:1408
void * m_userData
user data value to associate with this call
Definition: opal.h:1331
OpalInstantMessage m_instantMessage
Used by OpalCmdSendIM/OpalIndReceiveIM.
Definition: opal.h:1706
Definition: opal.h:492
const char * m_alertingType
Definition: opal.h:1175
Use DTMF specific names (H.245 signal, or INFO dtmf-relay)
Definition: opal.h:867
Definition: opal.h:523
const char * m_from
Definition: opal.h:1475
Call failed as could not find user (in GK)
Definition: opal.h:1645
Definition: opal.h:606
OpalMessageType m_type
Type of message.
Definition: opal.h:1715
Definition: opal.h:634
The remote ended the call with Q.931 cause code in MS byte.
Definition: opal.h:1658
Definition: opal.h:1077
OpalParamCallCleared m_clearCall
Used by OpalCmdClearCall.
Definition: opal.h:1699
const char * m_videoInputDevice
Definition: opal.h:683
unsigned m_silenceAdaptPeriod
Definition: opal.h:755
int m_volume
Definition: opal.h:1316
OpalInstantMessage * GetInstantMessage() const
Used by OpalCmdSendIM/OpalIndReceiveIM.
const char * m_userInput
User input string, e.g. &quot;#&quot;.
Definition: opal.h:1342
const char * m_result
Definition: opal.h:1557
int m_minAudioJitter
Definition: opal.h:737
OpalParamProtocol m_protocol
Used by OpalCmdSetProtocolParameters.
Definition: opal.h:1688
OpalMediaDataType
Definition: opal.h:604
const char * m_infoType
MIME tyupe for m_infoData, e.g. application/pidf+xml.
Definition: opal.h:1461
Definition: opal.h:456
OpalProductDescription m_product
Definition: opal.h:898
const char * m_mediaCryptoSuites
Definition: opal.h:926
bool AnswerCall(const char *callToken)
Answer a call using OpalCmdAnswerCall via OpalSendMessage()
Definition: opal.h:472
OpalMediaTiming m_videoSourceTiming
Definition: opal.h:796
const char * m_callToken
Definition: opal.h:1170
Remote endpoint congested.
Definition: opal.h:1653
Call cleared because gatekeeper admission request failed.
Definition: opal.h:1665
const char * m_commandError
Used by OpalIndCommandError.
Definition: opal.h:1686
int m_appearance
Definition: opal.h:1386
OpalMessageType GetType() const
Default mode for protocol.
Definition: opal.h:864
const char * m_callToken
Call token for call to be answered.
Definition: opal.h:1268
Call cleared because the line is out of service,.
Definition: opal.h:1663
Definition: opal.h:1368
User has a presence, but is cannot be contacted.
Definition: opal.h:1409
OpalPresenceStates
Definition: opal.h:1401
Local endpoint did not accept call OnIncomingCall()=false.
Definition: opal.h:1636
Authorisation to view a users state is required.
Definition: opal.h:1402
const char * m_remotePartyNumber
This is the E.164 number of the caller, if available.
Definition: opal.h:1219
const char * m_identifier
Definition: opal.h:1022
const char * m_callToken
Call token for new call.
Definition: opal.h:1213
const char * m_file
Definition: opal.h:1528
Definition: opal.h:1068
const char * m_infoData
Raw information as provided by underlying protocol, e.g. XML.
Definition: opal.h:1462
const char * m_audioRecordDevice
Definition: opal.h:675
OpalStatusMediaStream m_mediaStream
Used by OpalIndMediaStream/OpalCmdMediaStream.
Definition: opal.h:1700
Remote endpoint application cleared call.
Definition: opal.h:1638
OpalStatusRegistration * GetRegistrationStatus() const
Used by OpalIndRegistration.
Definition: opal.h:1553
OpalParamProtocol m_overrides
Definition: opal.h:1269
const char * m_line
URI for the line whose state is changing.
Definition: opal.h:1384
const char * m_remoteIdentity
Definition: opal.h:1245
const char * m_host
Definition: opal.h:1477
const char * m_attributes
Definition: opal.h:1050
const char * m_note
Definition: opal.h:1457
Wrapper around the OpalMessage structure.
Definition: opal.h:1757
Definition: opal.h:1284
Definition: opal.h:1066
Definition: opal.h:1372
Use Q.931 Information Elements (H.323 only)
Definition: opal.h:865
OpalLineAppearanceStates m_state
State the line has just moved to.
Definition: opal.h:1385
const char * m_partyB
Definition: opal.h:1158
Definition: opal.h:1369
const char * m_protocol
Definition: opal.h:1020
Definition: opal.h:396
Definition: opal.h:447
Definition: opal.h:1070
Remote endpoint busy.
Definition: opal.h:1652
Gatekeeper has cleared call.
Definition: opal.h:1644
Definition: opal.h:1605
const char * m_format
Definition: opal.h:1309
unsigned m_rtpTypeOfService
Definition: opal.h:733
OpalProductDescription m_product
Definition: opal.h:1088
Definition: opal.h:632
Definition: opal.h:416
const char * m_referredByAddress
This is the full address of the party doing transfer, if available.
Definition: opal.h:1238
OpalRegistrationStates
Definition: opal.h:1060
void(OPAL_EXPORT * OpalShutDownFunction)(OpalHandle opal)
Definition: opal.h:204
OpalUserInputModes m_userInputMode
Definition: opal.h:921
Definition: opal.h:1676
unsigned m_extraCount
Definition: opal.h:1611
const char * m_contact
Definition: opal.h:1449
const char * m_identifier
Definition: opal.h:1301
Local endpoint declined to answer call.
Definition: opal.h:1637
OpalStatusIVR m_ivrStatus
Used by OpalIndCompletedIVR.
Definition: opal.h:1704
const char * m_displayName
Definition: opal.h:896
const char * m_callToken
Used by OpalCmdHoldcall/OpalCmdRetrieveCall/OpalCmdStopRecording.
Definition: opal.h:1692
OpalMessageAvailableFunction m_messageAvailable
Definition: opal.h:770
OpalRegistrationStates m_status
Definition: opal.h:1087
OpalParamRecording m_recording
Used by OpalCmdStartRecording.
Definition: opal.h:1702
const char * m_callToken
Call token for the call the User Input was received on.
Definition: opal.h:1341
Definition: opal.h:522
unsigned m_rtpPortBase
Definition: opal.h:729
Something bad happened.
Definition: opal.h:1404
__inline bool SendMessageA(const OpalMessagePtr &message, OpalMessagePtr &response)
Definition: opal.h:1914
Definition: opal.h:429
Definition: opal.h:1714
Definition: opal.h:498
const char * m_activities
Definition: opal.h:1453
bool GetMessage(OpalMessagePtr &message, unsigned timeout=0)
Calls OpalGetMessage() to get next message from the OPAL context.
unsigned m_silenceThreshold
Definition: opal.h:749
const char * m_alertingType
Definition: opal.h:1224
OpalStatusIncomingCall * GetIncomingCall() const
Used by OpalIndIncomingCall.
const char * m_userName
Definition: opal.h:893
Definition: opal.h:453
const char * m_hostName
Definition: opal.h:1028
OpalParamSetUpCall m_callSetUp
Used by OpalCmdSetUpCall/OpalIndProceeding/OpalIndAlerting/OpalIndEstablished.
Definition: opal.h:1691
Transport error cleared call.
Definition: opal.h:1642
Definition: opal.h:631
bool SetUpCall(OpalMessagePtr &response, const char *partyB, const char *partyA=NULL, const char *alertingType=NULL)
Execute OpalSendMessage() using OpalCmdSetUpCall.
const char * GetCommandError() const
Used by OpalIndCommandError.
OpalProtocolMessage m_protocolMessage
Used by OpalIndProtocolMessage.
Definition: opal.h:1707
unsigned m_noMediaTimeout
Definition: opal.h:809
The remote party is not running an endpoint.
Definition: opal.h:1655
unsigned m_restoreTime
Definition: opal.h:1039
OpalSilenceDetectMode m_silenceDetectMode
Definition: opal.h:746
Destination Address format was incorrect format.
Definition: opal.h:1669
OpalMediaDataFunction m_mediaReadData
Definition: opal.h:763
Definition: opal.h:1526
OpalHandle OPAL_EXPORT OpalInitialise(unsigned *version, const char *options)