[Patch] Spark SIP Phone via FMJ

Hi,

I have migrate the Spark SIP Phone from JMF to FMJ.

At this time I have only tested it under Linux and it works.

I have created one patch for the Spark SIP Phone and two for the FMJ library.

GSMEncoder_FIX_NPE.patch -> Fix a ArrayOutOfBoundyException in the GSMEncoder

FIX_SUPPORTED_FORMAT_RTP_PATCH.patch -> Return the supported formats for RTP

SPARK_FIXES_FOR_FMJ.patch -> Mirgrate Spark Sip Phone from JMF to FMJ

I have attached the patched FMJ and the libraries and the patched sparkphone.jar
FIX_SUPPORTED_FORMAT_RTP_PATCH.patch (1939 Bytes)
GSMEncoder_FIX_NPE.patch (928 Bytes)
SPARK_FIXES_FOR_FMJ.patch (2118 Bytes)
fmj-jars.tar.gz (2267309 Bytes)
sparkphone.jar (1911756 Bytes)

Update … :slight_smile:

I have create a new patch for the sparkphone and now it works under windows xp, too!

And you only need the fmj.jar from the fmj-jars.tar.gz the other jar will not be needed.
SPARK_FIXES_FOR_FMJ_V2.patch (3727 Bytes)

Hi, thank you very much for posting the files.

Am I right in thinking that I just need the sparkphone.jar file to use the phone, or do I need to apply any of the patches also?

I am having a problem with the plugin in that I cannot get any audio to work, although call initiation both ways works fine. I can however press the numeric buttons during a call, and hear the DTMF tones on the remote side, but no other audio seems to work.

I don’t believe it is a firewall issue as I am able to use other softphones without a problem.

Do you have any suggestions for how I may resolve this? I am using Spark on Linux.

Many thanks,

Ben

You need the sparkphone.jar and the fmj.jar from the fmj-jars.tar.gz !

Replace the fmj.jar with your jmf.jar in the startup script or replace the jmf.jar with the fmj.jar.

Thanks, I found your other post about FMJ and followed your instructions and almost got it to work.

It seems that the SIP phone plugin is flakey, I’ve never managed to get it to work sucessfully even before changing to FMJ.

I have posted about it previously in another thread, but with no resolution. What happens is that often when dialling out from the Spark SIp phone, when I answer the other phone, Spark keeps playing the ringback tone forever, and the call doesn’t connect. I need to close Spark to stop it!

Also sometimes it does connect if I dial into the Spark phone, but then there is either no audio, or only one way audio. I can use X-lite without problem, so there is no problem with my network configuration. Have you had any problems like this?

Thanks,

Ben

Yes, I seem to also be having similar problems relating to the ringing playback sounds playing forever even after the call is answered. I have not been able to solve it yet though.

My initial looking into the how this works in the plugin code, it appears the sounds, like the DTMF dial sounds and the ringing sounds are generated with the Java Applet AudioClip facility (a simple generic built into java media player), where the SIP softphone audio comes from a FMJ (or JMF before) codec over the RTP stream from the connected channel to the remote SIP service.

In my experimenting so far I have observed sometimes the ringing sounds don’t even play at all when making a call. its all silent and then hear connected remote audio all of a sudden.

So my theory is because these two audio facilities both are competing for some audio device resource access, possibly somewhere inside FMJ., or perhaps at the java level itself. I’m not that knpwledgeable about it yet. but I wonder if there was some kind of ‘my audio device is in use’ flag that would be used to synchronize these two different things from inside Spark SIP plugin, if that would simplify the problem of possibly two differnet things trying to write to the audio device within the same time. ?

that is, if it is something about conention of writing to the audio device. I know it is supposed to be possible for more than one ‘thing’ to be able to have sound played at the same time, thats what mixer objects are supposed to do for us. But perhaps, there is something within the FMJ implementation that is currently incomplete or not completely functional in all platforms and environmetns under all situations ?