Win a copy of Rust Web Development this week in the Other Languages forum!

Krishna Komarpant

+ Follow
since Aug 07, 2009
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Krishna Komarpant

Tritonous is good. :-) But if i have to implement in my code then it will make me recode everything, as the current was coded with the aim to play only wav file. Now mp3 feature is required.
At one place an output format is specified: ULAW/rtp, 8000.0 Hz, 8-bit, Mono, FrameSize=8 bits

this statement forms the format string. when i provide the wav file as an input. it works, plays and gives the following output n the jmf log:

the following is the output in the jmf.log when i give the mp3 file as the input to my application:

Can anyone get a hint on this problem?

12 years ago
Can anyone help me out with this? would be of great help to me.
Thanks in advance.
12 years ago
Following is the code related to playing the audio file:

1st param: the callHandle
2nd param: MediaSourceType.MEDIA_SOURCE_FILE is a constant
3rd param: absolute filename.
4th param: loop
5th param: Initial volume
6th param: Initial Gain

I hope this will help you to get an idea about the problem.
12 years ago
I copied the jar in the /lib/ext/ directory of the installed jre's on my system.
Closed my Java project and reopend it. I verified that the mp3 plugin was taken into the class path.

when installing the plugin, i did the following as mentioned in the website:
For the plugin to work within a JMF application, you need to :
- ensure that jmf.jar is also in the /lib/ext directory
- run the following command:

You should see a message that it was successfully registered, without any error message.

****And I got th success message.

Yet it did not work...
12 years ago
Hi again,
No, this did not work.
I added the jar in the jre home and verified that it is included in the classpath. Still it did not work. also i tried adding the jar externally and then giving the import statement

It gives the same errors.
12 years ago

Christophe Verré wrote:Are you using the MP3 plugin ?

Oh.. is that also required? Ok, i wil try this and check.
12 years ago
I have a VOIP program wherein when an incoming call is detected my java program picks the call and makes the caller listen to an audio. The audio message file format currently supported is .wav but i need to enable .mp3 support and not .wav (However additional support for .wav wuold be a plus point though. but .mp3 is a must.)

When i give the path of the .mp3 file in the code of my java program, the call gets picked but nothing is played. The following is the output in the jmf.log with some errors. and below that is the output with .wav audio file.

jmf.log output when i give the path of the .wav audio file

Can anyone help me out with this?
Thanks in advance.
12 years ago
Yes this will work, bu i realised that i was making my code to commit suicide..

When you write the above code, it takes the base directory for the "Settings.ini" file to be in "projectHomeFolder/build/" directory, which is always deleted and re-created when you build you whole project.

As i have mentioned in the previous post, the solution was to paste the "Settings.ini" file in the "ProjectHomeFolder"

12 years ago

r035198x wrote:On File(Settings.ini), did you mean


Oh yes... I apologize for that. It was a typo, i was in haste so did not realize that mistake.

By the way, i figured it out..
I kept the "Settings.ini" file in the Project Home folder and gavethe same format statement in the code

and continued with my file reading code, and it works perfect.

Thanks anyways!
12 years ago
Hi All,

I have my Netbeans Project after building of which creates a JAR file in the "dist" folder.
Now i want to read some settings stored in a "settings.ini" which i pasted in the same directory as the JAR file.

In my code i give directly, the name of the file to read from in the File Input stream. This does not work, and gives error saying cannot read from file, there is a path resolvnig problem...

What is the correct code notation to read from the file?

Following is the code:
12 years ago
Hello Everyone,
It took me a little long to get back, apologies for that. I was busy with my code.
Yes RobThat would have surely helped me.
I tried it, but after debugging I came to the conclusion that there are serious issues with the Proxy Authentication that is being used. I had to completely break the code and get all the code included in the classes within the same file where the proxy authentication was being called.
i used a JAVA DECOMPILER to get the java source code of the java library class files.

It is also observed that the Asterix System has been to complicated to understand, I switched to a 3CX system, with this and some more massive code changes done i was able to make my First Call.

Thanks a lot to Rob Prime and Ulf Dittmer and others for all the help provided, I have learnt a lot of new things on this issue.

12 years ago

I did the following with my code: seems to work out to some extent, but there is one Exception that is generated:

I get the following output....
Reading Data From File VoipSettings.ini....:
createSipStack gov.nist.javax.sip.SipStackImpl@94948a
Sending Probe 5060
Received response not waited on:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP;rport=5060;branch=z9hG4bKc35c0d59d3f4bf6cc99c65cda8856399;received=
From: <sip:50@>;tag=740083d7
To: <sip:50@>
Call-ID: 98440ac88c2ca5de38ee82975a279788@
User-Agent: Asterisk PBX
Supported: replaces
Contact: <sip:50@>
Content-Length: 0
0 [Thread-7] DEBUG org.apache.commons.httpclient.auth.DigestScheme - enter DigestScheme.createCnonce()
16 [Thread-7] DEBUG org.apache.commons.httpclient.auth.DigestScheme - enter DigestScheme.encode(byte[])
63 [Thread-7] DEBUG org.apache.commons.httpclient.params.DefaultHttpParams - Set parameter http.useragent = Jakarta Commons-HttpClient/3.1-rc1
63 [Thread-7] DEBUG org.apache.commons.httpclient.params.DefaultHttpParams - Set parameter http.protocol.version = HTTP/1.1
63 [Thread-7] DEBUG org.apache.commons.httpclient.params.DefaultHttpParams - Set parameter http.connection-manager.class = class org.apache.commons.httpclient.SimpleHttpConnectionManager
63 [Thread-7] DEBUG org.apache.commons.httpclient.params.DefaultHttpParams - Set parameter http.protocol.cookie-policy = default
63 [Thread-7] DEBUG org.apache.commons.httpclient.params.DefaultHttpParams - Set parameter http.protocol.element-charset = US-ASCII
63 [Thread-7] DEBUG org.apache.commons.httpclient.params.DefaultHttpParams - Set parameter http.protocol.content-charset = ISO-8859-1
63 [Thread-7] DEBUG org.apache.commons.httpclient.params.DefaultHttpParams - Set parameter http.method.retry-handler = org.apache.commons.httpclient.DefaultHttpMethodRetryHandler@f11404

Exception in thread "Thread-7" java.lang.IllegalStateException: unsupported protocol: 'sip'
at org.apache.commons.httpclient.protocol.Protocol.lazyRegisterProtocol(
63 [Thread-7] DEBUG org.apache.commons.httpclient.params.DefaultHttpParams - Set parameter http.dateparser.patterns = [EEE, dd MMM yyyy HH:mm:ss zzz, EEEE, dd-MMM-yy HH:mm:ss zzz, EEE MMM d HH:mm:ss yyyy, EEE, dd-MMM-yyyy HH:mm:ss z, EEE, dd-MMM-yyyy HH-mm-ss z, EEE, dd MMM yy HH:mm:ss z, EEE dd-MMM-yyyy HH:mm:ss z, EEE dd MMM yyyy HH:mm:ss z, EEE dd-MMM-yyyy HH-mm-ss z, EEE dd-MMM-yy HH:mm:ss z, EEE dd MMM yy HH:mm:ss z, EEE,dd-MMM-yy HH:mm:ss z, EEE,dd-MMM-yyyy HH:mm:ss z, EEE, dd-MM-yyyy HH:mm:ss z]
at org.apache.commons.httpclient.protocol.Protocol.getProtocol(
at org.apache.commons.httpclient.HttpHost.<init>(
at org.apache.commons.httpclient.HttpMethodBase.setURI(
at org.apache.commons.httpclient.HttpMethodBase.<init>(
at org.apache.commons.httpclient.methods.GetMethod.<init>(
at com.sipresponse.voipcallmgr.internal.util.AuthenticationHelper.processResponseAuthorization(
CallManager destroyed.

BUILD SUCCESSFUL (total time: 33 seconds)
12 years ago

Rob Prime wrote:What's wrong with actually using the classes Ulf and I mentioned?

Alright, i wrote this...
12 years ago
Hi Ulf Dittmer,
Let me summarize the code statements involved...
I imported the following class:

Yes, i am trying to get some idea by what Rob and you have suggested. I will get back if I get it going.
The following is the entire file in which the code changes are to be done. can you please take a look at this file.

12 years ago
I had a similar issue.. tried creating the method variable and the uriString variable typecast to HttpMethod variable. but the statements seem to be erronous. Even i would like to know the solution to this problem that would make me complete by project.
12 years ago