class SignallingCallControl

Abstract phone call signalling. More...

Contains pure virtuals
Full nameTelEngine::SignallingCallControl
Definition#include <libs/ysig/yatesig.h>
InheritsTelEngine::Mutex [public ]
Inherited byISDNQ931, ISDNQ931Monitor, SS7BICC, SS7ISUP, SS7TUP
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods

Protected Methods

Protected Members


Detailed Description

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:
paramsCall controller's parameters
msgPrefixOptional 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:
circuitsPointer 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:
cicDestination circuit
checkLockLock flags to check. If the given lock flags are set, reservation will fail
rangeOptional range name to restrict circuit reservation within attached circuit group
listComma separated list of circuits
mandatoryThe 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
reverseRestrictUsed 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:
cicThe circuit to release
syncSynchronous 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:
codeThe circuit's code
syncSynchronous release requested

Returns: True if the circuit release was initiated

void  cleanup (const char* reason = "net-out-of-order")

cleanup

[virtual]

Cleanup

Parameters:
reasonCleanup reason

SignallingEvent*  getEvent (const Time& when)

getEvent

[virtual]

Iterate through the call list to get an event

Parameters:
whenThe 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:
msgCall parameters
reasonFailure 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:
paramsThe 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:
eventThe 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:
eventThe event, will be consumed and zeroed
callOptional 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:
callThe call to remove
delTrue to delete it. False to remove without destruct

void  setVerify (bool restartTimer = false, bool fireNow = false, const Time* time = 0)

setVerify

[protected]

Set the verify event flag. Restart/fire verify timer

Parameters:
restartTimerTrue to restart/fire the timer
fireNowTrue to fire the verify timer. Ignored if restartTimer is false
timeOptional time to use for timer restart

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 Thu Jul 24 18:41:02 2014, using kdoc 2.0a54.