Luis,
there are multiple issues with providing a wide static codec list in an
SDP answer.
First, an SDP answer may only narrow the codec list received in an SDP
offer, not extend it. So the SDP answer should not contain any codec
which wasn't present in the SDP offer.
Second, for sending the RTP, each endpoint should use the codec most
preferred by the remote party, so if the most preferred codec in the
answer differs from the most preferred codec in the offer, you'll end up
with
- either different codec to be used in each direction of the session,
- or a re-INVITE from the remote party with a new SDP offer containing
just a single codec so that you had no choice => you have to foresee one
extra re-INVITE in your scenario plus we get back to point 1.
Pavel
Dne 13.11.2017 v 13:19 Luis Rojas G. napsal(a):
Hello,
I don't know the answer to your question, but why are you answering
200 OK with only one codec? You have the problem of updating the UAS
script every time you change codec in phone because of that.
Why don't you program several codecs in UAS, so anytime you change in
phone is to one of the already supported codecs? it will not be an
"unlimited number of payload types", but at least a bigger set.
Best regards,
Luis
in On 11/12/2017 10:21 PM, Andreas Byström (Polystar) wrote:
Hi
Has someone ever created a UAS script that respond with the same
codec(s) as the incoming INVITE SDP offer?
The scripts I have used I usually create the 200 OK using something
like this:
<!-- Send 200 OK on UPDATE -->
<send>
<![CDATA[
SIP/2.0 200 OK
[last_Via:]
[last_From:]
[last_To:]
[last_Call-ID:]
[last_CSeq:]
Contact: <sip:test@[local_ip]:[local_port];transport=[transport] >
Content-Type: application/sdp
Content-Length: [len]
v=0 0
o=ccs-0-275-2 02722940331338705 331338705 IN IP[local_ip_type]
[local_ip]
s=-
c=IN IP[media_ip_type] [media_ip]
t=0 0
m=audio [media_port] RTP/AVP 8
a=ptime:20
But the above SDP in the 200 OK assumes that the incoming INVITE has
an SDP with g711alaw/PCMA (payloadtype=8) as offered codec. If the
incoming call had for example AMR, the call will fail if UAS responds
with above.
Everytime I change codec in phone that places the call to this UAS, I
need to manually update the UAS script with the correct payload type
and sometimes with a=rtpmap / fmtp lines
My question is if there is a way to have the UAS use the same as the
incoming SDP? The script needs their own [media_port] so it cannot
copy the m= line fully. It needs to copy only the characters after
RTP/AVP from that line. Also, it need to copy all lines that starts
with a=rtpmap or a=fmtp since they can have information about the
codec choosen. I’m happy if there is a way to support one codec
option (i.e one payloadtype after RTP/AVP and possible one rtpmap
and/or one fmtp line), and its even better if it can support an
unlimited number of payload types and rtpmap/fmtp
So, does anyone have that kind of UAS and are willing to share?
Regards,
// Andreas
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org!http://sdm.link/slashdot
_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users
--
Luis Rojas
Software Architect
Sixbell Nekotec Solutions
Los Leones 1200
Providencia
Santiago, Chile
Phone:(+56-2) 22001288 <tel:+56222001288>
mailto:luis.ro...@sixbell.com
http://www.sixbell.com
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users