MT#55283 keep a=label in publish answer

monologue_publish() never copied the offered label into the media,
so sdp_create() omitted a=label from the publish answer and from
subscribe requests for that publisher. Add the missing
media_update_label() call.

Closes #2200

Change-Id: Id9aaf4ab09c21f98d3dcaf78632413b99f4a97ff
pull/2217/head
Orgad Shaneh 1 month ago committed by Richard Fuchs
parent 41d34290ff
commit b66c59bed6

@ -4470,6 +4470,7 @@ int monologue_publish(struct call_monologue *ml, sdp_streams_q *streams, sdp_ng_
media_update_type(media, sp);
media_update_protocol(media, sp);
media_update_media_id(media, sp);
media_update_label(media, flags, &sp->label);
media_loop_protect(sp, media);
media_update_flags(media, sp);
media_update_crypto(media, sp, flags);

@ -4987,5 +4987,61 @@ SDP
snd($sock_a, $port_a, rtp(8, 2001, 4160, 0x3456, "\x00" x 160));
rcv($sock_b, $port_b, rtpm(8, 2001, 4160, 0x3456, "\x00" x 160));
new_call;
publish('publish with a=label',
{ }, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
t=0 0
m=audio 6200 RTP/AVP 0
c=IN IP4 198.51.100.14
a=label:1
a=sendonly
m=audio 6202 RTP/AVP 0
c=IN IP4 198.51.100.14
a=label:2
a=sendonly
----------------------------------
v=0
o=- SDP_VERSION IN IP4 203.0.113.1
s=RTPE_VERSION
t=0 0
m=audio PORT RTP/AVP 0
c=IN IP4 203.0.113.1
a=label:1
a=rtpmap:0 PCMU/8000
a=recvonly
a=rtcp:PORT
m=audio PORT RTP/AVP 0
c=IN IP4 203.0.113.1
a=label:2
a=rtpmap:0 PCMU/8000
a=recvonly
a=rtcp:PORT
SDP
subscribe_request('publish with a=label',
{ 'from-tag' => ft() }, <<SDP);
v=0
o=- SDP_VERSION IN IP4 198.51.100.1
s=tester
t=0 0
m=audio PORT RTP/AVP 0
c=IN IP4 203.0.113.1
a=label:1
a=rtpmap:0 PCMU/8000
a=sendonly
a=rtcp:PORT
m=audio PORT RTP/AVP 0
c=IN IP4 203.0.113.1
a=label:2
a=rtpmap:0 PCMU/8000
a=sendonly
a=rtcp:PORT
SDP
done_testing();
#done_testing;NGCP::Rtpengine::AutoTest::terminate('f00');exit;

Loading…
Cancel
Save