How to map lines 1 to 1 on extensions?


#1

We are playing with an * system behind our Nortel PBX. What I would like to do is have 3 analog extensions on the PBX connect to *(I have a digium card and have this hooked up). When one of these extensions rings I want a specific extension in * to ring. I also want to be able to make a call from an extension on * and have it access a specific channel so it uses the correct analog extension on the PBX.

The goal of all this is so that 3 of us can test * and SIP. I want to use * phones as our primary desk phones and access our normal private lines on the Nortel PBX. We have several different SIP phones working but can not seem to figure out the trunks. Any help would be great (we are phone guys and are trying to learn both * and Linux).


#2

What you are trying to do is setup ZAP <-> SIP using the Asterisk behind the Nortel for three extensions. What you need to do is create your Zap Trunks on the Nortel side within Asterisk, guidelines for this may be found here:

[quote=“Asterisk Wiki”]Creating Channels

The format of the zapata.conf file is unfortunately not as simple as it could be. Most keywords do not do anything by themselves; they merely set up the parameters of any channel definitions that follow. The channel keyword actually creates the channel, using the settings specified before it. For example, you might create two channels like this:

signalling=fxo_ks
language=en
context=reception
channel => 1

signalling=fxo_ks
language=fr
context=sales
channel => 2

This creates channel 1 with a default language code “en” and a context “reception”. Channel 2 has a default language code “fr” and context “sales”.

This is important, if you put something like echocancel=no before the channel definition, it will effect all channels unless you turn it on later with echocancel=yes. It progresses downward, but the definition must be above the channel=> statement.[/quote]

Source

The key for routing the incoming calls is mapping the Zap Channels to the correct context, where in this case you may have a context per user. So, if you have three trunks you could have three contexts:

[code][context_usr_a]
exten => s,1,Dial(SIP/usr_a)

[context_usr_b]
exten => s,1,Dial(SIP/usr_b)

[context_usr_c]
exten => s,1,Dial(SIP/usr_c)[/code]

Of course this could be streamlined and more capabilities added, but keeping this simple to start with. For the outbound side, you could again create a context for each user which effectively becomes their own class of service:

[code][context_usr_a]
exten => 9XXX.,1,Dial(ZAP/1/${EXTEN})

[context_usr_b]
exten => 9XXX.,1,Dial(ZAP/2/${EXTEN)

[context_usr_c]
exten => 9XXX.,1,Dial(ZAP/3/${EXTEN)[/code]

Once again, keeping this simple for simplicity sake, but this could be streamlined once you get the hang of how the mapping works. More here:

voip-info.org/wiki-Asterisk+ZAP+channels