Complex scenario


I ask for your knowledge. We have next scenario:

We have our office into a big building. This building has one analog PBX for all the officce in the building. Four extensions from Analog PBX reach to our office that will be connected to a Linksys SPA400 gateway. We will create new IP private extensions using IP phones and boxes as the Linksys PAP2. At this point one doubt reach to me… If we receive one external call through one of our 4 extensions, is there any way to tell to the building PBX to transfer this call to another building extension (if needed) without route through asterisk leaving our 4 input extensions free for future input calls? If not possible, any way to get it? May be using a Rhino/Digium/Sangoma card instead SPA400?

Very pleased for any help about the tip.


I’m not sure if this would be possible with the SPA-4000 but if you replace this with another Asterisk server with a 4-port FXO card it should be possible to do as you suggest if you know the key sequence on the phone system for a transfer and you put this into your dialplan.

Then, supposing I use a 4 FXO ports card for my Asterisk PBX, if I receive one inbound call in port 1 of the FXO card, how can be made difference between:

  1. Routing this call to an IP extension
  2. Routing this call to another building fixed extension through one of free FXO ports (ports 2 to 4)
  3. Tell building analog PBX route this call to another building fixed extension leaving free all 4 FXO ports of my card

Any config example?

the below config will help you in Configuring Asterisk :
Connect to the Asterisk server.

sip.conf Settings
The SPA400 needs the account name to match the value specified in the SPA400 User ID configuration field. The entry in sip.conf should look like the following:

register= spa400@ email address is being protected from spam bots, you need Javascript enabled to view it /spa400
Substitute spa400 for the value entered in the SPA400 User ID field and replace with the actual IP address of the SPA400.

Then create a SIP entry for the SPA400.

user: the SPA400 User ID field value
host: the IP address of the SPA400
context: the context that should handle inbound calls from the SPA400
It should look like the following:


extension.conf Settings
Configure your dial-out routing to utilize the spa400.

A generic dial-out route (dial 9 to get a SPA400 FXO trunk) would look like:

OUT_2 = SIP/spa400

Inbound routing is more complex, but could look something like this (forward all calls to extension 200):

include => from-pstn

include=> from-pstn-custom


which of 3 options exposed covers this config example, 1., 2. or 3.?