I am trying to develop an android application with SIP API (provided in Android 2.3 or higher). I want to know which audio codecs and video codecs does this API supports ? does this API have any tools allowing to configure/choose codecs ? please help me.
Asked
Active
Viewed 1,094 times
3
-
Interesting i am not sure if you will be able to do audio and video call with existing android sip software stack – Abhijit Chakra Apr 28 '16 at 13:48
-
@AbhijitChakra: this can assure you: http://developer.android.com/guide/topics/connectivity/sip.html – Uniruddh Apr 28 '16 at 14:36
-
This not working try that demo app.. – Abhijit Chakra Apr 28 '16 at 14:53
-
1@AbhijitChakra: are you sure ? maybe your device does not support VoIP communication. – libhu Apr 28 '16 at 15:41
1 Answers
2
I want to know which audio codecs and video codecs does this API supports?
You can get supported codec list from docs itself, check AudioCodec.
Those are:
- PCMU
- PCMA
- GSM_EFR
- GSM
- AMR
does this API have any tools allowing to configure/choose codecs ?
you could use the APIs related to the SIP and RTP. android.net.rtp
contains the AudioStream
, AudioGroup
and AudioCodec
classes that are easy to use. The last of these allows you to choose the codec which you want.
You can create codec as given in above link:
AudioCodec codec = AudioCodec.getCodec(100, "AMR/8000", "mode-set=1");
Then you can set this codec to your AudioStream using setCodec(codec)
method.

Uniruddh
- 4,427
- 3
- 52
- 86
-
1thanks a lot! do you think there is a class in android.net.sip that takes this AudioCodec as argument. I am new in this domain – libhu Apr 28 '16 at 15:37
-
I have edited my answer to give your brief. This should get you started. Hope it covers major aspects of your question – Uniruddh Apr 28 '16 at 19:02
-
Hi. I'm having trouble with my sip calling. The call is registered and established, but there is no sound. I'm thinking it could be because of codecs. How do I actually set which codec my sip call should use? – Pieter Du Toit Apr 14 '18 at 09:48