Krishna Komarpant

Greenhorn
+ Follow
since Aug 07, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
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?



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



where:
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.
14 years ago
Yes,
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:
java com.sun.media.codec.audio.mp3.JavaDecoder

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...
14 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.
14 years ago

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



Oh.. is that also required? Ok, i wil try this and check.
14 years ago
Hi,
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.
14 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"

14 years ago

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

instead?



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!
14 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:
14 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.

Regards,
Krishna.
14 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....
init:
deps-jar:
compile:
run:
Reading Data From File VoipSettings.ini....:
createSipStack gov.nist.javax.sip.SipStackImpl@94948a
Sending Probe 10.0.2.58 5060
Line Event: LINE_REGISTERING, LINE_NORMAL
processResponseAuthorization()
Received response not waited on:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.0.2.58:5060;rport=5060;branch=z9hG4bKc35c0d59d3f4bf6cc99c65cda8856399;received=10.0.2.58
From: <sip:50@10.0.2.59>;tag=740083d7
To: <sip:50@10.0.2.59>
Call-ID: 98440ac88c2ca5de38ee82975a279788@10.0.2.58
CSeq: 1 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY
Supported: replaces
Contact: <sip:50@10.0.2.59>
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(Protocol.java:149)
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(Protocol.java:117)
at org.apache.commons.httpclient.HttpHost.<init>(HttpHost.java:107)
at org.apache.commons.httpclient.HttpMethodBase.setURI(HttpMethodBase.java:280)
at org.apache.commons.httpclient.HttpMethodBase.<init>(HttpMethodBase.java:220)
at org.apache.commons.httpclient.methods.GetMethod.<init>(GetMethod.java:89)
at com.sipresponse.voipcallmgr.internal.util.AuthenticationHelper.processResponseAuthorization(AuthenticationHelper.java:115)
at com.sipresponse.voipcallmgr.internal.actions.RegisterAction.run(RegisterAction.java:103)
CallManager destroyed.

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

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


Alright, i wrote this...
14 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 AuthenticationHelper.java file in which the code changes are to be done. can you please take a look at this file.

14 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.
14 years ago