<div dir="ltr"><div dir="ltr"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Sep 9, 2018 at 8:23 PM, Daniel Harper <span dir="ltr"><<a href="mailto:daniel@harper.nz" target="_blank">daniel@harper.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">It has been recommended that I bring this up in order to get some<br>
feedback on ways to move forward regarding this feature "When<br>
recieving an re-Invite without SDP asterisk can re-offer all available<br>
codecs supported"<br>
<br>
See <a href="https://issues.asterisk.org/jira/browse/ASTERISK-28036" rel="noreferrer" target="_blank">https://issues.asterisk.org/<wbr>jira/browse/ASTERISK-28036</a><br>
<br>
I have had a look at the source for res_pjsip_session.c and<br>
res_pjsip_sdp_rtp.c but I am not sure I have the skillset or knowledge<br>
to be able to make a patch myself.<br>
<br>
I found this in regards to the feature being added to pjsipua<br>
<a href="https://trac.pjsip.org/repos/ticket/1892" rel="noreferrer" target="_blank">https://trac.pjsip.org/repos/<wbr>ticket/1892</a></blockquote><div><br></div><div>For v15+ it looks easier to get the desired behavior.</div><div><br></div><div>Looks like in v15+ the res_pjsip_sessions.c:create_local_sdp() function</div><div>can be modified to use the configured stream format capabilities when</div><div>there is no session->pending_media_state->topology or the topology is empty.</div><div><br></div><div>/* We've encountered a situation where we have been told to create a local SDP but noone has given us any indication<br> * of what kind of stream topology they would like. We try to not alter the current state of the SDP negotiation<br> * by using what is currently negotiated. If this is unavailable we fall back to what is configured on the endpoint.<br> */</div><div><br></div><div>If there is an active_media_state->topology then we could use that topology and set the pending_media_state->topology</div><div> stream formats to the configured endpoint media formats based on stream type.</div><div><br></div><div>When the session->pending_media_state->topology formats are setup then the outgoing deferred offer should be correct.<br></div><div><br></div><div>For v13 getting the desired behavior looks to be more difficult to know when to use the configured <br></div><div>codecs rather than the previously negotiated codecs.</div><div><br></div><div>In v13 the same function could also be modified. Unfortunately, I'm not seeing a way to know when</div><div>to copy the session->endpoint->media.codecs configured capabilities to the session->req_caps. If</div><div>we knew when to do that the outgoing deferred offer should be correct.<br></div><div><br></div>Richard<br></div></div></div></div></div>