[Asterisk-Users] Confuson on iax calls (register or not?)

Rich Adamson radamson at routers.com
Sun Oct 26 04:49:24 MST 2003


> >Think I'm a little confused on registering an iax connection; could
> >someone enlighten me?
> >
> >I guess the real question is... when two * machines are going to rely
> >on an iax link (each with their own dial plan), do both machines have
> >to register with each other (eg, both need a 'register' statement)?
> >
> >Or, will a single machine doing the registering cause the opposite
> >machine to recognize the registration, and allow calls to be originated
> >in both directions?
> >If so, assume machine "B" registers with machine "A" (machine B has the
> >register statement). Then, in machine A's extensions.conf dial plan,
> >what would the statement similar to
> > exten => _6X.,1,Dial(IAX/npi-off:mypassword at 205.122.192.89/${EXTEN-1})
> >look like? (I'm assuming the above might use the context for which
> >machine B registered with?)
> 
> AFAIK a register directive is only required when one of the servers has 
> a dynamic IP address which cannot be resolved from the outside or is 
> behind NAT..
> 
> So if both your servers are on the open internet then you probably don't 
> need to have any register directives set..

Okay, let me try a specific example (maybe a poor one) that might help me
understand.

Server A has a static registered address and is considered a production
"office" machine. It has pstn connections, VM, iaxtel, addressable via
dns, etc. (Changes to the configuration of this machine can only be made
once per month.)

Server B is a laptop running * that can be carried from one client's
location to another for "demo" purposes. Set the demo machine in the
client's conference room, connect to the Internet (assume no NAT), 
configure a couple of 7960's (as an example) on the conference room
table next to the laptop. Assume the two 7960's always use ext 3500 and
3501. The registered address at a client's location is obviously not the 
same from one client to another.

Now for demo purposes, 
 1. Server B registers with Server A via iax. That's easy to understand
    regardless whether nat is involved or not, and making calls from the 
    sip phones at the client's location to phones registered with 
    server A (office) is clear. An entry such as:
     exten => _6X.,1,Dial(IAX/office:mypasswd at 207.3.4.5/${EXTEN-1})
    in extensions.conf will work nicely since the server A is addressable
    and remains static at all times.
 2. Server A (without making any * config changes specific to the laptop
    addressing at the client's location) wants to place a call from a
    sip phone registered with server A (office), to one of the 7960's 
    (ext 3500) registered with server B (laptop).

What would the entry look like on Server A (office) that would allow calls
to be sent to Server B (laptop) when the specific IP address (and/or DNS
name) of the laptop is unknown?  (Or, rephrasing the question, can this
example call be forwarded to Server B using a reference to a iax "context"
(that is either active or not active based on Server B registration) rather 
then using an "exten =>..." statement that specifies an exact IP address?)

Although the above example might be rather poor, the same config issue
can happen with off-site disaster recovery configs, etc.






More information about the asterisk-users mailing list