我正在使用清单和 Windows 服务编写 Lync MSPL 应用程序。在我的 manifest.am 中,我有以下代码:
<?xml version="1.0"?>
<r:applicationManifest
r:appUri="http://www.company.no/LyncServerFilter"
xmlns:r="http://schemas.microsoft.com/lcs/2006/05">
<r:requestFilter methodNames="ALL"
strictRoute="true"
domainSupported="false"/>
<r:responseFilter reasonCodes="ALL"/>
<r:proxyByDefault action="true" />
<r:allowRegistrationBeforeUserServices action="true" />
<r:splScript>
<![CDATA[
callId = GetHeaderValues("Call-ID");
cseq = GetHeaderValues("CSeq");
content = "";
sstate = GetHeaderValues("subscription-state");
xevent = GetHeaderValues("Event");
xdir = GetHeaderValues("Direction");
xexp = GetHeaderValues("Session-Expires");
referto = GetHeaderValues("Refer-To");
if (sipRequest)
{
if (sipRequest.Method == "INVITE") {
if (ContainsString(sipRequest.Content, "m=audio", true)) {
content = "audio";
}
else if (ContainsString(sipRequest.Content, "m=video", true)) {
content = "video";
}
else if (ContainsString(sipRequest.Content, "m=message", true)) {
content = "message";
}
else if (ContainsString(sipRequest.Content, "m=application", true)) {
content = "application";
}
else {
content = "unknown";
}
}
else if (sipRequest.Method == "NOTIFY" || sipRequest.Method == "BENOTIFY") {
content = sipRequest.Content;
}
DispatchNotification("OnRequest", sipRequest.Method, sipMessage.From, sipMessage.To, callId, cseq, content, xdir, xevent, sstate, xexp, referto);
if (sipRequest) {
ProxyRequest();
}
}
else if(sipResponse) {
DispatchNotification("OnResponse", sipResponse.StatusCode, sipResponse.StatusReasonPhrase, sipMessage.From, sipMessage.To, callId, cseq, content, xdir, xevent, sstate, xexp, referto);
ProxyResponse();
}
]]></r:splScript>
</r:applicationManifest>
我在 Lync 前端服务器上的事件日志中收到以下错误消息: Lync Server application MSPL script execution aborted because of an error
' http://www.company.no/LyncServerFilter '处的应用程序 Uri ,第 60 行错误:0x80070057 - 参数不正确
附加信息:ProxyRequest 仅对 sipRequest 有效
第 60 行是我调用 ProxyRequest 的地方:
if (sipRequest) {
ProxyRequest();
}
问题:
- 为什么错误消息说 ProxyRequest 仅对 sipRequest 有效?我正在检查它是 sipMessage 对吗?
- 既然我设置了 proxyByDefault=true,我可以删除对 ProxyRequest() 的调用吗?DistpathNotification-method 是否“处理”该方法(吞下它),还是默认代理该消息?当我删除对 ProxyRequest() 的调用时,代码“有效”,但我不确定后果是什么......