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

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Jan 7 16:41:25 CST 2010


The following issue requires your FEEDBACK. 
====================================================================== 
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
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-07 16:41 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.


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

---------------------------------------------------------------------- 
 (0116282) dvossel (administrator) - 2010-01-07 16:41
 https://issues.asterisk.org/view.php?id=16457#c116282 
---------------------------------------------------------------------- 
nice catch!  I looked through previous commits and found why this happens. 
The code to do exactly what you're wanting is farther down in the function,
but since it is not set where video is, get_our_media_address does not set
the text address correctly.

The new patch is pretty much the same thing you did but adds some
debugging and removes duplicate code.  Can you verify the new patch works
for you? 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-01-07 16:41 dvossel        Note Added: 0116282                          
2010-01-07 16:41 dvossel        Status                   assigned => feedback
======================================================================




More information about the asterisk-bugs mailing list