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.
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.
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.
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?
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.
For example all the 3 G722 supported by CiscoJTAPI could be mapped to 9.
Please sign in to leave a comment.