Combination View Flat View Tree View
Threads [ Previous | Next ]
Showing 1 - 20 of 40 results.
of 2
Hello Everyone,
 
  I have been advised to use JMF for sending an audio file after the call is connected as the Cisco JTAPI implementation doesn't support javax.telephony.media.* , and hence its methods can not be used. The problem however is that I amfinding it very difficult to have the two integrated (JTAPI and JMF).
 
  I am able to caputure the callConnectedEv and I guess, in that block of callConnectedEv, that I have to use the JMF portion when the stream will be sent to the receiver. The issue is that how will we connect the two pieces. How would my JMF piece know that it is this connection that the stream should be transmitted.
 
Can some one who has an idea on this or has worked with similar kind of problem throw some light on this. Any sample piece of code would be of great help. Any new solution without the use of JMF to pass audio file in Cisco JTAPI is also welcomedemoticon
 
Thanks
Manas Varma

I have no problems with use of JMF with JTAPI. You need to use a CTI Port to transmit your files into a call. When you register CTI Port you specify a port where you will receive RTP traffic for an active call. Connect CTI Port to Cisco Call and you will receive a CiscoRTPOutputStarted event that will inform you about port and ip address where you need to transmit your file. But i need to warn you that JMF is very buggy. And sometimes you need to find a JMF sources and corrent them yourself (or write your own plgins for it). But, i am working with JTAPI and JMF about two years and still don't find better solution than JMF. All other solutions is more worse.

RE: JMF and JTAPI
Answer
2/27/12 1:37 PM as a reply to Sergei Gorbunov.
Hi Sergei,

Can you provide some code example? As Manas Varma, i spent my last weeks trying to put JMF and JTAPI working together, but no luck with this.

RE: JMF and JTAPI
Answer
2/28/12 1:28 AM as a reply to Nuno Magalhaes.
With my personal experience as developer, I wouldnt suggest JMF. In my opinion, JMF is ok if you are writing a client application(like a soft phone) and would be handling one or few streams at any time.
I have burnt my hands trying out JMF with server side applications trying to handle multiple streams and JMF wasnt any good with that. After a certain call load(it wasnt too huge), rtp streams started breaking up. I didnt fight too much trying to fit JMF into my solution after initial test results but it could be that I wasnt doing it right but there was very little help available to me. It was hard to find any documentation or support on JMF, most of the support and document links on Oracle website are broken and its hard to move in right direction even if you know how basic processor works with streams.
Moreover, there hasnt been any work done on JMF by Sun (and oracle now) since its last release in 2001 which was more than 10 years ago. So, it seems like an abaondoned initiative.
 
Coming to the problem as such, I have had trouble finding a robust media library/server based on JAVA so as lot of others, I had exact same question on what to use for Media streaming which can actually be seen in one of the other posts on forum. The best answer I got was writing your own RTP stack based on RFC which is what was done by one of the application developer who had responded to my post. I am myself still trying to find if ther are any better alternatives(java based) available to JMF.

RE: JMF and JTAPI
Answer
2/28/12 4:01 AM as a reply to Abhishek Malhotra.
Abhishek, we use JMF in our applications in many circumstances and with huge load too (SPANless recorder as example). Yes, it was buggy, but i am have fixed some JMF sources and wrote some plugins (RTPConnectors and DataSources) and it works fine for us. I think writing library of the same level is very expensive. I think this is best JAVA solutuon by its time/cost.

Nuno, i dont understand what you mean when you said " put JMF and JTAPI working together".

Manas, i dont understand what case you trying to implement, please give me more details.

RE: JMF and JTAPI
Answer
2/28/12 7:30 AM as a reply to Sergei Gorbunov.
Hi Sergei,

In my scenario , below are the sequence of events that needs to take place.

1. Place a call to "A".
2. After the call is connected( A picks up), send an audio file to him asking him to press "1".
3. Once he presses "1", connect a call to B.
4. Put A and B into conference.


While we are able to implement the part 1 and 4 of our scenario , we are stuck at 2 and 3. Can you please help us with the snippet if yours where you are using JMF to send the audio file to a connected party. That will really solve our problem.

Regards,
Manas Varma

Hi Sergei

When i say put JMF and JTAPI working toghether, i mean the same you suggest to Manas Varma, use a cti port to transmit the audio file to the call. If you can provide some snippet of code, i will be very grateful. I never worked with JMF, and i can't understand the examples i saw, and i don't have experience working with cti ports in JTAPI. Please help me if you can.
Thanks in advance.

Regards
Nuno Magalhães

RE: JMF and JTAPI
Answer
3/1/12 8:46 AM as a reply to Nuno Magalhaes.
Hi Sergei/Abhishek,

Can you guys please help me out with some code snippet of yours where you are using JMF . That will really help me get going with the project.

Regards,
Manas Varma

This is will be a very huge snippet. You must read JMF fundamentals. And there are many code examples of using JMF.

Manas, IP Phones Services may be helpful for you for playing a sound to Agent (see RTPRx command).

In all cases you got an IP address and port (from CTI port OutputStarted event or from RTPRx command) where you must play a sound in desired format via RTP protocol (in most cases PCMU 8000 samples 20 ms). There are many examples on the net of how to play a sound file via network.

RE: JMF and JTAPI
Answer
3/1/12 5:46 PM as a reply to Sergei Gorbunov.
Hi Sergei,

I already implemented the transmiting of a sound file to the ctiport, but i can't ear any sound on the ctioport, but if i use JMFStudio and open a rtp session to the ip and port of the ctiport, i can ear the sound. I tried almost all CiscoMediaCapability on ctiport registration, but no success, what i´m doing wrong?

Code of ctiport registration:
....
CiscoMediaTerminal cmterm = provider.getMediaTerminal(ctiport);
CiscoMediaCapability[] caps = new CiscoMediaCapability[]{
CiscoMediaCapability.G711_64K_30_MILLISECONDS
};
cmterm.register(inetaddr, portInt, caps);
....

Code of JMF to transmit sounf file to ctiport:

Format[] FORMATS = new Format[]{new AudioFormat(AudioFormat.MPEG_RTP)};
ContentDescriptor CONTENT_DESCRIPTOR = new ContentDescriptor(ContentDescriptor.RAW_RTP);

......
DataSource ds = Manager.createDataSource(new MediaLocator("file:\\c:\\a.wav"));
mediaProcessor = Manager.createRealizedProcessor(new ProcessorModel(ds, FORMATS, CONTENT_DESCRIPTOR));
mediaLocator = new MediaLocator("rtp://192.168.32.47:8500/audio"); // ip and port of ctiport
dataSink = Manager.createDataSink(mediaProcessor.getDataOutput(), mediaLocator);
mediaProcessor.start();
dataSink.open();
dataSink.start();
......


Thanks in advance

Regards
Nuno Magalhães

RE: JMF and JTAPI
Answer
3/5/12 3:36 AM as a reply to Nuno Magalhaes.
Don't use a medialocator as output, use RTPManager for transmitting processor output. And, by default JMF make packet size bigger than you want and in result you transmitting in format of 60 msec between packets instead of 20 msec. Most of cisco phone will play it fine, but some models will play nothing, you must do one of two things: get Control of RTPPacetizer from processor and set right packet size or find a source of RTPPacketizer on the net, compile your own class and make your own JMF jar.

RE: JMF and JTAPI
Answer
3/7/12 12:55 PM as a reply to Sergei Gorbunov.
Now with RTPManager i have the following code:

...
RTPManager rtpManager = RTPManager.newInstance();
SessionAddress localAddress = new SessionAddress();
rtpManager.initialize(localAddress);
InetAddress ipAddress = InetAddress.getByName("192.168.32.47");
SessionAddress remoteAddress = new SessionAddress(ipAddress, 8500);
rtpManager.addTarget(remoteAddress);
DataSource dataOutput = Manager.createDataSource(new MediaLocator("file:\\c:\\a.wav"));
sendStream = rtpManager.createSendStream(dataOutput, 1);
mediaProcessor = Manager.createProcessor(dataOutput);
mediaProcessor.setContentDescriptor(new ContentDescriptor(ContentDescriptor.RAW_RTP));
mediaProcessor.configure();
sendStream.start();
mediaProcessor.start();
...



But the code is executed till line "sendStream = rtpManager.createSendStream(dataOutput, 1);" the code after this line isn't executed and i don't get any exception, what i'm doing wrong?
Can help me with setting the packet size, i can't find any example in the net, and i don't see how to do that..

RE: JMF and JTAPI
Answer
3/15/12 11:53 AM as a reply to Nuno Magalhaes.
Hi All,

We have incorporated the JMF integration with JTAPI and are able to send the audio file over the Call after the call is connected. However, what we have observed is that there is a distinct "noise" that gets transmitted along with the wave file , making it absouloutely impossible for the reciever at the other end to listen. I presume , its an issue with codec

Below is the snippet , where we have passed the codec information. Can you please help us in finding out , where the problem lies. Whats the fault in the codec or is our assumption of a codec fault itself is wrong and the noise is due to some other reason ?

Thanks
Manas Varma

processr.setContentDescriptor( new ContentDescriptor( ContentDescriptor.RAW_RTP));
TrackControl track[] = processr.getTrackControls();
boolean encodingOk = false;

for (int i = 0; i < track.length; i++)
{
if (!encodingOk && track instanceof FormatControl)
{

if (((FormatControl)track). setFormat( new AudioFormat(AudioFormat.ULAW_RTP,
8000,
8,
1)) == null)
{

track.setEnabled(false);

}
else {


encodingOk = true;
}
}
else
{
track.setEnabled(false);
}
}

As i sad earlier this noise happens because JMF Packetizer default packet size 480 instead of 160. You need to manipulate a packetizer controls over the processor or find a "Packetizer extends com.ibm.media.codec.audio.AudioPacketizer" sources on the net, change default packet size and reassembly yours JMF package. There is a site with most complete JMF sources, enjoy emoticon

http://jcs.mobile-utopia.com/servlet/Source?type=s&q=Packetizer

RE: JMF and JTAPI
Answer
3/26/12 2:15 PM as a reply to Naga Halini Karri.
Hi,
 
My requirement is a similar one as :
1. Place a call to  'A'
2. On 'A' answering the call, a pre-recorded message should be played and call gets disconnected
3. Next call to be connected to  'B'.
4. If 'A', does not answer within some time say 60 seconds, call should be disconnected
5. Then place a call to 'B' so on.
 
I have implemented the above using JMF integreting with JTAPI. I could implement 1,2,4 steps, but facing issues on making the next call immediately.
First call is successful for the scenario either 2 or 4 (mentioned above) but on making the call to another party, the call gets connected, it rings for a fraction of second and gets disconnected even before the call can be answered. Also, please let me know if its possible to make calls in this manner one after another for a group of numbers using JTAPI.
 
Kindly help me in resolving this issue.
 
Thanks & regards,
Halini

RE: JMF and JTAPI
Answer
3/26/12 6:00 PM as a reply to Naga Halini Karri.
There should be no issue with making sequential calls.  It sounds like the sequence of events may not be quite what you intended, but difficult to tell from the description.
 
Are you seeing any exceptions or other errors?
 
Perhaps an even more detailed description of the call flow might help:
 
- Timestamps/DNs
- JTAPI events seen
- JTAPI methods called
- Phone behaviour observed
 
As a final check you can look into the JTAPI logs (you will need to enabled the detailed logs using the jtprefs application or via editing jtapi.ini.)  If you can't spot anything feel free to attach here.

RE: JMF and JTAPI
Answer
3/27/12 1:41 PM as a reply to Naga Halini Karri.
Hi David,
 
I have not seen any exceptions or errors while trying to implement the calls sequentially.
We are using the following Destination Numbers in the lab, ucm-rtplab-101.cisco.com: 80509151, 80509148. We created these sample numbers to test our application.
I am attaching the log files with the JTAPI events occured for the following scenarios:
   1. When the playback is successful. (JTAPILog_Call01.txt)
   2. When tried to make another immediately, it failed. No errors occured. (JTAPILog_Call02.txt)
Phone Behaviour observed: Received call and as it is getting disconnected almost immediately, it is listed as Missed call.
Also, can we make parallel calls using JTAPI. I have been using the code of JTAPI sample application, makecall for my requirement and implemented the playback using JMF. In makecall where we pass source and destination number, may i send a common source number and a list of 30 numbers as destination numbers and implement make call ?
 
Thanks & regards,
Halini
Attachments:

RE: JMF and JTAPI
Answer
3/28/12 9:06 PM as a reply to Naga Halini Karri.
Can you provide the logs from the JTAPI client itself?  These are configured via jtapi.ini (you can use the jtprefs UI app, shipped with the JTAPI plugin.)  Please enable all log types at detailed level.

Showing 1 - 20 of 40 results.
of 2