aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-09-26 21:15:15 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-09-26 21:15:15 +0000
commitbb4530b1c13a649a190587eb7601926f18e80f1e (patch)
treedaa19131627da26874bacd53b8242b09e6bcf1fd
parent3dbc489ef078d3caecf4bdead5a087a5b2ac6139 (diff)
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. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@83941 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_sip.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index ec06ca649..21060ec4e 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -13659,8 +13659,14 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
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);