Yate
SS7TCAP Class Referenceabstract

SS7 TCAP implementation. More...

#include <yatesig.h>

Inheritance diagram for SS7TCAP:
SCCPUser SignallingComponent RefObject DebugEnabler GenObject SS7TCAPANSI SS7TCAPITU

Public Types

enum  TCAPType { UnknownTCAP , ITUTCAP , ANSITCAP }
 
enum  TCAPUserCompActions {
  TC_Invoke = 1 , TC_ResultLast = 2 , TC_U_Error = 3 , TC_U_Reject = 4 ,
  TC_R_Reject = 5 , TC_L_Reject = 6 , TC_InvokeNotLast = 7 , TC_ResultNotLast = 8 ,
  TC_L_Cancel = 9 , TC_U_Cancel = 10 , TC_TimerReset = 11
}
 
enum  TCAPUserTransActions {
  TC_Unknown = 0 , TC_Unidirectional = 1 , TC_Begin , TC_QueryWithPerm ,
  TC_QueryWithoutPerm , TC_Continue , TC_ConversationWithPerm , TC_ConversationWithoutPerm ,
  TC_End , TC_Response , TC_U_Abort , TC_P_Abort ,
  TC_Notice
}
 
enum  TCAPComponentOperationClass { SuccessOrFailureReport = 1 , FailureOnlyReport = 2 , SuccessOnlyReport = 3 , NoReport = 4 }
 
enum  TCAPCounter {
  IncomingMsgs , OutgoingMsgs , DiscardedMsgs , NormalMsgs ,
  AbnormalMsgs
}
 

Public Member Functions

 SS7TCAP (const NamedList &params)
 
virtual ~SS7TCAP ()
 
virtual bool initialize (const NamedList *config)
 
virtual bool sendData (DataBlock &data, NamedList &params)
 
virtual HandledMSU receivedData (DataBlock &data, NamedList &params)
 
virtual HandledMSU notifyData (DataBlock &data, NamedList &params)
 
bool managementNotify (SCCP::Type type, NamedList &params)
 
void attach (TCAPUser *user)
 
void detach (TCAPUser *user)
 
virtual SS7TCAPError userRequest (NamedList &requestParams)
 
virtual HandledMSU processSCCPData (SS7TCAPMessage *sccpData)
 
TCAPType tcapType ()
 
void setTCAPType (TCAPType type)
 
virtual void enqueue (SS7TCAPMessage *msg)
 
virtual SS7TCAPMessagedequeue ()
 
virtual const String allocTransactionID ()
 
void allocTransactionID (String &str)
 
virtual SS7TCAPTransactionbuildTransaction (SS7TCAP::TCAPUserTransActions type, const String &transactID, NamedList &params, bool initLocal=true)=0
 
SS7TCAPTransactiongetTransaction (const String &tid)
 
void removeTransaction (SS7TCAPTransaction *tr)
 
virtual void timerTick (const Time &when)
 
virtual bool sendToUser (NamedList &params)
 
virtual void buildSCCPData (NamedList &params, SS7TCAPTransaction *tr)
 
virtual void status (NamedList &status)
 
virtual void userStatus (NamedList &status)
 
virtual HandledMSU handleError (SS7TCAPError &error, NamedList &params, DataBlock &data, SS7TCAPTransaction *tr=0)
 
virtual void updateUserStatus (TCAPUser *user, SCCPManagement::LocalBroadcast status, NamedList &params)
 
void incCounter (TCAPCounter counterType)
 
unsigned int count (TCAPCounter counterType)
 
- Public Member Functions inherited from SCCPUser
 SCCPUser (const NamedList &params)
 
virtual ~SCCPUser ()
 
virtual bool sccpNotify (SCCP::Type type, NamedList &params)
 
virtual void attach (SCCP *sccp)
 
SCCPsccp () const
 
- Public Member Functions inherited from SignallingComponent
virtual ~SignallingComponent ()
 
virtual const StringtoString () const
 
virtual bool control (NamedList &params)
 
virtual NamedListcontrolCreate (const char *oper=0)
 
virtual bool controlExecute (NamedList *params)
 
virtual void engine (SignallingEngine *eng)
 
SignallingEngineengine () const
 
int debugLevel (int level)
 
const StringcomponentType () const
 
- Public Member Functions inherited from RefObject
 RefObject ()
 
virtual ~RefObject ()
 
virtual void * getObject (const String &name) const
 
virtual bool alive () const
 
bool ref ()
 
bool deref ()
 
int refcount () const
 
virtual void destruct ()
 
- Public Member Functions inherited from GenObject
 GenObject ()
 
virtual ~GenObject ()
 
virtual const StringtraceId () const
 
NamedCountergetObjCounter () const
 
NamedCountersetObjCounter (NamedCounter *counter)
 
- Public Member Functions inherited from DebugEnabler
 DebugEnabler (int level=TelEngine::debugLevel(), bool enabled=true)
 
int debugLevel () const
 
int debugLevel (int level)
 
bool debugEnabled () const
 
void debugEnabled (bool enable)
 
const char * debugName () const
 
bool debugAt (int level) const
 
bool debugChained () const
 
void debugChain (const DebugEnabler *chain=0)
 
void debugCopy (const DebugEnabler *original=0)
 

Static Public Member Functions

static const char * lookupTransaction (int tr)
 
static int lookupTransaction (const char *tr)
 
static const char * lookupComponent (int comp)
 
static int lookupComponent (const char *comp)
 
- Static Public Member Functions inherited from SignallingComponent
static bool resolveConfig (const String &cmpName, NamedList &params, const NamedList *config)
 
- Static Public Member Functions inherited from RefObject
static bool alive (const RefObject *obj)
 
static bool efficientIncDec ()
 
- Static Public Member Functions inherited from GenObject
static void * getObject (const String &name, const GenObject *obj)
 
static bool getObjCounting ()
 
static void setObjCounting (bool enable)
 
static NamedCountergetObjCounter (const String &name, bool create=true)
 
static ObjListgetObjCounters ()
 

Static Public Attributes

static const TokenDict s_tcapVersion []
 
static const TokenDict s_compPrimitives []
 
static const TokenDict s_transPrimitives []
 
static const TokenDict s_compOperClasses []
 

Protected Member Functions

virtual SS7TCAPError decodeTransactionPart (NamedList &params, DataBlock &data)=0
 
virtual void encodeTransactionPart (NamedList &params, DataBlock &data)=0
 
bool sendSCCPNotify (NamedList &params)
 
- Protected Member Functions inherited from SCCPUser
virtual void destroyed ()
 
- Protected Member Functions inherited from SignallingComponent
 SignallingComponent (const char *name=0, const NamedList *params=0, const char *type="unknown")
 
void insert (SignallingComponent *component)
 
virtual void detach ()
 
void setName (const char *name)
 
void setCompType (const char *type)
 
unsigned long tickSleep (unsigned long usec=1000000) const
 
- Protected Member Functions inherited from RefObject
virtual void zeroRefs ()
 
bool resurrect ()
 
- Protected Member Functions inherited from DebugEnabler
void debugName (const char *name)
 

Protected Attributes

ObjList m_users
 
Mutex m_usersMtx
 
ObjList m_inQueue
 
Mutex m_inQueueMtx
 
unsigned int m_SSN
 
unsigned int m_defaultRemoteSSN
 
unsigned int m_defaultHopCounter
 
SS7PointCode m_defaultRemotePC
 
SS7PointCode::Type m_remoteTypePC
 
u_int64_t m_trTimeout
 
Mutex m_transactionsMtx
 
ObjList m_transactions
 
TCAPType m_tcapType
 
u_int32_t m_idsPool
 
unsigned int m_recvMsgs
 
unsigned int m_sentMsgs
 
unsigned int m_discardMsgs
 
unsigned int m_normalMsgs
 
unsigned int m_abnormalMsgs
 
SCCPManagement::LocalBroadcast m_ssnStatus
 

Detailed Description

SS7 TCAP implementation.

Implementation of SS7 Transactional Capabilities Application Part

Member Enumeration Documentation

◆ TCAPComponentOperationClass

Component Operation Classes

◆ TCAPCounter

Type of message counters

◆ TCAPType

enum TCAPType

TCAP implementation variant

◆ TCAPUserCompActions

Component handling primitives between TCAP and TCAP user (TC-user)

◆ TCAPUserTransActions

TCAP message primitives

Constructor & Destructor Documentation

◆ SS7TCAP()

SS7TCAP ( const NamedList & params)

Constructor

Parameters
paramsParameters for building this TCAP

◆ ~SS7TCAP()

virtual ~SS7TCAP ( )
virtual

Destructor

Member Function Documentation

◆ allocTransactionID() [1/2]

virtual const String allocTransactionID ( )
virtual

Get a new transaction ID

Returns
A transaction ID

◆ allocTransactionID() [2/2]

void allocTransactionID ( String & str)

Get a new transaction ID

Parameters
strString into which to put the id

◆ attach()

void attach ( TCAPUser * user)

Attach a SS7 TCAP user

Parameters
userPointer to the TCAP user to attach

◆ buildSCCPData()

virtual void buildSCCPData ( NamedList & params,
SS7TCAPTransaction * tr )
virtual

Build SCCP data

Parameters
paramsNamedList containing the parameters to be given to SCCP
trTransaction for which to build SCCP data

◆ buildTransaction()

virtual SS7TCAPTransaction * buildTransaction ( SS7TCAP::TCAPUserTransActions type,
const String & transactID,
NamedList & params,
bool initLocal = true )
pure virtual

Build a transaction

Parameters
typeType with which to build the transactions
transactIDID for the transaction
paramsParameters for building the transaction
initLocalTrue if built by user, false if by remote end
Returns
A transaction

Implemented in SS7TCAPANSI, and SS7TCAPITU.

◆ count()

unsigned int count ( TCAPCounter counterType)
inline

Retrieve one of the status counters

Parameters
counterTypeThe type of the counter to increment
Returns
The value of the counter

◆ dequeue()

virtual SS7TCAPMessage * dequeue ( )
virtual

Dequeue a TCAP message when ready to process it

Returns
A SS7TCAPMessage pointer dequeued from the queue

◆ detach()

void detach ( TCAPUser * user)

Detach a SS7 TCAP user

Parameters
userTCAP user to detach

◆ enqueue()

virtual void enqueue ( SS7TCAPMessage * msg)
virtual

Enqueue data received from SCCP as a TCAP message, kept in a processing queue

Parameters
msgA SS7TCAPMessage pointer containing all data received from SSCP

◆ getTransaction()

SS7TCAPTransaction * getTransaction ( const String & tid)

Find the transaction with the given id

Parameters
tidSearched local id
Returns
A pointer to the transaction or null if not found

◆ handleError()

virtual HandledMSU handleError ( SS7TCAPError & error,
NamedList & params,
DataBlock & data,
SS7TCAPTransaction * tr = 0 )
virtual

Handle an decoding error

Parameters
errorThe encoutered error
paramsTCAP message parameters which where successfully decoded until the error was encoutered
dataData block containing the rest of the message
trTransaction to which this message belongs to
Returns
Status if the error was handled or not

◆ incCounter()

void incCounter ( TCAPCounter counterType)
inline

Increment one of the status counters

Parameters
counterTypeThe type of the counter to increment

◆ initialize()

virtual bool initialize ( const NamedList * config)
virtual

Configure and initialize the component and any subcomponents it may have

Parameters
configOptional configuration parameters override
Returns
True if the component was initialized properly

Reimplemented from SCCPUser.

◆ lookupComponent() [1/2]

static int lookupComponent ( const char * comp)
inlinestatic

Get the type of component from string form

Parameters
compType of component
Returns
The type of component

References s_compPrimitives.

◆ lookupComponent() [2/2]

static const char * lookupComponent ( int comp)
inlinestatic

Get the type of component in string form

Parameters
compType of component
Returns
A string containing the string form of that type of component

References s_compPrimitives.

◆ lookupTransaction() [1/2]

static int lookupTransaction ( const char * tr)
inlinestatic

Get the type of transaction from string form

Parameters
trType of transaction in string form
Returns
The type of transaction

References s_transPrimitives.

◆ lookupTransaction() [2/2]

static const char * lookupTransaction ( int tr)
inlinestatic

Get the type of transaction in string form

Parameters
trType of transaction
Returns
A string containing the string form of that type of transaction

References s_transPrimitives.

◆ managementNotify()

bool managementNotify ( SCCP::Type type,
NamedList & params )
virtual

Notification from SCCP layer about management status

Parameters
typeType of management notification
paramsNotification params

Reimplemented from SCCPUser.

◆ notifyData()

virtual HandledMSU notifyData ( DataBlock & data,
NamedList & params )
virtual

Notification from SCCP that a message failed to arrive to its destination, inherited from SCCPUser

Parameters
dataUser data sent.
paramsSCCP parameters Note! The data may not contain the full message block previously sent (in case of SCCP segmentation), but it must always must contain the first segment

Reimplemented from SCCPUser.

◆ processSCCPData()

virtual HandledMSU processSCCPData ( SS7TCAPMessage * sccpData)
virtual

Process received SCCP data

Parameters
sccpDataA TCAP message received from SCCP to process
Returns
A code specifying if this message was handled

◆ receivedData()

virtual HandledMSU receivedData ( DataBlock & data,
NamedList & params )
virtual

Notification from SCCP that a message has arrived, inherited from SCCPUser

Parameters
dataReceived user data
paramsSCCP parameters
Returns
True if this user has processed the message, false otherwise

Reimplemented from SCCPUser.

◆ removeTransaction()

void removeTransaction ( SS7TCAPTransaction * tr)

Remove transaction

Parameters
trThe transaction to remove

◆ sendData()

virtual bool sendData ( DataBlock & data,
NamedList & params )
virtual

Send a message to SCCP for transport, inherited from SCCPUser

Parameters
dataUser data
paramsSCCP parameters

Reimplemented from SCCPUser.

◆ sendToUser()

virtual bool sendToUser ( NamedList & params)
virtual

Send to TCAP users a decode message

Parameters
paramsMessage in NamedList form
Returns
True if the message was handled by a user, false otherwise

◆ setTCAPType()

void setTCAPType ( TCAPType type)
inline

Set TCAP version

Parameters
typeTCAP version

◆ status()

virtual void status ( NamedList & status)
virtual

Status of TCAP

Parameters
statusNamedList to fill with status information

References status().

Referenced by status(), updateUserStatus(), and userStatus().

◆ tcapType()

TCAPType tcapType ( )
inline

Report which TCAP implementation is in use

◆ timerTick()

virtual void timerTick ( const Time & when)
virtual

Method called periodically to do processing and timeout checks

Parameters
whenTime to use as computing base for events and timeouts

Reimplemented from SignallingComponent.

◆ updateUserStatus()

virtual void updateUserStatus ( TCAPUser * user,
SCCPManagement::LocalBroadcast status,
NamedList & params )
virtual

Update the SCCP Management state for this SSN when requested by a user

Parameters
userThe TCAP user which changed its state
statusThe state of the TCAP user
paramsAdditional parameters to be transmitted to the SCPP

References status().

◆ userRequest()

virtual SS7TCAPError userRequest ( NamedList & requestParams)
virtual

A TCAP user made a request

Parameters
requestParamsNamedList containing all the necessary data for the TCAP request
Returns
A SS7TCAPError reporting the status of the request

◆ userStatus()

virtual void userStatus ( NamedList & status)
virtual

Status of TCAP users

Parameters
statusNamedList to fill with user status information

References status().

Member Data Documentation

◆ s_compOperClasses

const TokenDict s_compOperClasses[]
static

Dictionary for component opearation classes

◆ s_compPrimitives

const TokenDict s_compPrimitives[]
static

Dictionary for component primitives

Referenced by lookupComponent(), and lookupComponent().

◆ s_tcapVersion

const TokenDict s_tcapVersion[]
static

Dictionary for TCAP versions

◆ s_transPrimitives

const TokenDict s_transPrimitives[]
static

Dictionary for transaction primitives

Referenced by lookupTransaction(), and lookupTransaction().


The documentation for this class was generated from the following file: