Dialplans

I’ve been banging my head against a wall with this one.

I have two servers, A and B.

Both run Freepbx.

Both A and B have trunks that allow calls to PSTN.

A and B are connected to each other to allow for internal calls, which work fine in both directions.

Users on A can dialout to PSTN by simply dialling the full code (no prefix), as can users on B.

I wanted to give users on A the ability to dial out through B by prefixing the call with in a 9.

I created an Outbound Route on A to send all calls ‘9|0.’ to the trunk connecting A and B together.

On B, I set an Outbound Route to send all calls ‘9|0.’ out through B’s outbound trunk to PSTN.

Calls from B dialling 9 then a number go through fine.

Calls from A dialling 9 then a number get an announcement saying "the number you have dialled is not in service’.

I tried different outbound rules, but nothing seems to work (even though calls can be made internally).

EXAMPLES

A B

9|0. 9|0.
9|0. 0.
9|. 9|.
9|. .

Nothing works.

Any ideas, please?

Many thanks

It’s a little dated, and this tutorial written by Ethan from Schmooze will do what you are looking to do.

http://fonality.com/trixbox/node/25093/93824#comment-93824

If your outbound route contains 9|0., the leading 9 will be stripped BEFORE its sent out the trunk. Meaning the call will arrive on B only as 0.. You need to either not strip out the 9 or to append something else in its place (along the lines of: 9|8+0).