Can someone tell me how to apply dial-plans on a per-user basis? The only way I can see to do it is to give each user their own context, so
I went and created some users in sip.conf, each with their own context.
And then in extensions.conf, we have:
; Block some numbers
exten => _900.,1,Answer
exten => _900.,2,playback(not-allowed)
; you get the idea…
Now, this works just fine at allowing me to block certain numbers for user1, and to create a dial-plan that is specific to user1. However, now user1 CANNOT dial user2 or user3 (ie each user in their own context can’t route to users in other contexts). Am I using contexts incorrectly? If I’m not, what am I doing wrong? How can users dial reach each other across different contexts?
Is there a more efficient way to provide per-user dial-plans so that I have find granularity over each user, and can block certain numbers for each user?
I might be able to look at the caller id, and based on where the call is coming from, apply certain dial-plan rules but that is ugly. Plus… I couldn’t get it work anyway.