|
|
|
|
|
|
|
|
import java.util.logging.Level; |
|
|
import java.util.logging.Level; |
|
|
import java.util.logging.Logger; |
|
|
import java.util.logging.Logger; |
|
|
import javax.sdp.SdpException; |
|
|
import javax.sdp.SdpException; |
|
|
import javax.sdp.SdpFactory; |
|
|
|
|
|
import javax.sdp.SessionDescription; |
|
|
|
|
|
import javax.sip.DialogTerminatedEvent; |
|
|
import javax.sip.DialogTerminatedEvent; |
|
|
import javax.sip.IOExceptionEvent; |
|
|
import javax.sip.IOExceptionEvent; |
|
|
import javax.sip.InvalidArgumentException; |
|
|
import javax.sip.InvalidArgumentException; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public long cSequenz = 1; |
|
|
public long cSequenz = 1; |
|
|
private String proxyTag; |
|
|
private String proxyTag; |
|
|
private int myTag = (new Random()).nextInt(); |
|
|
|
|
|
private int branch = hashCode(); |
|
|
|
|
|
|
|
|
private String myTag = String.valueOf(new Random().nextInt()); |
|
|
|
|
|
private int branch = Integer.valueOf(hashCode()); |
|
|
public Address contactAddress; |
|
|
public Address contactAddress; |
|
|
public ContactHeader contactHeader; |
|
|
public ContactHeader contactHeader; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int hashCode() |
|
|
public int hashCode() |
|
|
{ |
|
|
{ |
|
|
int temp = myTag * (new Random(100)).nextInt(); |
|
|
|
|
|
|
|
|
int temp = Integer.valueOf(myTag)* (new Random(100)).nextInt(); |
|
|
return temp; |
|
|
return temp; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void sendRegister(String serverIP, int serverPort) throws ParseException, InvalidArgumentException, SipException |
|
|
public void sendRegister(String serverIP, int serverPort) throws ParseException, InvalidArgumentException, SipException |
|
|
{ |
|
|
{ |
|
|
lg.info("Vorbereiten des Registrierungs Headers"); |
|
|
|
|
|
proxyAddress = serverIP + ":" + serverPort; |
|
|
proxyAddress = serverIP + ":" + serverPort; |
|
|
Address addressto = this.addressFactory.createAddress("sip:" + proxyAddress); //evtl. mit Port: sip:192.168.100.11:5060 |
|
|
|
|
|
ToHeader to = this.headerFactory.createToHeader(addressto, null); // Integer.toString(myTag) address + myTag |
|
|
|
|
|
URI requestURI = addressto.getURI(); |
|
|
|
|
|
CallIdHeader callId = this.sipProvider.getNewCallId(); |
|
|
|
|
|
FromHeader from = this.headerFactory.createFromHeader(addressto, String.valueOf(this.myTag)); //this.contactAddress |
|
|
|
|
|
ArrayList via = new ArrayList(); //Via needs a List as input |
|
|
|
|
|
ViaHeader viaheader = this.headerFactory.createViaHeader(this.myIPAddress, this.myPort, "UDP", String.valueOf(branch)); |
|
|
|
|
|
via.add(viaheader); |
|
|
|
|
|
CSeqHeader cSeq = this.headerFactory.createCSeqHeader(1L, "REGISTER"); |
|
|
|
|
|
MaxForwardsHeader maxForwards = this.headerFactory.createMaxForwardsHeader(70); |
|
|
|
|
|
AllowHeader allow = this.headerFactory.createAllowHeader("NOTIFY,INVITE,ACK,CANCEL,BYE,REFER,INFO,OPTIONS,MESSAGE"); |
|
|
|
|
|
ExpiresHeader expire = this.headerFactory.createExpiresHeader(3600); //int value |
|
|
|
|
|
Request request = this.messageFactory.createRequest(requestURI, "REGISTER", callId, cSeq, from, to, via, maxForwards); |
|
|
|
|
|
request.addHeader(contactHeader); |
|
|
|
|
|
request.addHeader(allow); |
|
|
|
|
|
request.addHeader(expire); |
|
|
|
|
|
this.sipProvider.sendRequest(request); |
|
|
|
|
|
|
|
|
SIPRegister register = new SIPRegister(proxyAddress, myTag, myIPAddress, myPort, branch, addressFactory, headerFactory, messageFactory, contactHeader, sipProvider.getNewCallId()); |
|
|
|
|
|
this.sipProvider.sendRequest(register.getRequest()); |
|
|
lg.info("Erfolgreiches Senden der Registrierung"); |
|
|
lg.info("Erfolgreiches Senden der Registrierung"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void sendInvitation(String sipaddresse, String proxyaddresse, |
|
|
public void sendInvitation(String sipaddresse, String proxyaddresse, |
|
|
int serverPort) throws ParseException, InvalidArgumentException, SipException, SdpException |
|
|
int serverPort) throws ParseException, InvalidArgumentException, SipException, SdpException |
|
|
{ |
|
|
|
|
|
|
|
|
{ //ServerPort wird nicht verwendet? |
|
|
invite = true; |
|
|
invite = true; |
|
|
|
|
|
callID = this.sipProvider.getNewCallId(); |
|
|
|
|
|
|
|
|
Address addressto = this.addressFactory.createAddress("sip:" + sipaddresse + "@" + proxyaddresse); |
|
|
Address addressto = this.addressFactory.createAddress("sip:" + sipaddresse + "@" + proxyaddresse); |
|
|
ToHeader to = this.headerFactory.createToHeader(addressto, null); // Integer.toString(myTag) address + myTag |
|
|
ToHeader to = this.headerFactory.createToHeader(addressto, null); // Integer.toString(myTag) address + myTag |
|
|
URI requestURI = addressto.getURI(); |
|
|
URI requestURI = addressto.getURI(); |
|
|
callID = this.sipProvider.getNewCallId(); |
|
|
|
|
|
FromHeader from = this.headerFactory.createFromHeader(addressto, String.valueOf(this.myTag)); //this.contactAddress |
|
|
|
|
|
|
|
|
FromHeader from = this.headerFactory.createFromHeader(addressto, myTag); //this.contactAddress |
|
|
ArrayList via = new ArrayList(); //Via needs a List as input |
|
|
ArrayList via = new ArrayList(); //Via needs a List as input |
|
|
ViaHeader viaheader = this.headerFactory.createViaHeader(this.myIPAddress, this.myPort, "UDP", String.valueOf(branch)); |
|
|
ViaHeader viaheader = this.headerFactory.createViaHeader(this.myIPAddress, this.myPort, "UDP", String.valueOf(branch)); |
|
|
via.add(viaheader); |
|
|
via.add(viaheader); |
|
|
|
|
|
|
|
|
request.addHeader(expire); |
|
|
request.addHeader(expire); |
|
|
ContentTypeHeader content = headerFactory.createContentTypeHeader("application", "sdp"); |
|
|
ContentTypeHeader content = headerFactory.createContentTypeHeader("application", "sdp"); |
|
|
request.addHeader(content); |
|
|
request.addHeader(content); |
|
|
request.setContent(createSDPHeader(null), content); |
|
|
|
|
|
this.sipProvider.sendRequest(request); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SIPSessionDescription sdp = new SIPSessionDescription(myName, myIPAddress, evtWerdeAngerufen, invite); |
|
|
|
|
|
|
|
|
|
|
|
request.setContent(sdp.getSessionDescription(), content); |
|
|
|
|
|
|
|
|
|
|
|
SIPInvite sipinvite = new SIPInvite(sipaddresse, proxyaddresse, myIPAddress, myPort, myTag, branch, callID, cSequenz, addressFactory, sdp.getSessionDescription(), headerFactory, messageFactory, contactHeader); |
|
|
|
|
|
this.sipProvider.sendRequest(sipinvite.getInviterequest()); |
|
|
|
|
|
|
|
|
lg.info("Erfolgreiches Senden der Invitation"); |
|
|
lg.info("Erfolgreiches Senden der Invitation"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
lg.info("Option Request von Server, erstellen 200 OK zu Server"); |
|
|
lg.info("Option Request von Server, erstellen 200 OK zu Server"); |
|
|
try |
|
|
try |
|
|
{ |
|
|
{ |
|
|
this.sipProvider.sendResponse(create200Ok(requestEvent)); |
|
|
|
|
|
|
|
|
SIP200Ok tempOk = new SIP200Ok(messageFactory, requestEvent, contactHeader, headerFactory); |
|
|
|
|
|
this.sipProvider.sendResponse(tempOk.getResponse()); |
|
|
view.getTxtArea().append("Server Option Request erfolgreich beantwortet\n"); |
|
|
view.getTxtArea().append("Server Option Request erfolgreich beantwortet\n"); |
|
|
lg.info("Erfolgreiches senden des Headers"); |
|
|
|
|
|
|
|
|
lg.info("Erfolgreiches senden des 200Ok-Headers"); |
|
|
} |
|
|
} |
|
|
catch (ParseException | SipException ex) |
|
|
|
|
|
|
|
|
catch (SipException ex) |
|
|
{ |
|
|
{ |
|
|
lg.getLogger(SIPmodel.class.getName()).log(Level.SEVERE, null, ex); |
|
|
lg.getLogger(SIPmodel.class.getName()).log(Level.SEVERE, null, ex); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//Cancel Request -> Response 200 Ok + Response 487 Request Terminated |
|
|
//Cancel Request -> Response 200 Ok + Response 487 Request Terminated |
|
|
//200 Ok |
|
|
//200 Ok |
|
|
werdeAngerufen = false; |
|
|
werdeAngerufen = false; |
|
|
evtWerdeAngerufen = null; // sicher ist sicher |
|
|
|
|
|
this.sipProvider.sendResponse(create200Ok(requestEvent)); |
|
|
|
|
|
|
|
|
evtWerdeAngerufen = null; // sicher ist sicher |
|
|
|
|
|
SIP200Ok tempOk = new SIP200Ok(messageFactory, requestEvent, contactHeader, headerFactory); |
|
|
|
|
|
this.sipProvider.sendResponse(tempOk.getResponse()); |
|
|
view.getTxtArea().append("Anrufender canceld Anfrage\n"); |
|
|
view.getTxtArea().append("Anrufender canceld Anfrage\n"); |
|
|
lg.info("Erfolgreiches senden des 200 OkHeaders auf CancelAnfrage"); |
|
|
lg.info("Erfolgreiches senden des 200 OkHeaders auf CancelAnfrage"); |
|
|
//487 Request Terminated |
|
|
//487 Request Terminated |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
catch (ParseException | SipException ex) |
|
|
|
|
|
|
|
|
catch (SipException ex) |
|
|
{ |
|
|
{ |
|
|
Logger.getLogger(SIPmodel.class.getName()).log(Level.SEVERE, null, ex); |
|
|
Logger.getLogger(SIPmodel.class.getName()).log(Level.SEVERE, null, ex); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
try |
|
|
try |
|
|
{ |
|
|
{ |
|
|
this.sipProvider.sendResponse(create200Ok(requestEvent)); |
|
|
|
|
|
|
|
|
SIP200Ok tempOk = new SIP200Ok(messageFactory, requestEvent, contactHeader, headerFactory); |
|
|
|
|
|
this.sipProvider.sendResponse(tempOk.getResponse()); |
|
|
} |
|
|
} |
|
|
catch (Exception ex) |
|
|
catch (Exception ex) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
ToHeader to = this.headerFactory.createToHeader(addresstob, temp.getTag()); // Integer.toString(myTag) address + myTag |
|
|
ToHeader to = this.headerFactory.createToHeader(addresstob, temp.getTag()); // Integer.toString(myTag) address + myTag |
|
|
URI requestURI = addresstob.getURI(); |
|
|
URI requestURI = addresstob.getURI(); |
|
|
CallIdHeader callId = (CallIdHeader) responseEvent.getResponse().getHeader("Call-ID"); |
|
|
CallIdHeader callId = (CallIdHeader) responseEvent.getResponse().getHeader("Call-ID"); |
|
|
FromHeader from = this.headerFactory.createFromHeader(addresstob, String.valueOf(this.myTag)); //this.contactAddress |
|
|
|
|
|
|
|
|
FromHeader from = this.headerFactory.createFromHeader(addresstob, this.myTag); //this.contactAddress |
|
|
WWWAuthenticateHeader wwwauth = (WWWAuthenticateHeader) responseEvent.getResponse().getHeader("WWW-Authenticate"); |
|
|
WWWAuthenticateHeader wwwauth = (WWWAuthenticateHeader) responseEvent.getResponse().getHeader("WWW-Authenticate"); |
|
|
|
|
|
|
|
|
//wird bei AuthorizationHeader wirklich alles benötigt? war glaub nur mal Test -> testen!! |
|
|
//wird bei AuthorizationHeader wirklich alles benötigt? war glaub nur mal Test -> testen!! |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public Response create200Ok(RequestEvent requestEvent) throws ParseException |
|
|
|
|
|
{ |
|
|
|
|
|
Response response = messageFactory.createResponse(200, requestEvent.getRequest()); |
|
|
|
|
|
response.addHeader((ViaHeader) requestEvent.getRequest().getHeader("Via")); |
|
|
|
|
|
response.addHeader((FromHeader) requestEvent.getRequest().getHeader("From")); |
|
|
|
|
|
response.addHeader((ToHeader) requestEvent.getRequest().getHeader("To")); |
|
|
|
|
|
response.addHeader((CallIdHeader) requestEvent.getRequest().getHeader("Call-ID")); |
|
|
|
|
|
response.addHeader((CSeqHeader) requestEvent.getRequest().getHeader("Cseq")); |
|
|
|
|
|
response.addHeader(contactHeader); |
|
|
|
|
|
AllowHeader allow = headerFactory.createAllowHeader("NOTIFY,INVITE,ACK,CANCEL,BYE,REFER,INFO,OPTIONS,MESSAGE"); |
|
|
|
|
|
AllowEventsHeader allowevents = headerFactory.createAllowEventsHeader("talk,hold,refer,call-info"); |
|
|
|
|
|
response.addHeader((CallIdHeader) requestEvent.getRequest().getHeader("Call-ID")); |
|
|
|
|
|
response.addHeader(allow); |
|
|
|
|
|
response.addHeader(allowevents); |
|
|
|
|
|
return response; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Response create180Ringing(RequestEvent requestEvent) throws ParseException, SipException |
|
|
public Response create180Ringing(RequestEvent requestEvent) throws ParseException, SipException |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
//Bei Ringing muss persönlicher Tag ergänzt werden |
|
|
//Bei Ringing muss persönlicher Tag ergänzt werden |
|
|
ToHeader temptoring = (ToHeader) requestEvent.getRequest().getHeader("To"); |
|
|
ToHeader temptoring = (ToHeader) requestEvent.getRequest().getHeader("To"); |
|
|
proxyTag = temptoring.getTag(); |
|
|
proxyTag = temptoring.getTag(); |
|
|
temptoring.setTag(String.valueOf(this.myTag)); |
|
|
|
|
|
|
|
|
temptoring.setTag(this.myTag); |
|
|
responsering.addHeader(temptoring); |
|
|
responsering.addHeader(temptoring); |
|
|
cSequenz = ((CSeqHeader) requestEvent.getRequest().getHeader("Cseq")).getSeqNumber(); |
|
|
cSequenz = ((CSeqHeader) requestEvent.getRequest().getHeader("Cseq")).getSeqNumber(); |
|
|
responsering.addHeader((CSeqHeader) requestEvent.getRequest().getHeader("Cseq")); |
|
|
responsering.addHeader((CSeqHeader) requestEvent.getRequest().getHeader("Cseq")); |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public SessionDescription createSDPHeader(ArrayList<String> reqSDP) throws SdpException |
|
|
|
|
|
{ |
|
|
|
|
|
SdpFactory sdpFactory = SdpFactory.getInstance(); |
|
|
|
|
|
SessionDescription sessionDescription = sdpFactory.createSessionDescription(); |
|
|
|
|
|
sessionDescription.setOrigin(sdpFactory.createOrigin(myName, 8000, 8000, "IN", "IP4", myIPAddress)); |
|
|
|
|
|
sessionDescription.setSessionName(sdpFactory.createSessionName("SIP Call")); |
|
|
|
|
|
sessionDescription.setConnection(sdpFactory.createConnection("IN", "IP4", myIPAddress)); |
|
|
|
|
|
|
|
|
|
|
|
//Media Body |
|
|
|
|
|
Vector mediavec = new Vector(); |
|
|
|
|
|
String cods[] = new String[codecs.length]; |
|
|
|
|
|
System.out.println("System out: " + codecs.length); |
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < cods.length; i++)//Übertragung der RTP-Values in neues Array |
|
|
|
|
|
{ |
|
|
|
|
|
cods[i] = codecs[i][0]; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
mediavec.add(sdpFactory.createMediaDescription("audio", 6022, 1, "RTP/AVP", cods)); //(Übertragungstyp, Port, anzahl der Ports, Verbindungstyp,..) |
|
|
|
|
|
mediavec.add(sdpFactory.createAttribute("sendrecv", null)); |
|
|
|
|
|
if (invite = true) |
|
|
|
|
|
{ |
|
|
|
|
|
for (int i = 0; i == codecs[0].length; i++) |
|
|
|
|
|
{ |
|
|
|
|
|
System.out.println("Codecs: " + codecs[i][0] + " " + codecs[i][1]); |
|
|
|
|
|
mediavec.add(sdpFactory.createAttribute("rtpmap", codecs[i][0] + " " + codecs[i][1])); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
else//Vergleich von eigenen Codecs mit Codecs der anruft -> Rückgabe entsprechend wählen |
|
|
|
|
|
{ |
|
|
|
|
|
boolean temp = true; //evtl noch was besseres da so erster Codec nicht bester verwendet wird |
|
|
|
|
|
for (int i = 0; i == codecs[0].length; i++) |
|
|
|
|
|
{ |
|
|
|
|
|
if (codecs[i][1].equals(reqSDP) && temp == true) |
|
|
|
|
|
{ |
|
|
|
|
|
mediavec.add(sdpFactory.createAttribute("rtpmap", "8 G711a/8000")); |
|
|
|
|
|
temp = false; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
sessionDescription.setAttributes(mediavec); |
|
|
|
|
|
return sessionDescription; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void annehmen() //Fehlende Bedingung |
|
|
public void annehmen() //Fehlende Bedingung |
|
|
{ |
|
|
{ |
|
|
RequestEvent requestEvent; |
|
|
RequestEvent requestEvent; |
|
|
if ((requestEvent = evtWerdeAngerufen) != null && werdeAngerufen == true) |
|
|
if ((requestEvent = evtWerdeAngerufen) != null && werdeAngerufen == true) |
|
|
{ |
|
|
{ |
|
|
countWerdeAngerufen = 0; |
|
|
countWerdeAngerufen = 0; |
|
|
|
|
|
|
|
|
try |
|
|
try |
|
|
{ |
|
|
{ |
|
|
callID = (CallIdHeader) requestEvent.getRequest().getHeader("Call-ID"); |
|
|
callID = (CallIdHeader) requestEvent.getRequest().getHeader("Call-ID"); |
|
|
|
|
|
|
|
|
responsering.addHeader((FromHeader) requestEvent.getRequest().getHeader("From")); |
|
|
responsering.addHeader((FromHeader) requestEvent.getRequest().getHeader("From")); |
|
|
|
|
|
|
|
|
ToHeader temptoring = (ToHeader) requestEvent.getRequest().getHeader("To"); |
|
|
ToHeader temptoring = (ToHeader) requestEvent.getRequest().getHeader("To"); |
|
|
String tempTag = String.valueOf(this.myTag + Math.random()); |
|
|
|
|
|
|
|
|
String tempTag = String.valueOf(Integer.valueOf(myTag)+ Math.random()); |
|
|
temptoring.setTag(tempTag); //evtl. besseren Tag |
|
|
temptoring.setTag(tempTag); //evtl. besseren Tag |
|
|
responsering.addHeader(temptoring); |
|
|
responsering.addHeader(temptoring); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Jetzt kommt 200 Ok SIP Header + SDP (SIP/SDP) |
|
|
//Jetzt kommt 200 Ok SIP Header + SDP (SIP/SDP) |
|
|
//Sdp Header erstellen nächster Schritt |
|
|
//Sdp Header erstellen nächster Schritt |
|
|
invite = false; |
|
|
|
|
|
Response okandSDP = this.messageFactory.createResponse(Response.OK, requestEvent.getRequest()); |
|
|
|
|
|
|
|
|
/* |
|
|
|
|
|
//invite = false; |
|
|
|
|
|
//Response okandSDP = this.messageFactory.createResponse(Response.OK, requestEvent.getRequest()); |
|
|
//okandSDP.addHeader((ViaHeader) requestEvent.getRequest().getHeader("Via")); |
|
|
//okandSDP.addHeader((ViaHeader) requestEvent.getRequest().getHeader("Via")); |
|
|
okandSDP.addHeader((FromHeader) requestEvent.getRequest().getHeader("From")); |
|
|
okandSDP.addHeader((FromHeader) requestEvent.getRequest().getHeader("From")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ContentTypeHeader content = headerFactory.createContentTypeHeader("application", "sdp"); |
|
|
ContentTypeHeader content = headerFactory.createContentTypeHeader("application", "sdp"); |
|
|
okandSDP.addHeader(content); |
|
|
okandSDP.addHeader(content); |
|
|
|
|
|
|
|
|
String[] reqbody = (requestEvent.getRequest()).toString().split("\\s|" + System.getProperty("line.seperator"));//Req. Body in Zeilen aufteilen |
|
|
|
|
|
ArrayList<String> reqSDP = new ArrayList<>(); |
|
|
|
|
|
for (String req : reqbody)//jeden String durchgehen und nach Codecs suchen die unterstützt werden |
|
|
|
|
|
{ |
|
|
|
|
|
if (req.startsWith("a=rtpmap")) |
|
|
|
|
|
{ |
|
|
|
|
|
reqSDP.add(req.replace("a=rtpmap:", "")); |
|
|
|
|
|
System.out.println(reqSDP); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
okandSDP.setContent(createSDPHeader(reqSDP), content); |
|
|
|
|
|
|
|
|
SIPSessionDescription sdp = new SIPSessionDescription(myName, myIPAddress, requestEvent, invite); |
|
|
|
|
|
okandSDP.setContent(sdp.getSessionDescription(), content); |
|
|
this.sipProvider.sendResponse(okandSDP); |
|
|
this.sipProvider.sendResponse(okandSDP); |
|
|
|
|
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
SIP200Ok tempOk = new SIP200Ok(messageFactory, requestEvent, contactHeader, headerFactory); |
|
|
|
|
|
SIPSessionDescription sdp = new SIPSessionDescription(myName, myIPAddress, requestEvent, invite); |
|
|
|
|
|
tempOk.addSDP(sdp.getSessionDescription(), myTag); |
|
|
view.getTxtArea().append("Telefonat beginnt\n"); |
|
|
view.getTxtArea().append("Telefonat beginnt\n"); |
|
|
evtWerdeAngerufen = null; |
|
|
evtWerdeAngerufen = null; |
|
|
} |
|
|
} |
|
|
catch (ParseException | SipException | SdpException ex) |
|
|
|
|
|
|
|
|
catch (ParseException | SipException ex) |
|
|
{ |
|
|
{ |
|
|
Logger.getLogger(SIPmodel.class.getName()).log(Level.SEVERE, null, ex); |
|
|
Logger.getLogger(SIPmodel.class.getName()).log(Level.SEVERE, null, ex); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @return the myTag |
|
|
* @return the myTag |
|
|
*/ |
|
|
*/ |
|
|
public int getMyTag() |
|
|
|
|
|
|
|
|
public String getMyTag() |
|
|
{ |
|
|
{ |
|
|
return myTag; |
|
|
return myTag; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @param myTag the myTag to set |
|
|
* @param myTag the myTag to set |
|
|
*/ |
|
|
*/ |
|
|
public void setMyTag(int myTag) |
|
|
|
|
|
|
|
|
public void setMyTag(String myTag) |
|
|
{ |
|
|
{ |
|
|
this.myTag = myTag; |
|
|
this.myTag = myTag; |
|
|
} |
|
|
} |