MT#56128 SDP manipulations: add support for 'substitute' command.
It substitutes a specified `a=` line taken from the concerned
media attributes list. If such line has been not found,
the attributes list remains untouched.
It subsitutes one attribute at a time, so one attribute into
another attribute.
Change-Id: Ie0a48ba46a1b196fbe33b09dedc40e4498640e34
offer('SDP attr manipulations - substitute a= line for media audio',{ICE=>'remove',DTLS=>'off',SDES=>['nonew'],'sdp-attr'=>{audio=>{substitute=>[['test1','test2']]}}},<<SDP);
v=0
o=-15459970271INIP4198.51.100.1
s=tester
t=00
m=audio2000RTP/SAVP0
c=INIP4198.51.100.1
a=sendrecv
a=test1
----------------------------------
v=0
o=-15459970271INIP4198.51.100.1
s=tester
t=00
m=audioPORTRTP/SAVP0
c=INIP4203.0.113.1
a=test2
a=rtpmap:0PCMU/8000
a=sendrecv
a=rtcp:PORT
SDP
answer('SDP attr manipulations - substitute a= line for media audio',{ICE=>'remove'},<<SDP);
v=0
o=-15459970271INIP4198.51.100.3
s=tester
t=00
m=audio2002RTP/SAVP0
c=INIP4198.51.100.3
a=sendrecv
--------------------------------------
v=0
o=-15459970271INIP4198.51.100.3
s=tester
t=00
m=audioPORTRTP/SAVP0
c=INIP4203.0.113.1
a=rtpmap:0PCMU/8000
a=sendrecv
a=rtcp:PORT
SDP
new_call;
offer('SDP attr manipulations - substitute a= line for a session level',{ICE=>'remove',DTLS=>'off',SDES=>['nonew'],'sdp-attr'=>{none=>{substitute=>[['test1','test2']]}}},<<SDP);
v=0
o=-15459970271INIP4198.51.100.1
s=tester
t=00
a=test1
m=audio2000RTP/SAVP0
c=INIP4198.51.100.1
a=sendrecv
----------------------------------
v=0
o=-15459970271INIP4198.51.100.1
s=tester
t=00
a=test2
m=audioPORTRTP/SAVP0
c=INIP4203.0.113.1
a=rtpmap:0PCMU/8000
a=sendrecv
a=rtcp:PORT
SDP
answer('SDP attr manipulations - substitute a= line for a session level',{ICE=>'remove'},<<SDP);
v=0
o=-15459970271INIP4198.51.100.3
s=tester
t=00
m=audio2002RTP/SAVP0
c=INIP4198.51.100.3
a=sendrecv
--------------------------------------
v=0
o=-15459970271INIP4198.51.100.3
s=tester
t=00
m=audioPORTRTP/SAVP0
c=INIP4203.0.113.1
a=rtpmap:0PCMU/8000
a=sendrecv
a=rtcp:PORT
SDP
new_call;
offer('SDP attr manipulations - substitute two a= lines for media audio',{ICE=>'remove',DTLS=>'off',SDES=>['nonew'],'sdp-attr'=>{audio=>[substitute=>[['test1','test2'],['test5','test6']]]}},<<SDP);
v=0
o=-15459970271INIP4198.51.100.1
s=tester
t=00
m=audio2000RTP/SAVP0
c=INIP4198.51.100.1
a=sendrecv
a=test1
a=test5
----------------------------------
v=0
o=-15459970271INIP4198.51.100.1
s=tester
t=00
m=audioPORTRTP/SAVP0
c=INIP4203.0.113.1
a=test2
a=test6
a=rtpmap:0PCMU/8000
a=sendrecv
a=rtcp:PORT
SDP
answer('SDP attr manipulations - substitute two a= lines for media audio',{ICE=>'remove'},<<SDP);