Multiple parameters asterisk real time extensions

Hi I’m looking at replicating the following static one line extension:
exten => 1001,1,Macro(test,en)

With an asterisk real time database.

Using the standard real time extension database I can see I have the following fields available:
context, exten, priority, app, appdata

In this case I could translate the static line above into a mysql row like so:
context, exten, priority, app, appdata
default, 1234, 1, Macro, (test,en);

However I would like to add additional fields to the database so I can construct the appdata variable.

For example I may in addition to setting the macro to pass the call to a language to use a time of day or a MOH setting.

Is it possible to add additional variables or is the real time database for extensions inflexible?
How does real time deal with brackets?


Hi there,

really didn’t get your point.

Can you please explain it more.

Sohaib Khan

I have updated the initial post to read a little better.

The purpose of this post is to see if real time extensions is suitable for handling >10k DDI’s and provide enough flexibility to not only route calls to a macro but also retrieve all of the variables I want to pass to a macro.

It maybe this is a two step process.

First the inbound ddi is looked up via real time extensions.
The call is routed to the macro
Then looked up again in the macro to retrieve the additional variables

But is there a better way of handling this requirement?

So I found the answer to part of my question. I need not worry about the the brackets but the coma’s.

Instead of using coma’s I should use pipe “|” in my database entry.

However I would prefer to have separate fields for each parameter stored in appdata. Is there a way to do this?

Perhaps I need to have separate fields for each parameter leaving the appdata field blank and rely on a triger to concatenate and update the appdata field?

Again is this the correct way to add extra fields to real time extensions?