Yate
SS7ISUP Class Reference

SS7 ISUP implementation. More...

#include <yatesig.h>

Inheritance diagram for SS7ISUP:
SignallingCallControl SS7Layer4 Mutex SS7L3User Lockable SignallingComponent RefObject DebugEnabler GenObject SS7BICC

Public Types

enum  { SlsAuto = -1 , SlsLatest = -2 , SlsCircuit = -3 , SlsDefault = -4 }
 
enum  ChargeProcess { Confusion , Ignore , Raw , Parsed }
 
- Public Types inherited from SignallingCallControl
enum  MediaRequired { MediaNever , MediaAnswered , MediaRinging , MediaAlways }
 

Public Member Functions

 SS7ISUP (const NamedList &params, unsigned char sio=SS7MSU::ISUP|SS7MSU::National)
 
virtual ~SS7ISUP ()
 
virtual bool initialize (const NamedList *config)
 
virtual const char * statusName () const
 
virtual void attach (SS7Layer3 *network)
 
unsigned int cicLen () const
 
const Stringformat () const
 
bool ignoreUnknownAddrSignals () const
 
bool setPointCode (SS7PointCode *pc, bool def)
 
unsigned int setPointCode (const NamedList &params)
 
SS7PointCodehasPointCode (const SS7PointCode &pc)
 
bool handlesRemotePC (const SS7PointCode &pc) const
 
void setLabel (SS7Label &label, const SS7PointCode &opc, const SS7PointCode &dpc, unsigned char sls=255)
 
void setDebug (bool printMsg, bool extendedDebug)
 
virtual SS7MSUcreateMSU (SS7MsgISUP::Type type, unsigned char ssf, const SS7Label &label, unsigned int cic, const NamedList *params=0) const
 
virtual SignallingCallcall (SignallingMessage *msg, String &reason)
 
int transmitMessage (SS7MsgISUP *msg, const SS7Label &label, bool recvLbl, int sls=SlsDefault)
 
virtual void cleanup (const char *reason="net-out-of-order")
 
virtual bool control (NamedList &params)
 
bool decodeMessage (NamedList &msg, SS7MsgISUP::Type msgType, SS7PointCode::Type pcType, const unsigned char *paramPtr, unsigned int paramLen)
 
bool encodeMessage (DataBlock &buf, SS7MsgISUP::Type msgType, SS7PointCode::Type pcType, const NamedList &params, unsigned int *cic=0)
 
bool processParamCompat (const NamedList &list, unsigned int cic, bool *callReleased=0)
 
ChargeProcess getChargeProcessType () const
 
- Public Member Functions inherited from SignallingCallControl
 SignallingCallControl (const NamedList &params, const char *msgPrefix=0)
 
virtual ~SignallingCallControl ()
 
const Stringlocation () const
 
void setExiting ()
 
bool exiting () const
 
bool verify ()
 
MediaRequired mediaRequired () const
 
const StringmsgPrefix () const
 
SignallingCircuitGroupcircuits () const
 
const ObjListcalls () const
 
SignallingCircuitGroupattach (SignallingCircuitGroup *circuits)
 
bool reserveCircuit (SignallingCircuit *&cic, const char *range=0, int checkLock=-1, const String *list=0, bool mandatory=true, bool reverseRestrict=false)
 
bool releaseCircuit (SignallingCircuit *&cic, bool sync=false)
 
bool releaseCircuit (unsigned int code, bool sync=false)
 
virtual SignallingEventgetEvent (const Time &when)
 
virtual void buildVerifyEvent (NamedList &params)
 
- Public Member Functions inherited from Mutex
 Mutex (bool recursive=false, const char *name=0)
 
 Mutex (const Mutex &original)
 
 ~Mutex ()
 
Mutexoperator= (const Mutex &original)
 
virtual bool lock (long maxwait=-1)
 
virtual bool unlock ()
 
virtual bool locked () const
 
const char * owner () const
 
bool recursive () const
 
- Public Member Functions inherited from Lockable
virtual ~Lockable ()
 
virtual bool check (long maxwait=-1)
 
virtual bool unlockAll ()
 
- Public Member Functions inherited from SS7Layer4
SS7Layer3network () const
 
unsigned char sio () const
 
unsigned char sif () const
 
unsigned char ssf () const
 
unsigned char prio () const
 
unsigned char ni () const
 
unsigned char getSIO (const NamedList &params) const
 
- Public Member Functions inherited from SignallingComponent
virtual ~SignallingComponent ()
 
virtual const StringtoString () const
 
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)
 

Protected Member Functions

virtual void destroyed ()
 
virtual void timerTick (const Time &when)
 
virtual void notify (SS7Layer3 *link, int sls)
 
SS7MSUbuildMSU (SS7MsgISUP::Type type, unsigned char sio, const SS7Label &label, unsigned int cic, const NamedList *params) const
 
virtual HandledMSU receivedMSU (const SS7MSU &msu, const SS7Label &label, SS7Layer3 *network, int sls)
 
virtual bool processMSU (SS7MsgISUP::Type type, unsigned int cic, const unsigned char *paramPtr, unsigned int paramLen, const SS7Label &label, SS7Layer3 *network, int sls)
 
virtual void receivedUPU (SS7PointCode::Type type, const SS7PointCode node, SS7MSU::Services part, unsigned char cause, const SS7Label &label, int sls)
 
virtual SignallingEventprocessCircuitEvent (SignallingCircuitEvent *&event, SignallingCall *call=0)
 
bool startCircuitReset (SignallingCircuit *&cic, const String &timer)
 
- Protected Member Functions inherited from SignallingCallControl
int strategy () const
 
virtual bool processEvent (SignallingEvent *event)
 
void clearCalls ()
 
void removeCall (SignallingCall *call, bool del=false)
 
void setVerify (bool restartTimer=false, bool fireNow=false, const Time *time=0)
 
- Protected Member Functions inherited from SS7Layer4
 SS7Layer4 (unsigned char sio=SS7MSU::National, const NamedList *params=0)
 
int transmitMSU (const SS7MSU &msu, const SS7Label &label, int sls=-1)
 
- Protected Member Functions inherited from SS7L3User
virtual bool recoveredMSU (const SS7MSU &msu, const SS7Label &label, SS7Layer3 *network, int sls)
 
virtual void routeStatusChanged (SS7PointCode::Type type, const SS7PointCode &node, SS7Route::State state)
 
- 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

unsigned int m_cicLen
 
- Protected Attributes inherited from SignallingCallControl
ObjList m_calls
 
String m_msgPrefix
 
MediaRequired m_mediaRequired
 
bool m_verifyEvent
 
SignallingTimer m_verifyTimer
 
String m_location
 
- Protected Attributes inherited from SS7Layer4
unsigned char m_sio
 

Friends

class SS7ISUPCall
 

Additional Inherited Members

- Static Public Member Functions inherited from Mutex
static int count ()
 
static int locks ()
 
static bool efficientTimedLock ()
 
- Static Public Member Functions inherited from Lockable
static void wait (unsigned long maxwait)
 
static unsigned long wait ()
 
static void startUsingNow ()
 
static void enableSafety (bool safe=true)
 
static bool safety ()
 
- Static Public Member Functions inherited from SS7Layer4
static unsigned char getSIO (const NamedList &params, unsigned char sif, unsigned char prio, unsigned char ni)
 
static unsigned char getSIO (const NamedList &params, unsigned char sif, unsigned char ssf)
 
static unsigned char getSIO (const NamedList &params, unsigned char sio)
 
- 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 Protected Member Functions inherited from SS7L3User
static ObjListgetNetRoutes (SS7Layer3 *network, SS7PointCode::Type type)
 
static const ObjListgetNetRoutes (const SS7Layer3 *network, SS7PointCode::Type type)
 
- Static Protected Attributes inherited from SignallingCallControl
static const TokenDict s_mediaRequired []
 

Detailed Description

SS7 ISUP implementation.

Implementation of SS7 ISDN User Part

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Special SLS values

Constructor & Destructor Documentation

◆ SS7ISUP()

SS7ISUP ( const NamedList & params,
unsigned char sio = SS7MSU::ISUP|SS7MSU::National )

Constructor

Parameters
paramsCall controller's parameters
sioThe default Service Information Octet

References SS7Layer4::sio().

◆ ~SS7ISUP()

virtual ~SS7ISUP ( )
virtual

Destructor

Member Function Documentation

◆ attach()

virtual void attach ( SS7Layer3 * network)
virtual

Attach a SS7 network or router to this service. Detach itself from the old one

Parameters
networkPointer to network or router to attach

Reimplemented from SS7Layer4.

References SS7Layer4::network().

◆ buildMSU()

SS7MSU * buildMSU ( SS7MsgISUP::Type type,
unsigned char sio,
const SS7Label & label,
unsigned int cic,
const NamedList * params ) const
protected

Create a new MSU populated with type, routing label and space for fixed part

Parameters
typeType of ISUP message
sioService Information Octet
labelRouting label for the new MSU
cicCircuit Identification Code
paramsParameter list
Returns
Pointer to the new MSU or NULL if an error occured

References SS7Layer4::sio().

◆ call()

virtual SignallingCall * call ( SignallingMessage * msg,
String & reason )
virtual

Create an outgoing call. Send a NewCall event with the given msg parameter This method is thread safe

Parameters
msgCall parameters
reasonFailure reason if any
Returns
Referenced SignallingCall pointer on success or 0 on failure

Reimplemented from SignallingCallControl.

Referenced by processCircuitEvent().

◆ cicLen()

unsigned int cicLen ( ) const
inline

Get the length of the Circuit Identification Code for this user part

Returns
Length of the CIC field in octets

References m_cicLen.

◆ cleanup()

virtual void cleanup ( const char * reason = "net-out-of-order")
virtual

Cleanup calls This method is thread safe

Parameters
reasonCleanup reason

Reimplemented from SignallingCallControl.

◆ control()

virtual bool control ( NamedList & params)
virtual

Query or modify ISUP's settings or operational parameters

Parameters
paramsThe list of parameters to query or change
Returns
True if the control operation was executed

Reimplemented from SignallingComponent.

◆ createMSU()

virtual SS7MSU * createMSU ( SS7MsgISUP::Type type,
unsigned char ssf,
const SS7Label & label,
unsigned int cic,
const NamedList * params = 0 ) const
virtual

Create a new MSU populated with type, routing label and space for fixed part

Parameters
typeType of ISUP message
ssfSubservice Field
labelRouting label for the new MSU
cicCircuit Identification Code
paramsOptional parameter list
Returns
Pointer to the new MSU or NULL if an error occured

References SS7Layer4::ssf().

◆ decodeMessage()

bool decodeMessage ( NamedList & msg,
SS7MsgISUP::Type msgType,
SS7PointCode::Type pcType,
const unsigned char * paramPtr,
unsigned int paramLen )

Decode an ISUP message buffer to a list of parameters

Parameters
msgDestination list of parameters
msgTypeThe message type
pcTypeThe point code type (message version)
paramPtrPointer to the Parameter area (just after the message type)
paramLenLength of the Parameter area
Returns
True if the mesage was successfully parsed

◆ destroyed()

virtual void destroyed ( )
protectedvirtual

Remove all links with other layers. Disposes the memory

Reimplemented from SS7Layer4.

◆ encodeMessage()

bool encodeMessage ( DataBlock & buf,
SS7MsgISUP::Type msgType,
SS7PointCode::Type pcType,
const NamedList & params,
unsigned int * cic = 0 )

Encode an ISUP list of parameters to a buffer. The input list may contain a 'message-prefix' parameter to override this controller's prefix

Parameters
bufDestination buffer
msgTypeThe message type
pcTypeThe point code type (message version)
paramsMessage list of parameters
cicOptional cic to be added before mesage
Returns
True if the mesage was successfully encoded

◆ format()

const String & format ( ) const
inline

Get the default data format

Returns
The default data format

◆ getChargeProcessType()

ChargeProcess getChargeProcessType ( ) const
inline

Obtain the way that charge message should be processed

Returns
The way that charge message should be processed

◆ handlesRemotePC()

bool handlesRemotePC ( const SS7PointCode & pc) const
inline

Check if this controller should handle a remote point code

Parameters
pcThe remote point code to check
Returns
True if pc matches the remote or there is no remote set

◆ hasPointCode()

SS7PointCode * hasPointCode ( const SS7PointCode & pc)

Check if the given point code is serviced by this controller

Parameters
pcThe point code to check
Returns
SS7PointCode pointer or 0 if not found

◆ ignoreUnknownAddrSignals()

bool ignoreUnknownAddrSignals ( ) const
inline

Check if the message parser of this controller should ignore unknown digits encoding

Returns
True if unknown digits are ignored

◆ initialize()

virtual bool initialize ( const NamedList * config)
virtual

Configure and initialize the call controller and user part

Parameters
configOptional configuration parameters override
Returns
True if ISUP was initialized properly

Reimplemented from SS7Layer4.

◆ notify()

virtual void notify ( SS7Layer3 * link,
int sls )
protectedvirtual

Process a notification generated by the attached network layer

Parameters
linkNetwork or linkset that generated the notification
slsSignalling Link that generated the notification, negative if none

Reimplemented from SS7L3User.

◆ processCircuitEvent()

virtual SignallingEvent * processCircuitEvent ( SignallingCircuitEvent *& event,
SignallingCall * call = 0 )
protectedvirtual

Process an event received from a non-reserved circuit

Parameters
eventThe event, will be consumed and zeroed
callOptional signalling call whose circuit generated the event
Returns
Signalling event pointer or 0

Reimplemented from SignallingCallControl.

References call().

◆ processMSU()

virtual bool processMSU ( SS7MsgISUP::Type type,
unsigned int cic,
const unsigned char * paramPtr,
unsigned int paramLen,
const SS7Label & label,
SS7Layer3 * network,
int sls )
protectedvirtual

Process a MSU received from a Layer 3 component

Parameters
typeType of ISUP message
cicCircuit Identification Code
paramPtrPointer to the Parameter area
paramLenLength of the Parameter area
labelRouting label of the received MSU
networkNetwork layer that delivered the MSU
slsSignalling Link the MSU was received from
Returns
True if the MSU was processed

References SS7Layer4::network().

◆ processParamCompat()

bool processParamCompat ( const NamedList & list,
unsigned int cic,
bool * callReleased = 0 )

Process parameter compatibility lists. Terminate an existing call if a non emtpy release call parameter(s) list is found. Send CNF if non emtpy cnf parameter(s) list is found

Parameters
listMessage parameter list
cicThe circuit code
callReleasedOptional pointer to boolean value to be set if a call was released
Returns
True if any parameter compatibility was handled

◆ receivedMSU()

virtual HandledMSU receivedMSU ( const SS7MSU & msu,
const SS7Label & label,
SS7Layer3 * network,
int sls )
protectedvirtual

Process a MSU received from a Layer 3 component

Parameters
msuMessage data, starting with Service Indicator Octet
labelRouting label of the received MSU
networkNetwork layer that delivered the MSU
slsSignalling Link the MSU was received from
Returns
Result of MSU processing

Implements SS7L3User.

Reimplemented in SS7BICC.

References SS7Layer4::network().

◆ receivedUPU()

virtual void receivedUPU ( SS7PointCode::Type type,
const SS7PointCode node,
SS7MSU::Services part,
unsigned char cause,
const SS7Label & label,
int sls )
protectedvirtual

Notification for receiving User Part Unavailable

Parameters
typeType of Point Code
nodeNode on which the User Part is unavailable
partUser Part (service) reported unavailable
causeUnavailability cause - Q.704 15.17.5
labelRouting label of the UPU message
slsSignaling link the UPU was received on

Reimplemented from SS7L3User.

◆ setDebug()

void setDebug ( bool printMsg,
bool extendedDebug )
inline

Set debug data of this call controller

Parameters
printMsgEnable/disable message printing on output
extendedDebugEnable/disable hex data dump if print messages is enabled

◆ setLabel()

void setLabel ( SS7Label & label,
const SS7PointCode & opc,
const SS7PointCode & dpc,
unsigned char sls = 255 )
inline

Set a routing label to be used for outgoing messages

Parameters
labelRouting label to set
opcOriginating point code
dpcDestination point code
slsSignalling Link Selection

References SS7Label::assign().

◆ setPointCode() [1/2]

unsigned int setPointCode ( const NamedList & params)

Append all point codes from a parameter list, use "pointcode" and "defaultpointcode" parameters

Parameters
paramsList of parameters to take point codes from
Returns
Count of point codes added

◆ setPointCode() [2/2]

bool setPointCode ( SS7PointCode * pc,
bool def )

Append a point code to the list of point codes serviced by this controller if not already there. Set default point code if requested. If the list is empty, the default point code is set to the first point code added

Parameters
pcThe point code to append
defTrue if this point code is the default for outgoing calls
Returns
False if the point code is invalid for this call controller type. If true is returned, don't reuse the pointer

◆ startCircuitReset()

bool startCircuitReset ( SignallingCircuit *& cic,
const String & timer )
protected

Initiate circuit reset. The circuit must be already reserved This method is thread safe

Parameters
cicThe circuit to reset. Its referrence counter will be decreased and the pointer will be zeroed
timerEllapsed timer
Returns
True if the circuit reset was initiated

◆ statusName()

virtual const char * statusName ( ) const
virtual

Get the controller's status as text

Returns
Controller status name

Implements SignallingCallControl.

◆ timerTick()

virtual void timerTick ( const Time & when)
protectedvirtual

Send CGU if not already done. Check timeouts

Parameters
whenTime to use as computing base for timeouts

Reimplemented from SignallingComponent.

◆ transmitMessage()

int transmitMessage ( SS7MsgISUP * msg,
const SS7Label & label,
bool recvLbl,
int sls = SlsDefault )

Converts an ISUP message to a Message Signal Unit and push it down the protocol stack. The given message is consumed

Parameters
msgThe message to send
labelThe routing label for the message
recvLblTrue if the given label is from a received message. If true, a new routing label will be created from the received one
slsSignalling Link to use for the new routing label. Ignored if recvLbl is false
Returns
Link the message was successfully queued to, negative for error

Member Data Documentation

◆ m_cicLen

unsigned int m_cicLen
protected

Length of the Circuit Identification Code in octets

Referenced by cicLen().


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