It appears that SS does not currently handle OPTIONS Ping (OPTIONS requests out of an already established dialogue ). Such OPTIONS requests are frequently used by unauthenticated SIP Trunks / Gateways as a mean to verify peer is still reachable.
Looking at the code (GotRequest in SIPAppServerCore.cs), I believe support for OPTIONS Ping could be implemented with the following minor change:
SIPAppServerCore.cs
Line 48 (Insert):
using SIPSorcery.Net;
Line 239 (Insert):
else if (sipRequest.Method == SIPMethodsEnum.OPTIONS)
{
// Send back the remote SDP.
FireProxyLogEvent(new SIPMonitorConsoleEvent(SIPMonitorServerTypesEnum.AppServer, SIPMonitorEventTypesEnum.DialPlan, "OPTIONS request for ANONYMOUS.", fromUser));
SIPNonInviteTransaction optionsTransaction = m_sipTransport.CreateNonInviteTransaction(sipRequest, remoteEndPoint, localSIPEndPoint, m_outboundProxy);
SIPResponse okResponse = SIPTransport.GetResponse(sipRequest, SIPResponseStatusCodesEnum.Ok, null);
okResponse.Body = String.Empty;
okResponse.Header.ContentLength = okResponse.Body.Length;
okResponse.Header.ContentType = SDP.SDP_MIME_CONTENTTYPE;
optionsTransaction.SendFinalResponse(okResponse);
}
Does this make sense?
Thanks for your consideration.
Regards,
Sacha
OPTIONS Ping Support
Re: OPTIONS Ping Support
OPTIONS requests wil be repsonded to with a 405 Method Not Allowed response, which happens in the same spot on line 239 in SIPAppServerCore.cs. All the SIP servers I've come across that use OPTIONS requests as a keep-alive mechanism don't care what the response code is as long as they get one and in that case the 405 response will work fine.