I am trying to route calls from one asterisk server to another

I have one asterisk server in Germany and one In America and I need to send calls from Germany to America. America doesn’t need to able to call out thru Germany. I am looking for a very simple method. I have tried the following but I don’t know what to do to the dialplan:

American Server (iax.conf)
[REC_SERVER]
type=user
host=my.calling.server.ca
secret=mysecret
context=local
trunk=yes

German Server (extensions.conf)
[mycontext]
exten => _5XXX,1,Dial(IAX2/REC_SERVER:[email protected]/${EXTEN}@local)
exten => _5XXX,2,Hangup
exten => _5XXX,102,Hangup

I also tried this:

American Server (iax.conf)
[REC_SERVER]
type=user
host=dynamic
secret=mysecret
context=local
trunk=yes

German Server (iax.conf)
[general]
register => REC_SERVER:[email protected]

[REMOTE_SERVER]
type=peer
host=dynamic
context=local

German Server (Extensions.conf)
[mycontext]
exten => 5XXX,1,Dial(IAX2/REMOTE_SERVER/${EXTEN})
exten => _5XXX,2,Hangup
exten => _5XXX,102,Hangup

Same problem here, I don’t understand Asterisk .conf files very well.

This Last link Might have worked in some way shape or form. WHen I implemented this I see 2 clients connected when really there is only one. Maybe this means the servers are connected but I don’t know how to route calls from one to another.

http://etel.wiki.oreilly.com/wiki/index.php/Peering_two_Asterisk_servers_using_IAX

Any Help would be appreciated.

Jessica Vaughn

Hi,

May be a silly question, but are you setting this up via FreePBX or editing the files?

Using FreePBX I setup a trunk on each server pointing to the other server and then route calls via the trunk using an outbound route.

Are the two sites connected on a private network or over the Internet?

Graham