I’m not sure why you need dots (.) in your voicemail context, you can just give it a more cleaner name scheme.
The same with the endpoints and AORs. I’ve been down this road and using a URI still name for the endpoint/aor seems to cause these issues. When I don’t do that, the issue goes away. There really isn’t a lot of domain based support so far, so having the domain doesn’t do much.
That’s completely untrue. When a call comes in from the phone you can use username,ip,header,auth_username to authenticate with. The username will match username@domain then username by itself. You don’t need the domain, no one does it that way normally.
Now if you’re trying to do this to be multi-tenant/domain then you can use identify options to match against IPs or headers and associate it with the endpoint. I do this right now, I have four different locations with the “user” 208 I just have different endpoints configured and use the various auth options, like identify, to associate/auth that call/request to the endpoint in question.
So yes, this can be done with out the use of full URIs to try and break things up.
The username will match username@domain then username by itself. You don’t need the domain, no one does it that way normally.
I’m under the impression chan_sip was not able to match on the full user@domain, only on the userpart which is why traditionally the user portion had to be unique. The good news is these days we have a better sip stack to work with.
I’m using a proxy to handle my registration and authentication, Endpoint’s won’t have unique IP’s, asterisk see’s allt he traffic coming from the same proxy no matter what the domain is.
How are you using header matching? I don’t see it being well documented and trying to just use match_header = From didn’t work.
Well I use Kamailio as the SIP Proxy for the users. In the case of my hosted voice users (ones that are using a virtual PBX style service) I create individual endpoints/aors, etc for the users. The name of the endpoint or the aor doesn’t matter. I use match_header= and use a custom header. I agree the documentation on this option is lacking. I’ve been struggling with the regex matching and using standard headers so I just send my own.
So I use something along the lines of match_header=X-USERID: user@domain note the syntax so using match_header=From: <must be exact match to From header including tags> is going to be problematic, this is where the regex issue has me banging my head. I just then associate them with the endpoint I need to.
On the AOR side I just set static a static contact=sip:user@domain:port which is their actual SIP URI on the proxy. Works like a champ so far.
In fact I have one system that is just a gateway to pass the calls through for the SIP Trunk and Resi/SOHO users and I have one single endpoint on Asterisk for the proxy, I use custom headers to send user details to allow looking up things in AstDB for the call and any “premium functions”. I also use that single endpoint with an single AOR to send calls to the proxy for all the users by just using setting the static contact as contact=sip:domain:port and setting the user portion via the Dial() string. Dial(PJSIP/${EXTEN}@endpoint)