# class ISDNQ931 | ISDN Q.931 implementation on top of Q.921. More...
Full name | `TelEngine::ISDNQ931`
Definition | `#include <libs/ysig/yatesig.h>`
Inherits | TelEngine::ISDNLayer3 [public ], TelEngine::SignallingCallControl [public ], TelEngine::SignallingDumpable [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Types

- enum BehaviourFlags { SendNonIsdnSource = 0x00000001, IgnoreNonIsdnDest = 0x00000002, ForcePresNetProv = 0x00000004, Translate31kAudio = 0x00000008, URDITransferCapsOnly = 0x00000010, NoLayer1Caps = 0x00000020, IgnoreNonLockedIE = 0x00000040, NoDisplayIE = 0x00000080, NoDisplayCharset = 0x00000100, ForceSendComplete = 0x00000200, NoActiveOnConnect = 0x00000400, CheckNotifyInd = 0x00000800, ChannelExclusive = 0x00001000, }
- enum SwitchType { Unknown = 0, EuroIsdnE1 = ForceSendComplete|CheckNotifyInd|NoDisplayCharset|URDITransferCapsOnly, EuroIsdnT1 = ForceSendComplete|CheckNotifyInd, NationalIsdn = SendNonIsdnSource, Dms100 = ForcePresNetProv|IgnoreNonIsdnDest, Lucent5e = IgnoreNonLockedIE, Att4ess = ForcePresNetProv|IgnoreNonLockedIE|Translate31kAudio|NoLayer1Caps, QSIG = NoActiveOnConnect|NoDisplayIE|NoDisplayCharset }

#### Public Methods

- ISDNQ931 (const NamedList& params, const char* name = 0)
- virtual ~ISDNQ931 ()
- virtual bool initialize (const NamedList* config)
- virtual const char* statusName () const
- inline const ISDNLayer2* layer2 () const
- inline bool primaryRate () const
- inline bool network () const
- inline bool transferModeCircuit () const
- inline ISDNQ931ParserData& parserData ()
- inline const String& numPlan () const
- inline const String& numType () const
- inline const String& numPresentation () const
- inline const String& numScreening () const
- inline const String& format () const
- bool sendMessage (ISDNQ931Message* msg, u_int8_t tei, String* reason = 0)
- virtual void multipleFrameEstablished (u_int8_t tei, bool confirm, bool timeout, ISDNLayer2* layer2)
- virtual void multipleFrameReleased (u_int8_t tei, bool confirm, bool timeout, ISDNLayer2* layer2)
- virtual void receiveData (const DataBlock& data, u_int8_t tei, ISDNLayer2* layer2)
- virtual ISDNLayer2* attach (ISDNLayer2* q921)
- SignallingCall* call (SignallingMessage* msg, String& reason)
- bool restart (const char* circuits)
- inline bool sendStatus (ISDNQ931Call* call, const char* cause, u_int8_t tei = 0, const char* display = 0, const char* diagnostic = 0)
- inline bool sendRelease (ISDNQ931Call* call, bool release, const char* cause, u_int8_t tei = 0, const char* diag = 0, const char* display = 0, const char* signal = 0)
- virtual void cleanup (const char* reason = "offline")
- void setInterval (SignallingTimer& timer, int id)
- void manageTimeout ()
- inline void setDebug (bool printMsg, bool extendedDebug)

#### Public Members

- static const TokenDict s_flags[]
- static const TokenDict s_swType[]

#### Protected Methods

- virtual void destroyed ()
- virtual void timerTick (const Time& when)
- ISDNQ931Call* findCall (u_int32_t callRef, bool outgoing, u_int8_t tei = 0)
- ISDNQ931Call* findCall (unsigned int circuit)
- void terminateCalls (ObjList* list, const char* reason)
- bool acceptNewCall (bool outgoing, String& reason)
- ISDNQ931Message* getMsg (const DataBlock& data)
- ISDNQ931Message* endReceiveSegment (const char* reason = 0)
- void processGlobalMsg (ISDNQ931Message* msg, u_int8_t tei = 0)
- void processMsgRestart (ISDNQ931Message* msg, u_int8_t tei = 0)
- void processInvalidMsg (ISDNQ931Message* msg, u_int8_t tei = 0)
- void sendRestart (u_int64_t time = Time::msecNow(), bool retrans = false)
- void endRestart (bool restart, u_int64_t time, bool timeout = false)
- bool sendStatus (const char* cause, u_int8_t callRefLen, u_int32_t callRef = 0, u_int8_t tei = 0, bool initiator = false, ISDNQ931Call::State state = ISDNQ931Call::Null, const char* display = 0, const char* diagnostic = 0)
- bool sendRelease (bool release, u_int8_t callRefLen, u_int32_t callRef, u_int8_t tei, bool initiator, const char* cause = 0, const char* diag = 0, const char* display = 0, const char* signal = 0)

## Detailed Description

Q.931 ISDN Layer 3 implementation on top of a Layer 2

enum BehaviourFlags { SendNonIsdnSource = 0x00000001, IgnoreNonIsdnDest = 0x00000002, ForcePresNetProv = 0x00000004, Translate31kAudio = 0x00000008, URDITransferCapsOnly = 0x00000010, NoLayer1Caps = 0x00000020, IgnoreNonLockedIE = 0x00000040, NoDisplayIE = 0x00000080, NoDisplayCharset = 0x00000100, ForceSendComplete = 0x00000200, NoActiveOnConnect = 0x00000400, CheckNotifyInd = 0x00000800, ChannelExclusive = 0x00001000, } | ### BehaviourFlags

Enumeration flags defining the behaviour of the ISDN call controller and any active calls managed by it

enum SwitchType { Unknown = 0, EuroIsdnE1 = ForceSendComplete|CheckNotifyInd|NoDisplayCharset|URDITransferCapsOnly, EuroIsdnT1 = ForceSendComplete|CheckNotifyInd, NationalIsdn = SendNonIsdnSource, Dms100 = ForcePresNetProv|IgnoreNonIsdnDest, Lucent5e = IgnoreNonLockedIE, Att4ess = ForcePresNetProv|IgnoreNonLockedIE|Translate31kAudio|NoLayer1Caps, QSIG = NoActiveOnConnect|NoDisplayIE|NoDisplayCharset } | ### SwitchType

Call controller switch type. Each value is a mask of behaviour flags

ISDNQ931 (const NamedList& params, const char* name = 0) | ### ISDNQ931

Constructor Initialize this object and the component

Parameters:

params | Layer's parameters and parser settings
name | Name of this component

~ISDNQ931 () | ### ~ISDNQ931

[virtual]

Destructor Destroy all calls

bool initialize (const NamedList* config) | ### initialize

[virtual]

Configure and initialize Q.931 and its layer 2

Parameters:

config | Optional configuration parameters override

Returns: True if Q.931 and the layer 2 were initialized properly

Reimplemented from SignallingComponent.

const char* statusName () | ### statusName

[const virtual]

Get the controller's status as text

Returns: Controller status name

Reimplemented from SignallingCallControl.

inline const ISDNLayer2* layer2 () | ### layer2

[const]

Get the layer 2 attached to this object

Returns: Pointer to the layer 2 attached to this object or 0 if none

inline bool primaryRate () | ### primaryRate

[const]

Check if this call controller supports primary or basic rate transfer

Returns: True for primary rate. False for basic rate

inline bool network () | ### network

[const]

Chech if this call controller is at the NET or CPE side of the link

Returns: True if we are NET, false if we are CPE

inline bool transferModeCircuit () | ### transferModeCircuit

[const]

Check if this call controller supports circuit switch or packet mode transfer

Returns: True for circuit switch. False for packet mode

inline ISDNQ931ParserData& parserData () | ### parserData

Get the parser settings of this call control

Returns: The parser settings

inline const String& numPlan () | ### numPlan

[const]

Get the default numbering plan for outgoing calls

Returns: The default numbering plan for outgoing calls

inline const String& numType () | ### numType

[const]

Get the default number type for outgoing calls

Returns: The default number type for outgoing calls

inline const String& numPresentation () | ### numPresentation

[const]

Get the default number presentation for outgoing calls

Returns: The default number presentation for outgoing calls

inline const String& numScreening () | ### numScreening

[const]

Get the default number screening for outgoing calls

Returns: The default number screening for outgoing calls

inline const String& format () | ### format

[const]

Get the default data format for outgoing calls

Returns: The default data format for outgoing calls

bool sendMessage (ISDNQ931Message* msg, u_int8_t tei, String* reason = 0) | ### sendMessage

Send a message

Parameters:

msg | The message to be sent
tei | TEI value to use at Layer 2
reason | Optional string to write the failure reason

Returns: False if the message is invalid, Layer 2 is missing or refused the data

void multipleFrameEstablished (u_int8_t tei, bool confirm, bool timeout, ISDNLayer2* layer2) | ### multipleFrameEstablished

[virtual]

Notification of Layer 2 up state

Parameters:

tei | TEI received by the Layer 2
confirm | True if this is a confirmation of a previous request. False if it is an indication of state change on remote request
timeout | True if the reason is a timeout.
layer2 | Pointer to the notifier

Reimplemented from ISDNLayer3.

void multipleFrameReleased (u_int8_t tei, bool confirm, bool timeout, ISDNLayer2* layer2) | ### multipleFrameReleased

[virtual]

Notification of Layer 2 down state

Parameters:

tei | TEI received by the Layer 2
confirm | True if this is a confirmation of a previous request. False if it is an indication of state change on remote request
timeout | True if the reason is a timeout.
layer2 | Pointer to the notifier

Reimplemented from ISDNLayer3.

void receiveData (const DataBlock& data, u_int8_t tei, ISDNLayer2* layer2) | ### receiveData

[virtual]

Receive data from Layer 2

Parameters:

data | Received data
tei | TEI received by the Layer 2
layer2 | Pointer to the sender Layer 2

Reimplemented from ISDNLayer3.

ISDNLayer2* attach (ISDNLayer2* q921) | ### attach

[virtual]

Attach an ISDN Q.921 transport This method is thread safe

Parameters:

q921 | Pointer to the Q.921 transport to attach

Returns: Pointer to the detached Layer 2 or NULL

Reimplemented from SignallingCallControl.

SignallingCall* call (SignallingMessage* msg, String& reason) | ### call

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

Reimplemented from SignallingCallControl.

bool restart (const char* circuits) | ### restart

Restart one or more the circuits

Parameters:

circuits | Comma separated list of circuits to be restarted

Returns: True if the procedure was successfully started or enqueued

inline bool sendStatus (ISDNQ931Call* call, const char* cause, u_int8_t tei = 0, const char* display = 0, const char* diagnostic = 0) | ### sendStatus

Send a STATUS message for a given call

Parameters:

call | The call requesting the operation
tei | The TEI to send with the STATUS message
cause | Value for Cause IE
display | Optional value for Display IE
diagnostic | Optional value for cause diagnostic value

Returns: The result of the operation (true if successfully sent)

inline bool sendRelease (ISDNQ931Call* call, bool release, const char* cause, u_int8_t tei = 0, const char* diag = 0, const char* display = 0, const char* signal = 0) | ### sendRelease

Send a RELEASE or RELEASE COMPLETE message for a given call

Parameters:

call | The call requesting the operation
release | True to send RELEASE, false to send RELEASE COMPLETE
cause | Value for Cause IE
tei | TEI to which the release is sent to
diag | Optional hexified string for cause dignostic
display | Optional value for Display IE
signal | Optional value for Signal IE

Returns: The result of the operation (true if successfully sent)

void cleanup (const char* reason = "offline") | ### cleanup

[virtual]

Set terminate to all calls This method is thread safe

Parameters:

reason | Cleanup reason

Reimplemented from SignallingCallControl.

void setInterval (SignallingTimer& timer, int id) | ### setInterval

Set the timeout interval for a given timer if implemented If the timer is not implemented the interval is set to 0

Parameters:

timer | The destination timer
id | The timer number as defined in Q.931

void manageTimeout () | ### manageTimeout

Manage timeout for the call setup message

inline void setDebug (bool printMsg, bool extendedDebug) | ### setDebug

Set debug data of this call controller

Parameters:

printMsg | Enable/disable message printing on output
extendedDebug | Enable/disable hex data dump if print messages is enabled

static const TokenDict s_flags[] | ### s_flags[]

static const TokenDict s_swType[] | ### s_swType[]

void destroyed () | ### destroyed

[protected virtual]

Detach links. Disposes memory

Reimplemented from SignallingComponent.

void timerTick (const Time& when) | ### timerTick

[protected virtual]

Method called periodically to check timeouts This method is thread safe

Parameters:

when | Time to use as computing base for events and timeouts

Reimplemented from SignallingComponent.

ISDNQ931Call* findCall (u_int32_t callRef, bool outgoing, u_int8_t tei = 0) | ### findCall

[protected]

Find a call given its call reference and direction

Parameters:

callRef | The call reference to find
outgoing | True to find an outgoing call, false to find an incoming one
tei | TEI of the layer associated to the call to find

Returns: A referenced pointer to a call or 0

ISDNQ931Call* findCall (unsigned int circuit) | ### findCall

[protected]

Find a call given a circuit number

Parameters:

circuit | The circuit number to find

Returns: A referenced pointer to a call or 0

void terminateCalls (ObjList* list, const char* reason) | ### terminateCalls

[protected]

Terminate calls. If list is 0 terminate all calls

Parameters:

list | Optional list of circuits (strings) to be released
reason | The reason to be passed to each terminated call

bool acceptNewCall (bool outgoing, String& reason) | ### acceptNewCall

[protected]

Check if this call control can accept new calls

Parameters:

outgoing | Call direction (true for outgoing)
reason | String to be filled with the reason if not accepted

Returns: True if the call request is accepted

ISDNQ931Message* getMsg (const DataBlock& data) | ### getMsg

[protected]

Process received data. Process received message segments if any

Parameters:

data | The received data

Returns: ISDNQ931Message pointer or 0

ISDNQ931Message* endReceiveSegment (const char* reason = 0) | ### endReceiveSegment

[protected]

End waiting for message segments If reason is 0 parse already received data for the segmented message This method is thread safe

Parameters:

reason | Debug info reason. If non 0 drop the received segment(s)

Returns: ISDNQ931Message pointer or 0

void processGlobalMsg (ISDNQ931Message* msg, u_int8_t tei = 0) | ### processGlobalMsg

[protected]

Process messages with global call reference or should have one

Parameters:

msg | The received message
tei | The TEI received with the message

void processMsgRestart (ISDNQ931Message* msg, u_int8_t tei = 0) | ### processMsgRestart

[protected]

Process a restart request

Parameters:

msg | The received message
tei | The TEI received with the message

void processInvalidMsg (ISDNQ931Message* msg, u_int8_t tei = 0) | ### processInvalidMsg

[protected]

Process messages with invalid call reference

Parameters:

msg | The received message
tei | The TEI received with the message

void sendRestart (u_int64_t time = Time::msecNow(), bool retrans = false) | ### sendRestart

[protected]

Try to reserve a circuit for restarting if none. Send a restart request on it's behalf Start counting the restart interval if no circuit reserved This method is thread safe

Parameters:

time | The time of the transmission
retrans | Retransmission flag (true if a previous request timed out)

void endRestart (bool restart, u_int64_t time, bool timeout = false) | ### endRestart

[protected]

End restart procedure on timeout or restart acknoledge This method is thread safe

Parameters:

restart | True to try to send restart for the next circuit
time | The time of the transmission
timeout | True if a restart request timed out

bool sendStatus (const char* cause, u_int8_t callRefLen, u_int32_t callRef = 0, u_int8_t tei = 0, bool initiator = false, ISDNQ931Call::State state = ISDNQ931Call::Null, const char* display = 0, const char* diagnostic = 0) | ### sendStatus

[protected]

Send a STATUS message

Parameters:

cause | Value for Cause IE
callRefLen | The call reference length parameter.
callRef | The call reference
tei | The TEI to send with the STATUS message
initiator | True if this is from the call initiator
state | The state for CallState IE
display | Optional value for Display IE
diagnostic | Optional value for cause diagnostic value

Returns: The result of the operation (true if successfully sent)

bool sendRelease (bool release, u_int8_t callRefLen, u_int32_t callRef, u_int8_t tei, bool initiator, const char* cause = 0, const char* diag = 0, const char* display = 0, const char* signal = 0) | ### sendRelease

[protected]

Send a RELEASE or RELEASE COMPLETE message

Parameters:

release | True to send RELEASE, false to send RELEASE COMPLETE
callRefLen | The call reference length parameter
callRef | The call reference
tei | The TEI of the Layer 2 associated with the call
initiator | The call initiator flag
cause | Value for Cause IE
diag | Optional hexified string for cause dignostic
display | Optional value for Display IE
signal | Optional value for Signal IE

Returns: The result of the operation (true if successfully sent)

Generated by: paulc on bussard on Mon Feb 10 13:15:47 2014, using kdoc 2.0a54.