2

I noticed that when creating a dialplan in asterisk on realtime, I cannot inlcude contexts.

So to be clear, I want to do the following:

[context1]
switch => Realtime

[context2]
include => context1
switch => Realtime

Or

[context1]
switch => Realtime/context1

[context2]
switch => Realtime/context1
switch => Realtime/context2

But none of the above seems to work. Is there any way to get this working? I need to use this in realtime.

Thanks in advance.

2
  • What error do you get on the CLI when you try this?
    – MichelV69
    Mar 30, 2015 at 11:50
  • None, but I already figured it out. See my answer. Mar 30, 2015 at 14:23

1 Answer 1

3

Realtime doesnt support inlcudes within realtime. Thereby you can tweak a little with the Goto function.

If you do this in your extensions.conf

[context1]
switch => Realtime

[context2]
switch => Realtime

And then in the database do this:

[context1]
exten => _XXXXXXXXX,1,Goto(context2,${EXTEN},1)

The above needs to translated to a query, I think you know how you need to do that since you are using Realtime.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .