[asterisk-commits] jpeeler: branch jpeeler/feature14882 r286496 - in /team/jpeeler/feature14882:...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Sep 13 16:06:24 CDT 2010


Author: jpeeler
Date: Mon Sep 13 16:06:17 2010
New Revision: 286496

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=286496
Log:
oops, ok keep channel pointer for valid parking check so autoservice can be handled properly

Modified:
    team/jpeeler/feature14882/channels/chan_dahdi.c
    team/jpeeler/feature14882/channels/chan_iax2.c
    team/jpeeler/feature14882/channels/chan_sip.c
    team/jpeeler/feature14882/channels/sig_analog.c
    team/jpeeler/feature14882/include/asterisk/features.h
    team/jpeeler/feature14882/main/features.c

Modified: team/jpeeler/feature14882/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/jpeeler/feature14882/channels/chan_dahdi.c?view=diff&rev=286496&r1=286495&r2=286496
==============================================================================
--- team/jpeeler/feature14882/channels/chan_dahdi.c (original)
+++ team/jpeeler/feature14882/channels/chan_dahdi.c Mon Sep 13 16:06:17 2010
@@ -9739,7 +9739,7 @@
 				tone_zone_play_tone(p->subs[idx].dfd, -1);
 			else
 				tone_zone_play_tone(p->subs[idx].dfd, DAHDI_TONE_DIALTONE);
-			if (ast_exists_extension(chan, chan->context, exten, 1, p->cid_num) && !ast_parking_ext_valid(exten, chan->context)) {
+			if (ast_exists_extension(chan, chan->context, exten, 1, p->cid_num) && !ast_parking_ext_valid(exten, chan, chan->context)) {
 				if (!res || !ast_matchmore_extension(chan, chan->context, exten, 1, p->cid_num)) {
 					if (getforward) {
 						/* Record this as the forwarding extension */
@@ -9875,7 +9875,7 @@
 				getforward = 0;
 				memset(exten, 0, sizeof(exten));
 				len = 0;
-			} else if ((p->transfer || p->canpark) && ast_parking_ext_valid(exten, chan->context) &&
+			} else if ((p->transfer || p->canpark) && ast_parking_ext_valid(exten, chan, chan->context) &&
 						p->subs[SUB_THREEWAY].owner &&
 						ast_bridged_channel(p->subs[SUB_THREEWAY].owner)) {
 				/* This is a three way call, the main call being a real channel,

Modified: team/jpeeler/feature14882/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/team/jpeeler/feature14882/channels/chan_iax2.c?view=diff&rev=286496&r1=286495&r2=286496
==============================================================================
--- team/jpeeler/feature14882/channels/chan_iax2.c (original)
+++ team/jpeeler/feature14882/channels/chan_iax2.c Mon Sep 13 16:06:17 2010
@@ -9112,7 +9112,7 @@
 	memset(&ied1, 0, sizeof(ied1));
 	mm = ast_matchmore_extension(NULL, context, callednum, 1, callerid);
 	/* Must be started */
-	if (ast_parking_ext_valid(callednum, context) || ast_exists_extension(NULL, context, callednum, 1, callerid)) {
+	if (ast_parking_ext_valid(callednum, NULL, context) || ast_exists_extension(NULL, context, callednum, 1, callerid)) {
 		dpstatus = IAX_DPSTATUS_EXISTS;
 	} else if (ast_canmatch_extension(NULL, context, callednum, 1, callerid)) {
 		dpstatus = IAX_DPSTATUS_CANEXIST;
@@ -10606,7 +10606,7 @@
 					}
 
 					pbx_builtin_setvar_helper(bridged_chan, "BLINDTRANSFER", iaxs[fr->callno]->owner->name);
-					if (ast_parking_ext_valid(ies.called_number, iaxs[fr->callno]->context)) {
+					if (ast_parking_ext_valid(ies.called_number, c, iaxs[fr->callno]->context)) {
 						struct ast_channel *saved_channel = iaxs[fr->callno]->owner;
 						ast_mutex_unlock(&iaxsl[fr->callno]);
 						if (iax_park(bridged_chan, saved_channel, ies.called_number)) {

Modified: team/jpeeler/feature14882/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/jpeeler/feature14882/channels/chan_sip.c?view=diff&rev=286496&r1=286495&r2=286496
==============================================================================
--- team/jpeeler/feature14882/channels/chan_sip.c (original)
+++ team/jpeeler/feature14882/channels/chan_sip.c Mon Sep 13 16:06:17 2010
@@ -22069,7 +22069,7 @@
 	}
 
 	/* Parking a call */
-	if (p->refer->localtransfer && ast_parking_ext_valid(p->refer->refer_to, p->owner->context)) {
+	if (p->refer->localtransfer && ast_parking_ext_valid(p->refer->refer_to, p->owner, p->owner->context)) {
 		/* Must release c's lock now, because it will not longer be accessible after the transfer! */
 		*nounlock = 1;
 		ast_channel_unlock(current.chan1);

Modified: team/jpeeler/feature14882/channels/sig_analog.c
URL: http://svnview.digium.com/svn/asterisk/team/jpeeler/feature14882/channels/sig_analog.c?view=diff&rev=286496&r1=286495&r2=286496
==============================================================================
--- team/jpeeler/feature14882/channels/sig_analog.c (original)
+++ team/jpeeler/feature14882/channels/sig_analog.c Mon Sep 13 16:06:17 2010
@@ -1930,7 +1930,7 @@
 			} else {
 				analog_play_tone(p, index, ANALOG_TONE_DIALTONE);
 			}
-			if (ast_exists_extension(chan, chan->context, exten, 1, p->cid_num) && !ast_parking_ext_valid(exten, chan->context)) {
+			if (ast_exists_extension(chan, chan->context, exten, 1, p->cid_num) && !ast_parking_ext_valid(exten, chan, chan->context)) {
 				if (!res || !ast_matchmore_extension(chan, chan->context, exten, 1, p->cid_num)) {
 					if (getforward) {
 						/* Record this as the forwarding extension */
@@ -2081,7 +2081,7 @@
 				getforward = 0;
 				memset(exten, 0, sizeof(exten));
 				len = 0;
-			} else if ((p->transfer || p->canpark) && ast_parking_ext_valid(exten, chan->context) &&
+			} else if ((p->transfer || p->canpark) && ast_parking_ext_valid(exten, chan, chan->context) &&
 						p->subs[ANALOG_SUB_THREEWAY].owner &&
 						ast_bridged_channel(p->subs[ANALOG_SUB_THREEWAY].owner)) {
 				/* This is a three way call, the main call being a real channel,

Modified: team/jpeeler/feature14882/include/asterisk/features.h
URL: http://svnview.digium.com/svn/asterisk/team/jpeeler/feature14882/include/asterisk/features.h?view=diff&rev=286496&r1=286495&r2=286496
==============================================================================
--- team/jpeeler/feature14882/include/asterisk/features.h (original)
+++ team/jpeeler/feature14882/include/asterisk/features.h Mon Sep 13 16:06:17 2010
@@ -111,7 +111,7 @@
  * \retval 0 if extension does not exist
  * \retval 1 if extension does exist
 */
-int ast_parking_ext_valid(const char *exten_str, const char *context);
+int ast_parking_ext_valid(const char *exten_str, struct ast_channel *chan, const char *context);
 
 /*! \brief Determine system call pickup extension */
 const char *ast_pickup_ext(void);

Modified: team/jpeeler/feature14882/main/features.c
URL: http://svnview.digium.com/svn/asterisk/team/jpeeler/feature14882/main/features.c?view=diff&rev=286496&r1=286495&r2=286496
==============================================================================
--- team/jpeeler/feature14882/main/features.c (original)
+++ team/jpeeler/feature14882/main/features.c Mon Sep 13 16:06:17 2010
@@ -468,13 +468,13 @@
 	return 0;
 }
 
-int ast_parking_ext_valid(const char *exten_str, const char *context)
+int ast_parking_ext_valid(const char *exten_str, struct ast_channel *chan, const char *context)
 {
 	struct ast_exten *exten;
 	struct pbx_find_info q = { .stacklen = 0 }; /* the rest is reset in pbx_find_extension */
 	const char *app_at_exten;
 
-	exten = pbx_find_extension(NULL, NULL, &q, context, exten_str, 1, NULL, NULL, E_MATCH);
+	exten = pbx_find_extension(chan, NULL, &q, context, exten_str, 1, NULL, NULL, E_MATCH);
 	app_at_exten = ast_get_extension_app(exten);
 	if (!app_at_exten || strcmp(PARK_APP_NAME, app_at_exten)) {
 		return 0;




More information about the asterisk-commits mailing list