cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1209
Views
2
Helpful
5
Replies

Is there any way to get RTP packet payload type encoding

aklassen
Level 1
Level 1

Hello all,

I am using JTAPI to monitor telephone calls between IP phones.

I am able to get the codec type in the RTP properties which is very helpful. But I am not

able to find the byte encoded value that is exchanged in the actual RTP packets. Is there

any method I can use to this information when the call is connected?

Just in case my question is not clear. I want to extract the RTP payload type which is encoded

in the SIP SDP; e.g.

If G711-u is used, 0 would be returned.

If G711-a is used, 8 would be returned.

If G729 is used, 18 would be returned.

Obviously for fixed mappings I do not really need it is for dynamic mappings.

Thanks,

Andrew

5 Replies 5

mpotluri
Level 5
Level 5

Did you check the getPayloadType() interface of CiscoRTPInputProperties? You should be able to get this from CiscoRTPInputStartedEv which is delivered to Terminal observers when media is setup.

Hi Mohan,

Thanks for the response. The getPayloadType appears to return a define number which can be used

to determine the codec in use via the RTPPayload. But the mapping appears to be Cisco internal.

It does not appear to relate to the payload type in the RTP header of the packet streams that

are exchanged between the end-points. I am looking for access to that value.

Andrew

Got you. JTAPI interface defines 11 for G729 but is 18 in the standard RTP assignments. There is no interface in CiscoJTAPI that returns the standard RTP assignments.  You will have to create a conversion table in the application.

Do you know if the mapping for dynamic payload types is published anywhere? That is, some codecs

do not have an assigned payload type number. Will the phones use a hard coding mapping for these

codec types or assign them on a per call basis?

Thanks again,

Andrew

Unless the supported codec is restricted to one by configuration in CUCM, phone will advertise a number of supported codecs. Depending on what the other end supports one of common codec is picked and this happens for every call. If there is no common codec, CUCM will insert a MTP to convert the media.

I found that following list in javadoc and they start from 1. You may want to get the latest list from a recent version of Cisco JTAPI Javadocs.  Real-Time Transport Protocol (RTP) Parameters seems to have some of the codec codes.

  • CiscoRTPPayload.NONSTANDARD    (1)
  • CiscoRTPPayload.G711ALAW64K    (2)
  • CiscoRTPPayload.G711ALAW56K
  • CiscoRTPPayload.G711ULAW64K
  • CiscoRTPPayload.G711ULAW56K
  • CiscoRTPPayload.G722_64K
  • CiscoRTPPayload.G722_56K
  • CiscoRTPPayload.G722_48K
  • CiscoRTPPayload.G7231
  • CiscoRTPPayload.G728
  • CiscoRTPPayload.G729
  • CiscoRTPPayload.G729ANNEXA
  • CiscoRTPPayload.IS11172AUDIOCAP
  • CiscoRTPPayload.IS13818AUDIOCAP
  • CiscoRTPPayload.ACY_G729AASSN
  • CiscoRTPPayload.DATA64
  • CiscoRTPPayload.DATA56
  • CiscoRTPPayload.GSM
  • CiscoRTPPayload.ACTIVEVOICE
  • CiscoRTPPayload.WIDEBAND_256K
  • CiscoRTPPayload.ISAC

For example all the 3 G722 supported by CiscoJTAPI could be mapped to 9.