IAX

From Yate Documentation
Revision as of 12:14, 15 October 2012 by Dana (Talk | contribs)

Jump to: navigation, search

IAX channel

This module supports the IAX protocol by using the Yiax library.

From a routing module you can call an IAX channel like this:

extension=iax/iax:user@ip:port/called_number

For example, in regexroute.conf you can have:

^2$=iax/diana@10.0.0.1/123

if you want to use the default protocol port (4569), or

^2$=iax/diana@10.0.0.1:4569/123

if you know that the called party is using the given port for incoming connections.

Trunking

IAX trunking means that audio data between 2 peers (same ip/port) can be combined into a single packet for multiple calls. E.g. an entity wanting to send trunked media packets from local ip 1.2.3.4:4569 to 1.2.3.5:4569 would gather media packets from multiple calls into a single packet and send it when a certain amount of time had ellapsed or the packet had reached some length limit. It is essential to understand that trunking can occur between same local/remote ip/port: packets for calls with different local or remote ip/port can't be put together in a trunked packet. The advantage of using trunking is to lower the bandwidth: the number of sent packets decreases leading to lower IP overhead.

In the next images the green, blue and red rectangles represents audio packets sent by different IAX calls. The images show how audio packets are sent without trunking and with trunking. Iax trunk none.png Attach:iax_trunk.png

NOTE: The order of audio packets inside a trunked packet is not important.

Extra documentation can be found here:

For all calls the remote party can send trunked audio frames.
They will be handled automatically, there is no configuration for it.

To send trunked frames each call must be configured explicitly:

* Outgoing calls:
The 'call.execute' message must have a trunkout=true parameter
^2$=iax/diana@10.0.0.1:4569/123;trunkout=true
  • Incoming calls
A trunkin=true parameter must be set when routing or executing an incoming IAX call:
[contexts]
${module}iax=if ${ip_host}^10\.0\.0\.1=;trunkin=true 
or
[default]
^3$=sip/sip:1234@1.2.3.4;trunkin=true


Notes:

    • The port you set it's the port the library is using to listen for incoming connections. If you change the default protocol port the callers might not know the new one, so any call they made will fail.
    • When you set a route, be sure you know the destination's port. Again, if the port is incorrect the call will fail.
    • If you set the preferred format to a non existing or not enabled one another format will be chosen for library use.

Configuration

File yiaxchan.conf:

yiaxchan.conf

[general]

This section sets global variables of the implementation
port
int: UDP port for incoming connections
port=4569
addr
ipaddress: IP address to bind to
addr=0.0.0.0
force_bind
boolean: Try to use a random port if failed to bind on configured one
Defaults to yes
force_bind=yes
calltoken_in
boolean: Use call token ip address authentication on incoming calls
Note
If the caller don't support the call token IAX extension the call request
will be ignored anyway
This parameter is applied on reload
Defaults to no
calltoken_in=no
calltoken_out
boolean: Offer call token ip address authentication on outgoing calls
This parameter is applied on reload and can be overridden from routing
Defaults to yes
calltoken_out=yes
calltoken_rejectmissing
boolean: Reject incoming calls without call token support
when calltoken_in is enabled
If disabled the requests will be ignored (dropped)
This parameter is applied on reload
Defaults to yes
calltoken_rejectmissing=yes
tos
keyword: Type Of Service to set in outgoing UDP packets
numeric TOS value or
lowdelay, throughput, reliability, mincost
tos=0
read_threads
int: Number of threads that read packets from socket
read_threads=1 in client mode, 3 in server mode
event_threads
int: Number of threads that process events
event_threads=1 in client mode, 3 in server mode
trunk_threads
int: Number of threads that service trunked voice packets
trunk_threads=1
thread
keyword: Default priority of the data service threads (socket listener and data trunking)
Can be one of
lowest, low, normal, high, highest
It is a bad idea to set a low priority for anything but testing
thread=normal
printmsg
boolean: Print sent/received frames to output if the module's debug
level is at least 9
This parameter is applied on reload
Defaults to yes
printmsg=yes


[formats]

This section allows to individually enable or disable the codecs
default
bool: Default enabling state for codecs
default=enable
preferred
string: Preferred format to use
preferred=
slin
bool: Uncompressed 16-bit signed linear
slin=enable
mulaw
bool: Companded-only G711 mu-law
mulaw=enable
alaw
bool: Companded-only G711 a-law
alaw=enable
gsm
bool: European GSM 06.10
gsm=enable
lpc10
bool: LPC 10
lpc10=enable

=]

Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers