Yate
|
Abstract phone call signalling. More...
#include <yatesig.h>
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 |
const ObjList & | calls () const |
SignallingCircuitGroup * | 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) |
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) |
Protected Attributes | |
ObjList | m_calls |
String | m_msgPrefix |
bool | m_verifyEvent |
SignallingTimer | m_verifyTimer |
Friends | |
class | SignallingCall |
class | SS7ISUPCall |
class | ISDNQ931Call |
class | ISDNQ931CallMonitor |
Abstract phone call signalling.
Interface of protocol independent signalling for phone calls
SignallingCallControl | ( | const NamedList & | params, |
const char * | msgPrefix = 0 |
||
) |
Constructor
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
SignallingCircuitGroup* 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
circuits | Pointer to the SignallingCircuitGroup to attach. 0 to detach and force a cleanup |
Referenced by ISDNQ931Monitor::destroyed(), and ISDNQ931::destroyed().
virtual void buildVerifyEvent | ( | NamedList & | params | ) | [inline, virtual] |
Build the parameters of a Verify event
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
msg | Call parameters |
reason | Failure reason if any |
const ObjList& calls | ( | ) | const [inline] |
Get the list of calls currently known by this call controller
SignallingCircuitGroup* circuits | ( | ) | const [inline] |
Get the circuit group attached to this call controller
virtual void cleanup | ( | const char * | reason = "offline" | ) | [inline, virtual] |
void clearCalls | ( | ) | [protected] |
Clear call list
bool exiting | ( | ) | const [inline] |
Get exiting flag
virtual SignallingEvent* getEvent | ( | const Time & | when | ) | [virtual] |
Iterate through the call list to get an event
when | The current time |
const String& msgPrefix | ( | ) | const [inline] |
Get the prefix used by this call controller when decoding message parameters or retrive message parameters from a list
virtual SignallingEvent* processCircuitEvent | ( | SignallingCircuitEvent *& | event, |
SignallingCall * | call = 0 |
||
) | [inline, protected, virtual] |
Process an event received from a non-reserved circuit
event | The event, will be consumed and zeroed |
call | Optional signalling call whose circuit generated the event |
Reimplemented in SS7ISUP.
References TelEngine::destruct().
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
event | The event |
bool releaseCircuit | ( | unsigned int | code, |
bool | sync = false |
||
) |
Initiate a release of a circuit from the attached group This method is thread safe
code | The circuit's code |
sync | Synchronous release requested |
bool releaseCircuit | ( | SignallingCircuit *& | cic, |
bool | sync = false |
||
) |
Initiate a release of a circuit. Set cic to 0. This method is thread safe
cic | The circuit to release |
sync | Synchronous release requested |
void removeCall | ( | SignallingCall * | call, |
bool | del = false |
||
) | [protected] |
Remove a call from list
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
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 |
void setExiting | ( | ) | [inline] |
Set exiting flag
int strategy | ( | ) | const [inline, protected] |
Get 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
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
SignallingTimer m_verifyTimer [protected] |
Timer used to raise verify events