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/Configuration
    • Labels:
      None
    • Mantis ID:
      3485
    • Regression:
      No

      Description

      This patch implements the #exec directive in the ast_load file parser. This permits you to run an executable dynamicly during reload. The output is expected to be any legal asterisk config formated data. The resulting output is included as if it were a #include and then destroyed.

                • ADDITIONAL INFORMATION ******

      Disclaimer on file.
      anthmct@yahoo.com

        Activity

        Hide
        Andrey S Pankov added a comment -

        "Directive '#exec' needs an argument (path)"...

        Why path? I understand this should be smth like "filename with full path to it", but path without filename is not enough.

        Show
        Andrey S Pankov added a comment - "Directive '#exec' needs an argument (path)"... Why path ? I understand this should be smth like "filename with full path to it", but path without filename is not enough.
        Hide
        Mark Spencer added a comment -

        Since this gives config file access to execute commands, I think there should be a global option to enable/disable (default obviously being disabled). What do you think?

        Show
        Mark Spencer added a comment - Since this gives config file access to execute commands, I think there should be a global option to enable/disable (default obviously being disabled). What do you think?
        Hide
        Anthony Minessale added a comment -

        Good idea,

        command line... -e
        or in asterisk.conf:
        [options]
        exec_includes => true ; default false

        also changed it to warn
        '#exec' needs an argument (/path/to/executable)

        For those lucky few of us that don't know a what a path is but were somehow able to run unix and compile and patch asterisk.

        Show
        Anthony Minessale added a comment - Good idea, command line... -e or in asterisk.conf: [options] exec_includes => true ; default false also changed it to warn '#exec' needs an argument (/path/to/executable) For those lucky few of us that don't know a what a path is but were somehow able to run unix and compile and patch asterisk.
        Hide
        Mark Spencer added a comment -

        Okay need to update the man page, too!

        Show
        Mark Spencer added a comment - Okay need to update the man page, too!
        Hide
        Mark Spencer added a comment -

        (or remove it from the command line, and just have it from asterisk.conf, either way – does this really belong on the command line anyway?)

        Show
        Mark Spencer added a comment - (or remove it from the command line, and just have it from asterisk.conf, either way – does this really belong on the command line anyway?)
        Hide
        Anthony Minessale added a comment -

        markster,

        I'll let you pick! I'm not sure I just did it like all the other global_options for consistancy sake. I was afraid having a global option in the file that was not also a flag would break the unwritten rules.

        If you do want the man page edited where is that file exactly I'm not sure which one you mean? but it should probably be documented there that asterisk.conf can control all the defaults of command line options too which is bet is a little-known fact.

        Look for me on IRC, i'm there chatting with your walloping bot!

        Show
        Anthony Minessale added a comment - markster, I'll let you pick! I'm not sure I just did it like all the other global_options for consistancy sake. I was afraid having a global option in the file that was not also a flag would break the unwritten rules. If you do want the man page edited where is that file exactly I'm not sure which one you mean? but it should probably be documented there that asterisk.conf can control all the defaults of command line options too which is bet is a little-known fact. Look for me on IRC, i'm there chatting with your walloping bot!
        Hide
        Mark Spencer added a comment -

        Added to CVS with the following changes:

        1) Initializing variables that have no path for being used before being initialized elsewise is pointless.

        2) Removed command line option

        3) Tried to cleanup code so that #exec followed by #include would do the right thing (not try to unlink the file twice, etc.)

        Thanks!

        Show
        Mark Spencer added a comment - Added to CVS with the following changes: 1) Initializing variables that have no path for being used before being initialized elsewise is pointless. 2) Removed command line option 3) Tried to cleanup code so that #exec followed by #include would do the right thing (not try to unlink the file twice, etc.) Thanks!
        Hide
        Russell Bryant added a comment -

        not in 1.0

        Show
        Russell Bryant added a comment - not in 1.0

          People

          • Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development