<html>
<head>
<base href="https://wiki.asterisk.org/wiki">
<link rel="stylesheet" href="/wiki/s/en/2176/25/9/_/styles/combined.css?spaceKey=AST&forWysiwyg=true" type="text/css">
</head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
<h2><a href="https://wiki.asterisk.org/wiki/display/AST/New+SIP+channel+driver">New SIP channel driver</a></h2>
<h4>Page <b>edited</b> by <a href="https://wiki.asterisk.org/wiki/display/~mmichelson">Mark Michelson</a>
</h4>
<br/>
<h4>Changes (3)</h4>
<div id="page-diffs">
<table class="diff" cellpadding="0" cellspacing="0">
<tr><td class="diff-snipped" >...<br></td></tr>
<tr><td class="diff-unchanged" >** Basic phone calls <br>** Call transfer <br></td></tr>
<tr><td class="diff-changed-lines" >** Audio/video capability negotiation <span class="diff-added-words"style="background-color: #dfd;">(to include T.38 negotiation)</span> <br></td></tr>
<tr><td class="diff-unchanged" >* Registration <br>** Registrar for incoming registrations <br></td></tr>
<tr><td class="diff-snipped" >...<br></td></tr>
<tr><td class="diff-unchanged" >h3. Use cases <br> <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">Since A SIP channel driver has so many use cases, these reside on their own sub-page. See the bottom of this page for a link to the use cases. <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">Since A SIP channel driver has so many use cases, these reside on their own sub-page. SIP use cases can be found [here|SIP use cases]. <br></td></tr>
<tr><td class="diff-unchanged" > <br>h3. Documentation <br></td></tr>
<tr><td class="diff-snipped" >...<br></td></tr>
</table>
</div> <h4>Full Content</h4>
<div class="notificationGreySide">
<div class='panelMacro'><table class='warningMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/forbidden.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>This page is currently under construction. Please refrain from making comments at this time.</td></tr></table></div>
<div>
<ul>
<li><a href='#NewSIPchanneldriver-ProjectOverview'>Project Overview</a></li>
<li><a href='#NewSIPchanneldriver-RequirementsandSpecification'>Requirements and Specification</a></li>
<ul>
<li><a href='#NewSIPchanneldriver-SIPstack'>SIP stack</a></li>
<li><a href='#NewSIPchanneldriver-Configuration'>Configuration</a></li>
<li><a href='#NewSIPchanneldriver-Features'>Features</a></li>
<li><a href='#NewSIPchanneldriver-Usecases'>Use cases</a></li>
<li><a href='#NewSIPchanneldriver-Documentation'>Documentation</a></li>
<li><a href='#NewSIPchanneldriver-APIs'>APIs</a></li>
</ul>
<li><a href='#NewSIPchanneldriver-Design'>Design</a></li>
<li><a href='#NewSIPchanneldriver-TestPlan'>Test Plan</a></li>
<li><a href='#NewSIPchanneldriver-ProjectPlanning'>Project Planning</a></li>
<li><a href='#NewSIPchanneldriver-Referenceinformation'>Reference information</a></li>
</ul></div>
<h1><a name="NewSIPchanneldriver-ProjectOverview"></a>Project Overview</h1>
<p>This project's aim is to create a new SIP channel driver to be included in Asterisk 12.</p>
<p>Asterisk's current SIP channel driver (hereon referred to as "chan_sip") basically has the flaw of being poorly architected.</p>
<ul>
        <li>The code is not arranged in a stack. Attempting to add elements such as a new transport or other new feature means touching the code in places you would never expect to have to touch.</li>
        <li>chan_sip is monolithic; all aspects of SIP reside in the channel driver. Attempting to have a SIP registrar that does not accept calls is not easy.</li>
        <li>Fixing bugs in chan_sip is rarely straightforward. Changing code in order to fix one bug usually leads to new faults being discovered as a result.</li>
        <li>Many limitations are deeply-ingrained in chan_sip. For instance, trying to change chan_sip to support binding to multiple addresses would require huge changes.</li>
</ul>
<p>As of 1 November, 2012, chan_sip issues occupy 24% of the issue tracker</p>
<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>GET STATS FROM JIRA ABOUT ISSUE COUNT, ETC.</td></tr></table></div>
<p>The issue count in JIRA should go a long way in showing the difficulty Asterisk developers have in maintaining chan_sip.</p>
<p>Asterisk developers have on several occasions attempted projects to give chan_sip a transaction layer, or to give it some semblance of a refactor. In every case, they've reported that the effort that it would take in order to do whatever task they were doing would be better spent in rewriting chan_sip altogether.</p>
<h1><a name="NewSIPchanneldriver-RequirementsandSpecification"></a>Requirements and Specification</h1>
<h3><a name="NewSIPchanneldriver-SIPstack"></a>SIP stack</h3>
<p>The new chan_sip will use a third-party SIP stack. Research is currently being done into various offerings. SIP stack research can be found <a href="/wiki/display/AST/SIP+Stack+Research" title="SIP Stack Research">here</a>.</p>
<h3><a name="NewSIPchanneldriver-Configuration"></a>Configuration</h3>
<p>Configuration for the new chan_sip will be redesigned entirely. Configuration will be more modular, allowing easier control over aspects than previously allowed. At the same time, the new chan_sip MUST be backwards-compatible with the old chan_sip's configuration to ease upgrade. The tentative plan for this is to parse old configuration and translate the options into their new equivalents where possible.</p>
<h3><a name="NewSIPchanneldriver-Features"></a>Features</h3>
<p>A brief overview of features for the new chan_sip includes:</p>
<ul>
        <li>Transports (all IPv4 and IPv6)
        <ul>
                <li>UDP</li>
                <li>TCP</li>
                <li>TLS</li>
                <li>Websocket</li>
        </ul>
        </li>
        <li>Authentication</li>
        <li>Media sessions
        <ul>
                <li>Basic phone calls</li>
                <li>Call transfer</li>
                <li>Audio/video capability negotiation (to include T.38 negotiation)</li>
        </ul>
        </li>
        <li>Registration
        <ul>
                <li>Registrar for incoming registrations</li>
                <li>Client registration (i.e. outgoing registration)</li>
        </ul>
        </li>
        <li>Subscriptions
        <ul>
                <li>Presence</li>
                <li>Dialog-info</li>
                <li>Message-summary</li>
                <li>Call-completion</li>
        </ul>
        </li>
        <li>Messaging
        <ul>
                <li>Out-of-call messaging</li>
        </ul>
        </li>
</ul>
<h3><a name="NewSIPchanneldriver-Usecases"></a>Use cases</h3>
<p>Since A SIP channel driver has so many use cases, these reside on their own sub-page. SIP use cases can be found <a href="/wiki/display/AST/SIP+use+cases" title="SIP use cases">here</a>.</p>
<h3><a name="NewSIPchanneldriver-Documentation"></a>Documentation</h3>
<p>In order to increase adoption of the new chan_sip and encourage enhancement, detailed documentation MUST be provided.</p>
<h5><a name="NewSIPchanneldriver-Incodedocumentation"></a>In-code documentation</h5>
<p>This can be broken into two categories</p>
<ul>
        <li>API documentation (i.e. Doxygen)</li>
        <li>User documentation (i.e. XML documentation)</li>
</ul>
<p>This is standard for all code in Asterisk. All functions must have thorough doxygen documentation, and all applications, dialplan functions, manager actions, and manager events must have XML.</p>
<h5><a name="NewSIPchanneldriver-Configurationsample"></a>Configuration sample</h5>
<p>A sample configuration will be included. The sample configuration will serve to be a minimal documentation of options. More detailed explanations may be found on the wiki.</p>
<h5><a name="NewSIPchanneldriver-Wikidocumentation"></a>Wiki documentation</h5>
<p>The wiki will be used to document high-level information, ranging from configuration option details to an explanation of the threading model and architecture for developers.</p>
<h3><a name="NewSIPchanneldriver-APIs"></a>APIs</h3>
<p>Add an entry for each Application, Function, AMI command, AMI event, AGI command, CLI command, or other external way of interacting with the features provided by the project. Different APIs require different sets of documentation; in general, sufficient documentation should be provided to create the standard XML documentation for that particular item.</p>
<h1><a name="NewSIPchanneldriver-Design"></a>Design</h1>
<h1><a name="NewSIPchanneldriver-TestPlan"></a>Test Plan</h1>
<p>The new chan_sip test plan can be found at</p>
<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>insert test plan page here</td></tr></table></div>
<h1><a name="NewSIPchanneldriver-ProjectPlanning"></a>Project Planning</h1>
<p>JIRA issues will be posted here for the new chan_sip as they become created. If you are interested in helping with any of these, feel free to step forward and help out. Please comment on the specific JIRA issue rather than on this page. If you wish to have more in-depth discussions about a task you wish to take on, then please direct the discussion to the <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" class="external-link" rel="nofollow">Asterisk developers mailing list</a></p>
<h1><a name="NewSIPchanneldriver-Referenceinformation"></a>Reference information</h1>
<p>The decision to move forward with a new chan_sip was made at <a href="/wiki/display/AST/AstriDevCon+2012" title="AstriDevCon 2012">AstriDevCon 2012</a>.</p>
</div>
<div id="commentsSection" class="wiki-content pageSection">
<div style="float: right;" class="grey">
<a href="https://wiki.asterisk.org/wiki/users/removespacenotification.action?spaceKey=AST">Stop watching space</a>
<span style="padding: 0px 5px;">|</span>
<a href="https://wiki.asterisk.org/wiki/users/editmyemailsettings.action">Change email notification preferences</a>
</div>
<a href="https://wiki.asterisk.org/wiki/display/AST/New+SIP+channel+driver">View Online</a>
|
<a href="https://wiki.asterisk.org/wiki/pages/diffpagesbyversion.action?pageId=21464232&revisedVersion=6&originalVersion=5">View Changes</a>
|
<a href="https://wiki.asterisk.org/wiki/display/AST/New+SIP+channel+driver?showComments=true&showCommentArea=true#addcomment">Add Comment</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>