ymartineau / peers Goto Github PK
View Code? Open in Web Editor NEWJava SIP softphone
Java SIP softphone
Hi,
First of all, great job. I really like this phone.
But I have found something strange. I don´t understand the code, so let me introduce what I see and help me to guess what is going on.
When I try to call some telephone without any handset the phone launches an excpetion telling me
"No line matching interface TargetDataLine supporting format PCM_SIGNED 8000.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian is supported." that is great, but after a while I see that it stops sending the registering packet to the server and launches "registerFailed(SipResponse sipResponse)" function.
I tried a quick fix. In file peers / peers-javaxsound / src / main / java / net / sourceforge / peers / javaxsound / JavaxSoundManager.java line 94.
I removed return null and I left sourceDataLine starting.
// AccessController.doPrivileged added for plugin compatibility
AccessController.doPrivileged(
new PrivilegedAction<Void>() {
@Override
public Void run() {
try {
targetDataLine = (TargetDataLine) AudioSystem.getLine(targetInfo);
targetDataLine.open(audioFormat);
targetDataLine.start();
} catch (LineUnavailableException e) {
logger.error("target line unavailable", e);
//return null;
} catch (SecurityException e) {
logger.error("security exception", e);
//return null;
} catch (Throwable t) {
logger.error("throwable " + t.getMessage());
//return null;
}
try {
sourceDataLine = (SourceDataLine) AudioSystem.getLine(sourceInfo);
sourceDataLine.open(audioFormat);
} catch (LineUnavailableException e) {
logger.error("source line unavailable", e);
return null;
}
sourceDataLine.start();
return null;
}
});
Please, let me know what you think.
Kind regards
Hallo,
I had an issue and question concerning your application peers Sipstack Java.
Hi
How can i play mp3 or wav?
Hello,
Is there a way to stop logging to the console ?
I am doing dev with eclipse and its very difficult to debug the program logic with all the sip info and debugging.
i want to know how can we set caller ID , like display name which appear on receiver side when call is made
If I think correctly, then the library does not support bell transfer or is it still possible to do it?
Close timer ,InputStream and OutputStream
How I can use tls?
I don't see any options in peers.xml
are there any plans to upgrade to jdk17 compatibility?
JDK5 is pretty outdated and the build relys on it
I would update it first to JDK8, before switching to JDK11/17 which are openjdk based.
I will surely require help. If getting help would update the build accordingly.
But not clear if the rest of the code will work afterwards too. So would probably require help here
am working with pee-gui project and using it in my project, its save account data to conf/peer.xml file and read from it , i want to modify it that it save data to sqlite database . so for that i need help that how to start so that i can pass directly username , host , password etc to it .
thanks
In RegisterHandler.java file, at successResponseReceived method, register successfull event is raised even when you are actually unregistering.
At then end of the method, the [ !"0".equals(expires) ] check does not have any effect, so event is raised anyway
if (sipListener != null) {
sipListener.registerSuccessful(sipResponse);
}
Thaks for such a great effort!
I have also used your peers build Gui , it always start from
Calling- Talking etc
It doesn't show the ringing event, although there is the sound of ringing in talking phase.
Kindly guide me about that!
Thanks
Hi,
Thanks for this great project which help me a lot...
While I setup and it works with my IP server, and able to call internal numbers, but the voice quality seems not good as expect, most of the time it is broken, for example: If I count 1,2,3,4, 5,6,7,8,9,10 from speaker side, the other side can only listen 1, 4, 9; I am not sure where I can profiling,
My environment:
peers demo -> IP server <- X-Lite
While I have tried X-Lite to call X-Lite through my IP server, the voice quality is very good.
Appreciate for any help.
When sending DTMF tones to asterisk, each tone is detected many times.
This happens because timestamp of RTP packets are no the same as stated in RFC4733, I got the latest version from HEAD and see in changes that it was fixed, but when I tested again the RTP end packets changes the timestamp.
I look the code in DtmfFactory.java in package net.souceforge.peers.media and need to add line:
rtpPacket.setIncrementTimeStamp(false);
for the end packets.
The peers is greate,really help me a lot .
Last week , i find some repeat noise after a call. I figured it out :
the code in Java class MediaManager. stopSession(){
if (datagramSocket != null) { datagramSocket = null; }
the right way to close a dialog is
datagramSocket.close();
not
datagramSocket = null;
Hello, i wanna ask, can we play multiple audio files in single call to telephone? Because in peers.xml
I see only one tag for play one audio file during call.
how to set custom caller/senderid ????
I'm a little bit lost here, I see examples for Swing, JWS, etc. but I can't find an example for a simple use case as: place a call and playback an audio stream. Can I have a little help for this?
I have an Asterisk server on localhost, I've created a "peers:1234" user and I have a message.wav file. How can I simply call an extension, say "400", and play the file? No GUI, just a simple main
executable.
Thank you!
Hey, connect to Asterisk for outbound call, delay 200ms, what's going on
I have gone through this , but I don't get the proper Idea of how this function should be implemented?
https://sourceforge.net/p/peers/discussion/683023/thread/9ad8cdcf/?limit=25#a2f2
what does the guy mean by that?
"You just have to look for attributes sendonly or recvonly in SDP and avoid the setup
of the corresponding objects to send or receive media (incomingRtpReader or
captureRtpSender in MediaManager)."
I have tried this way, but it doesn't trigger the hold function at all..
userAgent.getSoundManager().close(); //for muting the sound from application side
userAgent.getSoundManager().init(); //for unmuting
Kindly guide.
It seems DTMF packets have increasing timestamps. My packet analyzer shows that a DTMF digit is sent as 6 RTP event packets, however these packets have both increasing timestamps and durations. I noticed this issue when calling into my SIP provider; I entered a single DTMF digit "2" which was interpreted as "222222" on the other side of the line. I believe the standard specifies that DTMF update packets should have the same timestamp as the initial packet: https://tools.ietf.org/html/rfc4733#section-2.5.1.2
Any reason this great project is not available on any of the public maven repositories as a ready to import artifact?
I tried running the EventManager sample at http://peers.sourceforge.net/files/html/peers.html. If I make a call, then hang up, even though the main thread completes, the program does not stop because there are still some threads running (TransactionManager, InviteHandler, TransportManager). Is there a way I can stop the remaining threads so the program will exit cleanly?
Are there any plans to support RFC3515 / REFER SIP method?
If you can point me in the right direction I'll spend some time on the development.
2023-08-29 16:02:52,379 ERROR [Encoder] Error writing encoded data
java.io.IOException: Pipe closed
at java.io.PipedInputStream.checkStateForReceive(PipedInputStream.java:260)
at java.io.PipedInputStream.receive(PipedInputStream.java:226)
at java.io.PipedOutputStream.write(PipedOutputStream.java:149)
at java.io.OutputStream.write(OutputStream.java:75)
at net.sourceforge.peers.media.Encoder.run(Encoder.java:115)
at java.lang.Thread.run(Thread.java:750)
It seam that these threads RtpSender
Capture
RtpSession
Encoder
not end
Hi, when calling constructor of the class RtpSender, the instance of logger is passed, but never assigned to attribute. This causes NullPointerException when logger.error() is called from run method.
do we have to start a local server?
getting "are you binding to the correct local IP?"
2018-06-11 12:26:32,313 DEBUG [Transaction timer] SM z9hG4bKDerhnghSS|INVITE [InviteClientTransactionStateCalling -> InviteClientTransactionStateCalling] setState
2018-06-11 12:26:32,313 DEBUG [Transaction timer] UdpMessageSender.sendMessage
2018-06-11 12:26:32,314 ERROR [Transaction timer] are you binding to the correct local IP? (local IP, not the routers IP)
2018-06-11 12:26:32,314 ERROR [Transaction timer] throwable
java.lang.Exception: java.io.IOException: Invalid argument (sendto failed)
at com.pannous.call.sip.transport.UdpMessageSender.sendBytes(UdpMessageSender.java:70)
at com.pannous.call.sip.transport.UdpMessageSender.sendMessage(UdpMessageSender.java:52)
at com.pannous.call.sip.transaction.InviteClientTransaction.sendRetrans(InviteClientTransaction.java:205)
at com.pannous.call.sip.transaction.InviteClientTransactionStateCalling.timerAFires(InviteClientTransactionStateCalling.java:36)
at com.pannous.call.sip.transaction.InviteClientTransaction$TimerA.run(InviteClientTransaction.java:226)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
In my case, call is successfully received on my cellphone, but when I pick the call, it always rings a hold music.
Kindly help
TransportManager on line 399.
In the maven artifact UserAgent
has a dtmfDetected
method, but I can't find it in the repository code. Is the master
branch up-to-date?
Could you implement TCP connections to SIP server?
net.sourceforge.peers.sip.syntaxencoding.SipHeaders;
// the bug code
public void remove(SipHeaderFieldName name) {
headers.remove(name);
}
// the fixed
public void remove(SipHeaderFieldName name) {
int index = headers.indexOf(new SipHeader(name, null));
if (index < 0) {
// do nothing
return;
}
headers.remove(index);
}
Is there any way to pass a custom dynamic SDP message when INVITING? I want to be able to call a remote address and pass a custom SDP message (for connecting with other endpoints).
There is a way to support a RTP port range ?
Thanks in advance
hi
i want to work with dtmf tones , can you guide me or give little example that how can i use useragent method with dtmf
thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.