[asterisk-commits] jpeeler: branch jpeeler/asterisk-sigwork-trunk r205845 - /team/jpeeler/asteri...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jul 10 12:00:12 CDT 2009


Author: jpeeler
Date: Fri Jul 10 12:00:07 2009
New Revision: 205845

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=205845
Log:
fix typo and start work required to support *0

Modified:
    team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c
    team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.c
    team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.h

Modified: team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c?view=diff&rev=205845&r1=205844&r2=205845
==============================================================================
--- team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c (original)
+++ team/jpeeler/asterisk-sigwork-trunk/channels/chan_dahdi.c Fri Jul 10 12:00:07 2009
@@ -1962,6 +1962,8 @@
 	return dahdi_setlinear(p->subs[idx].dfd, linear_mode);
 }
 
+static int get_alarms(struct dahdi_pvt *p);
+static void handle_alarms(struct dahdi_pvt *p, int alms);
 static void my_get_and_handle_alarms(void *pvt)
 {
 	int res;
@@ -1969,6 +1971,15 @@
 	
 	res = get_alarms(p);
 	handle_alarms(p, res);
+}
+
+static void *my_get_sigpvt_bridged_channel(struct ast_channel *chan)
+{
+	struct dahdi_pvt *p = ast_bridged_channel(chan)->tech_pvt;
+	if (p)
+		return p->sig_pvt;
+	else
+		return NULL;
 }
 
 static void my_increase_ss_count(void)
@@ -2614,6 +2625,7 @@
 	.distinctive_ring = my_distinctive_ring,
 	.set_linear_mode = my_set_linear_mode,
 	.get_and_handle_alarms = my_get_and_handle_alarms,
+	.get_sigpvt_bridged_channel = my_get_sigpvt_bridged_channel,
 };
 
 static struct dahdi_pvt *round_robin[32];
@@ -2823,8 +2835,6 @@
 	ast_log(LOG_NOTICE, "New MFC/R2 call detected on chan %d.\n", openr2_chan_get_number(r2chan));
 }
 
-static int get_alarms(struct dahdi_pvt *p);
-static void handle_alarms(struct dahdi_pvt *p, int alms);
 static void dahdi_r2_on_hardware_alarm(openr2_chan_t *r2chan, int alarm)
 {
 	int res;

Modified: team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.c?view=diff&rev=205845&r1=205844&r2=205845
==============================================================================
--- team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.c (original)
+++ team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.c Fri Jul 10 12:00:07 2009
@@ -88,6 +88,9 @@
 	/* "smdi" is intentionally not supported here, as there is a much better
 	 * way to do this in the dialplan now. */
 };
+
+#define ISTRUNK(p) ((p->sig == SIG_FXSLS) || (p->sig == SIG_FXSKS) || \
+					(p->sig == SIG_FXSGS))
 
 enum analog_sigtype analog_str_to_sigtype(const char *name)
 {
@@ -1274,6 +1277,16 @@
 	if (p->calls->get_and_handle_alarms)
 		return p->calls->get_and_handle_alarms(p->chan_pvt);
 }
+
+#if 0
+static void *analog_get_bridged_channel(struct analog_pvt *p, struct ast_channel *chan)
+{
+	if (p->calls->get_sigpvt_bridged_channel)
+		return p->calls->get_sigpvt_bridged_channel;
+	else
+		return NULL;
+}
+#endif
 
 #define ANALOG_NEED_MFDETECT(p) (((p)->sig == ANALOG_SIG_FEATDMF) || ((p)->sig == ANALOG_SIG_FEATDMF_TA) || ((p)->sig == ANALOG_SIG_E911) || ((p)->sig == ANALOG_SIG_FGC_CAMA) || ((p)->sig == ANALOG_SIG_FGC_CAMAMF) || ((p)->sig == ANALOG_SIG_FEATB))
 
@@ -1795,12 +1808,12 @@
 				memset(exten, 0, sizeof(exten));
 				timeout = analog_firstdigittimeout;
 			} else if (!strcmp(exten, "*0")) {
-#ifdef XXX
+#if 0
 				struct ast_channel *nbridge = p->subs[ANALOG_SUB_THREEWAY].owner;
-				struct dahdi_pvt *pbridge = NULL;
+				struct analog_pvt *pbridge = NULL;
 				  /* set up the private struct of the bridged one, if any */
 				if (nbridge && ast_bridged_channel(nbridge))
-					pbridge = ast_bridged_channel(nbridge)->tech_pvt;
+					pbridge = analog_get_bridged_channel(p, nbridge);
 				if (nbridge && pbridge &&
 				    (nbridge->tech == chan_tech) &&
 				    (ast_bridged_channel(nbridge)->tech == chan_tech) &&
@@ -3021,7 +3034,7 @@
 		break;
 	case ANALOG_EVENT_ALARM:
 		i->inalarm = 1;
-		analog_get_and_handle_alarms(p);
+		analog_get_and_handle_alarms(i);
 
 		/* fall thru intentionally */
 	case ANALOG_EVENT_ONHOOK:

Modified: team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.h
URL: http://svn.asterisk.org/svn-view/asterisk/team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.h?view=diff&rev=205845&r1=205844&r2=205845
==============================================================================
--- team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.h (original)
+++ team/jpeeler/asterisk-sigwork-trunk/channels/sig_analog.h Fri Jul 10 12:00:07 2009
@@ -189,6 +189,7 @@
 	int (* const distinctive_ring)(struct ast_channel *chan, void *pvt, int idx, int *ringdata);
 	int (* const set_linear_mode)(void *pvt, int idx, int linear_mode);
 	void (* const get_and_handle_alarms)(void *pvt);
+	void * (* const get_sigpvt_bridged_channel)(struct ast_channel *chan);
 };
 
 




More information about the asterisk-commits mailing list