I have two offices set in two distant locations, connected through a IPSec VPN (using pfSense). On one office, I have an Asterisk PBX where all the extensions connect, and the Asterisk PBX is configured with a Flowroute trunk.

Here's some ascii diagram:

--------------          ---------------             -------------
| office 1   |  IPSec   |  office 2   |    lan      | Asterisk  |
|  pfsense   | -------- |   pfsense   |-------------|           |
--------------          ---------------             -------------
      |                        |
      |                        |
internet link 1           internet link 2

When I make calls from office 2 through Flowroute, they work perfectly fine. However, when I make calls from office 1, there's some echo. I'm using IP phones, so the echo is not caused by analog terminals.

My guess is that the SIP traffic from office 1 is going through the VPN and then routed to Flowroute (through internet link 2).

How can I make it so the traffic is routed through internet link 1 instead? I only want to use SIP traffice over IPSec for internal calls (extensions on office 1 calling extensions on office 2, where some echo is acceptable).


Put another Asterisk server in Office 1.

Have the two servers talk to each other (e.g. IAX) for inter-office calls, and have each of them route PSTN calls directly to your upstream provider. The provider should be able to give you sub-accounts for each of your servers, so that incoming calls can be routed to the correct one.

  • Not sure how that works, but I'm willing to do it. If I do, can I keep all the extensions configured on a single Asterisk? Or do I need to configure it on both? – pgb May 21 '13 at 15:05
  • The extensions for each office would be configured on its own asterisk server, and route added to the other asterisk server for the other office's extensions. The same for your upstream provider's DIDs, they would need to be pointed at the right subaccount to reach the right asterisk server. – Michael Hampton May 21 '13 at 15:14
  • Hummm. I have a single DID (and want to continue with that) shared across the two offices. I was hoping for a simpler approach, but I guess I'm out of luck. – pgb May 21 '13 at 15:20
  • Yeah, if people in either office can answer incoming calls to your line, then you're going to have the issue with those calls being routed from one office to the other. I'd just route them to the office where they're answered most frequently and then have the queue deal with routing it to the other office if needed. – Michael Hampton May 21 '13 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.