[VoIP] IAX2 URIs
John R. Covert
john_reads_cnet_via_archives at covert.org
Sat Sep 8 21:12:35 CDT 2007
A question Greg asked me earlier made me think it might be time
to explain a few things about IAX2 URIs.
The format of an IAX2 URI is:
IAX2/[username[:password@]destination[:port][/extension[@context]]
The "destination" can be either a fully qualified host name or
the name of a [section] in your iax.conf, in which case the
username and password should not be specified.
All of the following are valid examples:
IAX2/iax.covert.org
This would place an fully unauthenticated call to extension "s" in
the first "context=" specified in the LAST user or friend [section]
in iax.conf which does not have a secret or other authentication
method. The last one you specify is actually the first in the
list if you type iax2 show users, which is why it's the one that
gets picked when there is no user name.
IAX2/cnet at iax.covert.org
This places an unauthenticated call with the username "cnet" to
extension "s". While this is a theoretically valid example, your
call will actually fail, because there is no "s" extension in the
first context specified for the [cnet] user in my iax.conf.
IAX2/cnet at iax.covert.org/12639900
This places an unauthenticated call with the username "cnet" to
extension "12639900". It will be placed into the context that
is specified by the first "context=" statement in the [cnet]
section of iax.conf.
IAX2/cnet at iax.covert.org/12649900 at inbound-cnet-264
This places an unauthenticated call with the username "cnet" to
extension "12649900" in context "inbound-cnet-264". For this
to be valid, there must be a "context=" statement in the [cnet]
section of iax.conf allowing access to the context. Unlike
sip.conf, in iax.conf you may specify multiple "context="
statements. The first is the default; others may be accessed
by explicit reference in an IAX2 URI.
More examples could be constructed based on the general syntax I
specified earlier. Any combination following the syntax is valid
as long as the receiving IAX2 device (typically an Asterisk PBX)
is willing to accept it.
/john
More information about the VoIP
mailing list