|
Yate
|
Abstract phone call signalling. More...
#include <yatesig.h>
Public Types | |
| enum | MediaRequired { MediaNever , MediaAnswered , MediaRinging , MediaAlways } |
Public Member Functions | |
| SignallingCallControl (const NamedList ¶ms, const char *msgPrefix=0) | |
| virtual | ~SignallingCallControl () |
| const String & | location () const |
| void | setExiting () |
| bool | exiting () const |
| bool | verify () |
| MediaRequired | mediaRequired () const |
| const String & | msgPrefix () const |
| SignallingCircuitGroup * | circuits () const |
| const ObjList & | calls () const |
| virtual const char * | statusName () const =0 |
| 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="net-out-of-order") |
| virtual SignallingEvent * | getEvent (const Time &when) |
| virtual SignallingCall * | call (SignallingMessage *msg, String &reason) |
| virtual void | buildVerifyEvent (NamedList ¶ms) |
Public Member Functions inherited from Mutex | |
| Mutex (bool recursive=false, const char *name=0) | |
| Mutex (const Mutex &original) | |
| ~Mutex () | |
| Mutex & | operator= (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 () |
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) |
| void | setVerify (bool restartTimer=false, bool fireNow=false, const Time *time=0) |
Protected Attributes | |
| ObjList | m_calls |
| String | m_msgPrefix |
| MediaRequired | m_mediaRequired |
| bool | m_verifyEvent |
| SignallingTimer | m_verifyTimer |
| String | m_location |
Static Protected Attributes | |
| static const TokenDict | s_mediaRequired [] |
Friends | |
| class | SignallingCall |
| class | SS7ISUPCall |
| class | ISDNQ931Call |
| class | ISDNQ931CallMonitor |
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 () |
Abstract phone call signalling.
Interface of protocol independent signalling for phone calls
| enum MediaRequired |
When is media absolutely required during the call
| 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 retrieve message parameters from a list |
References msgPrefix().
|
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 |
References circuits().
Referenced by ISDNQ931::destroyed(), and ISDNQ931Monitor::destroyed().
|
inlinevirtual |
Build the parameters of a Verify event
| params | The list of parameters to fill |
|
inlinevirtual |
Create an outgoing call. Send a NewCall event with the given msg parameter
| msg | Call parameters |
| reason | Failure reason if any |
Reimplemented in ISDNQ931, and SS7ISUP.
Referenced by processCircuitEvent(), and removeCall().
|
inline |
Get the list of calls currently known by this call controller
References m_calls.
|
inline |
Get the circuit group attached to this call controller
Referenced by attach(), and ISDNQ931::restart().
|
inlinevirtual |
|
protected |
Clear call list
|
inline |
Get exiting flag
|
virtual |
Iterate through the call list to get an event
| when | The current time |
|
inline |
|
inline |
|
inline |
Get the prefix used by this call controller when decoding message parameters or retrieve message parameters from a list
References m_msgPrefix.
Referenced by SignallingCallControl().
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
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 | ( | 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 |
| 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 |
|
protected |
Remove a call from list
| call | The call to remove |
| del | True to delete it. False to remove without destruct |
References call().
| 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 |
|
inline |
Set exiting flag
|
protected |
Set the verify event flag. Restart/fire verify timer
| restartTimer | True to restart/fire the timer |
| fireNow | True to fire the verify timer. Ignored if restartTimer is false |
| time | Optional time to use for timer restart |
|
pure virtual |
Get the controller's status as text
Implemented in ISDNQ931, ISDNQ931Monitor, and SS7ISUP.
|
inlineprotected |
Get the strategy used by the attached circuit group to allocate circuits
|
inline |
Check the verify event flag. Reset it if true is returned
References Mutex::lock(), and m_verifyEvent.
|
protected |
Controller location used when encoding Q.850 cause
Referenced by location().
|
protected |
Media required flag, call should drop if requirement not satisfied
Referenced by mediaRequired().
|
protected |
Prefix to be added to decoded message parameters or retrieve message parameters from a list
Referenced by msgPrefix().
|
protected |
Draw attention to call controller's user that something changed by raising a Verify event
Referenced by verify().
|
protected |
Timer used to raise verify events
|
staticprotected |
Media required keywords