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.
Submitting a Patch
Before contributing a patch, make sure your patch conforms to the Asterisk project Coding Guidelines.
Create your patch in unified diff format.
The easiest way to do this is from a checkout of Asterisk from Subversion:
Alternatively, you can use the
diff -ucommand to create a patch in the appropriate format:
- Sign a License Contributor Agreement in the issue tracker.
- Attach your patch to the newly created issue, marking the patch as a code contribution.
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
- 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.
- 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.
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.