<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://reviewboard.asterisk.org/r/2523/">https://reviewboard.asterisk.org/r/2523/</a>
     </td>
    </tr>
   </table>
   <br />




<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/static/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Asterisk Developers.</div>
<div>By Kevin Harwell.</div>








<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="https://issues.asterisk.org/jira/browse/ASTERISK-21441">ASTERISK-21441</a>, 

 <a href="https://issues.asterisk.org/jira/browse/ASTERISK-21442">ASTERISK-21442</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
Asterisk
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Adds support for extension state notifications in the new SIP channel driver.  A simple API was developed so that specific extension state providers can attach and create the relevant NOTIFY request body, according to their registered type, for the outgoing request.  The framework maintains the list of providers and looks up the appropriate provider upon a state change for an associated registered subscription.  For instance, a provider can be registered for a particular event/media type tuple (ex: presence and application/xml+pidf).  When a subscription comes in for a given event/media type it is the responsibility of the registered provider to create that NOTIFY body.

Unfortunately pjsip only allows an event and its associated media types to be registered all at once, so providers are not in themselves modules, but in order to maintain some division and to make it easier to move into a module later providers can and should reside in separate files (found in res/res_sip_providers/).

Included in this review is also an implementation of providers for the following types: event=presence; media_type=application/pidf+xml, application/xml+pidf, and application/cpim+pidf+xml.
</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Subscribed to a custom presence type and upon state change made sure the appropriate provider created the expected NOTIFY body in the request.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>team/group/pimp_my_sip/include/asterisk/res_sip_exten_state.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>team/group/pimp_my_sip/include/asterisk/res_sip_pubsub.h <span style="color: grey">(388073)</span></li>

 <li>team/group/pimp_my_sip/res/Makefile <span style="color: grey">(388073)</span></li>

 <li>team/group/pimp_my_sip/res/res_sip_exten_state.c <span style="color: grey">(PRE-CREATION)</span></li>

 <li>team/group/pimp_my_sip/res/res_sip_providers/include/res_sip_providers.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>team/group/pimp_my_sip/res/res_sip_providers/res_sip_pidf.c <span style="color: grey">(PRE-CREATION)</span></li>

 <li>team/group/pimp_my_sip/res/res_sip_pubsub.c <span style="color: grey">(388073)</span></li>

 <li>team/group/pimp_my_sip/res/res_sip_pubsub.exports.in <span style="color: grey">(388073)</span></li>

</ul>

<p><a href="https://reviewboard.asterisk.org/r/2523/diff/" style="margin-left: 3em;">View Diff</a></p>







  </td>
 </tr>
</table>




  </div>
 </body>
</html>