[Asterisk-Users] IAX2 --> IAX2 confusion, it doesn't work...
Michael George
george at mutualdata.com
Fri Aug 27 13:33:17 MST 2004
On Fri, Aug 27, 2004 at 11:34:35AM -0400, Michael George wrote:
> I am trying to get two * boxes to communicate with eachother.
I think I have this figured out. Maybe I was being dense, I don't know...
But anyway, I thought I'd write up what I discovered for anyone who might
happen across this in the mail archives...
----------------------------------------------------------------
The most useful page, IMO, for getting IAX<-->IAX working:
http://www.voip-info.org/tiki-index.php?page=Asterisk%20readme%20iax
We have two machines, A and B. If A wants to call B, B must allow it with an
entry in iax.conf of:
[<A's name>]
type=user
secret=<A's pre-shared key> ; optional but recommended
context=<default incoming context, in case one not specified with Dial()>
host=[dynamic|<A's IP address>] ; this appears to be optional, but needed if we accept a register from A
Then A can call B with the command:
Dial(IAX2/<A's name>:<A's pre-shared key>@<B's address (numeric or mnemonic)>/<extension>[@context]) ; if context is set in B's iax.conf, not required to specify here
Vice-versa for B wanting to call A.
So what is registration all about?
If A wants to call B, but may not know where to find B (dynamic address or we
simply don't want to store the info), we can put a "peer" entry in iax.conf.
Then, when issuing the Dial() command, rather than specify the destination
machine's numeric or mnemonic name, we can use this local symbolic name for
the host. But before we can do that, the destination machine must register
with us so we know their address.
So, if C wants to call D, but D's address is dynamic, we can accomplish this
with a peer entry in C's iax.conf file:
[<D's name>]
type=peer
secret=<D's pre-shared key>
host=dynamic
Then, D will have a register command in the [general] section of their
iax.conf:
register => <D's name>:<D's pre-shared key>@<C's IP address, numeric or mnemonic>
Once D has registered with C, C can call D by using <D's name> in the Dial().
Note that registration is not strictly necessary if D has a static IP address.
----------------------------------------------------------------
--
-M
There are 10 kinds of people in this world:
Those who can count in binary and those who cannot.
More information about the asterisk-users
mailing list