[asterisk-commits] oej: branch oej/teapot-1.8 r402138 - in /team/oej/teapot-1.8: channels/ patches/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Oct 29 04:38:51 CDT 2013


Author: oej
Date: Tue Oct 29 04:38:47 2013
New Revision: 402138

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=402138
Log:
The handling of a 603 in chan_sip is different than 403 which should not be the case. It's also 
sending busy always, without considering cause code translation. I prefer sending REJECT into the
bridge and let the channels handle the rejection. Also the 403 had no handling of connected caller ID.

This is propably a patch that should go all the way through the bug tracker, reviewboard and into 1.8.

Added:
    team/oej/teapot-1.8/patches/fix-603-handling.diff   (with props)
Modified:
    team/oej/teapot-1.8/channels/chan_sip.c

Modified: team/oej/teapot-1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/teapot-1.8/channels/chan_sip.c?view=diff&rev=402138&r1=402137&r2=402138
==============================================================================
--- team/oej/teapot-1.8/channels/chan_sip.c (original)
+++ team/oej/teapot-1.8/channels/chan_sip.c Tue Oct 29 04:38:47 2013
@@ -21130,12 +21130,16 @@
 		}
 		break;
 
+	case 603: /* Declined */
 	case 403: /* Forbidden */
 		/* First we ACK */
 		xmitres = transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE);
 		ast_log(LOG_WARNING, "Received response: \"Forbidden\" from '%s'\n", get_header(&p->initreq, "From"));
 		if (!req->ignore && p->owner) {
 			sip_queue_hangup_cause(p, hangup_sip2cause(resp));
+		}
+		if (p->owner) {
+	 		sip_handle_cc(p, req, AST_CC_CCBS);
 		}
 		break;
 
@@ -21994,7 +21998,8 @@
 				pvt_set_needdestroy(p, "received 407 response");
 			}
 			break;
-		case 403: /* Forbidden - we failed authentication */
+		case 403: /* Forbidden - maybe we failed authentication */
+		case 603: /* Decline */
 			if (sipmethod == SIP_INVITE)
 				handle_response_invite(p, resp, rest, req, seqno);
 			else if (sipmethod == SIP_SUBSCRIBE)

Added: team/oej/teapot-1.8/patches/fix-603-handling.diff
URL: http://svnview.digium.com/svn/asterisk/team/oej/teapot-1.8/patches/fix-603-handling.diff?view=auto&rev=402138
==============================================================================
--- team/oej/teapot-1.8/patches/fix-603-handling.diff (added)
+++ team/oej/teapot-1.8/patches/fix-603-handling.diff Tue Oct 29 04:38:47 2013
@@ -1,0 +1,32 @@
+Index: channels/chan_sip.c
+===================================================================
+--- channels/chan_sip.c	(revision 402098)
++++ channels/chan_sip.c	(working copy)
+@@ -21070,6 +21070,7 @@
+ 		}
+ 		break;
+ 
++	case 603: /* Declined */
+ 	case 403: /* Forbidden */
+ 		/* First we ACK */
+ 		xmitres = transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE);
+@@ -21077,6 +21078,9 @@
+ 		if (!req->ignore && p->owner) {
+ 			sip_queue_hangup_cause(p, hangup_sip2cause(resp));
+ 		}
++		if (p->owner) {
++	 		sip_handle_cc(p, req, AST_CC_CCBS);
++		}
+ 		break;
+ 
+ 	case 404: /* Not found */
+@@ -21881,7 +21885,8 @@
+ 				pvt_set_needdestroy(p, "received 407 response");
+ 			}
+ 			break;
+-		case 403: /* Forbidden - we failed authentication */
++		case 403: /* Forbidden - maybe we failed authentication */
++		case 603: /* Decline */
+ 			if (sipmethod == SIP_INVITE)
+ 				handle_response_invite(p, resp, rest, req, seqno);
+ 			else if (sipmethod == SIP_SUBSCRIBE)

Propchange: team/oej/teapot-1.8/patches/fix-603-handling.diff
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/oej/teapot-1.8/patches/fix-603-handling.diff
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/oej/teapot-1.8/patches/fix-603-handling.diff
------------------------------------------------------------------------------
    svn:mime-type = text/plain




More information about the asterisk-commits mailing list