Skip to content
Snippets Groups Projects
  1. Apr 13, 2015
    • Matt Jordan's avatar
      git migration: Refactor the ASTERISK_FILE_VERSION macro · 4a582616
      Matt Jordan authored
      Git does not support the ability to replace a token with a version
      string during check-in. While it does have support for replacing a
      token on clone, this is somewhat sub-optimal: the token is replaced
      with the object hash, which is not particularly easy for human
      consumption. What's more, in practice, the source file version was often
      not terribly useful. Generally, when triaging bugs, the overall version
      of Asterisk is far more useful than an individual SVN version of a file. As a
      result, this patch removes Asterisk's support for showing source file
      versions.
      
      Specifically, it does the following:
      
      * Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and
        remove passing the version in with the macro. Other facilities
        than 'core show file version' make use of the file names, such as
        setting a debug level only on a specific file. As such, the act of
        registering source files with the Asterisk core still has use. The
        macro rename now reflects the new macro purpose.
      
      * main/asterisk:
        - Refactor the file_version structure to reflect that it no longer
          tracks a version field.
        - Remove the "core show file version" CLI command. Without the file
          version, it is no longer useful.
        - Remove the ast_file_version_find function. The file version is no
          longer tracked.
        - Rename ast_register_file_version/ast_unregister_file_version to
          ast_register_file/ast_unregister_file, respectively.
      
      * main/manager: Remove value from the Version key of the ModuleCheck
        Action. The actual key itself has not been removed, as doing so would
        absolutely constitute a backwards incompatible change. However, since
        the file version is no longer tracked, there is no need to attempt to
        include it in the Version key.
      
      * UPGRADE: Add notes for:
        - Modification to the ModuleCheck AMI Action
        - Removal of the "core show file version" CLI command
      
      Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
      4a582616
  2. Sep 05, 2014
    • Matthew Jordan's avatar
      main/cdrs: Preserve context/extension when executing a Macro or GoSub · d42b1169
      Matthew Jordan authored
      The context/extension in a CDR is generally considered the destination of a
      call. When looking at a 2-party call CDR, users will typically be presented
      with the following:
      
      context    exten      channel     dest_channel app  data
      default    1000       SIP/8675309 SIP/1000     Dial SIP/1000,,20
      
      However, if the Dial actually takes place in a Macro, the current behaviour
      in 12 will result in the following CDR:
      
      context    exten      channel     dest_channel app  data
      macro-dial s          SIP/8675309 SIP/1000     Dial SIP/1000,,20
      
      The same is true of a GoSub:
      
      context    exten      channel     dest_channel app  data
      subs       dial_stuff SIP/8675309 SIP/1000     Dial SIP/1000,,20
      
      This generally makes the context/exten fields less than useful.
      
      It isn't hard to preserve these values in the CDR state machine; however, we
      need to have something that informs us when a channel is executing a
      subroutine. Prior to this patch, there isn't anything that does this.
      
      This patch solves this problem by adding a new channel flag,
      AST_FLAG_SUBROUTINE_EXEC. This flag is set on a channel when it executes a
      Macro or a GoSub. The CDR engine looks for this value when updating a Party A
      snapshot; if the flag is present, we don't override the context/exten on the
      main CDR object. In a funny quirk, executing a hangup handler must *not* abide
      by this logic, as the endbeforehexten logic assumes that the user wants to see
      data that occurs in hangup logic, which includes those subroutines. Since
      those execute outside of a typical Dial operation (and will typically have
      their own dedicated CDR anyway), this is unlikely to cause any heartburn.
      
      Review: https://reviewboard.asterisk.org/r/3962/
      
      ASTERISK-24254 #close
      Reported by: tm1000, Tony Lewis
      Tested by: Tony Lewis
      ........
      
      Merged revisions 422718 from http://svn.asterisk.org/svn/asterisk/branches/12
      ........
      
      Merged revisions 422719 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@422720 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      d42b1169
  3. Aug 13, 2014
  4. Jul 25, 2014
  5. May 09, 2014
  6. Apr 11, 2014
  7. Mar 27, 2014
  8. Feb 01, 2014
  9. Oct 02, 2013
  10. Aug 06, 2013
  11. Aug 01, 2013
  12. May 02, 2013
  13. Aug 21, 2012
  14. Jul 18, 2012
  15. Jul 10, 2012
  16. Jun 25, 2012
    • Matthew Jordan's avatar
      Add AMI event documentation · 82a7409c
      Matthew Jordan authored
      This patch adds the core changes necessary to support AMI event documentation
      in the source files of Asterisk, and adds documentation to those AMI events
      defined in the core application modules.  Event documentation is built from
      the source by two new python scripts, located in build_tools:
      get_documentation.py and post_process_documentation.py.
      
      The get_documentation.py script mirrors the actions of the existing AWK
      get_documentation scripts, except that it will scan the entirety of a source
      file for Asterisk documentation.  Upon encountering it, if the documentation
      happens to be an AMI event, it will attempt to extract information about the
      event directly from the manager event macro calls that raise the event.  The
      post_process_documentation.py script combines manager event instances that
      are the same event but documented in multiple source files.  It generates
      the final core-[lang].xml file.
      
      As this process can take longer to complete than a typical 'make all', it
      is only performed if a new make target, 'full', is chosen.
      
      Review: https://reviewboard.asterisk.org/r/1967/
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      82a7409c
  17. Jun 14, 2012
    • Richard Mudgett's avatar
      Allow non-normal execution routines to be able to run on hungup channels. · f8746d00
      Richard Mudgett authored
      * Make non-normal dialplan execution routines be able to run on a hung up
      channel.  This is preparation work for hangup handler routines.
      
      * Fixed ability to support relative non-normal dialplan execution
      routines.  (i.e., The context and exten are optional for the specified
      dialplan location.) Predial routines are the only non-normal routines that
      it makes sense to optionally omit the context and exten.  Setting a hangup
      handler also needs this ability.
      
      * Fix Return application being able to restore a dialplan location
      exactly.  Channels without a PBX may not have context or exten set.
      
      * Fixes non-normal execution routines like connected line interception and
      predial leaving the dialplan execution stack unbalanced.  Errors like
      missing Return statements, popping too many stack frames using StackPop,
      or an application returning non-zero could leave the dialplan stack
      unbalanced.
      
      * Fixed the AGI gosub application so it cleans up the dialplan execution
      stack and handles the autoloop priority increments correctly.
      
      * Eliminated the need for the gosub_virtual_context return location.
      
      Review: https://reviewboard.asterisk.org/r/1984/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      f8746d00
  18. Jun 01, 2012
  19. May 04, 2012
  20. Apr 20, 2012
  21. Mar 13, 2012
    • Terry Wilson's avatar
      Finalize ast_channel opaquification · 786f5898
      Terry Wilson authored
      Review: https://reviewboard.asterisk.org/r/1786/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358907 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      786f5898
    • Tilghman Lesher's avatar
      Enable macros in 1.8 to find the next highest "h" extension in a context, like in 1.4. · 9af5c769
      Tilghman Lesher authored
      This change restores functionality that was present in 1.4, when AEL macros
      were implemented with the Macro dialplan application.  Macros are fraught with
      functionality issues, because they consume a large portion of the underlying
      application stack.  This limits the ability of AEL users to call many layers
      of subroutines, an issue which Gosub does not have (originally tested to
      100,000 levels deep).  Therefore, starting in 1.6.0, AEL macros were
      implemented with Gosub.
      
      However, there were some implicit behaviors of Macro, which were not replicated
      at the same time as with the transition to Gosub, one of which is documented in
      the related issue.  In particular, the "h" extension is designed to execute not
      in the Macro context, but in the topmost calling context.  Due to legacy issues
      with a misapplied bugfix many years ago, when a macro exited in 1.4, it looks
      in all calling contexts, bubbling up from the deepest level until it finds an
      "h" extension.
      
      Since AEL hides the complexity of the underlying dialplan logic from the AEL
      programmer, it's reasonable to assume that this behavior should not change in
      the transition from Asterisk 1.4 LTS to Asterisk 1.8 LTS, lest we break
      working AEL configurations in the transition to Asterisk 1.8 LTS.  This fix
      is the result, which implements a search for the "h" extension in all calling
      Gosub contexts.
      
      Fixes ASTERISK-19336
      
      Patch: 20120308__ael_bugfix_for_trunk__2.diff (License #5003) by Tilghman Lesher
      	(with slight modifications for 1.8)
      
      Tested by: Johan Wilfer
      
      Review: https://reviewboard.asterisk.org/r/1776/
      ........
      
      Merged revisions 358810 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      ........
      
      Merged revisions 358811 from http://svn.asterisk.org/svn/asterisk/branches/10
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      9af5c769
  22. Feb 29, 2012
  23. Feb 28, 2012
  24. Feb 20, 2012
  25. Feb 13, 2012
  26. Jan 24, 2012
  27. Jan 09, 2012
    • Terry Wilson's avatar
      Replace direct access to channel name with accessor functions · 04da92c3
      Terry Wilson authored
      There are many benefits to making the ast_channel an opaque handle, from
      increasing maintainability to presenting ways to kill masquerades. This patch
      kicks things off by taking things a field at a time, renaming the field to
      '__do_not_use_${fieldname}' and then writing setters/getters and converting the
      existing code to using them. When all fields are done, we can move ast_channel
      to a C file from channel.h and lop off the '__do_not_use_'.
      
      This patch sets up main/channel_interal_api.c to be the only file that actually
      accesses the ast_channel's fields directly. The intent would be for any API
      functions in channel.c to use the accessor functions. No more monkeying around
      with channel internals. We should use our own APIs.
      
      The interesting changes in this patch are the addition of
      channel_internal_api.c, the moving of the AST_DATA stuff from channel.c to
      channel_internal_api.c (note: the AST_DATA stuff will have to be reworked to
      use accessor functions when ast_channel is really opaque), and some re-working
      of the way channel iterators/callbacks are handled so as to avoid creating fake
      ast_channels on the stack to pass in matching data by directly accessing fields
      (since "name" is a stringfield and the fake channel doesn't init the
      stringfields, you can't use the ast_channel_name_set() function). I went with
      ast_channel_name(chan) for a getter, and ast_channel_name_set(chan, name) for a
      setter.
      
      The majority of the grunt-work for this change was done by writing a semantic
      patch using Coccinelle ( http://coccinelle.lip6.fr/ ).
      
      Review: https://reviewboard.asterisk.org/r/1655/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      04da92c3
  28. Jul 14, 2011
  29. Jul 05, 2011
    • Tilghman Lesher's avatar
      Merged revisions 326411 via svnmerge from · 7d179abf
      Tilghman Lesher authored
      https://origsvn.digium.com/svn/asterisk/branches/1.8
      
      ........
        r326411 | tilghman | 2011-07-05 17:08:29 -0500 (Tue, 05 Jul 2011) | 14 lines
        
        Add the attribute "type" to each "<use>" for menuselect.
        
        This matters only when autoconf fails to detect that weak linking is supported.
        External optional dependencies will become optional in both cases, as they are
        removed at compile time when not detected.  However, runtime-optional modules
        are made mandatory when weak linking is not found.  This change affects only
        the external optional dependencies; previously, they were incorrectly required
        when weak linking support was not detected.
        
        Patches:
        	20110702__issue18062__asterisk_trunk.diff.txt by tilghman (License #5003)
        
        Tested by: iasgoscouk
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@326412 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      7d179abf
  30. Sep 02, 2010
  31. Jul 14, 2010
    • Richard Mudgett's avatar
      ast_callerid restructuring · ec37ffbd
      Richard Mudgett authored
      The purpose of this patch is to eliminate struct ast_callerid since it has
      turned into a miscellaneous collection of various party information.
      
      Eliminate struct ast_callerid and replace it with the following struct
      organization:
      
      struct ast_party_name {
      	char *str;
      	int char_set;
      	int presentation;
      	unsigned char valid;
      };
      struct ast_party_number {
      	char *str;
      	int plan;
      	int presentation;
      	unsigned char valid;
      };
      struct ast_party_subaddress {
      	char *str;
      	int type;
      	unsigned char odd_even_indicator;
      	unsigned char valid;
      };
      struct ast_party_id {
      	struct ast_party_name name;
      	struct ast_party_number number;
      	struct ast_party_subaddress subaddress;
      	char *tag;
      };
      struct ast_party_dialed {
      	struct {
      		char *str;
      		int plan;
      	} number;
      	struct ast_party_subaddress subaddress;
      	int transit_network_select;
      };
      struct ast_party_caller {
      	struct ast_party_id id;
      	char *ani;
      	int ani2;
      };
      
      The new organization adds some new information as well.
      
      * The party name and number now have their own presentation value that can
      be manipulated independently.  ISDN supplies the presentation value for
      the name and number at different times with the possibility that they
      could be different.
      
      * The party name and number now have a valid flag.  Before this change the
      name or number string could be empty if the presentation were restricted.
      Most channel drivers assume that the name or number is then simply not
      available instead of indicating that the name or number was restricted.
      
      * The party name now has a character set value.  SIP and Q.SIG have the
      ability to indicate what character set a name string is using so it could
      be presented properly.
      
      * The dialed party now has a numbering plan value that could be useful to
      have available.
      
      The various channel drivers will need to be updated to support the new
      core features as needed.  They have simply been converted to supply
      current functionality at this time.
      
      
      The following items of note were either corrected or enhanced:
      
      * The CONNECTEDLINE() and REDIRECTING() dialplan functions were
      consolidated into func_callerid.c to share party id handling code.
      
      * CALLERPRES() is now deprecated because the name and number have their
      own presentation values.
      
      * Fixed app_alarmreceiver.c write_metadata().  The workstring[] could
      contain garbage.  It also can only contain the caller id number so using
      ast_callerid_parse() on it is silly.  There was also a typo in the
      CALLERNAME if test.
      
      * Fixed app_rpt.c using ast_callerid_parse() on the channel's caller id
      number string.  ast_callerid_parse() alters the given buffer which in this
      case is the channel's caller id number string.  Then using
      ast_shrink_phone_number() could alter it even more.
      
      * Fixed caller ID name and number memory leak in chan_usbradio.c.
      
      * Fixed uninitialized char arrays cid_num[] and cid_name[] in
      sig_analog.c.
      
      * Protected access to a caller channel with lock in chan_sip.c.
      
      * Clarified intent of code in app_meetme.c sla_ring_station() and
      dial_trunk().  Also made save all caller ID data instead of just the name
      and number strings.
      
      * Simplified cdr.c set_one_cid().  It hand coded the ast_callerid_merge()
      function.
      
      * Corrected some weirdness with app_privacy.c's use of caller
      presentation.
      
      Review:	https://reviewboard.asterisk.org/r/702/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@276347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      ec37ffbd
  32. May 20, 2010
  33. Mar 16, 2010
  34. Dec 23, 2009
  35. Nov 10, 2009
  36. Aug 10, 2009
  37. Aug 09, 2009
  38. Aug 06, 2009
  39. Jun 15, 2009
Loading