SignallingCallControl Class Reference

Abstract phone call signalling. More...

#include <yatesig.h>

Inheritance diagram for SignallingCallControl:

Mutex ISDNQ931 ISDNQ931Monitor SS7ISUP SS7TUP SS7BICC

List of all members.

Public Member Functions

 SignallingCallControl (const NamedList &params, const char *msgPrefix=0)
virtual ~SignallingCallControl ()
void setExiting ()
bool exiting () const
bool verify ()
const StringmsgPrefix () const
SignallingCircuitGroupcircuits () const
void attach (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 void cleanup (const char *reason="offline")
virtual SignallingEventgetEvent (const Time &when)
virtual SignallingCallcall (SignallingMessage *msg, String &reason)
virtual void buildVerifyEvent (NamedList &params)
void setDumper (SignallingDumper *dumper=0)

Protected Member Functions

int strategy () const
virtual bool processEvent (SignallingEvent *event)
virtual SignallingEventprocessCircuitEvent (SignallingCircuitEvent &event, SignallingCall *call=0)
void clearCalls ()
void removeCall (SignallingCall *call, bool del=false)
bool dump (const DataBlock &data, bool sent=false, int link=0)

Protected Attributes

ObjList m_calls
String m_msgPrefix
bool m_verifyEvent
SignallingTimer m_verifyTimer

Friends

class SignallingCall
class SS7ISUPCall
class ISDNQ931Call
class ISDNQ931CallMonitor


Detailed Description

Abstract phone call signalling.

Interface of protocol independent signalling for phone calls


Constructor & Destructor Documentation

SignallingCallControl ( const NamedList params,
const char *  msgPrefix = 0 
)

Constructor

Parameters:
params Call controller's parameters
msgPrefix Optional prefix to be added before a decoded message's parameters or retrive message parameters from a list

virtual ~SignallingCallControl (  )  [virtual]

Destructor


Member Function Documentation

void attach ( SignallingCircuitGroup circuits  ) 

Attach/detach a circuit group to this call controller. Set group's allocation strategy. Set locked flags for all circuits belonging to the attached circuit group. Cleanup controller before detaching the group or attaching a new one This method is thread safe

Parameters:
circuits Pointer to the SignallingCircuitGroup to attach. 0 to detach and force a cleanup

Referenced by ISDNQ931Monitor::destruct(), and ISDNQ931::destruct().

virtual void buildVerifyEvent ( NamedList params  )  [inline, virtual]

Build the parameters of a Verify event

Parameters:
params The list of parameters to fill

virtual SignallingCall* call ( SignallingMessage msg,
String reason 
) [inline, virtual]

Create an outgoing call. Send a NewCall event with the given msg parameter

Parameters:
msg Call parameters
reason Failure reason if any
Returns:
Referenced SignallingCall pointer on success or 0 on failure

Reimplemented in SS7ISUP, and ISDNQ931.

SignallingCircuitGroup* circuits (  )  const [inline]

Get the circuit group attached to this call controller

Returns:
The circuit group attached to this call controller

virtual void cleanup ( const char *  reason = "offline"  )  [inline, virtual]

Cleanup

Parameters:
reason Cleanup reason

Reimplemented in SS7ISUP, ISDNQ931, and ISDNQ931Monitor.

void clearCalls (  )  [protected]

Clear call list

bool dump ( const DataBlock data,
bool  sent = false,
int  link = 0 
) [inline, protected]

Dump data if the dumper is valid This method is thread safe

Parameters:
data Buffer to dump
sent True if data is being sent, false if is being received
link Link number (relevant to MTP2 only)
Returns:
True if the data was dumped successfully

References DataBlock::data(), and DataBlock::length().

bool exiting (  )  const [inline]

Get exiting flag

Returns:
The exiting flag

virtual SignallingEvent* getEvent ( const Time when  )  [virtual]

Iterate through the call list to get an event

Parameters:
when The current time
Returns:
SignallingEvent pointer or 0 if no events

const String& msgPrefix (  )  const [inline]

Get the prefix used by this call controller when decoding message parameters or retrive message parameters from a list

Returns:
Message parameters prefix used by this call controller

virtual SignallingEvent* processCircuitEvent ( SignallingCircuitEvent event,
SignallingCall call = 0 
) [inline, protected, virtual]

Process an event received from a non-reserved circuit

Parameters:
event The event
call Optional signalling call whose circuit generated the event
Returns:
Signalling event pointer or 0

Reimplemented in SS7ISUP.

virtual bool processEvent ( SignallingEvent event  )  [inline, protected, virtual]

Process an event received from a call. This will give to derived classes an opportunity to intercept events generated by their calls

Parameters:
event The event
Returns:
True if the event was processed by the controller. False to deliver the event to the requestor

bool releaseCircuit ( unsigned int  code,
bool  sync = false 
)

Initiate a release of a circuit from the attached group This method is thread safe

Parameters:
code The circuit's code
sync Synchronous release requested
Returns:
True if the circuit release was initiated

bool releaseCircuit ( SignallingCircuit *&  cic,
bool  sync = false 
)

Initiate a release of a circuit. Set cic to 0. This method is thread safe

Parameters:
cic The circuit to release
sync Synchronous release requested
Returns:
True if the circuit release was initiated

void removeCall ( SignallingCall call,
bool  del = false 
) [protected]

Remove a call from list

Parameters:
call The call to remove
del True to delete it. False to remove without destruct

bool reserveCircuit ( SignallingCircuit *&  cic,
const char *  range = 0,
int  checkLock = -1,
const String list = 0,
bool  mandatory = true,
bool  reverseRestrict = false 
)

Reserve a circuit for later use. If the circuit list is 0, try to reserve a circuit from the group using its strategy. Release the given circuit before trying to reserve it. Set cic to 0 on failure. This method is thread safe

Parameters:
cic Destination circuit
checkLock Lock flags to check. If the given lock flags are set, reservation will fail
range Optional range name to restrict circuit reservation within attached circuit group
list Comma separated list of circuits
mandatory The list is mandatory. If false and none of the circuits in the list are available, try to reserve a free one. Ignored if list is 0
reverseRestrict Used when failed to reserve circuit from list. If true and the circuit allocation strategy includes any restriction (odd or even) use the opposite restriction to reserve a circuit. Ignored if mandatory is true
Returns:
False if the operation failed

void setDumper ( SignallingDumper dumper = 0  ) 

Set or remove the data dumper

Parameters:
dumper Pointer to the data dumper object, 0 to remove

void setExiting (  )  [inline]

Set exiting flag

int strategy (  )  const [inline, protected]

Get the strategy used by the attached circuit group to allocate circuits

Returns:
The strategy used by the attached circuit group to allocate circuits

bool verify (  )  [inline]

Check the verify event flag. Reset it if true is returned

Returns:
True if the verify event flag is set


Member Data Documentation

ObjList m_calls [protected]

List of active calls

String m_msgPrefix [protected]

Prefix to be added to decoded message parameters or retrive message parameters from a list

bool m_verifyEvent [protected]

Draw attention to call controller's user that something changed by raising a Verify event

Timer used to raise verify events


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

Generated on Sun Dec 7 21:45:27 2008 for Yate by  doxygen 1.5.7.1