Giter VIP home page Giter VIP logo

peers's Introduction

============================================================
                   Peers: java sip softphone
                 http://peers.sourceforge.net/
============================================================


LICENSE


This software is released under GPL License version 3 or
any later version. Please read this license in gpl.txt if
not already done.


SPECIFICATION


Peers is a software phone (softphone) compatible with the
following specifications:
 - RFC 3261 (SIP),
 - RFC 4566 (SDP),
 - RFC 3550 (RTP),
 - RFC 3551 (RTP Audio/Video profile),
 - RFC 2617 (Digest Authentication),
 - RFC 4733 (DTMF),
 - ITU-T G.711 (PCMU, PCMA)
You should easilly retrieve those specifications on internet with
your favorite search engine.


PREREQUISITES


This software has been developed using Oracle Java Development Kit
version 7. You should install the latest Java Runtime Environment
on your computer if you just want to run the application. If you
want to compile the sources yourself, you should use the JDK. In
both cases, you can download the installation files here:
  http://www.oracle.com/technetwork/java/javase/downloads/index.html


CONFIGURATION


Your SIP account credentials can be configured in conf/peers.xml.
Please read comments in this file for configuration details.
This configuration file is ruled by a grammar file: peers.xsd.
Thus to modify this file, you can use jEdit with XML and Error list
plugins. You can download jEdit here:
  http://www.jedit.org/index.php?page=download
This provides xml completion and grammar checking which can be
very useful to avoid simple configuration errors.
You can also configure your SIP account using graphical user
interface.


RUNNING


If you are a Windows user you can use the .bat batch script in root
directory, if you use any Unix compatible sytem, you can use the
.sh script. You can also double click .jar file. You can then call
any IP address using SIP protocol, if the remote host does not listen
on the default SIP port (5060), you can use the following example URI:
  sip:192.168.1.2:6060
For some softphones, it is necessary to add a userpart to the called
sip uri, for example:
  sip:[email protected]:6060

If you configured a sip account in configuration file or using gui,
you can also place calls with usual sip uris:
  sip:[email protected]

Advanced users can run several peers instances on the same computer.
In this case a folder should be created in peers root directory for
each peers instance. This folder should contain three directories:
conf, logs and media. conf should contain peers.xml and peers.xsd for this
instance. peers.xml will need to be updated with this instance
parameters, peers.xsd can be copied from root conf directory. You will
need to do this for each instance. <media> parameter in configuration file
should be activated for at most one peers instance, this avoids comfusion
in microphone capture and sound playback. You should also check that
SIP and RTP ports are not the same in each configuration file.

Here is an example configuration:

  peers/
    user1/
      conf/
        peers.xml
        peers.xsd
      logs/
      media/
    user2/
      conf/
        peers.xml
        peers.xsd
      logs/
      media/

Once all those files have been created and updated, each instance can
be run providing a java system property giving peers home directory:

  java -classpath build/classes -Dpeers.home=user1 net.sourceforge.peers.gui.MainFrame

As a Main-Class has been defined in jar manifest, you can also use the following
command line:

  java -jar build/peers.jar -Dpeers.home=user1 net.sourceforge.peers.gui.MainFrame


HISTORY


2007-11-25 0.1 First release


minimalist UAC and UAS.


2007-12-09 0.1.1 First release update


moved startup scripts in root directory


2008-03-29 0.2 Second release


New features:
 - provisional responses (UAC and UAS),
 - CANCEL management (UAC and UAS), updated GUI with provisional stuff
 - new Logger which enables network traffic tracing and classical log4j-like
   logging in two separate files
Bugs fixed:
 - 1900810 MTU too small management


2008-06-08 0.3 Third release


New features:
 - register management (initial register, register refresh, unregister)
 - authentication using message digest (RFC2617)
Improved features:
 - media capture/sending using pipes and three threads
 - using TestNG for tests
 - no singleton is used anymore
 - xxxRequestManagers and xxxMethodHandlers are instanciated only once for
   uas and uac
 - provisional responses can create or update dialog info (remote target, etc.)
Bugs fixed:
 - 1994625 provisional responses with to-tag


2009-09-23 0.3.1 Peers resurrection


New features:
 - Running:
   - peers.home system property to run peers in several environments
 - Configuration:
   - an outbound proxy can now be configured in configuration file
   - media can now be activated or deactivated in configuration file
 - SIP:
   - support "sent-by" and "received" Via parameters
   - support 407 Proxy-Authenticate on REGISTER
   - support 401 and 407 on INVITE
   - support re-INVITEs (refresh target)
   - manage challenges on INVITEs
 - RTP:
   - support remote party update (ip address and port)
Improved features:
 - transport log file now contains real remote ip address and port
 - fixed media sending issue (replaced encoder with mobicents media server
   g711 encoder)


2010-12-13 0.4 Peers GUI


New features:
 - GUI:
   - update sip account settings in account frame with no modification in files
 - SIP:
   - 3102136 keep-alives sent and answered
   - 3109472 added rport management based on RFC 3581
   - 3031364 added OPTIONS method management
 - RTP:
   - 2934223 support RFC 4733 outgoing telephone-events (DTMF)
   - 3107231 added PCMA (G711 A-law) codec
Improved features:
 - gui complete refactoring, now using clean events between sip core and gui
Bugs fixed:
   - 3032080 no media on pickup
   - 2864885 multiple challenged calls
   - 3098214 start CSeq at 1 instead of 0


2011-05-19 0.4.1 Bug fixes


Bugs fixed:
 - GUI:
   - 3155571 tuijldert: update dialog state before gui notification
 - SIP:
   - 3137803 tuijldert: client transaction synchronization on responses reception
   - 3285107 added authentication on bye request


2011-07-04 0.4.2 Bug fixes


Bugs fixed:
 - SIP:
   - 3325451 cannot hangup with asterisk 1.8.4.2
   - 3324115 ACK does not contain Authorization header


2011-09-06 0.4.3 Various improvements


New features:
 - SIP:
   - manage opaque parameter in challenge
   - use same tag in From header between original and authenticated INVITE
   - support incoming INVITEs and reINVITEs with empty body


Bugs fixed:
 - SIP:
   - 3392342 bad CANCEL sip request when other party doesn't picking up


2014-05-01 0.5 Maven release


 - moved source code from sourceforge subversion repository to git hosted
   on github
 - now using maven with multiple modules to build peers
 - updated doc
 - simplified SIP API


AUTHOR

Yohann Martineau [email protected]

peers's People

Contributors

96187 avatar bryce4d avatar ymartineau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

peers's Issues

TCP support

Could you implement TCP connections to SIP server?

how to set caller ID

i want to know how can we set caller ID , like display name which appear on receiver side when call is made

Missing dtmfDetected on UserAgent

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?

Pipe closed and RtpSender thread use CPU 100%

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
图片

Expose on a maven repo

Any reason this great project is not available on any of the public maven repositories as a ready to import artifact?

UDP socket not full clear up

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;

Simple use without GUI

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!

Using tls

How I can use tls?
I don't see any options in peers.xml

Integrating Peers in java application.

Hallo,
I had an issue and question concerning your application peers Sipstack Java.

  1. Is it possible to authenticate the registrar client using Database instead of the config/peers.xml?
  2. Is it also possible to only receive incoming calls and if so how do I do that?
    My integration plan.
    I had an application which is also supposed to only receive incoming calls so I can use the caller information to process a database queries.
    Peers classes that I tried to use.
  3. Eventmanager
  4. Accountframe
  5. Useragent
  6. And I would not be using the callframe because I already have a frame for my application. But then how do I initialize the registration to the server. Which class should I get the caller ID and fromUrl

How to play multiple audio files?

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.

voice broken

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.

the function SipHeaders.remove() exists class cast exception

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);
}

JDK 17 upgrade?

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

Unregister SipListenerEvent

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!

DTMF tones detected many times by asterisk

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.

DTMF packets have different timestamps

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

logging to console

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.

Hold Feature

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.

Support for REFER

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.

No headset causes unregistration in the server

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

working with dtmf

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

How to get Ringing Event?

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

Logger not assigned in RtpSender

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.

Pass custom SDP

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).

"are you binding to the correct local IP?"

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)

Cleaning up threads

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?

Call transfer

If I think correctly, then the library does not support bell transfer or is it still possible to do it?

save sip data to db

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

There is a Hold Music always

In my case, call is successfully received on my cellphone, but when I pick the call, it always rings a hold music.
Kindly help

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.