[asterisk-commits] tzafrir: branch group/zapata_conf r84120 - in /team/group/zapata_conf: channe...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Sep 28 22:45:14 CDT 2007


Author: tzafrir
Date: Fri Sep 28 22:45:14 2007
New Revision: 84120

URL: http://svn.digium.com/view/asterisk?view=rev&rev=84120
Log:
Support for: signalling=auto
(Why duplicate the Zaptel configuration?)

Modified:
    team/group/zapata_conf/channels/chan_zap.c
    team/group/zapata_conf/configs/zapata.conf.sample

Modified: team/group/zapata_conf/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/group/zapata_conf/channels/chan_zap.c?view=diff&rev=84120&r1=84119&r2=84120
==============================================================================
--- team/group/zapata_conf/channels/chan_zap.c (original)
+++ team/group/zapata_conf/channels/chan_zap.c Fri Sep 28 22:45:14 2007
@@ -692,6 +692,8 @@
 	ZT_PARAMS timing;
 
 	char smdi_port[SMDI_MAX_FILENAME_LEN];
+
+	int is_sig_auto;
 };
 
 /** returns a new zt_chan_conf with default values (by-value) */
@@ -7476,6 +7478,17 @@
 }
 #endif /* HAVE_SS7 */
 
+
+/* converts a zaptel sigtype to signalling as can be configured from
+ * zapata.conf.
+ * While both have basically the same values, this will later be the
+ * place to add filters and sanity checks
+ */
+static int sigtype_to_isgnalling(int sigtype)
+{
+	return sigtype;
+}
+
 static struct zt_pvt *mkintf(int channel, struct zt_chan_conf conf, struct zt_pri *pri, int reloading)
 {
 	/* Make a zt_pvt structure for this interface (or CRV if "pri" is specified) */
@@ -7553,6 +7566,8 @@
 					destroy_zt_pvt(&tmp);
 					return NULL;
 				}
+				if (conf.is_sig_auto)
+					conf.chan.sig = sigtype_to_isgnalling(p.sigtype);
 				if (p.sigtype != (conf.chan.sig & 0x3ffff)) {
 					ast_log(LOG_ERROR, "Signalling requested on channel %d is %s but line is in %s signalling\n", channel, sig2str(conf.chan.sig), sig2str(p.sigtype));
 					destroy_zt_pvt(&tmp);
@@ -12274,6 +12289,7 @@
 			 if (!strcasecmp(v->name, "signalling") || !strcasecmp(v->name, "signaling")) {
 				confp->chan.outsigmod = -1;
 				confp->chan.radio = 0;
+				confp->is_sig_auto = 0;
 				if (!strcasecmp(v->value, "em")) {
 					confp->chan.sig = SIG_EM;
 				} else if (!strcasecmp(v->value, "em_e1")) {
@@ -12372,6 +12388,8 @@
 				} else if (!strcasecmp(v->value, "ss7")) {
 					confp->chan.sig = SIG_SS7;
 #endif
+				} else if (!strcasecmp(v->value, "auto")) {
+					confp->is_sig_auto = 1;
 				} else {
 					ast_log(LOG_ERROR, "Unknown signalling method '%s'\n", v->value);
 				}

Modified: team/group/zapata_conf/configs/zapata.conf.sample
URL: http://svn.digium.com/view/asterisk/team/group/zapata_conf/configs/zapata.conf.sample?view=diff&rev=84120&r1=84119&r2=84120
==============================================================================
--- team/group/zapata_conf/configs/zapata.conf.sample (original)
+++ team/group/zapata_conf/configs/zapata.conf.sample Fri Sep 28 22:45:14 2007
@@ -155,6 +155,8 @@
 ;
 ;
 ; Signalling method (default is fxs).  Valid values:
+; auto:           Just use whatever is configured in Zaptel.
+;                 Should work well for FXS and FXO.
 ; em:             E & M
 ; em_w:           E & M Wink
 ; featd:          Feature Group D (The fake, Adtran style, DTMF)
@@ -202,7 +204,7 @@
 ; sf_rxtx:        Same as sf_txrx (for our dyslexic friends)
 ; ss7:            Signalling System 7
 ;
-signalling=fxo_ls
+signalling=auto
 ;
 ; If you have an outbound signalling format that is different from format
 ; specified above (but compatible), you can specify outbound signalling format,




More information about the asterisk-commits mailing list