SignallingCallControl Class Reference
Abstract phone call signalling.
More...
#include <yatesig.h>
List of all members.
|
Public Member Functions |
| SignallingCallControl (const NamedList ¶ms, const char *msgPrefix=0) |
virtual | ~SignallingCallControl () |
void | setExiting () |
bool | exiting () const |
bool | verify () |
const String & | msgPrefix () const |
SignallingCircuitGroup * | circuits () 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 SignallingEvent * | getEvent (const Time &when) |
virtual SignallingCall * | call (SignallingMessage *msg, String &reason) |
virtual void | buildVerifyEvent (NamedList ¶ms) |
void | setDumper (SignallingDumper *dumper=0) |
Protected Member Functions |
int | strategy () const |
virtual bool | processEvent (SignallingEvent *event) |
virtual SignallingEvent * | processCircuitEvent (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
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 |
Member Function Documentation
void setExiting |
( |
|
) |
[inline] |
bool exiting |
( |
|
) |
const [inline] |
Get exiting flag
- Returns:
- The exiting flag
Check the verify event flag. Reset it if true is returned
- Returns:
- True if the verify event flag is set
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
Get the circuit group attached to this call controller
- Returns:
- The circuit group attached to this call controller
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:
-
Referenced by ISDNQ931Monitor::destruct(), and ISDNQ931::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
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
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
virtual void cleanup |
( |
const char * |
reason = "offline" |
) |
[inline, virtual] |
Iterate through the call list to get an event
- Parameters:
-
- Returns:
- SignallingEvent pointer or 0 if no events
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.
virtual void buildVerifyEvent |
( |
NamedList & |
params |
) |
[inline, virtual] |
Build the parameters of a Verify event
- Parameters:
-
| params | The list of parameters to fill |
Set or remove the data dumper
- Parameters:
-
| dumper | Pointer to the data dumper object, 0 to remove |
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
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:
-
- Returns:
- True if the event was processed by the controller. False to deliver the event to the requestor
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.
void clearCalls |
( |
|
) |
[protected] |
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 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().
Member Data Documentation
Prefix to be added to decoded message parameters or retrive message parameters from a list
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: