I have created a SIP call, right now I dont have any sound to it i.e. I dont have a Sound Manager. I would like to play a Audio file for the Receiver instead. i.e. When I make a call to someone, I want them to hear the Audio message. How do I send the file and make it play?
ContentLengthHeader contentLength = headerFactory.createContentLengthHeader(211);
ContentTypeHeader contentType =
headerFactory.createContentTypeHeader("application", "sdp");
String sdpData = "v=0\n" +
"o=test 795808818 480847547 IN IP4 "+localIP+"\n" +
"s=Audio Call\n" +
"u=/audio/play.wav"+
"c=IN IP4 "+localIP+"\n" +
"t=0 0\n" +
"m=audio 8000 RTP/AVP 0 8 101\n" +
"a=rtpmap:0 PCMU/8000\n" +
"a=rtpmap:8 PCMA/8000\n" +
"a=rtpmap:101 telephone-event/8000\n" +
"a=sendrecv";
byte[] contents = sdpData.getBytes();
request.setContent(contents, contentType);
If I directly send the file like this will it play? Also is it possible to send text and play it over the call?