Asterisk realtime include dialplans

asteriskrealtime

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.

Best Answer

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.