android - Record calls in PCM-Format -
i trying write android app using sip-based voip (i use sipdemo template).
i need record incoming , outgoing calls , save them in pcm-format.
private static final int recorder_samplerate = 44100; private static final int recorder_channels = audioformat.channel_in_mono; private static final int recorder_audio_encoding = audioformat.encoding_pcm_16bit;
is possible?
this activity incoming calls:
public class incomingcallreceiver extends broadcastreceiver { @override public void onreceive(context context, intent intent) { sipaudiocall incomingcall = null; try { sipaudiocall.listener listener = new sipaudiocall.listener() { @override public void onringing(sipaudiocall call, sipprofile caller) { try { call.answercall(30); } catch (exception e) { e.printstacktrace(); } } }; walkietalkieactivity wtactivity = (walkietalkieactivity) context; incomingcall = wtactivity.manager.takeaudiocall(intent, listener); incomingcall.answercall(30); incomingcall.startaudio(); incomingcall.setspeakermode(true); if(incomingcall.ismuted()) { incomingcall.togglemute(); } wtactivity.call = incomingcall; wtactivity.updatestatus(incomingcall); } catch (exception e) { if (incomingcall != null) { incomingcall.close(); } } }
}
what source code need call recording?
thanks in advance!
Comments
Post a Comment