Index: client/content/make-call.xul =================================================================== RCS file: /cvsroot/mozilla/zap/client/content/Attic/make-call.xul,v retrieving revision 1.1.2.17 diff -u -r1.1.2.17 make-call.xul --- client/content/make-call.xul 29 May 2006 09:52:23 -0000 1.1.2.17 +++ client/content/make-call.xul 14 Aug 2006 21:24:39 -0000 @@ -65,6 +65,22 @@ // so let's just fall through: return; } + var uri = wRemoteAddress.uri.QueryInterface(Components.interfaces.zapISipSIPURI); + var method = uri.getURIParameter("method"); + if (!method) { + method = "INVITE"; + } + // XXX We process only INVITE for now but in the future MESSAGE can be processed... + if (method != "INVITE") { + return; + } + if (uri.hasHeader("Subject")) { + document.getElementById("urn:mozilla:zap:subject").value = uri.getHeader("Subject"); + } + uri.getHeaderNames({}).forEach(function(name) { + uri.removeHeader(name); + }); + uri.removeURIParameter("method"); dump("initialized make-call.xul:"+wRemoteAddress.serialize()+"\n"); Index: sip/SipUAStack.js =================================================================== RCS file: /cvsroot/mozilla/zap/sip/Attic/SipUAStack.js,v retrieving revision 1.1.2.34 diff -u -r1.1.2.34 SipUAStack.js --- sip/SipUAStack.js 10 Jul 2006 07:18:16 -0000 1.1.2.34 +++ sip/SipUAStack.js 14 Aug 2006 21:24:39 -0000 @@ -229,7 +229,16 @@ function createInviteRequestClient(ToAddress, FromAddress, contactAddress, routeset, count, rcFlags) { var rc = SipInviteRC.instantiate(); - var request = this.formulateGenericRequest("INVITE", ToAddress.uri, + + var uri = ToAddress.uri.QueryInterface(Components.interfaces.zapISipSIPURI); + var requestURI = uri.clone(true); + uri.port = ""; + uri.removeURIParameter("maddr"); + uri.removeURIParameter("ttl"); + uri.removeURIParameter("transport"); + uri.removeURIParameter("lr"); + + var request = this.formulateGenericRequest("INVITE", requestURI, ToAddress, FromAddress, routeset, count); // add mandatory Contact header (rfc3261 8.1.1.8):