[asterisk-commits] russell: branch group/vldtmf_fixup r51260 - /team/group/vldtmf_fixup/channels/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Jan 18 14:42:54 MST 2007


Author: russell
Date: Thu Jan 18 15:42:54 2007
New Revision: 51260

URL: http://svn.digium.com/view/asterisk?view=rev&rev=51260
Log:
Update all of the places that check the channels tech pointer to see if it is
a SIP channel to also check the version for channels using INFO dtmf.

Modified:
    team/group/vldtmf_fixup/channels/chan_sip.c

Modified: team/group/vldtmf_fixup/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/group/vldtmf_fixup/channels/chan_sip.c?view=diff&rev=51260&r1=51259&r2=51260
==============================================================================
--- team/group/vldtmf_fixup/channels/chan_sip.c (original)
+++ team/group/vldtmf_fixup/channels/chan_sip.c Thu Jan 18 15:42:54 2007
@@ -11258,7 +11258,7 @@
 	}
 
 	ast_channel_lock(chan);
-	if (chan->tech != &sip_tech) {
+	if (chan->tech != &sip_tech && chan->tech != &sip_tech_info) {
 		ast_log(LOG_WARNING, "This function can only be used on SIP channels.\n");
 		ast_channel_unlock(chan);
 		return -1;
@@ -11433,7 +11433,7 @@
 	}
 
 	ast_channel_lock(chan);
-	if (chan->tech != &sip_tech) {
+	if (chan->tech != &sip_tech && chan->tech != &sip_tech_info) {
 		ast_log(LOG_WARNING, "This function can only be used on SIP channels.\n");
 		ast_channel_unlock(chan);
 		return -1;
@@ -11681,7 +11681,7 @@
 				ast_log(LOG_WARNING, "Ooooh.. no tech!  That's REALLY bad\n");
 				break;
 			}
-			if (bridgepeer->tech == &sip_tech) {
+			if (bridgepeer->tech == &sip_tech || bridgepeer->tech == &sip_tech_info) {
 				bridgepvt = (struct sip_pvt*)(bridgepeer->tech_pvt);
 				if (bridgepvt->udptl) {
 					if (p->t38.state == T38_PEER_REINVITE) {
@@ -13474,7 +13474,7 @@
 				if ((bridgepeer = ast_bridged_channel(p->owner))) {
 					/* We have a bridge, and this is re-invite to switchover to T38 so we send re-invite with T38 SDP, to other side of bridge*/
 					/*! XXX: we should also check here does the other side supports t38 at all !!! XXX */
-					if (bridgepeer->tech == &sip_tech) {
+					if (bridgepeer->tech == &sip_tech || bridgepeer->tech == &sip_tech_info) {
 						bridgepvt = (struct sip_pvt*)bridgepeer->tech_pvt;
 						if (bridgepvt->t38.state == T38_DISABLED) {
 							if (bridgepvt->udptl) { /* If everything is OK with other side's udptl struct */
@@ -13528,7 +13528,7 @@
 				struct ast_channel *bridgepeer = NULL;
 				struct sip_pvt *bridgepvt = NULL;
 				if ((bridgepeer = ast_bridged_channel(p->owner))) {
-					if (bridgepeer->tech == &sip_tech) {
+					if (bridgepeer->tech == &sip_tech || bridgepeer->tech == &sip_tech_info) {
 						bridgepvt = (struct sip_pvt*)bridgepeer->tech_pvt;
 						/* Does the bridged peer have T38 ? */
 						if (bridgepvt->t38.state == T38_ENABLED) {
@@ -16809,7 +16809,7 @@
 		return 0;
 	}
 	ast_channel_lock(chan);
-	if (chan->tech != &sip_tech) {
+	if (chan->tech != &sip_tech && chan->tech != &sip_tech_info) {
 		ast_log(LOG_WARNING, "Call this application only on SIP incoming calls\n");
 		ast_channel_unlock(chan);
 		return 0;



More information about the asterisk-commits mailing list