[asterisk-bugs] [Asterisk 0012501]: autoframing only works if SDP contains rtpmap

noreply at bugs.digium.com noreply at bugs.digium.com
Wed Apr 23 10:06:50 CDT 2008


The following issue has been ASSIGNED. 
====================================================================== 
http://bugs.digium.com/view.php?id=12501 
====================================================================== 
Reported By:                slimey
Assigned To:                file
====================================================================== 
Project:                    Asterisk
Issue ID:                   12501
Category:                   Channels/chan_sip/CodecHandling
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Asterisk Version:           1.6.0-beta7.1 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             04-23-2008 04:00 CDT
Last Modified:              04-23-2008 10:06 CDT
====================================================================== 
Summary:                    autoframing only works if SDP contains rtpmap
Description: 
I'm currently doing an interop with a SIP provider who requires 10ms
packetisation of media (PCMA Audio). I've set autoframing=yes in [global]
of sip.conf, and "sip show settings" shows that Auto Framing is enabled.

The SDP that comes from the SIP provider looks like:

v=0

o=BroadWorks 8348755 1 IN IP4 172.19.0.20

s=-

c=IN IP4 172.19.0.20

t=0 0

m=audio 24342 RTP/AVP 8

a=ptime:10

However, when Asterisk replies with its own SDP, it's still using 20ms:

v=0

o=BroadWorks 8348747 2 IN IP4 172.19.0.20

s=-

c=IN IP4 172.19.0.20

t=0 0

m=audio 24242 RTP/AVP 8 101

a=rtpmap:8 PCMA/8000

a=rtpmap:101 telephone-event/8000

a=ptime:20

a=fmtp:101 0-11

a=sendrecv

I've checked through chan_sip.c, and from what I can see in the code,
autoframing only works if the incoming SDP has a=rtpmap lines

Around line 6638 (I have a patch of my own in there which may have
affected the line numbers) of chan_sip.c:

                 } else if (strlen(a) > 5 && !strncasecmp(a, "ptime", 5))
{
                 [...]
                        if (framing && last_rtpmap_codec) {

last_rtpmap_codec is only set when it parses an a=rtpmap line in the SDP

Asterisk should apply the ptime even without an rtpmap line, as rtpmap is
only (as I understand it) _required_ if the m= line references a dynamic
rtp type.
====================================================================== 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
04-23-08 10:06  file           Status                   new => assigned     
04-23-08 10:06  file           Assigned To               => file            
======================================================================




More information about the asterisk-bugs mailing list