ARA dialplans with contexts

Hi there,

I am wanting to work with multiple contexts, however I have been unsuccessful in getting the dialplan to load from the extensions table with ARA. In my extconfig.conf I have:

extensions => odbc,asterisk

In sorcery.conf I have:

extension=realtime,extensions

module show like realtime shows:

sip*CLI> module show like realtime
Module                         Description                              Use Count  Status      Support Level
func_realtime.so               Read/Write/Store/Destroy values from a R 0          Running              core
pbx_realtime.so                Realtime Switch                          0          Running          extended
res_realtime.so                Realtime Data Lookup/Rewrite             0          Running              core
res_sorcery_realtime.so        Sorcery Realtime Object Wizard           6          Running              core
4 modules loaded

I am not seeing the dialplans come through from the extensions table, and it appears that pbx_realtime is loaded but not in use.

I don’t have experience with dialplan from realtime, but I can say that it does not use sorcery.conf

Okay, good to know.

What would you recommend be the best way to handle context’s? Essentially I want to group extensions. My thinking is extensions / usernames would be:

10001100 - context is 10001 and the extension is 100.

What would be the best way to match this against a dialplan?

On Tuesday 01 April 2025 at 12:53:55, santasenforcer via Asterisk Community
wrote:

What would you recommend be the best way to handle context’s? Essentially I
want to group extensions. My thinking is extensions / usernames would be:

10001100 - context is 10001 and the extension is 100.

You appear to be using the word “context” in a very different way from the
standard Asterisk meaning.

I recommend you (a) choose a different word which does not conflict with
standard Asterisk terminology, and (b) explain exactly what you mean by it.

Antony.


RFC 6890 - Special-Purpose IP Address Registries - providing 16 million IPv4 addresses for
talking to yourself.

Right. I thought I was reasonably clear in my last reply.

I am toying with the idea of multiple tenancies for different organisational units. Each should be able to have their own dial plan which they can control. I don’t particularly want to have it statically set, instead be database driven or dynamic in a way.

What aspects would be dynamic?

Something to remember, and that I remind people of often, is that the act of doing that means you’ve increased your exposure to problems. If you are relying on a database in realtime it means if your database has a problem, now your voice platform has a problem.

Create a file per organisation and prefix each of their context with
unique ID and your done.

Le 01/04/2025 à 14:33, santasenforcer via Asterisk Community a écrit :

[santasenforcer] santasenforcer
https://community.asterisk.org/u/santasenforcer
April 1

Right. I thought I was reasonably clear in my last reply.

I am toying with the idea of multiple tenancies for different
organisational units. Each should be able to have their own dial plan
which they can control. I don’t particularly want to have it
statically set, instead be database driven or dynamic in a way.


Visit Topic
https://community.asterisk.org/t/ara-dialplans-with-contexts/107687/5
or reply to this email to respond.


    In Reply To

[Pooh] Pooh https://community.asterisk.org/u/pooh
April 1

On Tuesday 01 April 2025 at 12:53:55, santasenforcer via Asterisk
Community wrote: What would you recommend be the best way to handle
context’s? Essentially I want to group extensions. My thinking is
extensions / usernames would be: 10001100 - context is 10001 and the
extension is 100. You ap…

Visit Topic
https://community.asterisk.org/t/ara-dialplans-with-contexts/107687/5
or reply to this email to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, click here
<>.


Daniel

At the moment, I am just trying to have multiple contexts work successfully. If I add the context into the extensions.conf file as it’s own section, then it works, but if I do it as default it doesn’t. I’m not finding much documentation about how to handle it.

Contexts are their own sections, that’s how it works.

Understood. Is it possible to populate contexts from the database?

Yes and no. If you are using ARA for extensions, in true realtime mode, an in memory copy is never populated. Instead, the database is searched every time the dialplan steps to the next priority. However you can run with dialplan read from the database, and context is fundamental to the dialplan, so every database fetch includes the context field, from the database, as part of the key used to access the database. context is just part of a compound key.

There is, apparently, a static mode, in which the database is treated like a .conf file, but I don’t see what advantage that would have for you, as, I assume, it would only be read on a reload.

You can, as FreePBX does, populate a .conf file by running a report, on the contents of a database, although that database is not one known to Asterisk, itself.

ARA is called realtime, specifically for the way it handles extensions. The data is read at the time of use.