[asterisk-users] Possible bug in chan_sip:add_sdp
Richard Kenner
kenner at gnat.com
Thu May 6 16:54:34 CDT 2010
I can confirm that the following fixes my problem:
--- chan_sip.c (revision 261450)
+++ chan_sip.c (working copy)
@@ -10357,12 +10357,22 @@
strlen(connection) + strlen(session_time);
if (needaudio)
len += m_audio->used + a_audio->used + strlen(hold);
+ else if (p->offered_media[SDP_AUDIO].offered)
+ len += strlen("m=audio 0 RTP/AVP \r\n") + strlen(p->offered_media[SDP_AUDIO].text);
+
if (needvideo) /* only if video response is appropriate */
len += m_video->used + a_video->used + strlen(bandwidth) + strlen(hold);
+ else if (p->offered_media[SDP_VIDEO].offered)
+ len += strlen("m=video 0 RTP/AVP \r\n") + strlen(p->offered_media[SDP_VIDEO].text);
+
if (needtext) /* only if text response is appropriate */
len += m_text->used + a_text->used + strlen(hold);
+ else if (p->offered_media[SDP_TEXT].offered)
+ len += strlen("m=text 0 RTP/AVP \r\n") + strlen(p->offered_media[SDP_TEXT].text);
if (add_t38)
len += m_modem->used + a_modem->used;
+ else if (p->offered_media[SDP_IMAGE].offered)
+ len += strlen("m=image 0 udptl t38\r\n");
add_header(resp, "Content-Type", "application/sdp");
add_header_contentLength(resp, len);
More information about the asterisk-users
mailing list