aboutsummaryrefslogtreecommitdiffstats
path: root/channels/sip/include
diff options
context:
space:
mode:
authordvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-01 16:40:17 +0000
committerdvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-01 16:40:17 +0000
commitd12a014d5aa559d335c6210a1931a870a2586c2d (patch)
tree40333dfdabffa545bf218f4d3acc4f694ea727b1 /channels/sip/include
parentb5f418e3438d24b43bc19772423fd46d77f37524 (diff)
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: http://svn.digium.com/svn/asterisk/trunk@273427 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/sip/include')
-rw-r--r--channels/sip/include/sip.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/channels/sip/include/sip.h b/channels/sip/include/sip.h
index 01cbb2c73..13527517f 100644
--- a/channels/sip/include/sip.h
+++ b/channels/sip/include/sip.h
@@ -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 */