<html>
<head>
<base href="https://wiki.asterisk.org/wiki">
<link rel="stylesheet" href="/wiki/s/en/2171/18/9/_/styles/combined.css?spaceKey=TOP&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/TOP/SIP+Configuration">SIP Configuration</a></h2>
<h4>Page <b>edited</b> by <a href="https://wiki.asterisk.org/wiki/display/~khunt">Ken Hunt</a>
</h4>
<br/>
<h4>Changes (2)</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" >h3. Configuration Method <br> <br></td></tr>
<tr><td class="diff-changed-lines" >There is no standard method for configuration of Asterisk SCF components at this time. While there will be one in the near future, the focus for now is on a method that will work for the alpha demonstration at Astricon. To that end, the most convenient method for configuration is via Ice. Since an Ice config file is already required in order to start up the SIP <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">channel service,</span> <span class="diff-added-words"style="background-color: #dfd;">Session Gateway,</span> adding configuration details to this file is a simple means of providing the information. For more information concerning Ice configuration files, see [this|http://www.zeroc.com/doc/Ice-3.4.1/manual/Properties.html#80611]. <br></td></tr>
<tr><td class="diff-unchanged" > <br>Ice configuration files are constructed in a way such that options can be easily divided into subcategories. I propose that for SIP configuration, we make the most of this. Below are some proposed categories, along with options to go within. Note that the options laid out are not necessarily the names of the options, but instead, they represent the idea behind what should be configurable. Also note that I am laying out some ideas that will not be configurable prior to the alpha demo. <br></td></tr>
<tr><td class="diff-snipped" >...<br></td></tr>
<tr><td class="diff-unchanged" >h3. Endpoint-specific SIP Options <br> <br></td></tr>
<tr><td class="diff-changed-lines" >Most options for Asterisk SCF's SIP <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">channel service</span> <span class="diff-added-words"style="background-color: #dfd;">Session Gateway</span> will pertain to individual endpoints. For configuration purposes, an "endpoint" can be thought of as a single logical entity with which Asterisk SCF exchanges SIP messages. A phone, an Asterisk instance, or an ITSP would be a common example of a SIP endpoint. <br></td></tr>
<tr><td class="diff-unchanged" > <br>h5. Transport <br></td></tr>
<tr><td class="diff-snipped" >...<br></td></tr>
</table>
</div> <h4>Full Content</h4>
<div class="notificationGreySide">
<p>SIP requires what statisticians refer to as a "boatload" of configuration in order to run smoothly. On this page, we will discuss the method by which SIP will be configured, and we will examine the specific options and categorization of options employed for SIP configuration in Asterisk SCF.</p>
<h3><a name="SIPConfiguration-ConfigurationMethod"></a>Configuration Method</h3>
<p>There is no standard method for configuration of Asterisk SCF components at this time. While there will be one in the near future, the focus for now is on a method that will work for the alpha demonstration at Astricon. To that end, the most convenient method for configuration is via Ice. Since an Ice config file is already required in order to start up the SIP Session Gateway, adding configuration details to this file is a simple means of providing the information. For more information concerning Ice configuration files, see <a href="http://www.zeroc.com/doc/Ice-3.4.1/manual/Properties.html#80611" class="external-link" rel="nofollow">this</a>.</p>
<p>Ice configuration files are constructed in a way such that options can be easily divided into subcategories. I propose that for SIP configuration, we make the most of this. Below are some proposed categories, along with options to go within. Note that the options laid out are not necessarily the names of the options, but instead, they represent the idea behind what should be configurable. Also note that I am laying out some ideas that will not be configurable prior to the alpha demo.</p>
<h3><a name="SIPConfiguration-GeneralSIPOptions"></a>General SIP Options</h3>
<p>Some SIP options apply more to the instance of Asterisk SCF more than they do to individual endpoints.</p>
<h5><a name="SIPConfiguration-Transport"></a>Transport</h5>
<p>Transport options are related to the transport layer of SIP. Since the transport layer is implemented within PJSIP, most of these options will be passed along to PJSIP for consumption.</p>
<ul>
        <li>UDP bind address - The address/port on which to receive UDP SIP messages</li>
        <li>TCP bind address - The address/port on which to receive TCP SIP messages</li>
        <li>TLS bind address - The address/port on which to receive TLS SIP messages</li>
        <li>Global NAT settings</li>
        <li>Access Control - Specifies the networks/hosts from which to permit and deny SIP traffic.</li>
        <li>DNS policies - May not actually be necessary or desired, but if people want to skirt RFC 3263 in certain ways, then these settings would help determine the proper course of action when locating SIP endpoints. This may also need to be an endoint-specific option instead of a general option.</li>
</ul>
<p>For now, Transport is the only category I have conceived of for general SIP options.</p>
<h3><a name="SIPConfiguration-EndpointspecificSIPOptions"></a>Endpoint-specific SIP Options</h3>
<p>Most options for Asterisk SCF's SIP Session Gateway will pertain to individual endpoints. For configuration purposes, an "endpoint" can be thought of as a single logical entity with which Asterisk SCF exchanges SIP messages. A phone, an Asterisk instance, or an ITSP would be a common example of a SIP endpoint.</p>
<h5><a name="SIPConfiguration-Transport"></a>Transport</h5>
<p>Transport options deal with the transport layer of SIP. Unlike the Transport options in the general section, these options deal with communication with a specific endpoint.</p>
<ul>
        <li>IP address/port - To what IP address and port do we send SIP traffic when contacting this endpoint?</li>
        <li>Security - Is TLS required for this endpoint?</li>
</ul>
<h5><a name="SIPConfiguration-Authentication"></a>Authentication</h5>
<p>Authentication deals with inbound and outbound authentication of endpoints.</p>
<ul>
        <li>Secret - A text password to use when authenticating.</li>
        <li>Algorithm - Which hashing algorithm to use when authenticating with an endpoint.</li>
        <li>Methods - On which inbound SIP methods will we require authentication?</li>
</ul>
<h5><a name="SIPConfiguration-Registration"></a>Registration</h5>
<p>Registration deals with inbound and outbound registration with endpoints.</p>
<ul>
        <li>Direction - Do we register with the endpoint, or does it register with us?</li>
        <li>Outbound Expiry - When does an outbound registration expire?</li>
        <li>Inbound Min/Max Expiry - Sets a range for inbound registration expirations.</li>
</ul>
<h5><a name="SIPConfiguration-Session"></a>Session</h5>
<p>Session options pertain to INVITE sessions (e.g. calls).</p>
<ul>
        <li>Direction - Do we allow inbound or outbound calls to this endpoint? Both?</li>
        <li>Options - What session options are supported by this endpoint (e.g. 100rel, timer)?</li>
        <li>Caller ID - Name and number information. Perhaps also can control which headers are used to express caller ID (e.g. From, P-Asserted-Identity)</li>
        <li>Local IP/port - What IP address will be used for sending outbound messages?</li>
</ul>
<h5><a name="SIPConfiguration-Media"></a>Media</h5>
<p>Media options pertain to the types of media streams and specific details of those media streams. I'm not actually sure whether media options should be detailed in a SIP configuration file, given that there is a separate media component. For instance, it may be that media profiles are created in the media component, and the only media option for SIP endpoints is to link to a specific media profile. Assuming this is not the case, then here is a small list of media options.</p>
<ul>
        <li>Audio codecs - List of allowed audio codecs to use when contacting the endpoint</li>
        <li>Video codecs - List of allowed video codecs to use when contacting the endpoint</li>
        <li>Packetization - Preferred size of audio or video packets</li>
        <li>Media IP/port - Address/port to instruct the endpoint to send Media to.</li>
</ul>
<p>Since various audio and video codecs have their own format parameters, it may be worthwhile to not list allowed audio and video codecs, but rather to treat each individual audio and video codec as a subcategory of media so that individual parameters can be listed more easily.</p>
<h5><a name="SIPConfiguration-Subscription"></a>Subscription</h5>
<p>Subscriptions deal with event subscription/notification. Each event package will be a subcategory of the Subscription category. This way, options that pertain to individual event packages can be set easily. There are some options that will likely apply to all event categories though.</p>
<ul>
        <li>Role - One of Subscriber/Notifier/Event Publication Agent/Event State Compositor</li>
        <li>Outbound Expiry - On outgoing SUBSCRIBE and PUBLISH messages, what is our preferred expiry?</li>
        <li>Inbound Min/Max Expiry - On incoming SUBSCRIBE and PUBLISH messages, limit to a specific range of expirations.</li>
        <li>Name - The name of the package (As would likely appear in the Event: header)</li>
</ul>
<h3><a name="SIPConfiguration-Lingeringquestions"></a>Lingering questions</h3>
<ol>
        <li>Are there any glaringly terrible mistakes on this page? Stuff filed into the wrong category? Stuff that shouldn't be configurable? Stuff that should be handled much differently?</li>
        <li>Are there any options that I have left out that should be on the list? This goes especially for options that will be relevant for the alpha demo.</li>
        <li>To what extent do we specify media options for a SIP endpoint?</li>
        <li>What is the best way to specify multiple endpoints in an Ice configuration file? The way that immediately comes to mind would be something like this:<br/>
SIP.Endpoint.Mark.Session.Direction = both<br/>
SIP.Endpoint.Joshua.Session.Direction = inbound<br/>
In this example, I have specified the direction of the "Mark" and the "Joshua" endpoints. Is there a better way of doing this?</li>
</ol>
</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=TOP">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/TOP/SIP+Configuration">View Online</a>
|
<a href="https://wiki.asterisk.org/wiki/pages/diffpagesbyversion.action?pageId=4816903&revisedVersion=2&originalVersion=1">View Changes</a>
|
<a href="https://wiki.asterisk.org/wiki/display/TOP/SIP+Configuration?showComments=true&showCommentArea=true#addcomment">Add Comment</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>