|
| ||||||||||||||||||
Interface of protocol independent signalling for phone calls
| enum MediaRequired { MediaNever, MediaAnswered, MediaRinging, MediaAlways } | MediaRequired |
When is media absolutely required during the call
| SignallingCallControl (const NamedList& params, const char* msgPrefix = 0)
| SignallingCallControl |
Constructor
Parameters:
| params | Call controller's parameters |
| msgPrefix | Optional prefix to be added before a decoded message's parameters or retrieve message parameters from a list |
| ~SignallingCallControl ()
| ~SignallingCallControl |
[virtual]
Destructor
| inline const String& location ()
| location |
[const]
Retrieve Q.850 cause location
Returns: Controller location
| inline void setExiting ()
| setExiting |
Set exiting flag
| inline bool exiting ()
| exiting |
[const]
Get exiting flag
Returns: The exiting flag
| inline bool verify ()
| verify |
Check the verify event flag. Reset it if true is returned
Returns: True if the verify event flag is set
| inline MediaRequired mediaRequired ()
| mediaRequired |
[const]
Get the Media Required flag
Returns: Configured media requirement
| inline const String& msgPrefix ()
| msgPrefix |
[const]
Get the prefix used by this call controller when decoding message parameters or retrieve message parameters from a list
Returns: Message parameters prefix used by this call controller
| inline SignallingCircuitGroup* circuits ()
| circuits |
[const]
Get the circuit group attached to this call controller
Returns: The circuit group attached to this call controller
| inline const ObjList& calls ()
| calls |
[const]
Get the list of calls currently known by this call controller
Returns: Reference to the list of calls
| const char* statusName ()
| statusName |
[const pure virtual]
Get the controller's status as text
Returns: Controller status name
| SignallingCircuitGroup* attach (SignallingCircuitGroup* circuits)
| attach |
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 |
Returns: Pointer to the old group that was detached, NULL if none or no change
| bool reserveCircuit (SignallingCircuit*& cic, const char* range = 0, int checkLock = -1,
const String* list = 0, bool mandatory = true, bool reverseRestrict = false)
| reserveCircuit |
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
| bool releaseCircuit (SignallingCircuit*& cic, bool sync = false)
| releaseCircuit |
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)
| releaseCircuit |
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
| void cleanup (const char* reason = "net-out-of-order")
| cleanup |
[virtual]
Cleanup
Parameters:
| reason | Cleanup reason |
| SignallingEvent* getEvent (const Time& when)
| getEvent |
[virtual]
Iterate through the call list to get an event
Parameters:
| when | The current time |
Returns: SignallingEvent pointer or 0 if no events
| SignallingCall* call (SignallingMessage* msg, String& reason)
| call |
[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
| void buildVerifyEvent (NamedList& params)
| buildVerifyEvent |
[virtual]
Build the parameters of a Verify event
Parameters:
| params | The list of parameters to fill |
| inline int strategy ()
| strategy |
[protected const]
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 processEvent (SignallingEvent* event)
| processEvent |
[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
| SignallingEvent* processCircuitEvent (SignallingCircuitEvent*& event,
SignallingCall* call = 0)
| processCircuitEvent |
[protected virtual]
Process an event received from a non-reserved circuit
Parameters:
| event | The event, will be consumed and zeroed |
| call | Optional signalling call whose circuit generated the event |
Returns: Signalling event pointer or 0
| void clearCalls ()
| clearCalls |
[protected]
Clear call list
| void removeCall (SignallingCall* call, bool del = false)
| removeCall |
[protected]
Remove a call from list
Parameters:
| call | The call to remove |
| del | True to delete it. False to remove without destruct |
| ObjList m_calls | m_calls |
[protected]
| String m_msgPrefix | m_msgPrefix |
[protected]
| MediaRequired m_mediaRequired | m_mediaRequired |
[protected]
| bool m_verifyEvent | m_verifyEvent |
[protected]
| SignallingTimer m_verifyTimer | m_verifyTimer |
[protected]
| String m_location | m_location |
[protected]
| static const TokenDict s_mediaRequired[] | s_mediaRequired[] |
[protected]
| Generated by: paulc on bussard on Fri Apr 1 18:17:10 2011, using kdoc 2.0a54. |