YIAX design: Difference between revisions

From Yate Documentation
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:


===YIAX components===


IAXInfoElement
;IAXInfoElement
:    Holds a single text Information Element that is attached to a message.
;IAXInfoElementNumeric
:    Holds a single 1, 2 or 4 byte length Information Element that is attached to a message.
;IAXFormat
:    Holds the enumeration values for audio and video formats.
;IAXFrame
:    Holds an IAX mini or meta frame. Received frame parser.
;IAXFullFrame
:    Holds an IAX full frame.
;IAXFrameOut
:    Holds enough information to manage an outgoing frame.
;IAXEvent
;    Holds a message (event) for the client.
;IAXTransaction
:    Holds enough information to manage a link between 2 peers.
:    Keep incoming/outgoing frame lists.
:    IAX protocol management.
:    Data transfer between the two peers involved in the transaction.
;IAXEngine
:    Transactions manager.
:    Read/write data from/to socket.
:    Creates transactions.
:    Notify the client and the remote peer on transaction state change.


    Holds a single text Information Element that is attached to a message.
===IAXEngine scope===
 
IAXInfoElementNumeric
 
    Holds a single 1, 2 or 4 byte length Information Element that is attached to a message.
 
IAXFormat
 
    Holds the enumeration values for audio and video formats.
 
IAXFrame
 
    Holds an IAX mini or meta frame. Received frame parser.
 
IAXFullFrame
 
    Holds an IAX full frame.
 
IAXFrameOut
 
    Holds enough information to manage an outgoing frame.
 
IAXEvent
 
    Holds a message (event) for the client.
 
IAXTransaction
 
    Holds enough information to manage a link between 2 peers.
   
    Keep incoming/outgoing frame lists.
    IAX protocol management.
    Data transfer between the two peers involved in the transaction.
 
IAXEngine
 
    Transactions manager.
   
    Read/write data from/to socket.
    Creates transactions.
    Notify the client and the remote peer on transaction state change.


The following actions are asynchronously done by IAXEngine:
The following actions are asynchronously done by IAXEngine:
Line 50: Line 34:
*    Write data to socket.
*    Write data to socket.
*    Generate events.  
*    Generate events.  
=== What's happening when a valid request is received===


When receiving a valid request from as remote peer to create a new transaction, creates it and notify the client, unless the new transaction is an internally processed one (such as a POKE request, which will not generate any event):  
When receiving a valid request from as remote peer to create a new transaction, creates it and notify the client, unless the new transaction is an internally processed one (such as a POKE request, which will not generate any event):  
Line 58: Line 44:
:- Notify the client (IAXEvent).
:- Notify the client (IAXEvent).


When the client requests a new transaction:
===When the client requests a new transaction===
 
:- Generate a local number identifier.  
:- Generate a local number identifier.  
:- Create an IAXTransaction (giving it the transaction type).  
:- Create an IAXTransaction (giving it the transaction type).  
Line 69: Line 56:


Internally, IAXTransaction keeps an IAXFullFrame list containing the incoming frames and an IAXFrameOut list containing the outgoing frames list. When requested, the transaction check his state, take some action (depending on it). If the state changes notify the appropriate peer(s).
Internally, IAXTransaction keeps an IAXFullFrame list containing the incoming frames and an IAXFrameOut list containing the outgoing frames list. When requested, the transaction check his state, take some action (depending on it). If the state changes notify the appropriate peer(s).
'''See also'''
* [[IAX]]

Revision as of 14:38, 16 November 2012

YIAX components

IAXInfoElement
Holds a single text Information Element that is attached to a message.
IAXInfoElementNumeric
Holds a single 1, 2 or 4 byte length Information Element that is attached to a message.
IAXFormat
Holds the enumeration values for audio and video formats.
IAXFrame
Holds an IAX mini or meta frame. Received frame parser.
IAXFullFrame
Holds an IAX full frame.
IAXFrameOut
Holds enough information to manage an outgoing frame.
IAXEvent
Holds a message (event) for the client.
IAXTransaction
Holds enough information to manage a link between 2 peers.
Keep incoming/outgoing frame lists.
IAX protocol management.
Data transfer between the two peers involved in the transaction.
IAXEngine
Transactions manager.
Read/write data from/to socket.
Creates transactions.
Notify the client and the remote peer on transaction state change.

IAXEngine scope

The following actions are asynchronously done by IAXEngine:

  • Read data from socket.
  • Write data to socket.
  • Generate events.

What's happening when a valid request is received

When receiving a valid request from as remote peer to create a new transaction, creates it and notify the client, unless the new transaction is an internally processed one (such as a POKE request, which will not generate any event):

- Parse received data.
- Generate a local number identifier.
- Create an IAXTransaction (giving it an IAXFullFrame).
- Put it in the transactions list.
- Notify the client (IAXEvent).

When the client requests a new transaction

- Generate a local number identifier.
- Create an IAXTransaction (giving it the transaction type).
- Put it in the transactions list.
- Notify the client (IAXEvent) when the remote peer will respond.

Any received frame from the remote peer or command from the client is passed to the transaction.

After creation, when the link has been established, IAXTransaction manages the IAX protocol for the link. On IAXEngine demand will change his state, generating an event, if necessary. Audio data is transferred asynchronously until a request to stop is received from the client or from the remote peer.

Internally, IAXTransaction keeps an IAXFullFrame list containing the incoming frames and an IAXFrameOut list containing the outgoing frames list. When requested, the transaction check his state, take some action (depending on it). If the state changes notify the appropriate peer(s).

See also