All,
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.
[user1]
context=user-user1
username=user1
…
[user2]
context=user-user2
username=user2
…
[user3]
context=user-user3
username=user3
And then in extensions.conf, we have:
[user-user1]
#include “dialplan-user1”
; Block some numbers
exten => _900.,1,Answer
exten => _900.,2,playback(not-allowed)
; you get the idea…
[user-user2]
#include “dialplan-user2”
[user-user3]
#include “dialplan-user3”
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.
Thanks,
Doug.