Merged revisions 129149 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Tue, 8 Jul 2008 20:30:29 +0000 (20:30 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Tue, 8 Jul 2008 20:30:29 +0000 (20:30 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r129149 | tilghman | 2008-07-08 15:27:47 -0500 (Tue, 08 Jul 2008) | 8 lines

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/trunk@129152 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_dial.c
channels/chan_sip.c
include/asterisk/causes.h

index 370ac71..fa56184 100644 (file)
@@ -387,6 +387,7 @@ static void handle_cause(int cause, struct cause_args *num)
                num->congestion++;
                break;
 
+       case AST_CAUSE_NO_ROUTE_DESTINATION:
        case AST_CAUSE_UNREGISTERED:
                if (cdr)
                        ast_cdr_failed(cdr);
index bdaefc0..c98bcb9 100644 (file)
@@ -4838,6 +4838,7 @@ static const char *hangup_cause2sip(int cause)
                case AST_CAUSE_NO_USER_RESPONSE:        /* 18 */
                        return "408 Request Timeout";
                case AST_CAUSE_NO_ANSWER:               /* 19 */
+               case AST_CAUSE_UNREGISTERED:        /* 20 */
                        return "480 Temporarily unavailable";
                case AST_CAUSE_CALL_REJECTED:           /* 21 */
                        return "403 Forbidden";
index fb4f3c1..7e83ec5 100644 (file)
@@ -99,6 +99,7 @@ For more information:
 #define AST_CAUSE_USER_BUSY                            17
 #define AST_CAUSE_NO_USER_RESPONSE                     18
 #define AST_CAUSE_NO_ANSWER                            19
+#define AST_CAUSE_SUBSCRIBER_ABSENT                    20
 #define AST_CAUSE_CALL_REJECTED                                21
 #define AST_CAUSE_NUMBER_CHANGED                       22
 #define AST_CAUSE_DESTINATION_OUT_OF_ORDER             27
@@ -141,7 +142,7 @@ For more information:
 #define AST_CAUSE_NORMAL                               AST_CAUSE_NORMAL_CLEARING
 #define AST_CAUSE_NOANSWER                             AST_CAUSE_NO_ANSWER
 #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_NOSUCHDRIVER                         AST_CAUSE_CHAN_NOT_IMPLEMENTED
 /*@{ */