[asterisk-commits] rmudgett: branch rmudgett/ect r247251 - in /team/rmudgett/ect: ./ channels/ c...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Feb 17 12:49:12 CST 2010


Author: rmudgett
Date: Wed Feb 17 12:49:08 2010
New Revision: 247251

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=247251
Log:
Initial handling for incoming ETSI ECT messages.

It currently just returns transfer failed for testing of the libpri code.

Modified:
    team/rmudgett/ect/CHANGES
    team/rmudgett/ect/channels/chan_dahdi.c
    team/rmudgett/ect/channels/sig_pri.c
    team/rmudgett/ect/channels/sig_pri.h
    team/rmudgett/ect/configs/chan_dahdi.conf.sample
    team/rmudgett/ect/configure.ac

Modified: team/rmudgett/ect/CHANGES
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/ect/CHANGES?view=diff&rev=247251&r1=247250&r2=247251
==============================================================================
--- team/rmudgett/ect/CHANGES (original)
+++ team/rmudgett/ect/CHANGES Wed Feb 17 12:49:08 2010
@@ -307,6 +307,8 @@
    dialing option.  Dial(DAHDI/g1/[extension]/K(<keypad_digits>))
    Access any received keypad digits in SETUP message by: ${CHANNEL(keypad_digits)}
    (requires latest LibPRI)
+ * Added ability to send and receive ETSI Explicit Call Transfer (ECT) messages
+   to eliminate tromboned calls.
 
 Asterisk Manager Interface
 --------------------------

Modified: team/rmudgett/ect/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/ect/channels/chan_dahdi.c?view=diff&rev=247251&r1=247250&r2=247251
==============================================================================
--- team/rmudgett/ect/channels/chan_dahdi.c (original)
+++ team/rmudgett/ect/channels/chan_dahdi.c Wed Feb 17 12:49:08 2010
@@ -6643,7 +6643,7 @@
 			q931c1 = NULL;
 			break;
 		}
-		if (q931c0 && q931c1 && p0->transfer && p1->transfer && !triedtopribridge) {
+		if (q931c0 && q931c1 && p0->pri->transfer && p1->pri->transfer && !triedtopribridge) {
 			triedtopribridge = 1;
 			pri_channel_bridge(q931c0, q931c1);
 		}
@@ -11375,6 +11375,7 @@
 						pris[span].pri.hold_disconnect_transfer =
 							conf->pri.pri.hold_disconnect_transfer;
 #endif	/* defined(HAVE_PRI_CALL_HOLD) */
+						pris[span].pri.transfer = conf->chan.transfer;
 						pris[span].pri.facilityenable = conf->pri.pri.facilityenable;
 						ast_copy_string(pris[span].pri.msn_list, conf->pri.pri.msn_list, sizeof(pris[span].pri.msn_list));
 						ast_copy_string(pris[span].pri.idledial, conf->pri.pri.idledial, sizeof(pris[span].pri.idledial));

Modified: team/rmudgett/ect/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/ect/channels/sig_pri.c?view=diff&rev=247251&r1=247250&r2=247251
==============================================================================
--- team/rmudgett/ect/channels/sig_pri.c (original)
+++ team/rmudgett/ect/channels/sig_pri.c Wed Feb 17 12:49:08 2010
@@ -1647,6 +1647,12 @@
 			}
 			break;
 #endif	/* defined(HAVE_PRI_CALL_REROUTING) */
+#if defined(HAVE_PRI_TRANSFER)
+		case PRI_SUBCMD_TRANSFER_CALL:
+			/* BUGBUG transfer call. */
+			pri_transfer_rsp(pri->pri, call_rsp, subcmd->u.transfer.invoke_id, 0);
+			break;
+#endif	/* defined(HAVE_PRI_TRANSFER) */
 		default:
 			ast_debug(2,
 				"Unknown call subcommand(%d) in %s event on channel %d/%d on span %d.\n",
@@ -3979,8 +3985,14 @@
 		}
 #endif
 	}
+
 	/* Assume primary is the one we use */
 	pri->pri = pri->dchans[0];
+
+#if defined(HAVE_PRI_TRANSFER)
+	pri_transfer_enable(pri->pri, 1);
+#endif	/* defined(HAVE_PRI_TRANSFER) */
+
 	pri->resetpos = -1;
 	if (ast_pthread_create_background(&pri->master, NULL, pri_dchannel, pri)) {
 		for (i = 0; i < NUM_DCHANS; i++) {

Modified: team/rmudgett/ect/channels/sig_pri.h
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/ect/channels/sig_pri.h?view=diff&rev=247251&r1=247250&r2=247251
==============================================================================
--- team/rmudgett/ect/channels/sig_pri.h (original)
+++ team/rmudgett/ect/channels/sig_pri.h Wed Feb 17 12:49:08 2010
@@ -29,6 +29,10 @@
 #include "asterisk/frame.h"
 #include <libpri.h>
 #include <dahdi/user.h>
+#if defined(PRI_SUBCMD_TRANSFER_CALL)
+/* BUGBUG the HAVE_PRI_TRANSFER line is to be removed when the ect branch is merged to trunk and the configure script is updated. */
+#define HAVE_PRI_TRANSFER 1
+#endif	/* defined(PRI_SUBCMD_TRANSFER_CALL) */
 
 enum sig_pri_tone {
 	SIG_PRI_TONE_RINGTONE = 0,
@@ -200,6 +204,11 @@
 	/*! \brief TRUE if held calls are transferred on disconnect. */
 	unsigned int hold_disconnect_transfer:1;
 #endif	/* defined(HAVE_PRI_CALL_HOLD) */
+	/*!
+	 * \brief TRUE if call transfer is enabled for the span.
+	 * \note Support switch-side transfer (called 2BCT, RLT or other names)
+	 */
+	unsigned int transfer:1;
 	int dialplan;							/*!< Dialing plan */
 	int localdialplan;						/*!< Local dialing plan */
 	char internationalprefix[10];			/*!< country access code ('00' for european dialplans) */

Modified: team/rmudgett/ect/configs/chan_dahdi.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/ect/configs/chan_dahdi.conf.sample?view=diff&rev=247251&r1=247250&r2=247251
==============================================================================
--- team/rmudgett/ect/configs/chan_dahdi.conf.sample (original)
+++ team/rmudgett/ect/configs/chan_dahdi.conf.sample Wed Feb 17 12:49:08 2010
@@ -488,6 +488,8 @@
 ;   'facilityenable' setting must also be enabled to allow sending
 ;   the transfer to the ISDN switch, since it sent in a FACILITY
 ;   message.
+;   NOTE:  This should be disabled for NT PTMP mode.  Phones cannot
+;   have tromboned calls pushed down to them.
 ;
 transfer=yes
 ;

Modified: team/rmudgett/ect/configure.ac
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/ect/configure.ac?view=diff&rev=247251&r1=247250&r2=247251
==============================================================================
--- team/rmudgett/ect/configure.ac (original)
+++ team/rmudgett/ect/configure.ac Wed Feb 17 12:49:08 2010
@@ -336,6 +336,7 @@
 AST_EXT_LIB_SETUP([POPT], [popt], [popt])
 AST_EXT_LIB_SETUP([PORTAUDIO], [PortAudio], [portaudio])
 AST_EXT_LIB_SETUP([PRI], [ISDN PRI], [pri])
+AST_EXT_LIB_SETUP_DEPENDENT([PRI_TRANSFER], [ISDN PRI call transfer supplementary service], [PRI], [pri])
 AST_EXT_LIB_SETUP_DEPENDENT([PRI_SUBADDR], [ISDN PRI subaddressing], [PRI], [pri])
 AST_EXT_LIB_SETUP_DEPENDENT([PRI_CALL_HOLD], [ISDN PRI call hold], [PRI], [pri])
 AST_EXT_LIB_SETUP_DEPENDENT([PRI_CALL_REROUTING], [ISDN PRI call rerouting and call deflection], [PRI], [pri])
@@ -1527,6 +1528,7 @@
 AST_EXT_LIB_CHECK([PORTAUDIO], [portaudio], [Pa_GetDeviceCount], [portaudio.h])
 
 AST_EXT_LIB_CHECK([PRI], [pri], [pri_connected_line_update], [libpri.h])
+AST_EXT_LIB_CHECK([PRI_TRANSFER], [pri], [pri_transfer_enable], [libpri.h])
 AST_EXT_LIB_CHECK([PRI_SUBADDR], [pri], [pri_sr_set_called_subaddress], [libpri.h])
 AST_EXT_LIB_CHECK([PRI_CALL_HOLD], [pri], [pri_hold_enable], [libpri.h])
 AST_EXT_LIB_CHECK([PRI_CALL_REROUTING], [pri], [pri_reroute_enable], [libpri.h])




More information about the asterisk-commits mailing list