Multi Tenanting application - Can I include any context in other than default context?


I am working on the tenanting application using context to achieve same.

In my scenario, I need that GroupB extensions can call to GroupA extensions but GroupA extensions should be able to call GroupB extensions.

For that, I have configured following in extensions.conf file;

exten => 3000,1,Dial(${ip3000},30,r)
exten => 3000,2,Voicemail(u3000)
exten => 3000,3,Hangup
exten => 3000,102,Voicemail(b3000)
exten => 3000,103,Hangup

exten => 3001,1,Dial(${ip3001},30,r)
exten => 3001,2,Voicemail(u3001)
exten => 3001,3,Hangup
exten => 3001,102,Voicemail(b3001)
exten => 3001,103,Hangup

include => GroupA

exten => 3002,1,Dial(${ip3002},30,r)
exten => 3002,2,Voicemail(u3002)
exten => 3002,3,Hangup
exten => 3002,102,Voicemail(b3002)
exten => 3002,103,Hangup

exten => 3003,1,Dial(${ip3003},30,r)
exten => 3003,2,Voicemail(u3003)
exten => 3003,3,Hangup
exten => 3003,102,Voicemail(b3003)
exten => 3003,103,Hangup

However, with this configuration, even internal calls between 3000 and 3001.

What I got in the debug is like following;
“Looking for 3000 in default”

and then rejects with 404 Not found.
If I am including GroupA and GorupB context in default context then extensions in GroupA and GorupB can call each other and the purpose does not serve.

What is the best practice in such scenarios?


You should start by identifying why your call is going to the default context. Is this where it is configured to go? What is your sip.conf?

1 Like

Okey… I have totally missed that. Its default context in sip.conf.

Thanks Jcolp.