<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /> 
<base href="https://wiki.asterisk.org/wiki" /> 
<title>Message Title</title>  
<style type="text/css">@media only screen and (max-device-width: 480px) {.mobile-only {
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
        line-height: normal !important;
        font-size: inherit !important;
        mso-hide: all;
}

.desktop-only {
        display: none !important;
}

/* iPhone 3GS fix for unwanted 20px right margin */
body { min-width: 100% !important; padding: 0; margin: 0; }

#center-content-table { max-width: none; !important; }
#header-pattern-container { padding: 10px 10px 10px 10px !important; line-height: 20px !important; }
#header-avatar-image-container { padding-right: 8px !important; }
#email-content-container { padding: 0 !important; }
.mobile-expand { border-radius: 0 !important; border-left: 0 !important; border-right: 0 !important; padding-left: 26px !important;}
.mobile-resize-text { font-size: 16px !important; line-height: 22px !important; }
#page-title-pattern-header { font-size: 20px !important; line-height: 28px !important; }
#page-title-pattern-icon-image-container-cell { padding-top: 7px !important; }
#inline-user-pattern { display: block !important; }
#inline-user-pattern-avatar { padding-top: 3px !important; }
.contextual-area-pattern { border-bottom: 1px solid #ccc !important; padding: 15px 10px 0 10px !important;}
.users-involved-pattern-column-table { width: 100% !important;  }
.users-involved-pattern-avatar-table-cell { padding: 3px 5px 5px 0 !important; }
.users-involved-pattern-column-container { padding-right: 0 !important; }
.contextual-excerpt-pattern, #users-involved-pattern { border: 0 !important; }

/** Aui Typography upsized for mobile **/
#content-excerpt-pattern-container, #contextual-excerpt-pattern-text-container { font-size: 16px !important; line-height: 22px !important; }
#content-excerpt-pattern-container h1, #contextual-excerpt-pattern-text-container h1 { font-size: 24px !important; line-height: 28px !important; }
#content-excerpt-pattern-container h2, #contextual-excerpt-pattern-text-container h2 { font-size: 20px !important; line-height: 28px !important; }
#content-excerpt-pattern-container h3, #contextual-excerpt-pattern-text-container h3 { font-size: 18px !important; line-height: 24px !important; }
#content-excerpt-pattern-container h4, #contextual-excerpt-pattern-text-container h4 { font-size: 16px !important; line-height: 22px !important; }
#content-excerpt-pattern-container h5, #contextual-excerpt-pattern-text-container h5 { font-size: 14px !important; line-height: 20px !important; }
#content-excerpt-pattern-container h6, #contextual-excerpt-pattern-text-container h6 { font-size: 14px !important; line-height: 20px !important; }
.user-mention { line-height: 18px !important; }
/** Aui Typography end **/

/* Show appropriate footer logo on mobile, display links vertically */
#footer-pattern { padding: 15px 10px !important; }
#footer-pattern-logo-desktop-container { padding: 0 !important; }
#footer-pattern-logo-desktop { width: 0 !important; height: 0 !important; }
#footer-pattern-logo-mobile {
    padding-top: 10px !important;
    width: 30px !important;
    height: 27px !important;
    display: inline !important;
}
#footer-pattern-text {
    display: block !important;
}
#footer-pattern-links-container { line-height: 0 !important;}
.footer-pattern-links.mobile-resize-text,
.footer-pattern-links.mobile-resize-text,
#footer-pattern-text.mobile-resize-text,
#footer-pattern-links-container.no-footer-links {
    font-size: 14px !important;
    line-height: 20px !important;
}
.footer-link { display: block !important; }
#footer-pattern-links-container table { display: inline-block !important; float: none !important; }
#footer-pattern-links-container, #footer-pattern-text { text-align: center !important; }
#footer-pattern-links { padding-bottom: 5px !important; }

/** Team Calendar overrides, these should be removed when notifications are updated in Team Calendars. For now CSS
    overrides are being used because the structure of the content can't change without rereleasing the plugin */
.mail-calendar-container .day-header + table tr td:first-child {
    vertical-align: top !important;
    padding-top: 5px !important;
}}
@media (min-width: 900px) {#center-content-table { width: 900px; }}
@media all {#outlook a {padding:0;} /* Force Outlook to provide a "view in browser" menu link. */
/* Prevent Webkit and Windows Mobile platforms from changing default font sizes.*/
body{-webkit-text-size-adjust:100%; -ms-text-size-adjust:100%;}
.ExternalClass {width:100%;} /* Force Hotmail to display emails at full width */
#background-table {margin:0; padding:0; width:100% !important; }
/* Needed to override highlighting on date and time links in iOS */
.grey a {color: #707070; text-decoration: none; }/* These styles are appended to the head element of a notification in order to prevent Apple Mail and similar
   clients from underlining the due dates with a blue hyperlink */
/* a lozenge outside an inline task should always be #333, lozenges inside an inline task should be
   colored according to their upcoming due dates, a completed task date lozenge or deleted task date
   lozenge should always be #707070 */
.date-time-lozenge a {color: #333333; text-decoration: none; }
.inline-task-text-container .date-time-lozenge.date-upcoming a {color: #DF6F00; text-decoration: none; }
.inline-task-text-container .date-time-lozenge.date-past a {color: #D04437; text-decoration: none; }
.inline-task-text-container.content-deleted-color .date-time-lozenge a,
.inline-task-text-container.checked .date-time-lozenge a {
    color: #707070; text-decoration: none;
}}
</style> 
</head>
<body>
<table id="background-table" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333; background-color: #f5f5f5"> 
<tbody> 
<tr> 
<td id="header-pattern-container" style="padding: 0px; border-collapse: collapse; padding: 10px 20px"> 
<table id="header-pattern" cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<tbody> 
<tr> 
<td id="header-avatar-image-container" valign="top" style="padding: 0px; border-collapse: collapse; vertical-align: top; width: 32px; padding-right: 9px"><a href="https://wiki.asterisk.org/wiki/display/~gjoseph?src=email" style="color: #3b73af; text-decoration: none"><img id="header-avatar-image" class="image_fix" src="cid:avatar_56b2a47747d2721d6dcf26979b4b605a" height="32" width="32" border="0" style="border-radius: 3px; vertical-align: top" /></a></td>
<td id="header-text-container" valign="middle" style="padding: 0px; border-collapse: collapse; vertical-align: middle; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 1px">George Joseph <strong>edited</strong> a page</td> 
</tr> 
</tbody> 
</table> </td> 
</tr> 
<!-- End Header pattern --> 
<tr> 
<td id="email-content-container" style="padding: 0px; border-collapse: collapse; padding: 0 20px"> 
<table id="email-content-table" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333; border-spacing: 0; border-collapse: separate"> 
<tbody> 
<tr> 
<td class="email-content-rounded-top mobile-expand" style="padding: 0px; border-collapse: collapse; color: #fff; padding: 0 15px 0 16px; height: 15px; background-color: #fff; border-left: 1px solid #ccc; border-top: 1px solid #ccc; border-right: 1px solid #ccc; border-bottom: 0; border-top-right-radius: 5px; border-top-left-radius: 5px"> </td> 
</tr> 
<tr> 
<td class="email-content-main mobile-expand" style="padding: 0px; border-collapse: collapse; border-left: 1px solid #ccc; border-right: 1px solid #ccc; border-top: 0; border-bottom: 0; padding: 0 15px 15px 16px; background-color: #fff"> 
<table id="page-title-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<tbody> 
<tr> 
<td id="page-title-pattern-icon-image-container" valign="top" style="padding: 0px; border-collapse: collapse; width: 16px; vertical-align: top"> 
<table cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<tbody> 
<tr> 
<td id="page-title-pattern-icon-image-container-cell" style="padding: 0px; border-collapse: collapse; width: 16px; padding: 9px 8px 0px 0px; mso-text-raise: 5px; mso-line-height-rule: exactly"><a href="https://wiki.asterisk.org/wiki/display/AST/PJSIP+Advanced+Codec+Negotiation?src=email" title="page icon" style="vertical-align: top;; color: #3b73af; text-decoration: none"><img style="vertical-align: top; display: block;" src="cid:page-icon" alt="page icon" title="page icon" height="16" width="16" border="0" /></a></td> 
</tr> 
</tbody> 
</table> </td>
<td style="vertical-align: top;; padding: 0px; border-collapse: collapse; padding-right: 5px; font-size: 20px; line-height: 30px; mso-line-height-rule: exactly" id="page-title-pattern-header-container"><span id="page-title-pattern-header" style="font-family: Arial, sans-serif; padding: 0; font-size: 20px; line-height: 30px; mso-text-raise: 2px; mso-line-height-rule: exactly; vertical-align: middle"><a href="https://wiki.asterisk.org/wiki/display/AST/PJSIP+Advanced+Codec+Negotiation?src=email" title="PJSIP Advanced Codec Negotiation" style="color: #3b73af; text-decoration: none">PJSIP Advanced Codec Negotiation</a></span></td> 
</tr> 
</tbody> 
</table> </td> 
</tr> 
<tr> 
<td class="email-content-main mobile-expand" style="padding: 0px; border-collapse: collapse; border-left: 1px solid #ccc; border-right: 1px solid #ccc; border-top: 0; border-bottom: 0; padding: 0 15px 15px 16px; background-color: #fff"> 
<table class="content-excerpt-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 1px"> 
<tbody> 
<tr> 
<td class="content-excerpt-pattern-container mobile-resize-text " style="padding: 0px; border-collapse: collapse; padding: 0 0 0 24px"> <h1 id="PJSIPAdvancedCodecNegotiation-Introduction" class="diff-block-target" style="margin: 10px 0 0 0; margin-top: 0; font-size: 24px; font-weight: normal; line-height: 30px; margin: 40px 0 0 0; margin-top: 0"> <span class="diff-html-changed" id="changed-diff-0" style="background-color: #d6f0ff;">Introduction</span> </h1> <p class="diff-block-context" style="margin: 10px 0 0 0">With the release of Asterisk 18 comes a new Advanced Codec Negotiation process.  Not only does this create new configuration opportunities but also completely refactors the negotiation process itself.  The result is an easier to understand negotiation process that's implemented in far less code.  The PJSIP channel driver is currently the only one to adopt the new process but it other drivers could be altered to use it in the future.  They would have to adopt the Streams interface however.</p> <h1 id="PJSIPAdvancedCodecNegotiation-Architecture" class="diff-block-target" style="margin: 10px 0 0 0; font-size: 24px; font-weight: normal; line-height: 30px; margin: 40px 0 0 0"> <span class="diff-html-changed" id="changed-diff-1" style="background-color: #d6f0ff;">Architecture</span> </h1> <p class="diff-block-context" style="margin: 10px 0 0 0">When thinking about the negotiation process, we're really talking about negotiating stream topologies between two entities.   For every channel, there's a topology that contains one or more streams that describe the media.   The negotiation process actually happens on a stream-by-stream basis but we're going to use the "simple audio call" as an example.  The topology would only contain one "audio" stream but that stream could, of course, allow multiple codecs. </p> <p class="diff-context-placeholder" style="margin: 10px 0 0 0">...</p> 
<ul class="diff-block-context" style="margin: 10px 0 0 0"> 
<li> <strong>prefer</strong>: Which of the stream's codec list do we prefer?  The "pending" one or the "configured" one?   
<ul style="margin: 10px 0 0 0"> 
<li> <strong>incoming_offer: </strong>This one is pretty obvious.  "pending" is the topology created by parsing Alice's SDP offer and "configured" is the one created from Alice's endpoint allowed codecs list.</li> 
<li> <strong>outgoing_offer: </strong>This one is somewhat obvious.  "pending" is the result of Alice's incoming_offer resolution that was received from the core and "configured" is the one created from Bob's endpoint allowed codecs list.</li> 
<li> <strong>incoming_answer</strong>: This one is less obvious.  "pending" is the result of parsing Bob's SDP answer and "configured" is what we ultimately sent to Bob in the offer.</li> 
<li> <strong>outgoing_answer</strong>: This one is also less obvious.  "pending" is the result of Bob's incoming_answer resolution and "configured" is the result of Alice's incoming_offer resolution.</li> 
</ul>So what does "prefer" actually mean?  Read on...</li> 
<li> <strong>operation</strong>: Now that we know which topology we prefer, what operation do we want to perform on them? 
<ul style="margin: 10px 0 0 0"> 
<li> <strong>union</strong>: We combine the codecs from both topologies by starting with the preferred list, then adding to the end the codecs in the non-preferred list that weren't already in the preferred list.  Basically, we're preserving the order of the preferred topology.</li> 
<li> <strong>intersect</strong>: We start with the preferred list again, but we throw out any codecs that aren't in both lists.  This keeps only common codecs while preserving the preferred list's order.</li> 
<li> <strong>only_preferred</strong>: We just use the preferred list and toss the non-preferred list completely.</li> 
<li> <strong>only_nonpreferred</strong>: We just use the non-preferred list and toss the preferred list completely.</li> 
</ul> </li> 
<li> <strong>keep</strong>: Now that we have a filtered and sorted list, what do we keep from it? 
<ul style="margin: 10px 0 0 0"> 
<li> <strong>all</strong>: Keep them all.</li> 
<li> <strong>first</strong>: Only pass through the first codec in the resulting list.</li> 
</ul> </li> 
<li> <strong>transcode</strong>: Finally, do we allow transcoding or not? 
<ul style="margin: 10px 0 0 0"> 
<li> <strong>allow</strong>: Allow the call to proceed even if the resulting list has no codecs in it.</li> 
<li> <strong>prevent</strong>: Do NOT allow the call to proceed if the resulting list has no codecs in it.</li> 
</ul> </li> 
</ul> <h1 id="PJSIPAdvancedCodecNegotiation-Configuration" class="diff-block-target" style="margin: 10px 0 0 0; font-size: 24px; font-weight: normal; line-height: 30px; margin: 40px 0 0 0"> <span class="diff-html-changed" id="changed-diff-2" style="background-color: #d6f0ff;">Configuration</span> </h1> <p class="diff-block-context" style="margin: 10px 0 0 0">The 4 control points and their parameters are all configured on PJSIP endpoints.  The control point parameters are named...</p> <p class="diff-context-placeholder" style="margin: 10px 0 0 0">...</p> <p class="diff-block-context" style="margin: 10px 0 0 0">You'll notice that the defaults always prefer the "pending" topology so in our example, what Alice sends in her SDP offer sets the stage.</p> <h1 id="PJSIPAdvancedCodecNegotiation-Examples" class="diff-block-target diff-block-context" style="margin: 10px 0 0 0; font-size: 24px; font-weight: normal; line-height: 30px; margin: 40px 0 0 0"> <span class="diff-html-changed" id="changed-diff-3" style="background-color: #d6f0ff;">Examples</span> </h1> <h2 id="PJSIPAdvancedCodecNegotiation-ReallySimple" class="diff-block-target diff-block-context" style="margin: 10px 0 0 0; font-size: 20px; font-weight: normal; line-height: 30px; margin: 40px 0 0 0; margin-top: 10px"> <span class="diff-html-changed" id="changed-diff-4" style="background-color: #d6f0ff;">Really Simple</span> </h2> <p class="diff-block-context" style="margin: 10px 0 0 0">Let's start with a basic call where both Alice and Bob are configured with their default settings and both with an "allow" parameter set to "!all,ulaw,g722".</p> <p class="diff-context-placeholder" style="margin: 10px 0 0 0">...</p> <p class="diff-block-context" style="margin: 10px 0 0 0">In this call, Alice set the tone for the call.</p> <h2 id="PJSIPAdvancedCodecNegotiation-AChangeintheOrder" class="diff-block-target" style="margin: 10px 0 0 0; font-size: 20px; font-weight: normal; line-height: 30px; margin: 40px 0 0 0"> <span class="diff-html-changed" id="changed-diff-5" style="background-color: #d6f0ff;">A Change in the Order</span> </h2> <p class="diff-block-context" style="margin: 10px 0 0 0">We know that both Alice's and Bob's phones can support g722 but their phones always list ulaw first.  So, how do we get them to use g722? Let's make some config changes...</p> <p class="diff-context-placeholder" style="margin: 10px 0 0 0">...</p> <p class="diff-block-context" style="margin: 10px 0 0 0">The rest of the call flows as before except that g722,ulaw is the pending topology.  There could be one "gotcha" though.  <a href="https://tools.ietf.org/html/rfc3264" class="external-link" rel="nofollow" style="color: #3b73af; text-decoration: none">RFC3264</a> states that a user agent that receives an offer <strong>SHOULD</strong> not change the order of the codecs when it creates its answer.  It doesn't say MUST not change the order.  So it's possible, although highly unlikely, that Bob might respond to g722,ulaw with ulaw,g722.   If this is the case, you can force Bob to use g722 setting his outgoing_offer keep parameter to <strong>first</strong>.  This way we'll only send him g722.  Of course if he doesn't support g722, then  you shouldn't have configured it on his endpoint in the first place. <img class="emoticon emoticon-smile" src="/wiki/s/en_GB/5639/a252d7f5e75d7a8bf7047b4b2c92f71a56a8f048.48/_/images/icons/emoticons/smile.png" data-emoticon-name="smile" alt="(smile)" style="vertical-align: middle" /></p> <h2 id="PJSIPAdvancedCodecNegotiation-Transcoding" class="diff-block-target" style="margin: 10px 0 0 0; font-size: 20px; font-weight: normal; line-height: 30px; margin: 40px 0 0 0"> <span class="diff-html-changed" id="changed-diff-6" style="background-color: #d6f0ff;">Transcoding</span> </h2> <p class="diff-block-context" style="margin: 10px 0 0 0">This is where it gets tricky...</p> 
<ul class="diff-block-context" style="margin: 10px 0 0 0"> 
<li>Let's say Alice's endpoint is configured with only alaw as the codec but she sends only ulaw,g722.  If the resolved topology is empty, as it would be if the operation was union, the call is immediately terminated with a 488 Not Acceptable Here.  It doesn't matter what her transcode parameter is set to because, at this point,  we don't even know what the outgoing channel is.</li> 
<li>Now let's assume that Alice's endpoint had ulaw,g722.  Since her endpoint also had ulaw,g722, we sent that to the core.  Bob's endpoint however, had only alaw AND his operation was union.  This would result in an empty resolved topology.  In order for transcoding to be considered, both Alice's incoming_offer transcode parameter and Bob's outgoing_offer transcode parameter MUST be set to allow.   If either is "prevent", the call is terminated.  If they're both allow, we'll send an offer to Bob with alaw as the codec.</li> 
<li>If Bob responds with no codecs, then the call is terminated.  Again though, you probably shouldn't have configured Bob's endpoint with an unsupported codec.  Otherwise, the resolved topology (alaw) is passed back to the core.</li> 
<li>Alice's channel gets the topology from the core (pending) and resolves it against what it sent to the core (configured) and her endpoint's outgoing_answer preferences.  If the resulting topology is empty, as it would be in this case, the outgoing_answer transcode parameter is checked.  If it's allow, the channel will use the topology it originally sent to the core to construct the outgoing answer and just ignore the resolved topology.  If the transcode parameter was prevent (which was probably a misconfiguration), the call is terminated.</li> 
</ul> <h1 id="PJSIPAdvancedCodecNegotiation-BehindtheScenesImplementation" class="diff-block-target" style="margin: 10px 0 0 0; font-size: 24px; font-weight: normal; line-height: 30px; margin: 40px 0 0 0"> <span class="diff-html-changed" id="changed-diff-7" style="background-color: #d6f0ff;">Behind the Scenes Implementation</span> </h1> <p class="diff-block-context" style="margin: 10px 0 0 0">The old implementation had codec negotiation was scattered though chan_pjsip, res_pjsip_session and res_pjsip_sdp_rtp.   ACN attempts to consolidate all codec negotiation in chan_pjsip but there are still remnants in the other modules that will need to be refactored out.  A good example is the "set_caps" function in res_pjsip_sdp_rtp.  It gets called on both incoming answers and outgoing answers but we don't actually want it to run for outgoing answers as it attempts to set the caps to what was on the original incoming offer.  That's not good.  Everything works as intended but it's useless code.  Another issue is that many of the functions in the res_pjsip modules get reused and have no idea of the context they run in.  For instance, apply_negotiated_sdp runs for both incoming and outgoing answers (that's how set_caps gets run twice).  Anyway...</p> 
<ul class="diff-block-target diff-block-context" style="margin: 10px 0 0 0"> 
<li>Alice Offer -> Asterisk ->Bob: 
<ul style="margin: 10px 0 0 0; margin-top: 0"> 
<li> <strong>incoming_offer</strong>:  This gets handled in chan_pjsip:chan_pjsip_incoming_request() before the channel is actually created.   That function is called by session via the handle_incoming_request supplement.  The function resolves the topology created from Alice's offer with Alice's endpoint 's incoming_offer parameters and endpoint codecs.  Assuming there active streams left in the resolved topology, the function resets the pending topology on the session to be the resolved topology and calls chan_pjsip_new which sets the topology on the channel along with the native format caps and read and write formats.  NOTE: We don't set the rtp instance codecs here but we should.  If the resolution fails, we terminate with a 488.</li> 
<li>Eventually we work our way through to app_dial:dial_exec_full which creates Bob's outgoing channel with ast_request_with_stream_topology() passing in Alice's channel topology.</li> 
<li> <strong>outgoing_offer</strong>:  ast_request_with_stream_topology() calls chan_pjsip_request_with_stream_topology().  This then resolves the request topology (pending) with Bob's endpoint's outgoing_offer parameters and Bob's endpoint's endpoint codecs.   Assuming there are active streams left in the topology, the function calls chan_pjsip_new() which sets Bob's channel topology, native format caps and read/write formats.  Same note as above, we should set the rtp instance codecs here but we don't yet.     If the resolved topology, including applying transcoding options, didn't have any active streams left, we return a cause of AST_CAUSE_FAILURE to app_dial and bail which causes a 503 to be sent to Alice. </li> 
<li>dial_exec_full ultimately calls chan_pjsip_call() whose call() task calls ast_sip_session_create_invite() then ast_sip_session_send)request().</li> 
</ul> </li> 
<li>Bob Answer -> Asterisk -> Alice  
<ul style="margin: 10px 0 0 0; margin-top: 0"> 
<li> <strong><span class="diff-html-added" id="added-diff-0" style="font-size: 100%; background-color: #ddfade;">incoming_answer</span></strong><span class="diff-html-added" style="font-size: 100%; background-color: #ddfade;">:</span><span class="diff-html-changed" id="changed-diff-9" style="background-color: #d6f0ff;">  </span><span class="diff-html-added" id="added-diff-1" style="font-size: 100%; background-color: #ddfade;">When Bob sends a 200OK, pjproject calls our session_inv_on_media_update() callback which then calls res_pjsip_session:handle_negotiated_sdp().  That sets the active topology to that received from Bob.  Eventually pjproject signals a transaction state change based on receiving the 200 which triggers the session handle_incoming_response supplements, one of which is chan_pjsip_incoming_response_after_media().  That resolves the active topology that came from Bob, with the topology we sent Bob using Bob's endpoint's incoming_answer preferences.  The function then calls ast_queue_control_data with an AST_CONTROL_ANSWER frame type and the resolved topology as the data.</span> </li> 
<li> <span class="diff-html-added" id="added-diff-2" style="font-size: 100%; background-color: #ddfade;">app_dial:wait_for_answer() receives the ANSWER frame and places the topology into the bridge config structure.  That gets passed to features:ast_bridge_call() and down to pre_bridge_setup() which calls ast_raw_answer_with_stream_topology().  That in turn calls chan_pjsip_answer_with_stream_topology on Alice's channel.</span> </li> 
<li> <span class="diff-html-added" style="font-size: 100%; background-color: #ddfade;">outgoing_answer: chan_pjsip_answer_with_stream_topology's answer task does the final resolution using Bob's active topology, Alice's pending topology that was originally sent to the core, and Alice's endpoint's outgoing_answer parameters.</span> </li> 
</ul> </li> 
</ul> <p class="diff-block-target diff-block-context" style="margin: 10px 0 0 0"> <span class="diff-html-added" style="font-size: 100%; background-color: #ddfade;"> </span> </p> <p class="diff-block-target diff-block-context" style="margin: 10px 0 0 0"> <span class="diff-html-added" style="font-size: 100%; background-color: #ddfade;"> </span> </p> <p class="diff-block-target diff-block-context" style="margin: 10px 0 0 0"> <span class="diff-html-added" style="font-size: 100%; background-color: #ddfade;"> </span> </p> </td> 
</tr> 
</tbody> 
</table> </td> 
</tr> 
<tr> 
<td class="email-content-main mobile-expand action-padding last-row-padding" style="padding: 0px; border-collapse: collapse; border-left: 1px solid #ccc; border-right: 1px solid #ccc; border-top: 0; border-bottom: 0; padding: 0 15px 15px 16px; background-color: #fff; padding-bottom: 10px; padding-bottom: 10px"> 
<table id="actions-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 1px"> 
<tbody> 
<tr> 
<td id="actions-pattern-container" valign="middle" style="padding: 0px; border-collapse: collapse; padding: 15px 0 0 24px; vertical-align: middle"> 
<table align="left" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<tbody> 
<tr> 
<td class="actions-pattern-action-icon-container" style="padding: 0px; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 0px; vertical-align: middle"><a href="https://wiki.asterisk.org/wiki/display/AST/PJSIP+Advanced+Codec+Negotiation?src=email" title="View page Icon" style="color: #3b73af; text-decoration: none"><img class="actions-pattern-action-icon-image" height="16" width="16" border="0" title="View page Icon" src="cid:com.atlassian.confluence.plugins.confluence-email-resources%3Aview-page-email-adg-footer-item%3Aicon" alt="View page Icon" style="vertical-align: middle" /></a></td>
<td class="actions-pattern-action-text-container" style="padding: 0px; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 4px; padding-left: 5px; white-space: nowrap"><a href="https://wiki.asterisk.org/wiki/display/AST/PJSIP+Advanced+Codec+Negotiation?src=email" title="View page" style="color: #3b73af; text-decoration: none">View page</a></td>
<td class="actions-pattern-action-bull" style="padding: 0px; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 4px; color: #999; padding: 0 5px">•</td> 
</tr> 
</tbody> 
</table> 
<table align="left" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<tbody> 
<tr> 
<td class="actions-pattern-action-icon-container" style="padding: 0px; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 0px; vertical-align: middle"><a href="https://wiki.asterisk.org/wiki/display/AST/PJSIP+Advanced+Codec+Negotiation?showComments=true&showCommentArea=true&src=email#addcomment" title="Add comment Icon" style="color: #3b73af; text-decoration: none"><img class="actions-pattern-action-icon-image" height="16" width="16" border="0" title="Add comment Icon" src="cid:com.atlassian.confluence.plugins.confluence-email-resources%3Aadd-comment-to-content-email-adg-footer-item%3Aicon" alt="Add comment Icon" style="vertical-align: middle" /></a></td>
<td class="actions-pattern-action-text-container" style="padding: 0px; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 4px; padding-left: 5px; white-space: nowrap"><a href="https://wiki.asterisk.org/wiki/display/AST/PJSIP+Advanced+Codec+Negotiation?showComments=true&showCommentArea=true&src=email#addcomment" title="Add comment" style="color: #3b73af; text-decoration: none">Add comment</a></td>
<td class="actions-pattern-action-bull" style="padding: 0px; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 4px; color: #999; padding: 0 5px">•</td> 
</tr> 
</tbody> 
</table> 
<table style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<tbody> 
<tr> 
<td class="actions-pattern-action-icon-container" style="padding: 0px; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 0px; vertical-align: middle"><a href="https://wiki.asterisk.org/wiki/plugins/likes/like.action?contentId=44795874&src=email" title="Like Icon" style="color: #3b73af; text-decoration: none"><img class="actions-pattern-action-icon-image" height="16" width="16" border="0" title="Like Icon" src="cid:com.atlassian.confluence.plugins.confluence-like%3Aview-email-adg-content-item%3Aicon" alt="Like Icon" style="vertical-align: middle" /></a></td>
<td class="actions-pattern-action-text-container" style="padding: 0px; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 4px; padding-left: 5px; white-space: nowrap"><a href="https://wiki.asterisk.org/wiki/plugins/likes/like.action?contentId=44795874&src=email" title="Like" style="color: #3b73af; text-decoration: none">Like</a></td> 
</tr> 
</tbody> 
</table> </td> 
</tr> 
</tbody> 
</table> </td> 
</tr> 
<tr> 
<td class="email-content-rounded-bottom mobile-expand" style="padding: 0px; border-collapse: collapse; color: #fff; height: 5px; line-height: 5px; padding: 0 15px 0 16px; background-color: #fff; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; border-top: 0; border-left: 1px solid #ccc; border-bottom: 1px solid #ccc; border-right: 1px solid #ccc; mso-line-height-rule: exactly"> </td> 
</tr> 
</tbody> 
</table> </td> 
</tr> 
<tr> 
<td id="footer-pattern" style="padding: 0px; border-collapse: collapse; padding: 12px 20px"> 
<table id="footer-pattern-container" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333"> 
<tbody> 
<tr> 
<td id="footer-pattern-links-container" width="100%" style="padding: 0px; border-collapse: collapse; color: #999; font-size: 12px; line-height: 18px; font-family: Arial, sans-serif; mso-line-height-rule: exactly; mso-text-raise: 2px"> 
<table align="left" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333; font-size: 12px; line-height: 18px; font-family: Arial, sans-serif; mso-line-height-rule: exactly; mso-text-raise: 2px"> 
<tbody> 
<tr> 
<td class="footer-pattern-links mobile-resize-text" style="padding: 0px; border-collapse: collapse"><a href="https://wiki.asterisk.org/wiki/users/removespacenotification.action?spaceKey=AST&src=email" title="" style="color: #3b73af; text-decoration: none">Stop watching space</a></td>
<td class="footer-pattern-links-bull" style="padding: 0px; border-collapse: collapse; padding: 0 5px; color: #999">•</td> 
</tr> 
</tbody> 
</table> 
<table style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333; font-size: 12px; line-height: 18px; font-family: Arial, sans-serif; mso-line-height-rule: exactly; mso-text-raise: 2px"> 
<tbody> 
<tr> 
<td class="footer-pattern-links mobile-resize-text" style="padding: 0px; border-collapse: collapse"><a href="https://wiki.asterisk.org/wiki/users/editmyemailsettings.action?src=email" title="" style="color: #3b73af; text-decoration: none">Manage notifications</a></td> 
</tr> 
</tbody> 
</table> </td> 
</tr> 
<tr> 
<td id="footer-pattern-text" class="mobile-resize-text" width="100%" style="padding: 0px; border-collapse: collapse; color: #999; font-size: 12px; line-height: 18px; font-family: Arial, sans-serif; mso-line-height-rule: exactly; mso-text-raise: 2px; display: none">This message was sent by Atlassian Confluence 5.6.6</td> 
</tr> 
</tbody> 
</table> </td> 
</tr> 
</tbody> 
</table> 
<table id="sealed-section" border="0" cellpadding="0" cellspacing="0" width="0" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #333; display: none"> 
<tbody> 
<tr> 
<td style="padding: 0px; border-collapse: collapse; border: 0; font-size: 0px; line-height: 0; mso-line-height-rule: exactly"></td> 
</tr> 
</tbody> 
</table>
</body>
</html>