When UniMRCP is offline and receives an OPTIONS request, we attempt to send a 503 response, but Sofia refuses to respond with the error, "Responding to a Non-Existing Request."
We attempt to send the response in the following way (mrcp_sofiasip_server_agent.c):
if (sofia_agent->online == FALSE) {
apt_log(SIP_LOG_MARK, APT_PRIO_WARNING, "Cannot do Resource Discovery in Offline Mode");
nua_respond(nh, SIP_503_SERVICE_UNAVAILABLE, TAG_END());
return;
}
But nua_respond() expects the initial request be supplied for non-INVITE requests. This same issue was discussed on the sofia-sip list some time ago. The fix, which I have tested with Wireshark, is the same mentioned on that list. When it's in place, we get the response as expected:
When UniMRCP is offline and receives an OPTIONS request, we attempt to send a 503 response, but Sofia refuses to respond with the error, "Responding to a Non-Existing Request."
We attempt to send the response in the following way (mrcp_sofiasip_server_agent.c):
But nua_respond() expects the initial request be supplied for non-INVITE requests. This same issue was discussed on the sofia-sip list some time ago. The fix, which I have tested with Wireshark, is the same mentioned on that list. When it's in place, we get the response as expected:
A PR should be attached shortly.