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

Reply via email to