Skip to end of metadata
Go to start of metadata

Overview

As an open source project, the Asterisk project welcomes contributions that enhance and improve the functionality of Asterisk. This page describes the process for submitting patches to Asterisk.

Read More!

Icon

This page links to many other pages on the wiki that provide deeper explanations regarding reporting of issues, writing of patches, and participation in the Asterisk project. Please read the information on those linked pages! Having well tested, high quality patches proposed to the Asterisk project helps everyone.

Submitting a Patch

  1. Before contributing a patch, make sure your patch conforms to the Asterisk project Coding Guidelines.

  2. Create your patch in unified diff format.
    The easiest way to do this is from a checkout of Asterisk from Subversion:

    # svn diff > my_fancy_patch.diff

    Alternatively, you can use the diff -u command to create a patch in the appropriate format:

    # diff -u original/some_file.c modified/some_file.c > my_fancy_patch.diff
  3. Open a new issue in the Asterisk issue tracker. See Asterisk Issue Guidelines for more information on how to report an issue in the issue tracker.

    Icon

    If your patch fixes a bug, please write the patch against the oldest currently supported version of Asterisk. If your patch is a new feature or improvement, please write the patch against trunk. See Software Configuration Management Policies for more information about Asterisk release branches and the policies affecting them.

  4. Sign a License Contributor Agreement in the issue tracker.
  5. Attach your patch to the newly created issue, marking the patch as a code contribution.

Code Review

After you contribute a patch, bug marshals will triage the issue per the Issue Tracker Workflow. At this time, it is appropriate to put your patch up for code review. The Asterisk project uses Review Board for peer review of patches - for instructions on how to submit your patch to Review Board, see Review Board Usage.

All users who have signed a license contributor agreement have access to Review Board and are encouraged to participate in the peer review process. This includes not only review of your patch, but review of other patches as well.

Some Frequently Asked Questions

  1. Do I have to put my patch up for code review?
    In short, no. Attaching your patch as a code contribution to an issue in JIRA is all that is required.

    However, patches of any reasonable complexity should be put up for peer review. New features as well should always be reviewed.

    In practice, many developers in the Asterisk community look to Review Board for patches that are ready to be considered for submission. As such, you are highly encouraged to submit your patch to Review Board for peer review - but please read the instructions on Review Board Usage. You should also be aware of the Coding Guidelines, as well as the Code Review Checklist.

  2. No one has looked at my review. What do I do now?
    First, please be patient. There may be lots of peer reviews occurring, and it can take some time for members of the community to comment on a review.

    Second, help the reviewers by making sure that your patch is explained well, that the issue it solves/feature it provides is well understood, and that the patch is well tested. Unit tests and functional tests for the Asterisk Test Suite will help immensely, and may also be necessary for your patch to be included.

    Finally, get involved! Contributors who participate in other reviews and show a willingness to test and help out with other submissions will probably receive more attention themselves.

    When all else fails, ask for a review on the #asterisk-dev IRC channel or the asterisk-dev mailing list. Sometimes, we all just need a gentle nudge.

Committing

When a patch has been deemed correct and passed peer review - either on the issue in the issue tracker or Review Board - it will be committed by a developer with commit access. Which release branches the patch is committed into is determined by the Software Configuration Management Policies. All patches are committed to Asterisk trunk.

 

 

 

  • No labels