|
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) |
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 |
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 |
| 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 ISDNQ931::destroyed(), and ISDNQ931Monitor::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 |
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 = "net-out-of-order" | ) | [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 |
| MediaRequired mediaRequired | ( | ) | const [inline] |
Get the Media Required flag
Get the prefix used by this call controller when decoding message parameters or retrieve 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 | ( | 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 |
| 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
| void setVerify | ( | bool | restartTimer = false, |
| bool | fireNow = false, |
||
| const Time * | time = 0 |
||
| ) | [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 |
| virtual const char* statusName | ( | ) | const [pure virtual] |
Get the controller's status as text
Implemented in ISDNQ931Monitor, ISDNQ931, and SS7ISUP.
| 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_location [protected] |
Controller location used when encoding Q.850 cause
MediaRequired m_mediaRequired [protected] |
Media required flag, call should drop if requirement not satisfied
String m_msgPrefix [protected] |
Prefix to be added to decoded message parameters or retrieve 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
const TokenDict s_mediaRequired[] [static, protected] |
Media required keywords
1.7.6.1