[asterisk-bugs] [Asterisk 0016457]: [Patch] always m=text 0 in sdp answer

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Jan 12 10:14:43 CST 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16457 
====================================================================== 
Reported By:                peterj
Assigned To:                dvossel
====================================================================== 
Project:                    Asterisk
Issue ID:                   16457
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   trivial
Priority:                   normal
Status:                     feedback
Target Version:             1.6.0.22
Asterisk Version:           SVN 
JIRA:                       SWP-561 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 235298 
Request Review:              
====================================================================== 
Date Submitted:             2009-12-16 12:38 CST
Last Modified:              2010-01-12 10:14 CST
====================================================================== 
Summary:                    [Patch] always m=text 0 in sdp answer
Description: 
Hi Issuetracker, 
I installed asterisk trunk today, it wasnt working as I was expecting.

I called asterisk with audio, video and text. The Echo() application
answered the call. I had videosupport and textsupport enabled and the
ulaw,alaw,h263, t140 and t140red codecs enabled in asterisk.

When I typed text it was not being echo until I completed a whole
sentence, I suspected that sip message was being used instead of real-time
text. This was verified by chan sip logs. From the logs i also saw that
asterisk receieved a correct invite and sdp. Asterisk answered wrongly by
saying that it wanted text on port 0. Then Ibegan suspecting something was
wrong with asterisk chan_sip.c code.

If found this piece of code, its only being executed for video, we need
the same for text. If not the result will be that when asterisk calls the
function that finds out where rtp media should be sent to, it will never go
in to the block where where the text address is setup.

if (add_audio && (p->jointcapability & AST_FORMAT_VIDEO_MASK) &&
!p->novideo) {
 if (p->vrtp) {
  needvideo = TRUE;
  ast_debug(2, "This call needs video offers!\n");
 } else
  ast_debug(2, "This call needs video offers, but there's no video support
enabled!\n");
}

So, if this code is duplicated and the word 'video' is changed to 'text',
then will provide correct port on sdp answer.


====================================================================== 

---------------------------------------------------------------------- 
 (0116503) svnbot (reporter) - 2010-01-12 10:14
 https://issues.asterisk.org/view.php?id=16457#c116503 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 239427

U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r239427 | dvossel | 2010-01-12 10:14:41 -0600 (Tue, 12 Jan 2010) | 14
lines

fixes text support in sdp answer

The code that handled setting 'm=text' in the sdp was not executing
in the correct order.  The check to see if text was needed came after
the check to add 'm=text' to the sdp, this resulted in 'm=text' always
being set to 0 because it looked like text was never required.

(closes issue https://issues.asterisk.org/view.php?id=16457)
Reported by: peterj
Patches:
      textportinsdp.diff uploaded by peterj (license 951)
      issue16457.diff uploaded by dvossel (license 671)
Tested by: peterj

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=239427 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-01-12 10:14 svnbot         Checkin                                      
2010-01-12 10:14 svnbot         Note Added: 0116503                          
======================================================================




More information about the asterisk-bugs mailing list