< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [repro-users] [lumicall-users] "-1" after port in CANCEL message


I guess I'm new to github and wasn't sure how it works.  Below is the fix for this issue:


BaseMessageFactory.java:

/** Creates a CANCEL request. */
public static Message createCancelRequest(SipProvider sip_provider,
Message method,Dialog dialog) {
ToHeader to = method.getToHeader();
FromHeader from = method.getFromHeader();
SipURL request_uri = method.getRequestLine().getAddress();
String via_addr = sip_provider.getViaAddress();
NameAddress contact = method.getContactHeader().getNameAddress();
ViaHeader via = method.getViaHeader();
int host_port = sip_provider.getPort();
boolean rport = via.hasRport();
String proto = via.getProtocol();
String branch = method.getViaHeader().getBranch();
return createRequest(SipMethods.CANCEL, request_uri, to
.getNameAddress(), from.getNameAddress(), contact, proto,
via_addr, host_port, rport, method.getCallIdHeader()
.getCallId(), method.getCSeqHeader()
.getSequenceNumber(), from.getParameter("tag"), to
.getParameter("tag"), branch, "", null, null);
}


InviteDialog.java:

/**
* Cancel the ongoing call request or a call listening. This method should
* be called when the InviteDialog is in D_INVITING or D_ReINVITING state or
* in the D_WAITING state
*/
public void cancel() {
printLog("inside cancel()", LogLevel.MEDIUM);
if (statusIs(D_INVITING) || statusIs(D_ReINVITING)) {
Message cancel = MessageFactory.createCancelRequest(sip_provider, invite_req,this); // modified
cancel(cancel);
} else if (statusIs(D_WAITING) || statusIs(D_ReWAITING)) {
invite_ts.terminate();
}
}