iax.txt 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. Inter-Asterisk eXchange Protocol
  2. ================================
  3. Usage:
  4. ======
  5. The format for the dialing string on Asterisk is:
  6. IAX/[user@]peer[:exten[@context]]
  7. (Note, []'s denote optional fields). The peer is either an IP address
  8. or a peer as specified in the /etc/asterisk/iax.conf file. Exten is
  9. an optional requested extension (otherwise "s" will be used), and
  10. "context" is an optional context to request. The user is an optional
  11. username specified in the peer's iax.conf. If the user is not specified,
  12. the peer will select one.
  13. Protocol and rationale:
  14. =======================
  15. IAX is a simple, low overhead and low bandwidth VoIP protocol designed to
  16. allow multiple Asterisk PBX's to communicate with one another without
  17. the overhead of more complex protocols like H.323. Payload is sent with
  18. a header overhead of only 4 octets. Control functions (and one payload packet
  19. per minute or so) is sent with a more complex header of 12 octets.
  20. IAX is slightly stateful.
  21. IAX contains two kinds of packets: The full header packet type, which
  22. contains much information about the frame, in addition to its contents,
  23. and the mini header type, which is used only for non-reliable voice
  24. packet delivery.
  25. All packets are immediately transmitted. Packets are received, but not
  26. delivered to the actual channels until a given time quantum has passed, in
  27. order to try to eliminate jitter.
  28. All full header packets must be ackd (except, obviously for the ACK packets
  29. themselves and not so obviously for hangup packets). The "timestamp" field of
  30. ack packets is not the normal offset, but rather a quote of the timestamp as
  31. included with the original packet that you're acking, and likewise the
  32. seqno field is the seqno of the packet you're acking, not your own seqno,
  33. and you do not increment your own sequence number. ACKing is based on the
  34. sequence number.
  35. See iax.h for a description of the frame formats.
  36. IAX internal frames use the AST_FRAME_IAX type. The subclass of these
  37. frames is the IAX control number, as seen in iax.h. The first frame sent
  38. must be an AST_FRAME_IAX with the control AST_IAX_CONTROL_NEW.
  39. The AST_IAX_CONTROL_NEW establishes a new connection.
  40. The first frame sent MUST be an AST_CONTROL_NEW to start a connection.
  41. IAX connnections may require authentication using either simple plaintext
  42. passwords or an md5 challenge/response pair.