Difference between revisions of "IAX2"
Line 31: | Line 31: | ||
** ''none'': use no routing flags | ** ''none'': use no routing flags | ||
tos = lowdelay | tos = lowdelay | ||
+ | |||
+ | '''Options for Entities''' | ||
+ | Entity definitions begin with the entity name in brackets. The name is followed by a number of keyword/value pairs applying to the entity in which they are set. | ||
+ | The following keywords are available for users: | ||
+ | * '''type:''' This sets the type of entity for the client. Valid types are: | ||
+ | ** ''user'': A user can place calls to or through the Asterisk server. | ||
+ | ** ''peer'': A peer receives calls from the Asterisk server, but does not place them | ||
+ | ** ''friend'': A friend both sends and receives calls through the Asterisk server. This makes the most sense for handsets or other station devices. When in doubt use this type. | ||
+ | * '''trunk:''' Enables or disables trunking for a given user or peer. Trunk mode is a more efficient method of operating IAX if there are typically many calls running on the link. Trunk mode requires having a Zaptel interface in the Asterisk server. | ||
+ | trunk=yes | ||
== testing IAX2 trunking == | == testing IAX2 trunking == |
Revision as of 14:28, 3 February 2007
IAX2 is the Inter-Asterisk eXchange protocol. This is used to transport the calls between Asterisk PBX stations.
iax.conf
This file is used to configure clients connecting via the Inter-Asterisk eXchange protocol. IAX is primarily used for passing calls between Asterisk servers.
N.B. This is a selection from the information given in Asterisk Handbook (p. 61-)
Keywords
In the general section:
- port: The port to listen on for incoming connections. The default is port 5036. Takes as it's argument a port number (which must not be in use by another service.)
- bindaddr: If multiple IP addresses are available in the same system, this option may be set to bind Asterisk to a single interface.
port = 5036 bindaddr = 0.0.0.0
- bandwidth: This option is used to control which codecs are used generally. Rather than allowing or disallowing specific codecs, this option may be set to 'low' to automatically avoid some codecs that don't work well in low bandwidth sitiuations. Takes an option of low or high.
- allow: Specifically allow a certain codec to be used. Takes a codec, or all. Using all is the same as specifying bandwidth=high.
- disallow: Specifically disallow a certain codec. See allow.
bandwidth=low disallow=all allow=gsm
- register: Register is used to tell the Asterisk server to register with another Asterisk server. This is normally only needed if our local server has a dynamic IP address and needs to tell the other server where to find it. The format of a register statement is:
register => username:secret@server
The 'secret' field is optional, if no secret has been specified on the server being connected to. If RSA encryption is in use, specify the key to send to the server with this format:
register => username:[key]@server
- tos: Specify the type of service bits to set on IAX packets, which may improve routing of the packets. Available values are:
- lowdelay: minimize delay
- throughput: maximize throughput
- reliability: maximize reliability
- mincost: use the lowest cost path
- none: use no routing flags
tos = lowdelay
Options for Entities Entity definitions begin with the entity name in brackets. The name is followed by a number of keyword/value pairs applying to the entity in which they are set. The following keywords are available for users:
- type: This sets the type of entity for the client. Valid types are:
- user: A user can place calls to or through the Asterisk server.
- peer: A peer receives calls from the Asterisk server, but does not place them
- friend: A friend both sends and receives calls through the Asterisk server. This makes the most sense for handsets or other station devices. When in doubt use this type.
- trunk: Enables or disables trunking for a given user or peer. Trunk mode is a more efficient method of operating IAX if there are typically many calls running on the link. Trunk mode requires having a Zaptel interface in the Asterisk server.
trunk=yes
testing IAX2 trunking
Situation:
Conference-Voice-call between 201, 202 (G711u-codec) and 301 (G711u codec) X-lite on ext. 301 was combining the conference.
- Traffic to and from Ext. 201 is Green
- Traffic to and from Ext. 202 is Pink
- Traffic to and from Ext. 301 is Red
- Traffic between Asterisk-boxes is Blue in one direction and black in the other
Used filters in I/O-graph:
Filter-Black: ip.src == 192.168.1.101 && ip.dst == 192.168.1.106 Filter-Red : ip.src == 192.168.1.3 && ip.dst == 192.168.1.106 Filter-Green: ip.src == 192.168.1.189 && ip.dst == 192.168.1.101 Filter-Blue : ip.src == 192.168.1.106 && ip.dst == 192.168.1.101 Filter-Pink : ip.src == 192.168.1.100 && ip.dst == 192.168.1.101