[asterisk-commits] mmichelson: branch mmichelson/correct_sdp_answer r206563 - /team/mmichelson/c...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jul 14 14:25:29 CDT 2009
Author: mmichelson
Date: Tue Jul 14 14:25:26 2009
New Revision: 206563
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=206563
Log:
And now a first attempt at setting the inactive streams if necessary.
I still have some places where I need to clear out the offered_methods. For instance,
we should clear the offered_methods before sending a reinvite.
Modified:
team/mmichelson/correct_sdp_answer/channels/chan_sip.c
Modified: team/mmichelson/correct_sdp_answer/channels/chan_sip.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/mmichelson/correct_sdp_answer/channels/chan_sip.c?view=diff&rev=206563&r1=206562&r2=206563
==============================================================================
--- team/mmichelson/correct_sdp_answer/channels/chan_sip.c (original)
+++ team/mmichelson/correct_sdp_answer/channels/chan_sip.c Tue Jul 14 14:25:26 2009
@@ -6789,6 +6789,10 @@
/* XXX MCM To simplify matters, a good idea would probably be to use whatever boolean was stored
* on p to set the 'needvideo' variable. Then, within this block, we can just set vdest.sin_port to
* 0.
+ *
+ * Actually, taking a closer look, 'needvideo' would have to be altered all over the place if I were to
+ * try to overload it like this. A better method would just be to wait until the end of this function to
+ * decide about whether to add video to the SDP or not.
*/
if (needvideo) {
/* Determine video destination */
@@ -6977,15 +6981,24 @@
add_line(resp, m_audio);
add_line(resp, a_audio);
add_line(resp, hold);
+ } else if (p->offered_media[SDP_AUDIO]) {
+ add_line(resp, "m=audio 0 RTP/AVP\r\n");
+ add_line(resp, "a=inactive\r\n");
}
if (needvideo) { /* only if video response is appropriate */
add_line(resp, m_video);
add_line(resp, a_video);
add_line(resp, hold); /* Repeat hold for the video stream */
+ } else if (p->offered_media[SDP_VIDEO]) {
+ add_line(resp, "m=video 0 RTP/AVP\r\n");
+ add_line(resp, "a=inactive\r\n");
}
if (add_t38) {
add_line(resp, m_modem);
add_line(resp, a_modem);
+ } else if (p->offered_media[SDP_IMAGE]) {
+ add_line(resp, "m=image 0 udptl t38\r\n");
+ add_line(resp, "a=inactive\r\n");
}
/* Update lastrtprx when we send our SDP */
More information about the asterisk-commits
mailing list