[asterisk-users] SIP Context Confusion

Anthony Plack tony at plack.net
Wed Apr 1 14:45:49 CDT 2009


Okay, I am not understanding if I have this correct or not.

I have a requirement to allow guests into a PBX from different domains.  However, I can not allow the guests into the default context because each domain has its own IVR.  So I end up setting the domain context.  I also need to provide separate contexts for different sip users (different dial groups).  Small system, few users, so it doesn't make sense to create separate Asterisk boxes (cost wise and support) and some of the prompts are similar.  Same company, different micro departments and web domains.  Should need to either.

If I set the user context to "user1" and have set a domain context set to "guests1" in sip.conf, the system is ignoring the "user1" context.  An incoming call (from the code) will be force the context to "guests1" and not have the "user1".  I quote:

	/* If we have a context defined, overwrite the original context */

For example, in sip.conf:

	[general]
	context=fromsip
	domain=domain1.tld,guests1
	domain=domain2.tld,guests2

	[userA]
	context=user1

It would seem to me, that if the context was NOT set in the SIP entry, and a domain context was available, only then would you replace the context.

To me, I would go from micro to macro definition and not jump around.  So we would have peer, domain, general in the SIP context hierarchy.  Instead we have domain, peer, general.

What am I missing about why this is setup this way (other than that is the way it has always been)?

Looking for some instruction here to wrap my head around this better.

As stands now, I believe I have to set all the phones up to a domain without a context to allow the local context to be used.  Is that correct?



More information about the asterisk-users mailing list