[asterisk-commits] mmichelson: branch mmichelson/features_config r390367 - /team/mmichelson/feat...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jun 3 11:23:17 CDT 2013


Author: mmichelson
Date: Mon Jun  3 11:23:15 2013
New Revision: 390367

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=390367
Log:
Fix compilation failures in chan_sip.c


Modified:
    team/mmichelson/features_config/channels/chan_sip.c

Modified: team/mmichelson/features_config/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/features_config/channels/chan_sip.c?view=diff&rev=390367&r1=390366&r2=390367
==============================================================================
--- team/mmichelson/features_config/channels/chan_sip.c (original)
+++ team/mmichelson/features_config/channels/chan_sip.c Mon Jun  3 11:23:15 2013
@@ -296,6 +296,7 @@
 #include "asterisk/app.h"
 #include "asterisk/bridging.h"
 #include "asterisk/stasis_endpoints.h"
+#include "asterisk/features_config.h"
 
 /*** DOCUMENTATION
 	<application name="SIPDtmfMode" language="en_US">
@@ -17662,6 +17663,7 @@
 	char tmpf[256] = "", *from = NULL;
 	struct sip_request *req;
 	char *decoded_uri;
+	RAII_VAR(struct ast_features_pickup_config *, pickup_cfg, ast_get_chan_features_pickup_config(p->owner), ao2_cleanup);
 
 	req = oreq;
 	if (!req) {
@@ -17772,7 +17774,7 @@
 			return SIP_GET_DEST_EXTEN_FOUND;
 		}
 		if (ast_exists_extension(NULL, p->context, decoded_uri, 1, S_OR(p->cid_num, from))
-			|| !strcmp(decoded_uri, ast_pickup_ext())) {
+			|| !strcmp(decoded_uri, pickup_cfg->pickupexten)) {
 			if (!oreq) {
 				ast_string_field_set(p, exten, decoded_uri);
 			}
@@ -17800,7 +17802,7 @@
 	if (ast_test_flag(&global_flags[1], SIP_PAGE2_ALLOWOVERLAP)
 		&& (ast_canmatch_extension(NULL, p->context, uri, 1, S_OR(p->cid_num, from))
 			|| ast_canmatch_extension(NULL, p->context, decoded_uri, 1, S_OR(p->cid_num, from))
-			|| !strncmp(decoded_uri, ast_pickup_ext(), strlen(decoded_uri)))) {
+			|| !strncmp(decoded_uri, pickup_cfg->pickupexten, strlen(decoded_uri)))) {
 		/* Overlap dialing is enabled and we need more digits to match an extension. */
 		return SIP_GET_DEST_EXTEN_MATCHMORE;
 	}
@@ -21735,7 +21737,6 @@
 			}
 			/* 403 means that we don't support this feature, so don't request it again */
 			transmit_response(p, "403 Forbidden", req);
-			ast_unlock_call_features();
 			return;
 		}
 		/* Send the feature code to the PBX as DTMF, just like the handset had sent it */
@@ -25649,6 +25650,7 @@
 
 	if (c) {	/* We have a call  -either a new call or an old one (RE-INVITE) */
 		enum ast_channel_state c_state = ast_channel_state(c);
+		RAII_VAR(struct ast_features_pickup_config *, pickup_cfg, ast_get_chan_features_pickup_config(c), ao2_cleanup);
 
 		if (c_state != AST_STATE_UP && reinvite &&
 			(p->invitestate == INV_TERMINATED || p->invitestate == INV_CONFIRMED)) {
@@ -25670,7 +25672,7 @@
 			transmit_provisional_response(p, "100 Trying", req, 0);
 			p->invitestate = INV_PROCEEDING;
 			ast_setstate(c, AST_STATE_RING);
-			if (strcmp(p->exten, ast_pickup_ext())) {	/* Call to extension -start pbx on this call */
+			if (strcmp(p->exten, pickup_cfg->pickupexten)) {	/* Call to extension -start pbx on this call */
 				enum ast_pbx_result result;
 
 				result = ast_pbx_start(c);




More information about the asterisk-commits mailing list