[Asterisk-Users] RE: Asterisk-Users Digest, Vol 20, Issue 184

JR Richardson jr.richardson at cox.net
Sun Mar 26 11:00:54 MST 2006


Hi Joseph,

With iax servers dispersed across the internet, you could still use the
below setup, it would work but it's not as secure as you would want it.

I would then have a context for each server and use the IP address deny and
permit statements.

Also, you can have 1 server with a public IP and have the other servers
behind a NAT register to the public server.  There are really several ways
to accomplish this. My suggestion is to start simple. Get the servers
talking with each other, successfully pass calls between themselves then add
in the security layers.  Dial plan routing would probably be the same or
close to it, you could keep the same password or make it different for each
server, just be mindful of the IAX2/iaxtrunk:1234 at XXX.187.142.204/${EXTEN}
statement in the exten => Dial command, pass the correct
username:password at ipaddress to the correct server and you should be fine.

JR



>Hi JR 
>    Thanks for the mail ,  I am trying out Asterisk 
>and learning it , U mentioned that if all the tree
>boxes are on the same subnet , there is no need for an
>IAX [ context] for each outbound/inbound sessions
>between the servers 

>If there is a situation , in which they three asterisk
>box are in different locations / with separate  subnet
>, How will the it be 
>                      Thanks 
>                            Joseph John 





> Example iax.conf all PBX's
> 
> [iaxtrunk] (my internal iax trunk)
> type=friend 
> auth=md5
> secret=1234   
> host=dynamic
> context=incomingiax
> disallow=all
> allow=ulaw
> trunk=yes
> 
> 
> extensions.conf all PBX's
> 
> [incomingiax]
> Include => local (or whatever contexts the incoming
> iax trunks need access
> to)
> 
> 
> Now routing call between them is a whole other
> topic, several ways to
> accomplish this but it is all dial plan related at
> this point.  The only
> thing we accomplished so far is allowing all 3 PBX's
> trunk access to each
> other over a common [context] group.  This is good,
> as you add PBX4, PBX5,
> you just add this common [context] in iax.conf in
> the new servers without
> the need of updating pbx1,2&3.
> 
> Routing example extensions.conf 
> 
> [internal]
> ;To reach internal extensions on pbx1 (put this in
> pbx 2&3)
> Exten =>
>
1XXX,1,Dial(IAX2/iaxtrunk:1234 at XXX.187.142.203/${EXTEN})
> 
> ;To reach internal extensions on pbx2 (put this in
> pbx 1&3)
> Exten =>
>
2XXX,1,Dial(IAX2/iaxtrunk:1234 at XXX.187.142.204/${EXTEN})
> 
> ;To reach internal extensions on pbx3 (put this in
> pbx 1&2)
> Exten =>
>
3XXX,1,Dial(IAX2/iaxtrunk:1234 at XXX.187.142.234/${EXTEN})
> 
> 
> You could also specify each PBX in the [globals]
> context
> Example
> 
> [globals]
> 
> TRUNKPBX1 => IAX2/iaxtrunk:1234 at XXX.187.142.203
> TRUNKPBX2 => IAX2/iaxtrunk:1234 at XXX.187.142.204
> TRUNKPBX3 => IAX2/iaxtrunk:1234 at XXX.187.142.234
> 
> So your routing extension would look like this:
> 
> Exten => 1XXX,1,Dial(${TRUNKPBX1}/${EXTEN})
> Exten => 2XXX,1,Dial(${TRUNKPBX2}/${EXTEN})
> Exten => 3XXX,1,Dial(${TRUNKPBX3}/${EXTEN})
> 
> 
> Hope this helps.
> 
> JR





More information about the asterisk-users mailing list