Skip to content

Commit

Permalink
Imported version 1.8 of mjsip from http://mjsip.org/.
Browse files Browse the repository at this point in the history
  • Loading branch information
haumacher committed May 14, 2023
1 parent 34dc6e3 commit 51039cd
Show file tree
Hide file tree
Showing 575 changed files with 53,918 additions and 42,826 deletions.
91 changes: 15 additions & 76 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@
#
# Major make targets:
#
# all cleans, builds everything
# sip builds sip.jar
# ua builds ua.jar
# server builds server.jar
# sbc builds sbc.jar
# all compiles and builds jar files
# jar builds jar files
#
# **********************************************************************

Expand All @@ -38,12 +35,6 @@ endif

MJSIP_LIBS= $(LIBDIR)/sip.jar

NAMESPACE= org.zoolu
NAMESPACE_PATH= org/zoolu

#SIP_PACKAGES= address header message provider transaction dialog
SIP_PACKAGES= $(notdir $(wildcard $(SRCDIR)/$(NAMESPACE_PATH)/sip/*))


#%.class: %.java
# $(JAVAC) $<
Expand All @@ -66,79 +57,27 @@ cleanlogs:

# ****************************** Builds all ****************************
all:
$(MAKE) sip
$(MAKE) ua
$(MAKE) server
$(MAKE) sbc
$(MAKE) compile
$(MAKE) jar



# *************************** Creates sip.jar **************************
sip:
@echo ------------------ MAKING SIP ------------------
# *************************** Compiles source files **************************
compile:
@echo ------------------ COMPILING SRC ------------------
cd $(SRCDIR); \
$(JAVAC) -d ../$(CLASSDIR) $(NAMESPACE_PATH)/tools/*.java $(NAMESPACE_PATH)/sound/*.java $(NAMESPACE_PATH)/net/*.java $(NAMESPACE_PATH)/sdp/*.java; \
$(JAVAC) -classpath ../$(CLASSDIR) -d ../$(CLASSDIR) $(addsuffix /*.java,$(addprefix $(NAMESPACE_PATH)/sip/,$(SIP_PACKAGES))); \
cd ..

cd $(CLASSDIR); \
$(JAR) -cf ../$(LIBDIR)/sip.jar $(addprefix $(NAMESPACE_PATH)/,tools sound net sdp sip) -C ../$(LIBDIR) COPYRIGHT.txt -C ../$(LIBDIR) license.txt; \
cd ..



# *************************** Creates ua.jar ***************************
ua:
@echo ------------------- MAKING UA -------------------
$(JAVAC) -classpath "$(LIBDIR)/sip.jar" -d $(CLASSDIR) $(addsuffix /*.java,$(addprefix $(SRCDIR)/local/,net media ua))

cd $(CLASSDIR); \
$(JAR) -cf ../$(LIBDIR)/ua.jar $(addprefix local/,net media ua) $(addprefix -C ../resources media/local/,media ua); \
cd ..



# *************************** Creates ua.jar ***************************
jmf:
@echo ------------------- MAKING UA WITH JMF -------------------
$(JAVAC) -classpath "$(LIBDIR)/sip.jar" -d $(CLASSDIR) $(addsuffix /*.java,$(addprefix $(SRCDIR)/local/,net media ua) $(SRCDIR)/local.media.jmf)

cd $(CLASSDIR); \
$(JAR) -cf ../$(LIBDIR)/ua.jar $(addprefix local/,net media ua) $(addprefix -C ../resources media/local/,media ua); \
$(JAVAC) -d ../$(CLASSDIR) $(addsuffix /*.java, $(addprefix org/zoolu/, net sound $(addprefix sound/, codec $(addprefix codec/, amr g711 g726 gsm)) util)); \
$(JAVAC) -classpath ../$(CLASSDIR) -d ../$(CLASSDIR) $(addsuffix /*.java, $(addprefix org/mjsip/, media net rtp sdp sdp/field server server/sbc $(addprefix sip/, address authentication call dialog header message provider transaction) ua $(addprefix ua/, cli gui))); \
cd ..




# ************************** Creates server.jar ************************
server:
@echo ----------------- MAKING SERVER ----------------
$(JAVAC) -classpath "$(LIBDIR)/sip.jar" -d $(CLASSDIR) $(addsuffix /*.java,$(addprefix $(SRCDIR)/local/,server))

# ************************** Creates jar files ************************
jar:
@echo ------------------ CREATING JARs ------------------
cd $(CLASSDIR); \
$(JAR) -cf ../$(LIBDIR)/server.jar $(addprefix local/,server); \
$(JAR) -cf ../$(LIBDIR)/sip.jar org/zoolu $(addprefix org/mjsip/, rtp sdp sip) -C ../$(LIBDIR) COPYRIGHT.txt -C ../$(LIBDIR) license.txt; \
$(JAR) -cf ../$(LIBDIR)/ua.jar $(addprefix org/mjsip/, media net ua) -C ../resources media/org/mjsip/ua; \
$(JAR) -cf ../$(LIBDIR)/server.jar $(addprefix org/mjsip/, net server) -C ../$(LIBDIR) COPYRIGHT.txt -C ../$(LIBDIR) license.txt; \
cd ..



# **************************** Creates sbc.jar ****************************
SBC_LIBS= $(LIBDIR)/sip.jar$(COLON)$(LIBDIR)/server.jar
sbc:
@echo ------------------ MAKING SBC -------------------
$(JAVAC) -classpath "$(SBC_LIBS)" -d $(CLASSDIR) $(addsuffix /*.java,$(addprefix $(SRCDIR)/local/,sbc net))

cd $(CLASSDIR); \
$(JAR) -cf ../$(LIBDIR)/sbc.jar $(addprefix local/,sbc net); \
cd ..



# ************************** Creates conference.jar ************************
CONFERENCE_LIBS= $(LIBDIR)/sip.jar$(COLON)$(LIBDIR)/codec.jar$(COLON)$(LIBDIR)/server.jar
conference:
@echo --------------- MAKING CONFERENCE --------------
$(JAVAC) -classpath "$(CONFERENCE_LIBS)" -d $(CLASSDIR) $(addsuffix /*.java,$(addprefix $(SRCDIR)/local/,net media conference))

cd $(CLASSDIR); \
$(JAR) -cf ../$(LIBDIR)/conference.jar $(addprefix local/,net media conference); \
cd ..
Binary file removed lib/conference.jar
Binary file not shown.
Binary file removed lib/sbc.jar
Binary file not shown.
Binary file modified lib/server.jar
Binary file not shown.
Binary file modified lib/sip.jar
Binary file not shown.
Binary file modified lib/ua.jar
Binary file not shown.
41 changes: 28 additions & 13 deletions make-HOWTO.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,42 @@
Make MjSIP HOW-TO
Make-MjSIP HOW-TO
__________________________________________________________________
(by Luca Veltri, 29/6/2010)
(by Luca Veltri, 21/4/2016)


Note: Now JMF (Java Multimedia Framework) has been made optional. In order to build a standard java SIP UA you have just to make the UA (make ua) without any other configuration. If still you encounter JMF-related problems you can simply remove the folder 'local.media.jmf'.

1) How to compile all packages
--------------------------------------
# execute the following commands:
javac -d classes src/org/zoolu/net/*.java src/org/zoolu/rtp/*.java src/org/zoolu/sdp/*.java src/org/zoolu/sound/*.java src/org/zoolu/util/*.java
javac -classpath classes -d classes src/org/zoolu/sip/address/*.java src/org/zoolu/sip/authentication/*.java src/org/zoolu/sip/call/*.java src/org/zoolu/sip/dialog/*.java src/org/zoolu/sip/header/*.java src/org/zoolu/sip/message/*.java src/org/zoolu/sip/provider/*.java src/org/zoolu/sip/transaction/*.java
javac -classpath classes -d classes src/local/media/*.java src/local/net/*.java src/local/ua/*.java
javac -classpath classes -d classes src/local/server/*.java src/local/sbc/*.java


1) How to compile all packages under Windows OS (see section 3 for building mjUA with JMF support):
2) How to make the jar files
--------------------------------------
- just run 'make all'
- otherwise you can separately do 'make' with the selected target (e.g. 'make ua')

# execute the following commands:
cd classes
jar -cf ../lib/sip.jar org -C ../lib COPYRIGHT.txt -C ../lib license.txt
jar -cf ../lib/ua.jar local/media local/net local/ua -C ../resources media/local/ua
jar -cf ../lib/server.jar local/server
jar -cf ../lib/sbc.jar local/net local/sbc
cd ..


2) How to compile all packages under linux OS (see section 3 for building mjUA with JMF support):
3) Alternatively, how to compile all packages and make all jars with 'make' under Windows OS
--------------------------------------
- in file 'makefile-config' set 'OS=Linux'
- just run 'make all'
- otherwise you can separately do 'make' with the selected target (e.g. 'make ua')
# just run 'make all'
# otherwise you can separately do 'make' with the selected target (e.g. 'make sip' or 'make ua')


4) Alternatively, how to compile all packages and make all jars with 'make' under linux OS
--------------------------------------
# in file 'makefile-config' set 'OS=Linux'
# run 'make all'
# otherwise you can separately do 'make' with the selected target (e.g. 'make sip' or 'make ua')


3) How to build mjUA with JMF support:
5) Problems with JDK bin folder
--------------------------------------
- if you have JMF installed you can bulid a JMF-powered UA with video support; you can do this byusing the jmf' target, i.e. run 'make jmf'
# if you have not the JDK bin folder correctly configured in your PATH environment variable, you may modify the file 'make-config' and properly set the parameters 'JDK_HOME=..' and 'JDK_BIN=$(JDK_HOME)/bin/'
9 changes: 9 additions & 0 deletions make_mjsip.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
javac -d classes src/org/zoolu/net/*.java src/org/zoolu/sound/*.java src/org/zoolu/sound/codec/*.java src/org/zoolu/sound/codec/amr/*.java src/org/zoolu/sound/codec/g711/*.java src/org/zoolu/sound/codec/g726/*.java src/org/zoolu/sound/codec/gsm/*.java src/org/zoolu/util/*.java src/org/mjsip/rtp/*.java src/org/mjsip/sdp/*.java src/org/mjsip/sdp/field/*.java src/org/mjsip/media/*.java src/org/mjsip/net/*.java
javac -classpath classes -d classes src/org/mjsip/sip/address/*.java src/org/mjsip/sip/authentication/*.java src/org/mjsip/sip/call/*.java src/org/mjsip/sip/dialog/*.java src/org/mjsip/sip/header/*.java src/org/mjsip/sip/message/*.java src/org/mjsip/sip/provider/*.java src/org/mjsip/sip/transaction/*.java
javac -classpath classes -d classes src/org/mjsip/ua/*.java src/org/mjsip/ua/cli/*.java src/org/mjsip/ua/gui/*.java
javac -classpath classes -d classes src/org/mjsip/server/*.java src/org/mjsip/server/sbc/*.java
cd classes
jar -cf ../lib/sip.jar org/zoolu org/mjsip/rtp org/mjsip/sdp org/mjsip/sip -C ../lib COPYRIGHT.txt -C ../lib license.txt
jar -cf ../lib/ua.jar org/mjsip/media org/mjsip/net org/mjsip/ua -C ../resources media/org/mjsip/ua -C ../lib COPYRIGHT.txt -C ../lib license.txt
jar -cf ../lib/server.jar org/mjsip/net org/mjsip/server -C ../lib COPYRIGHT.txt -C ../lib license.txt
cd ..
9 changes: 9 additions & 0 deletions make_mjsip.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
javac -d classes src/org/zoolu/net/*.java src/org/zoolu/sound/*.java src/org/zoolu/sound/codec/*.java src/org/zoolu/sound/codec/amr/*.java src/org/zoolu/sound/codec/g711/*.java src/org/zoolu/sound/codec/g726/*.java src/org/zoolu/sound/codec/gsm/*.java src/org/zoolu/util/*.java src/org/mjsip/rtp/*.java src/org/mjsip/sdp/*.java src/org/mjsip/sdp/field/*.java src/org/mjsip/media/*.java src/org/mjsip/net/*.java
javac -classpath classes -d classes src/org/mjsip/sip/address/*.java src/org/mjsip/sip/authentication/*.java src/org/mjsip/sip/call/*.java src/org/mjsip/sip/dialog/*.java src/org/mjsip/sip/header/*.java src/org/mjsip/sip/message/*.java src/org/mjsip/sip/provider/*.java src/org/mjsip/sip/transaction/*.java
javac -classpath classes -d classes src/org/mjsip/ua/*.java src/org/mjsip/ua/cli/*.java src/org/mjsip/ua/gui/*.java
javac -classpath classes -d classes src/org/mjsip/server/*.java src/org/mjsip/server/sbc/*.java
cd classes
jar -cf ../lib/sip.jar org/zoolu org/mjsip/rtp org/mjsip/sdp org/mjsip/sip -C ../lib COPYRIGHT.txt -C ../lib license.txt
jar -cf ../lib/ua.jar org/mjsip/media org/mjsip/net org/mjsip/ua -C ../resources media/voip/application/ua -C ../lib COPYRIGHT.txt -C ../lib license.txt
jar -cf ../lib/server.jar org/mjsip/net org/mjsip/server -C ../lib COPYRIGHT.txt -C ../lib license.txt
cd ..
18 changes: 2 additions & 16 deletions makefile-config
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,9 @@
# You can set the following variables here according to where you
# have put things. These values are used in the makefiles.
#
# JDK_HOME : is the directory where the JDK is installed
# OS : is the Operative System (Windows, Linux, Unix, etc.)
#
#####################################################################


# Selects the proper OS
#OS= Linux
OS= Windows


# Selects the proper shell
# On MS-DOS systems, COMSPEC variable refers to the default shell (usually c:\windows\command.com)
Expand All @@ -34,18 +27,11 @@ MAKE= make
#MAKE= c:\programmi\bin\make


# Selects the proper jdk home
ifeq (${OS},Windows)
JDK_HOME= c:/programmi/jdk1.4.2
else
JDK_HOME= /user/local/jdk1.4.2
endif


# Selects the proper java tools
#JDK_BIN=$(JDK_HOME)/bin/
#JDK_BIN= /user/local/jdk1.4.2/bin/
JDK_BIN=
JAVA= $(JDK_BIN)java
#JAVAC= $(JDK_BIN)javac -source 1.4 -target 1.4
JAVAC= $(JDK_BIN)javac
JAVADOC= $(JDK_BIN)javadoc
JAR= $(JDK_BIN)jar
Expand Down
14 changes: 11 additions & 3 deletions mjsip.cfg.txt
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,10 @@
#registrar=example.net

# Contact URL.
# If not defined (default), it is formed as sip:user@via_address:host_port.
# If not defined (default), it is formed as sip:user@via_addr:host_port.
# Normally you can leave it undefined.
#contact_url=sip:[email protected]:5070

# User's name used for server authentication.
#auth_user=alice

Expand All @@ -383,7 +383,15 @@
# Absolute path (or complete URL) of the jar archive, where various UA media (gif, wav, etc.) are stored.
# Use value 'NONE' for getting resources from external folders.
# Default value: ua_jar=lib/ua.jar
#ua_jar=./ua.jar
#ua_jar=lib/ua.jar

# Absolute path (or complete URI) of the folder containing UA's resources.
# By default, the local folder "resources" is used.
#res_path=resources

# Relative path of UA media resources (gif, wav, etc.) within the UA jar file or within the resources folder.
# By default, the folder "media/local/ua" is used.
#media_path=media/local/ua

# Absolute path (or complete URL) of the buddy list file where the buddy list is and loaded from (and saved to).
# Default value: buddy_list_file=buddy.lst
Expand Down
Binary file removed resources/media/local/media/icon.gif
Binary file not shown.
Binary file removed resources/media/local/media/logo.gif
Binary file not shown.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 0 additions & 22 deletions src/COPYRIGHT.txt

This file was deleted.

Loading

0 comments on commit 51039cd

Please sign in to comment.