[boxB-user]
type=user
secret=password
host=172.16.0.234
disallow=all
allow=gsm
allow=ulaw
allow=alaw
context=from-internal [/code]
where, of course, switch boxB for boxA as appropriate.
In the extensions.conf file, I have the following line in the [from-internal] context (the context for calls that originate on local extensions)
[boxB-user]
type=user
secret=password
host=172.16.0.234
disallow=all
allow=gsm
allow=ulaw
allow=alaw
context=from-internal [/code]
where, of course, switch boxB for boxA as appropriate.
[/quote]
If you use different names, it might be clearer what’s going on. For example:
I think i’ve got all this right! It’s made my head spin a bit!
By the way, i can’t see any point allowing gsm, ulaw and alaw between the two hosts - pick one and only use that. If you’ve got the same preference order on each one, they’ll always use the first one anyway!
But a simpler and less confusing way to do it is to just have one single friend account, rather than two peer/user accounts - after all, you only really need one connection between the two boxes.
On box A:
[boxB]
type=friend
username=AtoB
secret=password
host=<host B IP address>
disallow=all
allow=gsm
allow=ulaw
allow=alaw
context=fromB
On box B:
[boxA]
type=friend
username=AtoB
secret=password
host=<host A IP address>
disallow=all
allow=gsm
allow=ulaw
allow=alaw
context=fromA
Then, on box A:
register => AtoB:password@boxB
(Although you probably don’t need to register.)
And that’s it!
It’s not symmetrical like the other method, but it’s easier to debug.