mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
correct handling of get_destination return values
A failure when calling the get_destination can mean multiple things. If the extension is not found, a 404 error is appropriate, but if the URI scheme is incorrect, a 404 is not approperiate. This patch adds the get_destination_result enum to differentiate between these and other failure types. The only logical difference in this patch is that we now send a "416 Unsupported URI scheme" response instead of a "404" when the scheme is not recognized. This indicates to the initiator of the INVITE to retry the request with a correct URI. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@273427 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -449,6 +449,15 @@ enum sip_auth_type {
|
||||
WWW_AUTH = 401,
|
||||
};
|
||||
|
||||
/*! \brief Result from get_destination function */
|
||||
enum sip_get_dest_result {
|
||||
SIP_GET_DEST_PICKUP_EXTEN_FOUND = 1,
|
||||
SIP_GET_DEST_EXTEN_FOUND = 0,
|
||||
SIP_GET_DEST_EXTEN_NOT_FOUND = -1,
|
||||
SIP_GET_DEST_REFUSED = -2,
|
||||
SIP_GET_DEST_INVALID_URI = -3,
|
||||
};
|
||||
|
||||
/*! \brief Authentication result from check_auth* functions */
|
||||
enum check_auth_result {
|
||||
AUTH_DONT_KNOW = -100, /*!< no result, need to check further */
|
||||
|
Reference in New Issue
Block a user