Asterisk
  1. Asterisk
  2. ASTERISK-5855

[patch] Allow for context includes in realtime (ARA)

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Severity: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Target Release Version/s: None
    • Component/s: Core/General
    • Labels:
      None
    • Mantis ID:
      6014
    • Regression:
      No

      Description

      This is a patch which allows you to include one or more contexts within another context in the ARA (realtime) dial plan. One of the major limitations of ARA has been the inability to include one context within another without having to creat "proxy contexts" in extensions.conf.

      This patch allows you to include one context from within another by creating a specail extension in your realtime context called 'include'. This context has one or emore priorities each of which 'includeds' one context. The context name should be placed in the appdata field (the field which normally contains the arguments for the selected application). The app field (where the application name goes) is ignored. For readability sake I use 'include' as the app name.

      The contexts are searched by priority order. The system accepts the first exacto or pattern match which it finds. BEWARE CIRCULAR INCLUSION! YOU WILL FILL YOUR STACK AND KILL YOUR PBX!

      Because of the overhead involved in executing queries, the system caches the 50 most recent 'hits' (cases where a match was found in an included context).

                • ADDITIONAL INFORMATION ******

      The system searches following the same search pattern as non-realtime Asterisk with the exception that we don't have the ability to invoke switches from RT. The order is:

      Exact Matches
      _Pattern Matches
      Include Context 1 Matches (Exact)
      Include Context 1 Matches (_Pattern)
      Include Context 2 Matches (Exact)
      Include Context 2 Matches (_Pattern)
      etc...

      To apply this patch, simply patch pbx_realtime.c, make, make install. Then add an "include" extension to one of your realtime contexts:

      id context exten priority app appdata
      1 default include 1 include inside_extensions
      2 default include 2 include standard_features

      Note that this makes use of the realtime_switch_common function reentrantly. Too many levels of inclusion could cause problems. And don't forget that circular inclusion is a sure-fired way to kill your Asterisk.

      Please test and let me know if this works for you.

      Disclaimer on file.

        Activity

        Hide
        Steven Sokol added a comment -

        I have not done much with it in the past few months (too busy with other work). Talking with several other developers I got the impression that ARA may be completely re-written at some point in the near future. I can try to make this work on TRUNK if anybody wants it.

        Show
        Steven Sokol added a comment - I have not done much with it in the past few months (too busy with other work). Talking with several other developers I got the impression that ARA may be completely re-written at some point in the near future. I can try to make this work on TRUNK if anybody wants it.
        Hide
        Serge Vecher added a comment -

        ok, what's the status of this work ...?

        Show
        Serge Vecher added a comment - ok, what's the status of this work ...?
        Hide
        jmls added a comment -

        ssokol, do we have any updates for this issue ? Thanks.

        Show
        jmls added a comment - ssokol, do we have any updates for this issue ? Thanks.
        Hide
        jmls added a comment -

        ping. housekeeping

        Show
        jmls added a comment - ping. housekeeping
        Hide
        Serge Vecher added a comment -

        please reopen if you are interested again and have the updated trunk patch available.

        Show
        Serge Vecher added a comment - please reopen if you are interested again and have the updated trunk patch available.

          People

          • Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development