Contexts

Hi,

I’m looking at having each endpoint have their own context (for endpoint outbound rules),
which would just have a bunch of includes to other contexts. I want to do this dynamically,
if I could do it in realtime/mysql that would be even better. If that isn’t possible, could there
be a way to #include all files in a specific directory and have asterisk go through those
during each session… As opposed to doing everything by hand and issuing a dialplan reload
each time?

I’m looking to do something by the web, where I can add/remove/provision devices/users/vm
eliminating the need to go into the asterisk cli. I like realtime, but I’d like to see more where
more things can be added/removed on the fly.

Thanks,
Holbrook

BTW, yes I know I could write up a nice function in say PHP to open up the extensions file,
parse it something using for loops to find [contexts] and get only the contents until the
next [context], and add/remove stuff with fopen/fputs, etc and then open up a connection to
ast through ast manager to reload.

I’m looking for an easy solution if the code already exists within the codebase to handle
something like this natively.