[SR-Users] [Sems] directed media problem when video is included in sdp

Daniel-Constantin Mierla miconda at gmail.com
Tue Sep 20 09:33:46 CEST 2011


Hello,

On 9/19/11 9:47 PM, Stefan Sayer wrote:
> o Juha Heinanen on 09/19/2011 08:39 PM:
>> when sems receives voice call invite from ua behind nat that has
>> direction:active in its sdp, like this:
>>
>>          Session Description Protocol
>>              Session Description Protocol Version (v): 0
>>              Owner/Creator, Session Id (o): foo.bar 0 0 IN IP4 
>> 192.168.1.
>> 68
>>              Session Name (s): -
>>              Connection Information (c): IN IP4 192.168.1.68
>>              Time Description, active time (t): 0 0
>>              Media Description, name and address (m): audio 8500 
>> RTP/AVP 18 4 112 100 101 0 8 106
>>              Media Attribute (a): sendrecv
>>              Media Attribute (a): rtpmap:18 G729/8000
>>              Media Attribute (a): rtpmap:4 G723/8000
>>              Media Attribute (a): rtpmap:112 AMR/8000
>>              Media Attribute (a): rtpmap:100 EG711U/8000
>>              Media Attribute (a): rtpmap:101 EG711A/8000
>>              Media Attribute (a): rtpmap:0 PCMU/8000
>>              Media Attribute (a): rtpmap:8 PCMA/8000
>>              Media Attribute (a): rtpmap:106 telephone-event/8000
>>              Media Attribute (a): direction:active
>>
>> sems includes direction:passive in 200 OK and starts to correctly send
>> rtp packets to the ip address/port of received rtp packets.
>>
>> however, then sems receives a voice+video call invite like this:
>>
>>          Session Description Protocol
>>              Session Description Protocol Version (v): 0
>>              Owner/Creator, Session Id (o): foo.bar 0 0 IN IP4 
>> 192.168.1.68
>>              Session Name (s): -
>>              Connection Information (c): IN IP4 192.168.1.68
>>              Time Description, active time (t): 0 0
>>              Media Description, name and address (m): audio 8500 
>> RTP/AVP 18 4 112 100 101 0 8 106
>>              Media Attribute (a): sendrecv
>>              Media Attribute (a): rtpmap:18 G729/8000
>>              Media Attribute (a): rtpmap:4 G723/8000
>>              Media Attribute (a): rtpmap:112 AMR/8000
>>              Media Attribute (a): rtpmap:100 EG711U/8000
>>              Media Attribute (a): rtpmap:101 EG711A/8000
>>              Media Attribute (a): rtpmap:0 PCMU/8000
>>              Media Attribute (a): rtpmap:8 PCMA/8000
>>              Media Attribute (a): rtpmap:106 telephone-event/8000
>>              Media Description, name and address (m): video 8600 
>> RTP/AVP 34
>>              Bandwidth Information (b): AS:300
>>              Media Attribute (a): sendrecv
>>              Media Attribute (a): rtpmap:34 H263/90000
>>              Media Attribute (a): direction:active
>>
>> it does not include direction:passive in 200 OK and keeps on sending rtp
>> packets to 192.168.1.68 even after receiving first voice rtp packet from
>> public ip of the ua.
>>
>> is this a bug in sems or is it a bug in sr nathelper_k
>> fix_nated_sdp("1") implementation, i.e., does that function place
>> direction:actvive line to only one place, when it should place it in two
>> places (in both voice and video media descriptions)?
> The latter. The direction attribute from comedia draft is a media 
> level attribute. If it is set in the video stream only, it applies 
> only to the video stream. fix_nated_sdp should put it in the audio m 
> section as well. 
Hello,

I was looking to modules_k/nathelper/nathelper.c in fix_nated_sdp() and 
has a loop for all m= lines to add direction attribute (around line 
1374). From the code, the direction attribute is added just after m= 
line, in the trace before seems to be the last. Is it sure this is added 
by kamailio or came from caller?

Cheers,
Daniel

-- 
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kat
http://linkedin.com/in/miconda -- http://twitter.com/miconda




More information about the sr-users mailing list