Multiple contexts served from one IAX trunk


#1

Hi,
I am trying to serve multiple contexts from one IAX trunk and am having difficulty.

The intention is to provide 3 seperate pbxs on one asterisk box, seperating each virtual pbx by using different contexts.

all of the incoming numbers come into the asterisk box using one iax trunk from one provider.

Each of the number ranges and there associated vPBX all work fine, when the context in the IAX.conf file is set to the one they use, but as soon as I try to introduce more contexts the whole lot fails.

I have tried:

context=firstcontextname&secondcontextname&thirdcontextname

and also tried
context=firstcontextname
context=secondcontextname
context=thirdcontextname

but both ways do not work for me.

what am I doing wrong please?

y68r


#2

And Asterisk should guess which context to use? :smile:
Try creating 3 contexts for the 3 virtual PBXes and 1 for the trunk. Then in the new context you can match the dialed number and jump to another context using Goto().

Stoyan