Skip to content
Snippets Groups Projects
  1. Sep 10, 2021
    • George Joseph's avatar
      res_snmp: Add -fPIC to _ASTCFLAGS · 448962d0
      George Joseph authored
      With gcc 11, res/res_snmp.c and res/snmp/agent.c need the
      -fPIC option added to its _ASTCFLAGS.
      
      ASTERISK-29634
      
      Change-Id: I34649c85e075fd954e578378fabf798c3f038f50
      448962d0
  2. Aug 19, 2021
  3. Mar 25, 2020
    • Ben Ford's avatar
      res_stir_shaken: Initial commit and reading private key. · 211bb8a7
      Ben Ford authored
      This commit sets up some of the initial framework for the module and
      adds a way to read the private key from the specified file, which will
      then be appended to the certificate object. This works fine for now, but
      eventually some other structure will likely need to be used to store all
      this information. Similarly, the caller_id_number is specified on the
      certificate config object, but in the end we will want that information
      to be tied to the certificate itself and read it from there.
      
      A method has been added that will retrieve the private key associated
      with the caller_id_number passed in. Tab completion for certificates and
      stores has also been added.
      
      Change-Id: Ic4bc1416fab5d6afe15a8e2d32f7ddd4e023295f
      211bb8a7
  4. Mar 03, 2020
    • Kevin Harwell's avatar
      codec negotiation: add incoming_call_offer_prefs option · 06dada3f
      Kevin Harwell authored
      Add a new option, incoming_call_offer_pref, to res_pjsip endpoints that
      specifies the preferred order of codecs after receiving an offer.
      
      This patch does the following:
      
        Adds a new enumeration, ast_sip_call_codec_pref, used by the the new
      configuration option that's added to the endpoint media structure.
      
        Adds a new ast_sip_session_caps structure that's set for each session media
      object.
      
        Creates a new file, res_pjsip_session_caps that "implements" the new
      structure and option, and is compiled into the res_pjsip_session library.
      
      ASTERISK-28756 #close
      
      Change-Id: I35e7a2a0c236cfb6bd9cdf89539f57a1ffefc76f
      06dada3f
  5. May 21, 2019
    • Matt Jordan's avatar
      res_prometheus: Add Asterisk channel metrics · 0760af71
      Matt Jordan authored
      This patch adds basic Asterisk channel statistics to the res_prometheus
      module. This includes:
      
      * asterisk_calls_sum: A running sum of the total number of
        processed calls
      
      * asterisk_calls_count: The current number of calls
      
      * asterisk_channels_count: The current number of channels
      
      * asterisk_channels_state: The state of any particular channel
      
      * asterisk_channels_duration_seconds: How long a channel has existed,
        in seconds
      
      In all cases, enough information is provided with each channel metric
      to determine a unique instance of Asterisk that provided the data, as
      well as the name, type, unique ID, and - if present - linked ID of each
      channel.
      
      ASTERISK-28403
      
      Change-Id: I0db306ec94205d4f58d1e7fbabfe04b185869f59
      0760af71
  6. May 11, 2018
    • Corey Farrell's avatar
      Fix GCC 8 build issues. · b5914d90
      Corey Farrell authored
      This fixes build warnings found by GCC 8.  In some cases format
      truncation is intentional so the warning is just suppressed.
      
      ASTERISK-27824 #close
      
      Change-Id: I724f146cbddba8b86619d4c4a9931ee877995c84
      b5914d90
  7. Apr 18, 2018
    • Corey Farrell's avatar
      Build System: Add missing ASTMM_LIBC to flex output. · 179ae87c
      Corey Farrell authored
      Redirect libc allocation functions to use Asterisk functions for
      main/ast_expr2f.c and res/ael/ael_lex.c.  This will resolve errors
      produced by astmm.h when these files are regenerated, though other
      issues still remain.
      
      ASTERISK~27813
      
      Change-Id: I7263e9e4217a17bde4ffaa2087a8f8aeb2a8588c
      179ae87c
  8. Dec 22, 2017
  9. Apr 14, 2015
    • Corey Farrell's avatar
      Build System: Create Makefile macro MOD_ADD_SOURCE. · 62508d68
      Corey Farrell authored
      This new macro allows a single line to add all additional
      sources to a module.  This helps prevent modules from
      missing steps, and makes future changes easier since
      they can be made in a single place.
      
      ASTERISK-24960 #close
      Reported by: Corey Farrell
      
      Change-Id: I38f12d8b72c5e7bb37a879b2fb51761a2855eb4b
      62508d68
  10. Mar 28, 2015
  11. Aug 30, 2013
    • David M. Lee's avatar
      ARI: Implement /recordings/stored API's · 7f547872
      David M. Lee authored
      his patch implements the ARI API's for stored recordings. While the
      original task only specified deleting a recording, it was simple
      enough to implement the GET for all recordings, and for an individual
      recording.
      
      The recording playback operation was modified to use the same code for
      accessing the recording as the REST API, so that they will behave
      consistently.
      
      There were several problems with the api-docs that were also fixed,
      bringing the ARI spec in line with the implementation. There were some
      'wishful thinking' fields on the stored recording model (duration and
      timestamp) that were removed, because I ended up not implementing a
      metadata file to go along with the recording to store such information.
      
      The GET /recordings/live operation was removed, since it's not really
      that useful to get a list of all recordings that are currently going
      on in the system. (At least, if we did that, we'd probably want to
      also list all of the current playbacks. Which seems weird.)
      
      (closes issue ASTERISK-21582)
      Review: https://reviewboard.asterisk.org/r/2693/
      ........
      
      Merged revisions 397985 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      7f547872
  12. Jul 30, 2013
    • Mark Michelson's avatar
      The large GULP->PJSIP renaming effort. · 735b30ad
      Mark Michelson authored
      The general gist is to have a clear boundary between old SIP stuff
      and new SIP stuff by having the word "SIP" for old stuff and "PJSIP"
      for new stuff. Here's a brief rundown of the changes:
      
      * The word "Gulp" in dialstrings, functions, and CLI commands is now
        "PJSIP"
      * chan_gulp.c is now chan_pjsip.c
      * Function names in chan_gulp.c that were "gulp_*" are now "chan_pjsip_*"
      * All files that were "res_sip*" are now "res_pjsip*"
      * The "res_sip" directory is now "res_pjsip"
      * Files in the "res_pjsip" directory that began with "sip_*" are now "pjsip_*"
      * The configuration file is now "pjsip.conf" instead of "res_sip.conf"
      * The module info for all PJSIP-related files now uses "PJSIP" instead of "SIP"
      * CLI and AMI commands created by Asterisk's PJSIP modules now have "pjsip" as
      the starting word instead of "sip"
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      735b30ad
  13. Jul 27, 2013
  14. Jul 03, 2013
    • David M. Lee's avatar
      ARI authentication. · 9ba976b1
      David M. Lee authored
      This patch adds authentication support to ARI.
      
      Two authentication methods are supported. The first is HTTP Basic
      authentication, as specified in RFC 2617[1]. The second is by simply
      passing the username and password as an ?api_key query parameter
      (which allows swagger-ui[2] to authenticate more easily).
      
      ARI usernames and passwords are configured in the ari.conf file
      (formerly known as stasis_http.conf). The user may be set to
      `read_only`, which will prohibit the user from issuing POST, DELETE,
      etc. Also, the user's password may be specified in either plaintext,
      or encrypted using the crypt() function.
      
      Several other notes about the patch.
      
       * A few command line commands for seeing ARI config and status were
         also added.
       * The configuration parsing grew big enough that I extracted it to
         its own file.
      
       [1]: http://www.ietf.org/rfc/rfc2617.txt [2]:
       https://github.com/wordnik/swagger-ui
      
      (closes issue ASTERISK-21277)
      Review: https://reviewboard.asterisk.org/r/2649/
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      9ba976b1
    • David M. Lee's avatar
      Update events to use Swagger 1.3 subtyping, and related aftermath · c9a3d456
      David M. Lee authored
      This patch started with the simple idea of changing the /events data
      model to be more sane. The original model would send out events like:
      
          { "stasis_start": { "args": [], "channel": { ... } } }
      
      The event discriminator was the field name instead of being a value in
      the object, due to limitations in how Swagger 1.1 could model objects.
      While technically sufficient in communicating event information, it was
      really difficult to deal with in terms of client side JSON handling.
      
      This patch takes advantage of a proposed extension[1] to Swagger which
      allows type variance through the use of a discriminator field. This had
      a domino effect that made this a surprisingly large patch.
      
       [1]: https://groups.google.com/d/msg/wordnik-api/EC3rGajE0os/ey_5dBI_jWcJ
      
      In changing the models, I also had to change the swagger_model.py
      processor so it can handle the type discriminator and subtyping. I took
      that a big step forward, and using that information to generate an
      ari_model module, which can validate a JSON object against the Swagger
      model.
      
      The REST and WebSocket generators were changed to take advantage of the
      validators. If compiled with AST_DEVMODE enabled, JSON objects that
      don't match their corresponding models will not be sent out. For REST
      API calls, a 500 Internal Server response is sent. For WebSockets, the
      invalid JSON message is replaced with an error message.
      
      Since this took over about half of the job of the existing JSON
      generators, and the .to_json virtual function on messages took over the
      other half, I reluctantly removed the generators.
      
      The validators turned up all sorts of errors and inconsistencies in our
      data models, and the code. These were cleaned up, with checks in the
      code generator avoid some of the consistency problems in the future.
      
       * The model for a channel snapshot was trimmed down to match the
         information sent via AMI. Many of the field being sent were not
         useful in the general case.
       * The model for a bridge snapshot was updated to be more consistent
         with the other ARI models.
      
      Another impact of introducing subtyping was that the swagger-codegen
      documentation generator was insufficient (at least until it catches up
      with Swagger 1.2). I wanted it to be easier to generate docs for the API
      anyways, so I ported the wiki pages to use the Asterisk Swagger
      generator. In the process, I was able to clean up many of the model
      links, which would occasionally give inconsistent results on the wiki. I
      also added error responses to the wiki docs, making the wiki
      documentation more complete.
      
      Finally, since Stasis-HTTP will now be named Asterisk REST Interface
      (ARI), any new functions and files I created carry the ari_ prefix. I
      changed a few stasis_http references to ari where it was non-intrusive
      and made sense.
      
      (closes issue ASTERISK-21885)
      Review: https://reviewboard.asterisk.org/r/2639/
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393529 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      c9a3d456
    • David M. Lee's avatar
      Shuffle RESTful URL's around. · dcf03554
      David M. Lee authored
      This patch moves the RESTful URL's around to more appropriate
      locations for release.
      
      The /stasis URL's are moved to /ari, since Asterisk REST Interface was
      a more appropriate name than Stasis-HTTP. (Most of the code still has
      stasis_http references, but they will be cleaned up after there are no
      more outstanding branches that would have merge conflicts with such a
      change).
      
      A larger change was moving the ARI events WebSocket off of the shared
      /ws URL to its permanent home on /ari/events. The Swagger code
      generator was extended to handle "upgrade: websocket" and
      "websocketProtocol:" attributes on an operation.
      
      The WebSocket module was modified to better handle WebSocket servers
      that have a single registered protocol handler. If a client
      connections does not specify the Sec-WebSocket-Protocol header, and
      the server has a single protocol handler registered, the WebSocket
      server will go ahead and accept the client for that subprotocol.
      
      (closes issue ASTERISK-21857)
      Review: https://reviewboard.asterisk.org/r/2621/
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      dcf03554
  15. May 21, 2013
  16. May 14, 2013
    • David M. Lee's avatar
      Break res_stasis into smaller files. · e8f4ac6c
      David M. Lee authored
      When implementing playback for stasis-http, the monolithicedness of
      res_stasis really started to get in my way.
      
      This patch breaks the major components of res_stasis.c into individual
      files.
      
       * res/stasis/app.c - Stasis application tracking
       * res/stasis/control.c - Channel control objects
       * res/stasis/command.c - Channel command object
      
      This refactoring also allows res_stasis applications to be loaded as
      independent modules, such as the new res_stasis_answer module.
      
      The bulk of this patch is simply moving code from one file to another,
      adjusting names and adding accessors as necessary.
      
      Review: https://reviewboard.asterisk.org/r/2530/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388729 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      e8f4ac6c
  17. Apr 25, 2013
    • Mark Michelson's avatar
      Merge the pimp_my_sip branch into trunk. · 74f23180
      Mark Michelson authored
      The pimp_my_sip branch is being merged at this point because
      it offers basic functionality, and from an API standpoint, things
      are complete.
      
      SIP work is *not* feature-complete; however, with the completion
      of the SUBSCRIBE/NOTIFY API, all APIs (except a PUBLISH API) have
      been created, and thus it is possible for developers to attempt
      to create new SIP work.
      
      API documentation can be found in the doxygen in the code, but
      usability documentation is still lacking.
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      74f23180
  18. Apr 22, 2013
    • David M. Lee's avatar
      This patch adds a RESTful HTTP interface to Asterisk. · 1c21b857
      David M. Lee authored
      The API itself is documented using Swagger, a lightweight mechanism for
      documenting RESTful API's using JSON. This allows us to use swagger-ui
      to provide executable documentation for the API, generate client
      bindings in different languages, and generate a lot of the boilerplate
      code for implementing the RESTful bindings. The API docs live in the
      rest-api/ directory.
      
      The RESTful bindings are generated from the Swagger API docs using a set
      of Mustache templates.  The code generator is written in Python, and
      uses Pystache. Pystache has no dependencies, and be installed easily
      using pip. Code generation code lives in rest-api-templates/.
      
      The generated code reduces a lot of boilerplate when it comes to
      handling HTTP requests. It also helps us have greater consistency in the
      REST API.
      
      (closes issue ASTERISK-20891)
      Review: https://reviewboard.asterisk.org/r/2376/
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      1c21b857
  19. Mar 12, 2013
  20. Feb 04, 2013
  21. Oct 14, 2012
  22. Sep 07, 2012
    • David M. Lee's avatar
      Fix parallel make for res_asterisk_rtp. · cab7acd2
      David M. Lee authored
      Fixes a build regression introduced in r369517 "Add support for ICE/STUN/TURN
      in res_rtp_asterisk and chan_sip." [1].
      
      [1] http://svnview.digium.com/svn/asterisk?view=revision&revision=369517
      
      When compiling asterisk in parallel like:
          $ make -j 10
      
      It's possible to get errors like the following:
      
          .pjlib-util-test-x86_64-unknown-linux-gnu.depend:120: *** missing separator.  Stop.
          make[4]: *** [depend] Error 2
          make[3]: *** [dep] Error 1
          make[2]: *** [/home/sruffell/asterisk-working/res/pjproject/pjnath/lib/libpjnath-x86_64-unknown-linux-gnu.a] Error 2
          make[3]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
      
      This is because the build system is trying to build each of the libraries in
      pjproject in parallel. Now the build will build pjproject in a single job and
      link the results into res_asterisk_rtp.
      
      Parallel builds, on one test system, saves ~1.5 minutes from a default Asterisk
      build:
      
      Single job:
          $ git clean -fdx >/dev/null && time ( ./configure >/dev/null 2>&1 && make >/dev/null 2>&1 )
      
          real    2m34.529s
          user    1m41.810s
          sys     0m15.970s
      
      Parallel make:
          $ git clean -fdx >/dev/null && time ( ./configure >/dev/null 2>&1 && make -j10 >/dev/null 2>&1 )
      
          real    1m2.353s
          user    2m39.120s
          sys     0m18.850s
      
      (closes issue ASTERISK-20362)
      Reported by: Shaun Ruffel
      Patches:
          0001-res_asterisk_rtp-Fix-build-error-when-using-parallel.patch uploaded by Shaun Ruffel (License #5417)
      ........
      
      Merged revisions 372609 from http://svn.asterisk.org/svn/asterisk/branches/11
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      cab7acd2
  23. Jul 19, 2012
  24. Jul 01, 2012
  25. May 09, 2011
  26. May 11, 2010
  27. Mar 23, 2010
    • Kevin P. Fleming's avatar
      Change per-file debug and verbose levels to be per-module, the way · ae6008ef
      Kevin P. Fleming authored
      users expect them to work.
      
      'core set debug' and 'core set verbose' can optionally change the
      level for a specific filename; however, this is actually for a
      specific source file name, not the module that source file is included
      in. With examples like chan_sip, chan_iax2, chan_misdn and others
      consisting of multiple source files, this will not lead to the
      behavior that users expect. If they want to set the debug level for
      chan_sip, they want it set for all of chan_sip, and not to have to
      also set it for reqresp_parser and other files that comprise the
      chan_sip module.
      
      This patch changes this functionality to be module-name based instead
      of file-name based.
      
      To make this work, some Makefile modifications were required to ensure
      that the AST_MODULE definition is present in each object file produced
      for each module as well.
      
      Review: https://reviewboard.asterisk.org/r/574/
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@253917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      ae6008ef
  28. Jan 25, 2010
  29. Jan 24, 2010
    • Tilghman Lesher's avatar
      Merged revisions 242520 via svnmerge from · bc9f02a6
      Tilghman Lesher authored
      https://origsvn.digium.com/svn/asterisk/branches/1.4
      
      ........
        r242520 | tilghman | 2010-01-24 00:33:01 -0600 (Sun, 24 Jan 2010) | 8 lines
        
        Only rebuild bison and flex source files on demand, if bison and flex are detected by the configure script.
        
        Changed after discussion on the -dev list about possible unnecessary build
        failures, due to checkouts/untars causing these special source files to
        possibly be newer than their resulting C files.  This should additionally
        ensure that nobody need learn about extra Makefile arguments to ensure the
        proper files get rebuilt when changes are made to these special source files.
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@242521 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      bc9f02a6
  30. Jan 22, 2010
  31. Jul 21, 2009
    • Kevin P. Fleming's avatar
      Merged revisions 207647 via svnmerge from · 96e4e31e
      Kevin P. Fleming authored
      https://origsvn.digium.com/svn/asterisk/branches/1.4
      
      ........
        r207647 | kpfleming | 2009-07-21 08:04:44 -0500 (Tue, 21 Jul 2009) | 12 lines
        
        Ensure that user-provided CFLAGS and LDFLAGS are honored.
        
        This commit changes the build system so that user-provided flags (in ASTCFLAGS
        and ASTLDFLAGS) are supplied to the compiler/linker *after* all flags provided
        by the build system itself, so that the user can effectively override the
        build system's flags if desired. In addition, ASTCFLAGS and ASTLDFLAGS can now
        be provided *either* in the environment before running 'make', or as variable
        assignments on the 'make' command line. As a result, the use of COPTS and LDOPTS
        is no longer necessary, so they are no longer documented, but are still supported
        so as not to break existing build systems that supply them when building Asterisk.
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@207680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      96e4e31e
  32. Nov 28, 2008
  33. Nov 20, 2008
    • Kevin P. Fleming's avatar
      Merged revisions 157859 via svnmerge from · 8d5deb31
      Kevin P. Fleming authored
      https://origsvn.digium.com/svn/asterisk/branches/1.4
      
      ........
        r157859 | kpfleming | 2008-11-19 15:34:47 -0600 (Wed, 19 Nov 2008) | 7 lines
        
        the gcc optimizer frequently finds broken code (use of uninitalized variables, unreachable code, etc.), which is good. however, developers usually compile with the optimizer turned off, because if they need to debug the resulting code, optimized code makes that process very difficult. this means that we get code changes committed that weren't adequately checked over for these sorts of problems.
        
        with this build system change, if (and only if) --enable-dev-mode was used and DONT_OPTIMIZE is turned on, when a source file is compiled it will actually be preprocessed (into a .i or .ii file), then compiled once with optimization (with the result sent to /dev/null) and again without optimization (but only if the first compile succeeded, of course).
        
        while making these changes, i did some cleanup work in Makefile.rules to move commonly-used combinations of flag variables into their own variables, to make the file easier to read and maintain
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@157974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      8d5deb31
  34. Jul 13, 2008
    • Michiel van Baak's avatar
      Make all sed calls Posix sed compatible. · 0d49cdae
      Michiel van Baak authored
      To make sure nobody commits script-modified files we first make a backup
      of asterisk.tex, run the script, generate the pdf and / or html,
      and put the original asterisk.tex back.
      This will guard us for the stuff that happened before that someone committed 
      a locally modified asterisk.tex, with changes done by this script.
      
      (closes issue #13062)
      Reported by: mvanbaak
      Patches:
            sed_without-i-v3.diff uploaded by mvanbaak (license 7)
      Tested by: mvanbaak
      
      Feedback from Corydon. Thanks for taking the time to go through this.
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130578 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      0d49cdae
Loading