YIAX design

From Yate Documentation
(Difference between revisions)
Jump to: navigation, search
(What's happening when a valid request is received)
(What's happening when the client requests a new transaction)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
  
 +
This notes describe how the yate IAX library (YIAX) is implemented. Below are the components of the library and some basic scenarios.
 
===YIAX components===
 
===YIAX components===
  
Line 27: Line 28:
 
:    Notify the client and the remote peer on transaction state change.
 
:    Notify the client and the remote peer on transaction state change.
  
===IAXEngine scope===
+
===IAXEngine functions===
  
 
The following actions are asynchronously done by IAXEngine:
 
The following actions are asynchronously done by IAXEngine:
Line 33: Line 34:
 
*    Read data from socket.
 
*    Read data from socket.
 
*    Write data to socket.
 
*    Write data to socket.
*    Generate events.  
+
*    Generate events.
  
 
=== What's happening when a valid request is received===
 
=== What's happening when a valid request is received===
Line 44: Line 45:
 
:- Notify the client (IAXEvent).
 
:- Notify the client (IAXEvent).
  
===When the client requests a new transaction===
+
===What's happening when the client requests a new transaction===
  
 
:- Generate a local number identifier.  
 
:- Generate a local number identifier.  
Line 56: Line 57:
  
 
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'''
 
'''See also'''
 +
 
* [[IAX]]
 
* [[IAX]]
 +
 +
[[Category:IAX]] [[Category:Programmers]]

Latest revision as of 13:45, 4 November 2013

This notes describe how the yate IAX library (YIAX) is implemented. Below are the components of the library and some basic scenarios.

Contents

[edit] 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.

[edit] IAXEngine functions

The following actions are asynchronously done by IAXEngine:

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

[edit] 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).

[edit] What's happening 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

Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers