libisdn
Q931.h File Reference
#include "Q9XXplatform.h"
#include "Q850.h"
#include "Q931call.h"
#include "Q931ie.h"

Go to the source code of this file.

Data Structures

struct  Q931mes_Header
struct  Q931mes_Generic
struct  Q931_TrunkInfo
struct  Q931_TrunkInfo::_charray

Defines

#define L3CHAR   char /* Min 8 bit */
#define L3UCHAR   unsigned char /* Min 8 bit */
#define L3USHORT   unsigned short /* Min 16 bit unsigned */
#define L3UINT   unsigned int /* Min 16 bit unsigned */
#define L3INT   int /* Min 16 bit signed */
#define L3ULONG   unsigned long /* Min 32 bit */
#define L3BOOL   char /* Min 1 bit, valuse 0 & 1 only */
#define L3TRUE   1
#define L3FALSE   0
#define Q931_LOGBUFSIZE   1024 /* size of logging buffer */
#define Q931L4BUF   1000 /* size of message buffer */
#define Q931L2BUF   300 /* size of message buffer */
#define Q931MAXTRUNKS   4 /* Total number of trunks that will be */
#define Q931MAXCHPERTRUNK   32 /* Number of channels per trunk. The */
#define Q931MAXCALLPERTRUNK   (Q931MAXCHPERTRUNK * 2)
#define Q931_IS_BRI(x)   ((x)->TrunkType == Q931_TrType_BRI || (x)->TrunkType == Q931_TrType_BRI_PTMP)
#define Q931_IS_PRI(x)   (!Q931_IS_BRI(x))
#define Q931_IS_PTP(x)   ((x)->TrunkType != Q931_TrType_BRI_PTMP)
#define Q931_IS_PTMP(X)   ((x)->TrunkType == Q931_TrType_BRI_PTMP)
#define Q931_BRI_MAX_CRV   127
#define Q931_PRI_MAX_CRV   32767
#define Q931MAXDLCT   8 /* Max dialects included in this */
#define Q931MAXMES   128 /* Number of messages */
#define Q931MAXIE   255 /* Number of IE */
#define Q931MAXUSEDIE   50 /* Maximum number of ie types per Dialect */
#define Q931MAXCODESETS   7 /* Maximum number of codests (by spec, 0-7) */
#define Q931MAXSTATE   100 /* Size of state tables */
#define Q931MAXTIMER   25 /* Maximum number of timers */
#define Q931mes_ALERTING   0x01 /* 0000 0001 */
#define Q931mes_CALL_PROCEEDING   0x02 /* 0000 0010 */
#define Q931mes_CONNECT   0x07 /* 0000 0111 */
#define Q931mes_CONNECT_ACKNOWLEDGE   0x0f /* 0000 1111 */
#define Q931mes_PROGRESS   0x03 /* 0000 0011 */
#define Q931mes_SETUP   0x05 /* 0000 0101 */
#define Q931mes_SETUP_ACKNOWLEDGE   0x0d /* 0000 1101 */
#define Q931mes_RESUME   0x26 /* 0010 0110 */
#define Q931mes_RESUME_ACKNOWLEDGE   0x2e /* 0010 1110 */
#define Q931mes_RESUME_REJECT   0x22 /* 0010 0010 */
#define Q931mes_SUSPEND   0x25 /* 0010 0101 */
#define Q931mes_SUSPEND_ACKNOWLEDGE   0x2d /* 0010 1101 */
#define Q931mes_SUSPEND_REJECT   0x21 /* 0010 0001 */
#define Q931mes_USER_INFORMATION   0x20 /* 0010 0000 */
#define Q931mes_DISCONNECT   0x45 /* 0100 0101 */
#define Q931mes_RELEASE   0x4d /* 0100 1101 */
#define Q931mes_RELEASE_COMPLETE   0x5a /* 0101 1010 */
#define Q931mes_RESTART   0x46 /* 0100 0110 */
#define Q931mes_RESTART_ACKNOWLEDGE   0x4e /* 0100 1110 */
#define Q931mes_CONGESTION_CONTROL   0x79 /* 0111 1001 */
#define Q931mes_INFORMATION   0x7b /* 0111 1011 */
#define Q931mes_NOTIFY   0x6e /* 0110 1110 */
#define Q931mes_STATUS   0x7d /* 0111 1101 */
#define Q931mes_STATUS_ENQUIRY   0x75 /* 0111 0101 */
#define Q931mes_SEGMENT   0x60 /* 0110 0000 */
#define Q931mes_FACILITY   0x62 /* 0110 0010 */
#define Q931mes_SERVICE   0x0f /* 0000 1111 (ProtDisc 3) */
#define Q931mes_SERVICE_ACKNOWLEDGE   0x07 /* 0000 0111 (ProtDisc 3) */
#define Q931mes_FACILITY_ACKNOWLEDGE   0x6a /* 0110 1010 */
#define Q931mes_FACILITY_REJECT   0x72 /* 0111 0010 */
#define Q931mes_REGISTER   0x64 /* 0110 0100 */
#define Q931_CODESET_ALL   0x07
#define Q931GetIETotSize(ie)   (((ie.InfoID & 0x80) != 0) ? 1 : ie.LenIE) + 2)
#define Q931IsIEPresent(x)   ((x & 0x8000) != 0)
#define Q931GetIEOffset(x)   (x & 0x7fff)
#define Q931GetIEValue(x)   (x & 0x7fff)
#define Q931GetIEPtr(ie, buf)   ((void *)&buf[Q931GetIEOffset(ie)])
#define Q931SetIE(x, o)   { x = (ie)(o) | 0x8000; }
#define IsQ931Ext(x)   ((x & 0x80) == 0)
#define ieGetOctet(x)   ((L3UCHAR)(x))
#define NoWarning(x)   (x = x)

Typedefs

typedef L3USHORT ie
typedef struct Q931_TrunkInfo Q931_TrunkInfo_t
typedef L3INT(* Q931Tx34CB_t )(void *, struct Q931_Call *call, Q931mes_Generic *, int)
typedef L3INT(* Q931Tx32CB_t )(void *, L3INT, L3UCHAR, L3UCHAR *, L3INT)
typedef L3INT(* Q931ErrorCB_t )(void *, L3INT, L3INT, L3INT)
typedef L3INT(* Q931LogCB_t )(void *, Q931LogLevel_t, const char *, L3INT)

Enumerations

enum  q931_error_t {
  Q931E_NO_ERROR = 0, Q931E_UNKNOWN_MESSAGE = -3001, Q931E_ILLEGAL_IE = -3002, Q931E_UNKNOWN_IE = -3003,
  Q931E_BEARERCAP = -3004, Q931E_HLCOMP = -3005, Q931E_LLCOMP = -3006, Q931E_INTERNAL = -3007,
  Q931E_MISSING_CB = -3008, Q931E_UNEXPECTED_MESSAGE = -3009, Q931E_ILLEGAL_MESSAGE = -3010, Q931E_TOMANYCALLS = -3011,
  Q931E_INVALID_CRV = -3012, Q931E_CALLID = -3013, Q931E_CALLSTATE = -3014, Q931E_CALLEDSUB = -3015,
  Q931E_CALLEDNUM = -3016, Q931E_CALLINGNUM = -3017, Q931E_CALLINGSUB = -3018, Q931E_CAUSE = -3019,
  Q931E_CHANID = -3020, Q931E_DATETIME = -3021, Q931E_DISPLAY = -3022, Q931E_KEYPADFAC = -3023,
  Q931E_NETFAC = -3024, Q931E_NOTIFIND = -3025, Q931E_PROGIND = -3026, Q931E_RESTARTIND = -3027,
  Q931E_SEGMENT = -3028, Q931E_SIGNAL = -3029, Q931E_GENERIC_DIGITS = -3030, Q931E_MANDATORY_IE_MISSING = -3031,
  Q931E_UNRECOGNIZED_MESSAGE = -3032
}
enum  {
  Q931_TIMER_NONE = 0, Q931_TIMER_T300, Q931_TIMER_T301, Q931_TIMER_T302,
  Q931_TIMER_T303, Q931_TIMER_T304, Q931_TIMER_T305, Q931_TIMER_T306,
  Q931_TIMER_T307, Q931_TIMER_T308, Q931_TIMER_T309, Q931_TIMER_T310,
  Q931_TIMER_T311, Q931_TIMER_T312, Q931_TIMER_T313, Q931_TIMER_T314,
  Q931_TIMER_T315, Q931_TIMER_T316, Q931_TIMER_T317, Q931_TIMER_T318,
  Q931_TIMER_T319, Q931_TIMER_T320, Q931_TIMER_T321, Q931_TIMER_T322
}
enum  q931_ton_t {
  Q931_TON_UNKNOWN = 0x00, Q931_TON_INTERNATIONAL = 0x01, Q931_TON_NATIONAL = 0x02, Q931_TON_NETWORK_SPECIFIC = 0x03,
  Q931_TON_SUBSCRIBER_NUMBER = 0x04, Q931_TON_ABBREVIATED_NUMBER = 0x06, Q931_TON_RESERVED = 0x07
}
enum  q931_npi_t {
  Q931_NUMPLAN_UNKNOWN = 0x00, Q931_NUMPLAN_E164 = 0x01, Q931_NUMPLAN_X121 = 0x03, Q931_NUMPLAN_F69 = 0x04,
  Q931_NUMPLAN_NATIONAL = 0x08, Q931_NUMPLAN_PRIVATE = 0x09, Q931_NUMPLAN_RESERVED = 0x0e
}
enum  q931_pres_t { Q931_PRES_ALLOWED = 0x00, Q931_PRES_RESTRICTED = 0x01, Q931_PRES_NOT_AVAILABLE = 0x02, Q931_PRES_RESERVED = 0x03 }
enum  q931_screen_t { Q931_SCREEN_USER_NOT_SCREENED = 0x00, Q931_SCREEN_USER_VERIFIED_PASSED = 0x01, Q931_SCREEN_USER_VERIFIED_FAILED = 0x02, Q931_SCREEN_NETWORK = 0x03 }
enum  q931_coding_t { Q931_CODING_ITU = 0x00, Q931_CODING_ISO = 0x01, Q931_CODING_NATIONAL = 0x02, Q931_CODING_NETWORK = 0x03 }
enum  q931_hlchar_t {
  Q931_HLCHAR_TELEPHONY = 0x01, Q931_HLCHAR_FAX_G23 = 0x04, Q931_HLCHAR_FAX_G4 = 0x21, Q931_HLCHAR_FAX_G4II = 0x24,
  Q931_HLCHAR_T102 = 0x32, Q931_HLCHAR_T101 = 0x33, Q931_HLCHAR_F60 = 0x35, Q931_HLCHAR_X400 = 0x38,
  Q931_HLCHAR_X200 = 0x41
}
enum  q931_uil1p_t {
  Q931_UIL1P_V110 = 0x01, Q931_UIL1P_I460 = 0x01, Q931_UIL1P_X30 = 0x01, Q931_UIL1P_G711U = 0x02,
  Q931_UIL1P_G711A = 0x03, Q931_UIL1P_G721 = 0x04, Q931_UIL1P_H221 = 0x05, Q931_UIL1P_H242 = 0x05,
  Q931_UIL1P_H223 = 0x06, Q931_UIL1P_H245 = 0x06, Q931_UIL1P_RATE_ADAP = 0x07, Q931_UIL1P_V120 = 0x08,
  Q931_UIL1P_X31 = 0x09
}
enum  q931_itc_t {
  Q931_ITC_SPEECH = 0x00, Q931_ITC_UNRESTRICTED = 0x08, Q931_ITC_RESTRICTED = 0x09, Q931_ITC_3K1_AUDIO = 0x10,
  Q931_ITC_UNRESTRICTED_TONES = 0x11, Q931_ITC_VIDEO = 0x18
}
enum  q931_itr_t {
  Q931_ITR_PACKET = 0x00, Q931_ITR_64K = 0x10, Q931_ITR_128K = 0x11, Q931_ITR_384K = 0x13,
  Q931_ITR_1536K = 0x15, Q931_ITR_1920K = 0x17, Q931_ITR_MULTI = 0x18
}
enum  {
  Q931_CODESET_0 = 0, Q931_CODESET_1, Q931_CODESET_2, Q931_CODESET_3,
  Q931_CODESET_4, Q931_CODESET_5, Q931_CODESET_6, Q931_CODESET_7
}
enum  Q931LogLevel_t {
  Q931_LOG_NONE = -1, Q931_LOG_EMERG, Q931_LOG_ALERT, Q931_LOG_CRIT,
  Q931_LOG_ERROR, Q931_LOG_WARNING, Q931_LOG_NOTICE, Q931_LOG_INFO,
  Q931_LOG_DEBUG
}
enum  Q931NetUser_t { Q931_TE = 0, Q931_NT }
enum  Q931Dialect_t {
  Q931_Dialect_Q931 = 0, Q931_Dialect_National, Q931_Dialect_DMS, Q931_Dialect_5ESS,
  Q931_Dialect_DSS1, Q931_Dialect_Count
}
enum  Q931_TrunkType_t {
  Q931_TrType_E1 = 0, Q931_TrType_T1, Q931_TrType_J1, Q931_TrType_BRI,
  Q931_TrType_BRI_PTMP
}
enum  Q931_TrunkState_t { Q931_TrState_NoAlignment = 0, Q931_TrState_Aligning, Q931_TrState_Aligned }
enum  Q931_ChanType_t { Q931_ChType_NotUsed = 0, Q931_ChType_B, Q931_ChType_D, Q931_ChType_Sync }

Functions

Q931_API const char * q931_error_to_name (q931_error_t error)
Q931_API void Q931TrunkSetAutoSetupAck (Q931_TrunkInfo_t *trunk, L3BOOL enable)
Q931_API void Q931TrunkSetAutoServiceAck (Q931_TrunkInfo_t *trunk, L3BOOL enable)
Q931_API void Q931TrunkSetAutoRestartAck (Q931_TrunkInfo_t *trunk, L3BOOL enable)
Q931_API void Q931TrunkSetAutoConnectAck (Q931_TrunkInfo_t *trunk, L3BOOL enable)
Q931_API void Q931TrunkSetStatusEnquiry (Q931_TrunkInfo_t *trunk, L3BOOL enable)
Q931_API void Q931TrunkSetIgnoreUnknownMsg (Q931_TrunkInfo_t *trunk, L3BOOL enable)
Q931_API void Q931TrunkSetIgnoreUnknownIEs (Q931_TrunkInfo_t *trunk, L3BOOL enable)
Q931_API void Q931TrunkSetIgnoreIllegalIEs (Q931_TrunkInfo_t *trunk, L3BOOL enable)
Q931_API L3BOOL Q931TrunkGetAutoSetupAck (Q931_TrunkInfo_t *trunk)
Q931_API L3BOOL Q931TrunkGetAutoServiceAck (Q931_TrunkInfo_t *trunk)
Q931_API L3BOOL Q931TrunkGetAutoRestartAck (Q931_TrunkInfo_t *trunk)
Q931_API L3BOOL Q931TrunkGetAutoConnectAck (Q931_TrunkInfo_t *trunk)
Q931_API L3BOOL Q931TrunkGetStatusEnquiry (Q931_TrunkInfo_t *trunk)
Q931_API L3BOOL Q931TrunkGetIgnoreUnknownMsg (Q931_TrunkInfo_t *trunk)
Q931_API L3BOOL Q931TrunkGetIgnoreUnknownIEs (Q931_TrunkInfo_t *trunk)
Q931_API L3BOOL Q931TrunkGetIgnoreIllegalIEs (Q931_TrunkInfo_t *trunk)
Q931_API void Q931TrunkSetRelaxedMode (Q931_TrunkInfo_t *trunk, L3BOOL enable)
Q931_API void Q931TimerTick (Q931_TrunkInfo_t *trunk)
Q931_API L3INT Q931Rx23 (Q931_TrunkInfo_t *trunk, L3INT ind, L3UCHAR tei, L3UCHAR *Mes, L3INT Size)
Q931_API L3INT Q931Rx43 (Q931_TrunkInfo_t *trunk, Q931mes_Generic *msg, int size)
void Q931SetError (Q931_TrunkInfo_t *trunk, L3INT ErrID, L3INT ErrPar1, L3INT ErrPar2)
Q931_API void Q931Initialize (void)
Q931_API void Q931SetGetTimeCB (L3ULONG(*callback)(void))
Q931_API L3INT Q931GetMesSize (Q931mes_Generic *msg)
Q931_API L3INT Q931InitMesResume (Q931mes_Generic *msg)
Q931_API L3INT Q931InitMesSetup (Q931mes_Generic *msg)
Q931_API L3INT Q931InitMesRestartAck (Q931mes_Generic *msg)
Q931_API L3INT Q931InitMesGeneric (Q931mes_Generic *msg)
Q931_API L3INT Q931ReleaseCRV (Q931_TrunkInfo_t *trunk, L3INT crv)
Q931_API ie Q931AppendIE (Q931mes_Generic *msg, L3UCHAR *pi)
Q931_API L3INT Q931InitIEBearerCap (Q931ie_BearerCap *ie)
Q931_API L3INT Q931InitIEChanID (Q931ie_ChanID *ie)
Q931_API L3INT Q931InitIEProgInd (Q931ie_ProgInd *ie)
Q931_API L3INT Q931InitIENetFac (Q931ie_NetFac *ie)
Q931_API L3INT Q931InitIEDisplay (Q931ie_Display *ie)
Q931_API L3INT Q931InitIEDateTime (Q931ie_DateTime *ie)
Q931_API L3INT Q931InitIEKeypadFac (Q931ie_KeypadFac *ie)
Q931_API L3INT Q931InitIESignal (Q931ie_Signal *ie)
Q931_API L3INT Q931InitIECallingNum (Q931ie_CallingNum *ie)
Q931_API L3INT Q931InitIECallingSub (Q931ie_CallingSub *ie)
Q931_API L3INT Q931InitIECalledNum (Q931ie_CalledNum *ie)
Q931_API L3INT Q931InitIECalledSub (Q931ie_CalledSub *ie)
Q931_API L3INT Q931InitIETransNetSel (Q931ie_TransNetSel *ie)
Q931_API L3INT Q931InitIELLComp (Q931ie_LLComp *ie)
Q931_API L3INT Q931InitIEHLComp (Q931ie_HLComp *ie)
L3INT Q931Disconnect (Q931_TrunkInfo_t *trunk, L3INT iTo, L3INT iCRV, L3INT iCause)
L3INT Q931Release (Q931_TrunkInfo_t *trunk, struct Q931_Call *call, L3UCHAR causeval)
L3INT Q931ReleaseComplete (Q931_TrunkInfo_t *trunk, struct Q931_Call *call, L3UCHAR causeval)
L3INT Q931AckRestart (Q931_TrunkInfo_t *trunk, Q931mes_Generic *msg)
L3INT Q931AckConnect (struct Q931_Call *call)
L3INT Q931AckSetup (Q931_TrunkInfo_t *trunk, Q931mes_Generic *msg)
L3INT Q931AckService (Q931_TrunkInfo_t *trunk, Q931mes_Generic *msg)
Q931_API L3INT Q931InitTrunk (Q931_TrunkInfo_t *trunk, Q931Dialect_t Dialect, Q931NetUser_t NetUser, Q931_TrunkType_t TrunkType, Q931Tx34CB_t Q931Tx34CBProc, Q931Tx32CB_t Q931Tx32CBProc, Q931ErrorCB_t Q931ErrorCBProc, void *PrivateData32, void *PrivateData34)
Q931_API L3INT Q931Start (Q931_TrunkInfo_t *trunk)
 Start Q.931 Trunk (Send RESTART)
Q931_API void Q931SetLogCB (Q931_TrunkInfo_t *trunk, Q931LogCB_t func, void *priv)
Q931_API void Q931SetLogLevel (Q931_TrunkInfo_t *trunk, Q931LogLevel_t level)
Q931_API Q931LogLevel_t Q931GetLogLevel (Q931_TrunkInfo_t *trunk)
Q931_API const char * Q931GetLogLevelName (Q931_TrunkInfo_t *trunk)
void Q931SetL2HeaderSpace (L3INT space)
L3INT Q931CallSendStatus (const struct Q931_Call *call, const L3UCHAR causeval)
 Send STATUS message with cause code.

Define Documentation

#define ieGetOctet (   x)    ((L3UCHAR)(x))

Definition at line 828 of file Q931.h.

Referenced by Q931Uie_BearerCap().

#define IsQ931Ext (   x)    ((x & 0x80) == 0)

Definition at line 816 of file Q931.h.

Referenced by Q931Uie_BearerCap(), and Q931Uie_LLComp().

#define L3CHAR   char /* Min 8 bit */

Definition at line 171 of file Q931.h.

#define L3INT   int /* Min 16 bit signed */

Definition at line 175 of file Q931.h.

Referenced by Q931AckRestart(), Q931AppendIE(), Q931CallGetStateName(), Q931CallNew(), Q931CallRelease(), Q931Dmes_Generic(), Q931GetMesSize(), Q931GetUniqueCRV(), Q931Log(), Q931MesgHeader(), Q931Pie_BearerCap(), Q931Pie_CalledNum(), Q931Pie_CalledSub(), Q931Pie_CallID(), Q931Pie_CallingNum(), Q931Pie_CallingSub(), Q931Pie_CallState(), Q931Pie_Cause(), Q931Pie_ChangeStatus(), Q931Pie_ChanID(), Q931Pie_CongLevel(), Q931Pie_DateTime(), Q931Pie_Display(), Q931Pie_HLComp(), Q931Pie_KeypadFac(), Q931Pie_LLComp(), Q931Pie_NetFac(), Q931Pie_NotifInd(), Q931Pie_ProgInd(), Q931Pie_RepeatInd(), Q931Pie_RestartInd(), Q931Pie_Segment(), Q931Pie_Signal(), Q931Pie_TransNetSel(), Q931Pie_UserUser(), Q931Pmes_Generic(), Q931Proc(), Q931ProcAlertingNT(), Q931ProcAlertingTE(), Q931ProcCallProceedingNT(), Q931ProcCallProceedingTE(), Q931ProcCongestionControlNT(), Q931ProcCongestionControlTE(), Q931ProcConnectAckNT(), Q931ProcConnectAckTE(), Q931ProcConnectNT(), Q931ProcConnectTE(), Q931ProcDisconnectNT(), Q931ProcDisconnectTE(), Q931ProcInformationNT(), Q931ProcInformationTE(), Q931ProcNotifyNT(), Q931ProcNotifyTE(), Q931ProcProgressNT(), Q931ProcProgressTE(), Q931ProcReleaseCompleteNT(), Q931ProcReleaseCompleteTE(), Q931ProcReleaseNT(), Q931ProcReleaseTE(), Q931ProcRestartAckNT(), Q931ProcRestartAckTE(), Q931ProcRestartNT(), Q931ProcRestartTE(), Q931ProcResumeAckNT(), Q931ProcResumeAckTE(), Q931ProcResumeNT(), Q931ProcResumeRejectNT(), Q931ProcResumeRejectTE(), Q931ProcResumeTE(), Q931ProcSegmentNT(), Q931ProcSegmentTE(), Q931ProcSetupAckNT(), Q931ProcSetupAckTE(), Q931ProcSetupNT(), Q931ProcSetupTE(), Q931ProcStatusEnquiryNT(), Q931ProcStatusEnquiryTE(), Q931ProcStatusNT(), Q931ProcStatusTE(), Q931ProcSuspendAckNT(), Q931ProcSuspendAckTE(), Q931ProcSuspendNT(), Q931ProcSuspendRejectNT(), Q931ProcSuspendRejectTE(), Q931ProcSuspendTE(), Q931ProcUserInformationNT(), Q931ProcUserInformationTE(), Q931ReadExt(), Q931Rx23(), Q931Rx43(), Q931TimerTick(), Q931Tx32(), Q931Uie_BearerCap(), Q931Uie_CalledNum(), Q931Uie_CalledSub(), Q931Uie_CallID(), Q931Uie_CallingNum(), Q931Uie_CallingSub(), Q931Uie_CallState(), Q931Uie_Cause(), Q931Uie_ChangeStatus(), Q931Uie_ChanID(), Q931Uie_CongLevel(), Q931Uie_CRV(), Q931Uie_DateTime(), Q931Uie_Display(), Q931Uie_Generic(), Q931Uie_GenericDigits(), Q931Uie_HLComp(), Q931Uie_KeypadFac(), Q931Uie_LLComp(), Q931Uie_NetFac(), Q931Uie_NotifInd(), Q931Uie_ProgInd(), Q931Uie_RepeatInd(), Q931Uie_RestartInd(), Q931Uie_Segment(), Q931Uie_SendComplete(), Q931Uie_Signal(), Q931Uie_TransNetSel(), Q931Uie_UserUser(), Q931Umes_Generic(), Q932ProcFacilityNT(), Q932ProcFacilityTE(), Q932ProcHoldAckNT(), Q932ProcHoldAckTE(), Q932ProcHoldNT(), Q932ProcHoldRejectNT(), Q932ProcHoldRejectTE(), Q932ProcHoldTE(), Q932ProcRegisterNT(), Q932ProcRegisterTE(), Q932ProcRetrieveAckNT(), Q932ProcRetrieveAckTE(), Q932ProcRetrieveNT(), Q932ProcRetrieveRejectNT(), Q932ProcRetrieveRejectTE(), Q932ProcRetrieveTE(), Q932Umes_Facility(), Q932Umes_Hold(), Q932Umes_HoldAck(), Q932Umes_HoldReject(), Q932Umes_Register(), Q932Umes_Retrieve(), Q932Umes_RetrieveAck(), and Q932Umes_RetrieveReject().

#define L3TRUE   1

Definition at line 179 of file Q931.h.

Referenced by Q931DialectIsEventLegal(), and Q931DialectRegistryInit().

#define L3UINT   unsigned int /* Min 16 bit unsigned */

Definition at line 174 of file Q931.h.

#define L3ULONG   unsigned long /* Min 32 bit */

Definition at line 176 of file Q931.h.

Referenced by Q931CallRestartTimer(), Q931CallStartTimer(), Q931GetTime(), and Q931TimerTick().

#define L3USHORT   unsigned short /* Min 16 bit unsigned */

Definition at line 173 of file Q931.h.

Referenced by Q931Uie_CRV().

#define Q931_BRI_MAX_CRV   127

Definition at line 234 of file Q931.h.

Referenced by Q931GetUniqueCRV().

#define Q931_CODESET_ALL   0x07

Definition at line 476 of file Q931.h.

Referenced by Q931DialectAddCodeset().

#define Q931_IS_BRI (   x)    ((x)->TrunkType == Q931_TrType_BRI || (x)->TrunkType == Q931_TrType_BRI_PTMP)

Definition at line 228 of file Q931.h.

Referenced by Q931GetUniqueCRV(), and Q931MesgHeader().

#define Q931_IS_PRI (   x)    (!Q931_IS_BRI(x))

Definition at line 229 of file Q931.h.

Referenced by Q931Start().

#define Q931_IS_PTMP (   X)    ((x)->TrunkType == Q931_TrType_BRI_PTMP)

Definition at line 232 of file Q931.h.

#define Q931_IS_PTP (   x)    ((x)->TrunkType != Q931_TrType_BRI_PTMP)

Definition at line 231 of file Q931.h.

Referenced by Q931ProcSetupNT().

#define Q931_LOGBUFSIZE   1024 /* size of logging buffer */

Definition at line 207 of file Q931.h.

Referenced by Q931Log().

#define Q931_PRI_MAX_CRV   32767

Definition at line 235 of file Q931.h.

Referenced by Q931GetUniqueCRV().

#define Q931GetIEOffset (   x)    (x & 0x7fff)

Definition at line 781 of file Q931.h.

#define Q931GetIEPtr (   ie,
  buf 
)    ((void *)&buf[Q931GetIEOffset(ie)])

Definition at line 793 of file Q931.h.

Referenced by Q931ProcStatusTE().

#define Q931GetIETotSize (   ie)    (((ie.InfoID & 0x80) != 0) ? 1 : ie.LenIE) + 2)

Definition at line 754 of file Q931.h.

#define Q931GetIEValue (   x)    (x & 0x7fff)

Definition at line 782 of file Q931.h.

#define Q931IsIEPresent (   x)    ((x & 0x8000) != 0)

Definition at line 765 of file Q931.h.

Referenced by Q931ProcStatusTE().

#define Q931L2BUF   300 /* size of message buffer */

Definition at line 211 of file Q931.h.

Definition at line 222 of file Q931.h.

Referenced by Q931DumpAllCalls(), Q931GetCallByCRV(), and Q931TimerTick().

#define Q931MAXCHPERTRUNK   32 /* Number of channels per trunk. The */

Definition at line 217 of file Q931.h.

Referenced by Q931InitTrunk().

#define Q931MAXCODESETS   7 /* Maximum number of codests (by spec, 0-7) */

Definition at line 265 of file Q931.h.

#define Q931MAXDLCT   8 /* Max dialects included in this */

Definition at line 258 of file Q931.h.

Referenced by Q931DialectGet(), Q931DialectRegister(), and Q931DialectRegistryInit().

#define Q931MAXIE   255 /* Number of IE */

Definition at line 263 of file Q931.h.

Referenced by Q931Pmes_Generic(), and Q931Umes_Generic().

#define Q931MAXMES   128 /* Number of messages */

Definition at line 262 of file Q931.h.

#define Q931MAXSTATE   100 /* Size of state tables */

Definition at line 266 of file Q931.h.

Referenced by Q931DialectAddStateEntry(), and Q931DialectIsEventLegal().

#define Q931MAXTIMER   25 /* Maximum number of timers */

Definition at line 267 of file Q931.h.

Referenced by Q931DialectSetTimerProcAll().

#define Q931MAXTRUNKS   4 /* Total number of trunks that will be */

Definition at line 213 of file Q931.h.

#define Q931MAXUSEDIE   50 /* Maximum number of ie types per Dialect */

Definition at line 264 of file Q931.h.

#define Q931mes_ALERTING   0x01 /* 0000 0001 */

Definition at line 276 of file Q931.h.

Referenced by ATT5ESSCreateTE(), Q931CreateNT(), and Q931CreateTE().

#define Q931mes_CALL_PROCEEDING   0x02 /* 0000 0010 */

Definition at line 277 of file Q931.h.

Referenced by ATT5ESSCreateTE(), Q931CreateNT(), and Q931CreateTE().

#define Q931mes_CONGESTION_CONTROL   0x79 /* 0111 1001 */

Definition at line 295 of file Q931.h.

Referenced by ATT5ESSCreateTE(), Q931CreateNT(), and Q931CreateTE().

#define Q931mes_CONNECT   0x07 /* 0000 0111 */

Definition at line 278 of file Q931.h.

Referenced by ATT5ESSCreateTE(), Q931CreateNT(), and Q931CreateTE().

#define Q931mes_CONNECT_ACKNOWLEDGE   0x0f /* 0000 1111 */

Definition at line 279 of file Q931.h.

Referenced by ATT5ESSCreateTE(), Q931AckConnect(), Q931CreateNT(), and Q931CreateTE().

#define Q931mes_FACILITY   0x62 /* 0110 0010 */

Definition at line 301 of file Q931.h.

Referenced by ATT5ESSCreateTE().

#define Q931mes_FACILITY_ACKNOWLEDGE   0x6a /* 0110 1010 */

Definition at line 307 of file Q931.h.

Referenced by ATT5ESSCreateTE().

#define Q931mes_FACILITY_REJECT   0x72 /* 0111 0010 */

Definition at line 308 of file Q931.h.

Referenced by ATT5ESSCreateTE().

#define Q931mes_INFORMATION   0x7b /* 0111 1011 */

Definition at line 296 of file Q931.h.

Referenced by Q931CreateNT(), and Q931CreateTE().

#define Q931mes_NOTIFY   0x6e /* 0110 1110 */

Definition at line 297 of file Q931.h.

Referenced by Q931CreateNT(), and Q931CreateTE().

#define Q931mes_PROGRESS   0x03 /* 0000 0011 */

Definition at line 280 of file Q931.h.

Referenced by ATT5ESSCreateTE(), Q931CreateNT(), and Q931CreateTE().

#define Q931mes_REGISTER   0x64 /* 0110 0100 */

Definition at line 309 of file Q931.h.

Referenced by ATT5ESSCreateTE().

#define Q931mes_RELEASE_COMPLETE   0x5a /* 0101 1010 */

Definition at line 292 of file Q931.h.

Referenced by ATT5ESSCreateTE(), Q931CreateNT(), Q931CreateTE(), Q931ReleaseComplete(), and Q931Rx23().

#define Q931mes_RESTART   0x46 /* 0100 0110 */

Definition at line 293 of file Q931.h.

Referenced by ATT5ESSCreateTE(), Q931CreateNT(), Q931CreateTE(), and Q931Start().

#define Q931mes_RESTART_ACKNOWLEDGE   0x4e /* 0100 1110 */
#define Q931mes_RESUME   0x26 /* 0010 0110 */

Definition at line 283 of file Q931.h.

Referenced by Q931CreateNT(), Q931CreateTE(), and Q931InitMesResume().

#define Q931mes_RESUME_ACKNOWLEDGE   0x2e /* 0010 1110 */

Definition at line 284 of file Q931.h.

Referenced by Q931CreateNT(), and Q931CreateTE().

#define Q931mes_RESUME_REJECT   0x22 /* 0010 0010 */

Definition at line 285 of file Q931.h.

Referenced by Q931CreateNT(), and Q931CreateTE().

#define Q931mes_SEGMENT   0x60 /* 0110 0000 */

Definition at line 300 of file Q931.h.

Referenced by Q931CreateNT(), and Q931CreateTE().

#define Q931mes_SERVICE   0x0f /* 0000 1111 (ProtDisc 3) */

Definition at line 304 of file Q931.h.

#define Q931mes_SERVICE_ACKNOWLEDGE   0x07 /* 0000 0111 (ProtDisc 3) */

Definition at line 305 of file Q931.h.

Referenced by Q931AckService().

#define Q931mes_SETUP   0x05 /* 0000 0101 */

Definition at line 281 of file Q931.h.

Referenced by ATT5ESSCreateTE(), Q931CreateNT(), Q931CreateTE(), and Q931Rx23().

#define Q931mes_SETUP_ACKNOWLEDGE   0x0d /* 0000 1101 */

Definition at line 282 of file Q931.h.

Referenced by Q931AckSetup(), Q931CreateNT(), and Q931CreateTE().

#define Q931mes_STATUS   0x7d /* 0111 1101 */
#define Q931mes_STATUS_ENQUIRY   0x75 /* 0111 0101 */

Definition at line 299 of file Q931.h.

Referenced by ATT5ESSCreateTE(), Q931CreateNT(), Q931CreateTE(), and Q931Rx23().

#define Q931mes_SUSPEND   0x25 /* 0010 0101 */

Definition at line 286 of file Q931.h.

Referenced by Q931CreateNT(), and Q931CreateTE().

#define Q931mes_SUSPEND_ACKNOWLEDGE   0x2d /* 0010 1101 */

Definition at line 287 of file Q931.h.

Referenced by Q931CreateNT(), and Q931CreateTE().

#define Q931mes_SUSPEND_REJECT   0x21 /* 0010 0001 */

Definition at line 288 of file Q931.h.

Referenced by Q931CreateNT(), and Q931CreateTE().

#define Q931mes_USER_INFORMATION   0x20 /* 0010 0000 */

Definition at line 289 of file Q931.h.

Referenced by ATT5ESSCreateTE(), Q931CreateNT(), and Q931CreateTE().


Typedef Documentation

typedef L3USHORT ie

Definition at line 188 of file Q931.h.

Definition at line 585 of file Q931.h.

typedef L3INT(* Q931ErrorCB_t)(void *, L3INT, L3INT, L3INT)

Definition at line 676 of file Q931.h.

typedef L3INT(* Q931LogCB_t)(void *, Q931LogLevel_t, const char *, L3INT)

Definition at line 677 of file Q931.h.

typedef L3INT(* Q931Tx32CB_t)(void *, L3INT, L3UCHAR, L3UCHAR *, L3INT)

Definition at line 675 of file Q931.h.

typedef L3INT(* Q931Tx34CB_t)(void *, struct Q931_Call *call, Q931mes_Generic *, int)

Definition at line 674 of file Q931.h.


Enumeration Type Documentation

anonymous enum

Generic Q.931 Timers

Note:
hmm, probably private, depending on the event api
Enumerator:
Q931_TIMER_NONE 
Q931_TIMER_T300 
Q931_TIMER_T301 
Q931_TIMER_T302 
Q931_TIMER_T303 
Q931_TIMER_T304 
Q931_TIMER_T305 
Q931_TIMER_T306 
Q931_TIMER_T307 
Q931_TIMER_T308 
Q931_TIMER_T309 
Q931_TIMER_T310 
Q931_TIMER_T311 
Q931_TIMER_T312 
Q931_TIMER_T313 
Q931_TIMER_T314 
Q931_TIMER_T315 
Q931_TIMER_T316 
Q931_TIMER_T317 
Q931_TIMER_T318 
Q931_TIMER_T319 
Q931_TIMER_T320 
Q931_TIMER_T321 
Q931_TIMER_T322 

Definition at line 316 of file Q931.h.

anonymous enum

Q.931 Codesets

Enumerator:
Q931_CODESET_0 
Q931_CODESET_1 
Q931_CODESET_2 
Q931_CODESET_3 
Q931_CODESET_4 
Q931_CODESET_5 
Q931_CODESET_6 
Q931_CODESET_7 

Definition at line 466 of file Q931.h.

Channel type

Enumerator:
Q931_ChType_NotUsed 

Unused Channel

Q931_ChType_B 

B Channel (Voice)

Q931_ChType_D 

D Channel (Signalling)

Q931_ChType_Sync 

Sync Channel

Definition at line 643 of file Q931.h.

Q.931 Coding Standard

Enumerator:
Q931_CODING_ITU 
Q931_CODING_ISO 
Q931_CODING_NATIONAL 
Q931_CODING_NETWORK 

Definition at line 392 of file Q931.h.

Enumerator:
Q931E_NO_ERROR 
Q931E_UNKNOWN_MESSAGE 
Q931E_ILLEGAL_IE 
Q931E_UNKNOWN_IE 
Q931E_BEARERCAP 
Q931E_HLCOMP 
Q931E_LLCOMP 
Q931E_INTERNAL 
Q931E_MISSING_CB 
Q931E_UNEXPECTED_MESSAGE 
Q931E_ILLEGAL_MESSAGE 
Q931E_TOMANYCALLS 
Q931E_INVALID_CRV 
Q931E_CALLID 
Q931E_CALLSTATE 
Q931E_CALLEDSUB 
Q931E_CALLEDNUM 
Q931E_CALLINGNUM 
Q931E_CALLINGSUB 
Q931E_CAUSE 
Q931E_CHANID 
Q931E_DATETIME 
Q931E_DISPLAY 
Q931E_KEYPADFAC 
Q931E_NETFAC 
Q931E_NOTIFIND 
Q931E_PROGIND 
Q931E_RESTARTIND 
Q931E_SEGMENT 
Q931E_SIGNAL 
Q931E_GENERIC_DIGITS 
Q931E_MANDATORY_IE_MISSING 
Q931E_UNRECOGNIZED_MESSAGE 

Definition at line 118 of file Q931.h.

Q.931 High layer characteristik id

Enumerator:
Q931_HLCHAR_TELEPHONY 
Q931_HLCHAR_FAX_G23 
Q931_HLCHAR_FAX_G4 
Q931_HLCHAR_FAX_G4II 
Q931_HLCHAR_T102 
Q931_HLCHAR_T101 
Q931_HLCHAR_F60 
Q931_HLCHAR_X400 
Q931_HLCHAR_X200 

Definition at line 402 of file Q931.h.

enum q931_itc_t

Q.931 Information Transfer Capability

Enumerator:
Q931_ITC_SPEECH 
Q931_ITC_UNRESTRICTED 
Q931_ITC_RESTRICTED 
Q931_ITC_3K1_AUDIO 
Q931_ITC_UNRESTRICTED_TONES 
Q931_ITC_VIDEO 

Definition at line 441 of file Q931.h.

enum q931_itr_t

Q.931 Information transfer rate

Enumerator:
Q931_ITR_PACKET 
Q931_ITR_64K 
Q931_ITR_128K 
Q931_ITR_384K 
Q931_ITR_1536K 
Q931_ITR_1920K 
Q931_ITR_MULTI 

Definition at line 453 of file Q931.h.

enum q931_npi_t

Q.931 Numbering Plan

Enumerator:
Q931_NUMPLAN_UNKNOWN 
Q931_NUMPLAN_E164 
Q931_NUMPLAN_X121 
Q931_NUMPLAN_F69 
Q931_NUMPLAN_NATIONAL 
Q931_NUMPLAN_PRIVATE 
Q931_NUMPLAN_RESERVED 

Definition at line 359 of file Q931.h.

Q.931 Presentation Indicator

Enumerator:
Q931_PRES_ALLOWED 
Q931_PRES_RESTRICTED 
Q931_PRES_NOT_AVAILABLE 
Q931_PRES_RESERVED 

Definition at line 372 of file Q931.h.

Q.931 Screening Indicator

Enumerator:
Q931_SCREEN_USER_NOT_SCREENED 
Q931_SCREEN_USER_VERIFIED_PASSED 
Q931_SCREEN_USER_VERIFIED_FAILED 
Q931_SCREEN_NETWORK 

Definition at line 382 of file Q931.h.

enum q931_ton_t

Q.931 ToN

Enumerator:
Q931_TON_UNKNOWN 
Q931_TON_INTERNATIONAL 
Q931_TON_NATIONAL 
Q931_TON_NETWORK_SPECIFIC 
Q931_TON_SUBSCRIBER_NUMBER 
Q931_TON_ABBREVIATED_NUMBER 
Q931_TON_RESERVED 

Definition at line 346 of file Q931.h.

Trunk state

Enumerator:
Q931_TrState_NoAlignment 

Trunk not aligned

Q931_TrState_Aligning 

Aligning in progress

Q931_TrState_Aligned 

Trunk Aligned

Definition at line 634 of file Q931.h.

Trunk line type

Enumerator:
Q931_TrType_E1 

0 : E1 Trunk

Q931_TrType_T1 

1 : T1 Trunk

Q931_TrType_J1 

2 : J1 Trunk

Q931_TrType_BRI 

3 : BRI Trunk

Q931_TrType_BRI_PTMP 

4 : BRI PTMP Trunk

Definition at line 623 of file Q931.h.

Q.931 User information layer 1 protocol

Enumerator:
Q931_UIL1P_V110 
Q931_UIL1P_I460 
Q931_UIL1P_X30 
Q931_UIL1P_G711U 
Q931_UIL1P_G711A 
Q931_UIL1P_G721 
Q931_UIL1P_H221 
Q931_UIL1P_H242 
Q931_UIL1P_H223 
Q931_UIL1P_H245 
Q931_UIL1P_RATE_ADAP 
Q931_UIL1P_V120 
Q931_UIL1P_X31 

Definition at line 417 of file Q931.h.

Enumerator:
Q931_Dialect_Q931 
Q931_Dialect_National 
Q931_Dialect_DMS 
Q931_Dialect_5ESS 
Q931_Dialect_DSS1 

DSS1 (aka EuroISDN)

Q931_Dialect_Count 

Definition at line 610 of file Q931.h.

Loglevel

Enumerator:
Q931_LOG_NONE 
Q931_LOG_EMERG 
Q931_LOG_ALERT 
Q931_LOG_CRIT 
Q931_LOG_ERROR 
Q931_LOG_WARNING 
Q931_LOG_NOTICE 
Q931_LOG_INFO 
Q931_LOG_DEBUG 

Definition at line 590 of file Q931.h.

Network/User mode

Enumerator:
Q931_TE 

0 : User Mode

Q931_NT 

1 : Network Mode

Definition at line 605 of file Q931.h.


Function Documentation

Q931_API const char* q931_error_to_name ( q931_error_t  error)

Return description of error code

Parameters:
[in]errorError code
Returns:
Description of error code or empty string on error

Definition at line 731 of file Q931.c.

References Q931_MAX_ERROR.

L3INT Q931CallSendStatus ( const struct Q931_Call call,
const L3UCHAR  causeval 
)

Send STATUS message with cause code.

Q931CallSendStatus

Parameters:
[in]callQ.931 call handle
[in]causevalQ.850 cause code
Returns:
>= 0 on success, < 0 on error
Note:
Let's see... this is how the L4 api stuff is supposed to look (custom IEs missing here)
Todo:
Naming s*cks a bit... (maybe use a new prefix (instead of "Q931Call") for layer4 call control related stuff)

Definition at line 464 of file Q931api.c.

References Q931ie_CallState::CallState, Q931mes_Generic::CallState, Q931mes_Generic::Cause, Q931ie_CallState::CodStand, Q931ie_Cause::CodStand, Q931mes_Generic::CRVFlag, Q931ie_Cause::Diag, Q931ie_CallState::IEId, Q931ie_Cause::IEId, L3UCHAR, Q931ie_Cause::Location, Q931mes_Generic::MesType, Q931_CODING_ITU, Q931AppendIE(), Q931CallGetState(), Q931CallGetTrunk(), Q931CallIsOutgoing(), Q931ie_CALL_STATE, Q931ie_CAUSE, Q931InitMesGeneric(), Q931L4BUF, Q931mes_STATUS, Q931Tx32(), Q931ie_Cause::Recom, Q931ie_CallState::Size, Q931ie_Cause::Size, Q931mes_Generic::Size, and Q931ie_Cause::Value.

L3INT Q931Disconnect ( Q931_TrunkInfo_t trunk,
L3INT  iTo,
L3INT  iCRV,
L3INT  iCause 
)

Definition at line 357 of file Q931api.c.

Referenced by Q931ProcSetupNT(), Q931ProcSetupTE(), and Q931Rx23().

Get log level

Parameters:
[in]trunkQ.931 trunk
Returns:
current log level set on trunk

Definition at line 836 of file Q931.c.

References Q931_TrunkInfo::loglevel, and Q931_LOG_NONE.

Q931_API const char* Q931GetLogLevelName ( Q931_TrunkInfo_t trunk)

Get name of log level set on trunk

Parameters:
[in]trunkQ.931 trunk
Todo:
Make this a generic function e.g.: const char *Q931GetLogLevelName(q931_loglevel_t level)

Definition at line 865 of file Q931.c.

References Q931_TrunkInfo::loglevel, and Q931_LOG_NONE.

Q931_API void Q931Initialize ( void  )

Initialize Q.931 stack

Note:
Call once before using any other function!

Definition at line 178 of file Q931.c.

References ATT5ESSCreateTE(), Q931_Dialect_5ESS, Q931_Dialect_Q931, Q931_NT, Q931_TE, Q931CreateNT(), Q931CreateTE(), Q931DialectRegister(), and Q931DialectRegistryInit().

Release a CRV (= call)

Parameters:
[in]trunkQ.931 trunk
[in]crvCRV to release
Returns:
Q931E_NO_ERROR on success, Q931E_INVALID_CRV if call does not exist

Definition at line 635 of file Q931.c.

References Q931_Call::InUse, Q931E_INVALID_CRV, Q931E_NO_ERROR, and Q931GetCallByCRV().

Q931_API L3INT Q931Rx23 ( Q931_TrunkInfo_t trunk,
L3INT  ind,
L3UCHAR  tei,
L3UCHAR buf,
L3INT  Size 
)

Receive message from Q.921 (Layer 2) stack

Parameters:
[in]trunkQ.931 trunk
[in]indType of Q.921 message: Q921_DL_UNIT_DATA, Q921_DL_DATA
[in]teiTEI this message is coming in on
[in]bufMessage buffer
[in]SizeSize of message
Returns:
Q931E_NO_ERROR on success, Q931E_* otherwise

Definition at line 267 of file Q931.c.

References Q931mes_Generic::buf, Q931mes_Generic::CRV, Q931mes_Generic::CRVFlag, Q931_TrunkInfo::Dialect, Q931_CallEvent::id, Q931_TrunkInfo::L3Buf, L3INT, L3UCHAR, Q931mes_Generic::MesType, MSGF_FROM_L2, Q931mes_Generic::ProtDisc, Q850_CAUSE_IE_NONEXIST, Q850_CAUSE_INVALID_IE_CONTENTS, Q850_CAUSE_MANDATORY_IE_MISSING, Q850_CAUSE_MESSAGE_TYPE_NONEXIST, Q850_CAUSE_WRONG_MESSAGE, Q921_DL_DATA, Q921_DL_UNIT_DATA, Q931_EVENT_RELEASE_CRV, Q931_EVENT_TYPE_CRV, Q931_LOG_DEBUG, Q931_MSG_FROM_L2, Q931_U0, Q931CallGetCRV(), Q931CallGetState(), Q931CallGetStateName(), Q931CallIsGlobal(), Q931CallIsOutgoing(), Q931CallNewIncoming(), Q931CallRelease(), Q931CallSendEvent(), Q931CallSendQueuedEvents(), Q931DialectGetName(), Q931Disconnect(), Q931E_ILLEGAL_IE, Q931E_INTERNAL, Q931E_INVALID_CRV, Q931E_MANDATORY_IE_MISSING, Q931E_NO_ERROR, Q931E_UNEXPECTED_MESSAGE, Q931E_UNKNOWN_IE, Q931E_UNRECOGNIZED_MESSAGE, Q931GetCallByCRV(), Q931GetGlobalCall(), Q931InitMesGeneric(), Q931L2HeaderSpace, Q931Log(), Q931mes_RELEASE, Q931mes_RELEASE_COMPLETE, Q931mes_SETUP, Q931mes_STATUS_ENQUIRY, Q931MesgErrorsInit(), Q931MesgErrorsPrint(), Q931Proc(), Q931StatusEnquiryResponse(), Q931TrunkGetStatusEnquiry(), Q931Tx32(), Q931Uie_CRV(), Q931Umes(), Q931mes_Generic::Size, and Q931mes_Generic::Tei.

void Q931SetError ( Q931_TrunkInfo_t trunk,
L3INT  ErrID,
L3INT  ErrPar1,
L3INT  ErrPar2 
)

Used by the stack to indicate an error

Parameters:
[in]trunkQ.931 trunk
[in]ErrIDID of error (Q931E_*)
[in]ErrPar1Parameter1
[in]ErrPar2Parameter2

Definition at line 621 of file Q931.c.

References Q931_TrunkInfo::PrivateData34, and Q931_TrunkInfo::Q931ErrorCBProc.

Referenced by Q931Pie_LLComp(), Q931Uie_BearerCap(), Q931Uie_GenericDigits(), Q931Uie_HLComp(), and Q931Uie_LLComp().

Q931_API void Q931SetGetTimeCB ( L3ULONG(*)(void)  callback)

Set timer callback

Parameters:
[in]callbackcallback function used to get the current time in milliseconds
Note:
Required, timers won't work without a valid callback

Definition at line 675 of file Q931.c.

References Q931GetTimeProc.

void Q931SetL2HeaderSpace ( L3INT  space)

Definition at line 86 of file Q931.c.

References Q931L2HeaderSpace.

Q931_API void Q931SetLogCB ( Q931_TrunkInfo_t trunk,
Q931LogCB_t  func,
void *  priv 
)

Set Logging callback function and private data

Parameters:
[in]trunkQ.931 trunk
[in]funcLog callback function
[in]privOptional private data passed to logging function

Definition at line 804 of file Q931.c.

References Q931_TrunkInfo::PrivateDataLog, and Q931_TrunkInfo::Q931LogCBProc.

Set log level

Parameters:
[in]trunkQ.931 trunk
[in]levelLog level

Definition at line 816 of file Q931.c.

References Q931_TrunkInfo::loglevel, Q931_LOG_DEBUG, and Q931_LOG_NONE.

Q931_API void Q931TrunkSetAutoSetupAck ( Q931_TrunkInfo_t trunk,
L3BOOL  enable 
)
Q931_API void Q931TrunkSetRelaxedMode ( Q931_TrunkInfo_t trunk,
L3BOOL  enable 
)

Relax IE and Message checks: incoming unknown messages and unknown/invalid IEs will be ignored

Parameters:
[in]trunkQ.931 Trunk handle
[in]enableEnable or disable Relaxed mode (Q931_TRUE / Q931_FALSE)
Note:
Use with care!

Definition at line 997 of file Q931.c.

References Q931_TFLAG_IGNORE_ILLEGAL_IE, Q931_TFLAG_IGNORE_UNKNOWN_IE, Q931_TFLAG_IGNORE_UNKNOWN_MSG, Q931TrunkClearFlag(), and Q931TrunkSetFlag().