mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-15 17:27:02 +00:00
Cause SIP to return a 480 instead of a 404 when a sip peer exists, but is not
registered. (closes issue #12885) Reported by: ibc Patches: 20080701__bug12885__2.diff.txt uploaded by Corydon76 (license 14) Tested by: ibc git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@129149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -341,6 +341,7 @@ static void hanguptree(struct dial_localuser *outgoing, struct ast_channel *exce
|
|||||||
ast_cdr_failed(chan->cdr); \
|
ast_cdr_failed(chan->cdr); \
|
||||||
numcongestion++; \
|
numcongestion++; \
|
||||||
break; \
|
break; \
|
||||||
|
case AST_CAUSE_NO_ROUTE_DESTINATION: \
|
||||||
case AST_CAUSE_UNREGISTERED: \
|
case AST_CAUSE_UNREGISTERED: \
|
||||||
if (chan->cdr) \
|
if (chan->cdr) \
|
||||||
ast_cdr_failed(chan->cdr); \
|
ast_cdr_failed(chan->cdr); \
|
||||||
|
@@ -3457,6 +3457,7 @@ static const char *hangup_cause2sip(int cause)
|
|||||||
case AST_CAUSE_NO_USER_RESPONSE: /* 18 */
|
case AST_CAUSE_NO_USER_RESPONSE: /* 18 */
|
||||||
return "408 Request Timeout";
|
return "408 Request Timeout";
|
||||||
case AST_CAUSE_NO_ANSWER: /* 19 */
|
case AST_CAUSE_NO_ANSWER: /* 19 */
|
||||||
|
case AST_CAUSE_UNREGISTERED: /* 20 */
|
||||||
return "480 Temporarily unavailable";
|
return "480 Temporarily unavailable";
|
||||||
case AST_CAUSE_CALL_REJECTED: /* 21 */
|
case AST_CAUSE_CALL_REJECTED: /* 21 */
|
||||||
return "403 Forbidden";
|
return "403 Forbidden";
|
||||||
|
@@ -33,6 +33,7 @@
|
|||||||
#define AST_CAUSE_USER_BUSY 17
|
#define AST_CAUSE_USER_BUSY 17
|
||||||
#define AST_CAUSE_NO_USER_RESPONSE 18
|
#define AST_CAUSE_NO_USER_RESPONSE 18
|
||||||
#define AST_CAUSE_NO_ANSWER 19
|
#define AST_CAUSE_NO_ANSWER 19
|
||||||
|
#define AST_CAUSE_SUBSCRIBER_ABSENT 20
|
||||||
#define AST_CAUSE_CALL_REJECTED 21
|
#define AST_CAUSE_CALL_REJECTED 21
|
||||||
#define AST_CAUSE_NUMBER_CHANGED 22
|
#define AST_CAUSE_NUMBER_CHANGED 22
|
||||||
#define AST_CAUSE_DESTINATION_OUT_OF_ORDER 27
|
#define AST_CAUSE_DESTINATION_OUT_OF_ORDER 27
|
||||||
@@ -75,7 +76,7 @@
|
|||||||
#define AST_CAUSE_NORMAL AST_CAUSE_NORMAL_CLEARING
|
#define AST_CAUSE_NORMAL AST_CAUSE_NORMAL_CLEARING
|
||||||
#define AST_CAUSE_NOANSWER AST_CAUSE_NO_ANSWER
|
#define AST_CAUSE_NOANSWER AST_CAUSE_NO_ANSWER
|
||||||
#define AST_CAUSE_CONGESTION AST_CAUSE_NORMAL_CIRCUIT_CONGESTION
|
#define AST_CAUSE_CONGESTION AST_CAUSE_NORMAL_CIRCUIT_CONGESTION
|
||||||
#define AST_CAUSE_UNREGISTERED AST_CAUSE_NO_ROUTE_DESTINATION
|
#define AST_CAUSE_UNREGISTERED AST_CAUSE_SUBSCRIBER_ABSENT
|
||||||
#define AST_CAUSE_NOTDEFINED 0
|
#define AST_CAUSE_NOTDEFINED 0
|
||||||
#define AST_CAUSE_NOSUCHDRIVER AST_CAUSE_CHAN_NOT_IMPLEMENTED
|
#define AST_CAUSE_NOSUCHDRIVER AST_CAUSE_CHAN_NOT_IMPLEMENTED
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user