[asterisk-commits] russell: branch 1.4 r83941 - /branches/1.4/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Sep 26 16:15:16 CDT 2007


Author: russell
Date: Wed Sep 26 16:15:15 2007
New Revision: 83941

URL: http://svn.digium.com/view/asterisk?view=rev&rev=83941
Log:
Add a log message that was requested by the masses in the developer tutorial
session at Astricon.  chan_sip did not output any message when a call was
rejected because the extension was not found.  This adds a verbose message
(at verbose level 3) to note when this happens.

Modified:
    branches/1.4/channels/chan_sip.c

Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=83941&r1=83940&r2=83941
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Wed Sep 26 16:15:15 2007
@@ -13659,8 +13659,14 @@
 		if (!replace_id && gotdest) {	/* No matching extension found */
 			if (gotdest == 1 && ast_test_flag(&p->flags[1], SIP_PAGE2_ALLOWOVERLAP))
 				transmit_response_reliable(p, "484 Address Incomplete", req);
-			else
+			else {
 				transmit_response_reliable(p, "404 Not Found", req);
+				if (option_verbose > 2) {
+					ast_verbose(VERBOSE_PREFIX_3 "Call from '%s' to extension"
+						" '%s' rejected because extension not found.\n",
+						S_OR(p->username, p->peername), p->exten);
+				}
+			}
 			p->invitestate = INV_COMPLETED;	
 			update_call_counter(p, DEC_CALL_LIMIT);
 			sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);




More information about the asterisk-commits mailing list