[asterisk-commits] trunk r18373 - /trunk/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Apr 7 12:46:52 MST 2006


Author: oej
Date: Fri Apr  7 14:46:50 2006
New Revision: 18373

URL: http://svn.digium.com/view/asterisk?rev=18373&view=rev
Log:
Add history events for re-invites
(need to nail this issue...)

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=18373&r1=18372&r2=18373&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Fri Apr  7 14:46:50 2006
@@ -2078,7 +2078,8 @@
 	
 	res = 0;
 	ast_set_flag(&p->flags[0], SIP_OUTGOING);
-	ast_log(LOG_DEBUG, "Outgoing Call for %s\n", p->username);
+	if (option_debug)
+		ast_log(LOG_DEBUG, "Outgoing Call for %s\n", p->username);
 	res = update_call_counter(p, INC_CALL_LIMIT);
 	if ( res != -1 ) {
 		p->callingpres = ast->cid.cid_pres;
@@ -4731,6 +4732,8 @@
 	add_header(&req, "Allow", ALLOWED_METHODS);
 	if (sipdebug)
 		add_header(&req, "X-asterisk-info", "SIP re-invite (RTP bridge)");
+	if (recordhistory)
+		append_history(p, "%s", "Re-invite sent");
 	add_sdp(&req, p);
 	/* Use this as the basis */
 	copy_request(&p->initreq, &req);
@@ -10701,6 +10704,8 @@
 				p->jointcapability = p->capability;
 				ast_log(LOG_DEBUG, "Hm....  No sdp for the moment\n");
 			}
+			if (recordhistory) /* This is a response, note what it was for */
+				append_history(p, "%s", "Re-invite received");
 		}
 	} else if (debug)
 		ast_verbose("Ignoring this INVITE request\n");



More information about the asterisk-commits mailing list