Problem with Transmitting media using JMF

Hello Everyone !!

I am working on an application called SIPSpeaker which listens for incoming calls, answer the call and plays a message. I am done with the first two parts of the application, i.e. it can successfully answers the call. I am now facing problem with transmitting audio to the SIP Phone (the caller). I am using JMF and I am trying to send the audio over RTP.

My code looks something like this....

locator =new MediaLocator("rtp://130.237.214.124:" + port +"/audio");

f =new File("C:/1.wav");

try{

ds = Manager.createDataSource(f.toURL());

}catch (NoDataSourceException ex){

ex.printStackTrace();

}catch (MalformedURLException ex){

ex.printStackTrace();

}catch (IOException ex){

ex.printStackTrace();

}

format =new Format[]{new AudioFormat(AudioFormat.GSM_RTP,8000,8,1)};

contentDesc =new ContentDescriptor(ContentDescriptor.RAW_RTP);

processor = Manager.createProcessor(ds);

waitForState(processor,Processor.Configured);

processor.setContentDescriptor(contentDesc);

processor.getTrackControls()[0].setFormat(format[0]);

waitForState(processor,Processor.Realized);

try{

sink = Manager.createDataSink(processor.getDataOutput(),locator);

System.out.println("6");

}catch (NotRealizedError ex){

ex.printStackTrace();

}catch (NoDataSinkException ex){

ex.printStackTrace();

}

}

processor.start();

try{

sink.open();

sink.start();

}catch (SecurityException ex){

ex.printStackTrace();

}catch (IOException ex){

ex.printStackTrace();

}

we are required to work with a .wav file as input ....

i am new to java and to JMF and i have absolutely no idea whats going wrong...

please help me

Regards,

Sanjay !!

[3089 byte] By [SanjayRajwania] at [2007-11-27 1:15:02]
# 1

Hello

following is the error i get

Failed to realize: com.sun.media.ProcessEngine@618d26

Cannot build a flow graph with the customized options:

Unable to transcode format: mpeglayer3, 44100.0 Hz, 16-bit, Stereo, LittleEndian, Signed, 16000.0 frame rate, FrameSize=32768 bits

to: mpegaudio/rtp, 8000.0 Hz, 8-bit, Mono

outputting to: RAW/RTP

Error: Unable to realize com.sun.media.ProcessEngine@618d26

what could be the problem ?

SanjayRajwania at 2007-7-11 23:50:22 > top of Java-index,Security,Cryptography...