diff --git a/build.xml b/build.xml
new file mode 100644
index 0000000..8dbffa6
--- /dev/null
+++ b/build.xml
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+
+
+
+ Builds, tests, and runs the project Phone.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lib/jain-sip-api-1.2.1.4.jar b/lib/jain-sip-api-1.2.1.4.jar
new file mode 100644
index 0000000..2815242
Binary files /dev/null and b/lib/jain-sip-api-1.2.1.4.jar differ
diff --git a/lib/jain-sip-ri-1.2.327.jar b/lib/jain-sip-ri-1.2.327.jar
new file mode 100644
index 0000000..b1bb356
Binary files /dev/null and b/lib/jain-sip-ri-1.2.327.jar differ
diff --git a/lib/junit-4.12.jar b/lib/junit-4.12.jar
new file mode 100644
index 0000000..3a7fc26
Binary files /dev/null and b/lib/junit-4.12.jar differ
diff --git a/lib/log4j-1.2.17.jar b/lib/log4j-1.2.17.jar
new file mode 100644
index 0000000..068867e
Binary files /dev/null and b/lib/log4j-1.2.17.jar differ
diff --git a/manifest.mf b/manifest.mf
new file mode 100644
index 0000000..1574df4
--- /dev/null
+++ b/manifest.mf
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+X-COMMENT: Main-Class will be added automatically by build
+
diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml
new file mode 100644
index 0000000..cfdb0cb
--- /dev/null
+++ b/nbproject/build-impl.xml
@@ -0,0 +1,1768 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must set src.dir
+ Must set test.src.dir
+ Must set build.dir
+ Must set dist.dir
+ Must set build.classes.dir
+ Must set dist.javadoc.dir
+ Must set build.test.classes.dir
+ Must set build.test.results.dir
+ Must set build.classes.excludes
+ Must set dist.jar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must set javac.includes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select some files in the IDE or set javac.includes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ To run this application from the command line without Ant, try:
+
+ java -jar "${dist.jar.resolved}"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set debug.class
+
+
+
+
+ Must select one file in the IDE or set debug.class
+
+
+
+
+ Must set fix.includes
+
+
+
+
+
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set profile.class
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+
+
+ Must select some files in the IDE or set test.includes
+
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+
+ Must select one file in the IDE or set applet.url
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select some files in the IDE or set javac.includes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Some tests failed; see details above.
+
+
+
+
+
+
+
+
+ Must select some files in the IDE or set test.includes
+
+
+
+ Some tests failed; see details above.
+
+
+
+ Must select some files in the IDE or set test.class
+ Must select some method in the IDE or set test.method
+
+
+
+ Some tests failed; see details above.
+
+
+
+
+ Must select one file in the IDE or set test.class
+
+
+
+ Must select one file in the IDE or set test.class
+ Must select some method in the IDE or set test.method
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set applet.url
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set applet.url
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties
new file mode 100644
index 0000000..e197871
--- /dev/null
+++ b/nbproject/genfiles.properties
@@ -0,0 +1,8 @@
+build.xml.data.CRC32=f69c57db
+build.xml.script.CRC32=53e451ff
+build.xml.stylesheet.CRC32=f85dc8f2@1.90.1.48
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=f69c57db
+nbproject/build-impl.xml.script.CRC32=2b6978ab
+nbproject/build-impl.xml.stylesheet.CRC32=3a2fa800@1.90.1.48
diff --git a/nbproject/project.properties b/nbproject/project.properties
new file mode 100644
index 0000000..d02eba2
--- /dev/null
+++ b/nbproject/project.properties
@@ -0,0 +1,80 @@
+#Tue Jun 11 17:15:12 CEST 2019
+excludes=
+javac.test.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}:\
+ ${libs.junit_4.classpath}:\
+ ${libs.hamcrest.classpath}
+run.classpath=${javac.classpath}\:${build.classes.dir}
+javac.processorpath=${javac.classpath}
+dist.javadoc.dir=${dist.dir}/javadoc
+test.src.dir=test
+file.reference.junit-4.12.jar=lib\\junit-4.12.jar
+run.modulepath=${javac.modulepath}
+annotation.processing.enabled=true
+file.reference.jain-sip-ri-1.2.327.jar=lib\\jain-sip-ri-1.2.327.jar
+build.sysclasspath=ignore
+debug.modulepath=${run.modulepath}
+javac.compilerargs=
+javadoc.noindex=false
+javadoc.private=false
+file.reference.log4j-1.2.17.jar=lib\\log4j-1.2.17.jar
+javadoc.author=false
+endorsed.classpath=
+main.class=phone.Start
+junit.selected.version=4
+source.encoding=UTF-8
+javac.source=11
+includes=**
+javadoc.use=true
+jar.compress=false
+javadoc.nonavbar=false
+annotation.processing.enabled.in.editor=false
+javadoc.notree=false
+annotation.processing.processors.list=
+javac.deprecation=false
+application.vendor=Normal
+jlink.launcher=true
+javadoc.additionalparam=
+jlink.launcher.name=Phone
+build.generated.sources.dir=${build.dir}/generated-sources
+javadoc.splitindex=true
+javac.processormodulepath=
+run.jvmargs=
+jlink.additionalmodules=
+javadoc.encoding=${source.encoding}
+javac.classpath=${file.reference.jain-sip-api-1.2.1.4.jar}\:${file.reference.jain-sip-ri-1.2.327.jar}\:${file.reference.junit-4.12.jar}\:${file.reference.log4j-1.2.17.jar}
+mkdist.disabled=false
+run.test.modulepath=${javac.test.modulepath}
+build.classes.excludes=**/*.java,**/*.form
+dist.jlink.dir=${dist.dir}/jlink
+dist.jar=${dist.dir}/Phone.jar
+build.classes.dir=${build.dir}/classes
+debug.test.modulepath=${run.test.modulepath}
+build.test.classes.dir=${build.dir}/test/classes
+file.reference.jain-sip-api-1.2.1.4.jar=lib\\jain-sip-api-1.2.1.4.jar
+javadoc.windowtitle=
+build.test.results.dir=${build.dir}/test/results
+dist.dir=dist
+build.dir=build
+dist.archive.excludes=
+annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
+build.generated.dir=${build.dir}/generated
+javadoc.version=false
+application.title=Phone
+javac.test.modulepath=${javac.modulepath}
+debug.test.classpath=${run.test.classpath}
+javac.external.vm=true
+javac.target=11
+platform.active=default_platform
+manifest.file=manifest.mf
+javadoc.html5=false
+javac.test.processorpath=${javac.test.classpath}
+meta.inf.dir=${src.dir}/META-INF
+run.test.classpath=${javac.test.classpath}\:${build.test.classes.dir}
+dist.jlink.output=${dist.jlink.dir}/Phone
+annotation.processing.run.all.processors=true
+javac.modulepath=
+src.dir=src
+jlink.additionalparam=
+debug.classpath=${run.classpath}
diff --git a/nbproject/project.xml b/nbproject/project.xml
new file mode 100644
index 0000000..10ed024
--- /dev/null
+++ b/nbproject/project.xml
@@ -0,0 +1,15 @@
+
+
+ org.netbeans.modules.java.j2seproject
+
+
+ Phone
+
+
+
+
+
+
+
+
+
diff --git a/src/model/SIP100Trying.java b/src/model/SIP100Trying.java
index 6dc8969..8cde62e 100644
--- a/src/model/SIP100Trying.java
+++ b/src/model/SIP100Trying.java
@@ -21,7 +21,7 @@ import javax.sip.message.Response;
import logger.OhmLogger;
/**
- *
+ * Erstellt den Trying Header, wird als erstes gesendet sobald man einen Anruf bekommt
* @author Jan
*/
public class SIP100Trying
@@ -44,6 +44,7 @@ public class SIP100Trying
AllowHeader allow = headerFactory.createAllowHeader("NOTIFY,INVITE,ACK,CANCEL,BYE,REFER,INFO,OPTIONS,MESSAGE");
tryResponse.addHeader(supp);
tryResponse.addHeader(allow);
+ lgTry.info("100-Trying Header erstellt");
}
catch (Exception ex)
{
diff --git a/src/model/SIP180Ringing.java b/src/model/SIP180Ringing.java
index 59e5043..2b37cf4 100644
--- a/src/model/SIP180Ringing.java
+++ b/src/model/SIP180Ringing.java
@@ -21,13 +21,15 @@ import javax.sip.message.MessageFactory;
import javax.sip.message.Response;
import logger.OhmLogger;
/**
- *
+ * Erstellt den Ringing Header, wird als zweites gesendet sobald man einen Anruf bekommt
+ * Wiederholen bis User das Telefon abnimmt oder nichtmehr angerufen wird
+ *
* @author Jan
*/
public class SIP180Ringing implements Runnable
{
private RequestEvent requestEvent;
- private ExecutorService threadring;
+ private ExecutorService threadring; //für wiederholtes senden des Ringing Headers
private boolean callIncoming;
private Response responseRing;
private MessageFactory messageFactory;
@@ -58,7 +60,7 @@ public class SIP180Ringing implements Runnable
responseRing.addHeader(headerFactory.createSupportedHeader("replace,path,timer"));
responseRing.addHeader(this.headerFactory.createAllowHeader("NOTIFY,INVITE,ACK,CANCEL,BYE,REFER,INFO,OPTIONS,MESSAGE"));
responseRing.addHeader(this.headerFactory.createAllowEventsHeader("talk,hold,refer")); //für was wird er gebraucht
- lgRing.info("Ringing Header erfolgreich erstellt");
+ lgRing.info("180-Ringing Header erstellt");
}
catch (Exception ex)
{
@@ -83,7 +85,6 @@ public class SIP180Ringing implements Runnable
{
}
}
-
/**
* @return the responseRing
*/
diff --git a/src/model/SIP200Ok.java b/src/model/SIP200Ok.java
index 862fdd0..473dd36 100644
--- a/src/model/SIP200Ok.java
+++ b/src/model/SIP200Ok.java
@@ -54,7 +54,7 @@ public class SIP200Ok
response.addHeader((CallIdHeader) this.requestEvent.getRequest().getHeader("Call-ID"));
response.addHeader(allow);
response.addHeader(allowevents);
- lg200Ok.info("200Ok Header erfolgreich erstellt");
+ lg200Ok.info("200-OK Header erstellt");
}
catch (Exception ex)
{
diff --git a/src/model/SIPInvite.java b/src/model/SIPInvite.java
index f8aec81..969839e 100644
--- a/src/model/SIPInvite.java
+++ b/src/model/SIPInvite.java
@@ -62,7 +62,7 @@ public class SIPInvite
ContentTypeHeader content = headerFactory.createContentTypeHeader("application", "sdp");
inviterequest.addHeader(content);
inviterequest.setContent(sessionDescription, content);
- System.out.println(inviterequest);
+ lgInvite.info("Invitation Header erstellt");
}
catch (Exception ex)
{
diff --git a/src/model/SIPRegister.java b/src/model/SIPRegister.java
index 4c89b96..945515f 100644
--- a/src/model/SIPRegister.java
+++ b/src/model/SIPRegister.java
@@ -55,7 +55,7 @@ public class SIPRegister
request.addHeader(contactHeader);
request.addHeader(allow);
request.addHeader(expire);
- lgRegister.info("Erfolgreiche Register-Header erstellt");
+ lgRegister.info("Register Header erstellt");
}
catch (Exception ex)
{
diff --git a/src/model/SIPSessionDescription.java b/src/model/SIPSessionDescription.java
index 1e9f442..86137d1 100644
--- a/src/model/SIPSessionDescription.java
+++ b/src/model/SIPSessionDescription.java
@@ -97,6 +97,7 @@ public class SIPSessionDescription
}
}
sessionDescription.setAttributes(mediavec);
+ lgSessionDescription.info("SDP Header erstellt");
}
catch (Exception ex)
{