Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

Note
titleRead More!

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.

Panel
titleOn This Page

Table of Contents

Panel
titleAdditional Information

Children Display

Submitting a Patch

...

  1. Create an account with the Asterisk project

...

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

No Format
# svn diff > my_fancy_patch.diff

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

No Format
# diff -u original/some_file.c modified/some_file.c > my_fancy_patch.diff

...

  1. at https://signup.asterisk.org.
  2. Sign a Contributor License Agreement in the Asterisk issue tracker.
  3. Create a new issue in the Asterisk project issue tracker

...

  1. for the bug or new feature. Please read the Asterisk Issue Guidelines for

...

  1. information on

...

Tip

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.

...

  1. filing an issue.
  2. Obtain the Asterisk source code from Gerrit. Since you'll need to put your patch up for review, make an account in Gerrit as well, following the instructions on Gerrit Usage.
  3. Create a new Git branch for your change, and implement your change.
  4. Before submitting the patch, make sure your patch conforms to the Asterisk project Coding Guidelines.

  5. Submit the patch back to the project. There are two options:
    1. Highly Preferred: Submit the patch for code review to Gerrit, referencing the created issue in the topic field. Please follow the instructions on the Code Review and Gerrit Usage pages for submitting the patch to Gerrit.
    2. Not Preferred: attach the patch to the issue in unified diff format, 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.

...

If you have put the patch up for code review

...

on Gerrit, the patch will be reviewed there and - if accepted - merged into the project and the issue closed.

If you have not put the patch up for code review, your issue will be handled by an Asterisk developer as time and resources permits.

All users who have signed a license contributor agreement have access to

...

Gerrit 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,

...

  1. all patches made to Asterisk are peer reviewed. Hence, when you don't put your patch up for review, you place the burden on others to review your code for you. As you may imagine, preference is given to participants in the Asterisk project who choose to participate in the entire patch process.

    As such, you are highly encouraged to submit your patch to

...

  1. Gerrit. for peer review

...

  1. . Please be aware of the Coding Guidelines, as well as the Code Review Checklist, when doing so.

  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.