* Set radio signalling only once.
* Don't reset outsignalling when a non-valid value is given for signalling.
Index: asterisk-zap_signal_auto/channels/chan_zap.c
===================================================================
--- asterisk-zap_signal_auto.orig/channels/chan_zap.c	2008-01-05 20:32:59.455897066 +0200
+++ asterisk-zap_signal_auto/channels/chan_zap.c	2008-01-05 23:18:05.020382823 +0200
@@ -13147,6 +13147,9 @@ static int process_zap(struct zt_chan_co
 			ast_copy_string(mwimonitornotify, v->value, sizeof(mwimonitornotify));
 		} else if (!reload){ 
 			 if (!strcasecmp(v->name, "signalling") || !strcasecmp(v->name, "signaling")) {
+				int orig_radio = confp->chan.radio;
+				int orig_outsigmod = confp->chan.outsigmod;
+				confp->chan.radio = 0;
 				confp->chan.outsigmod = -1;
 				if (!strcasecmp(v->value, "em")) {
 					confp->chan.sig = SIG_EM;
@@ -13154,25 +13157,18 @@ static int process_zap(struct zt_chan_co
 					confp->chan.sig = SIG_EM_E1;
 				} else if (!strcasecmp(v->value, "em_w")) {
 					confp->chan.sig = SIG_EMWINK;
-					confp->chan.radio = 0;
 				} else if (!strcasecmp(v->value, "fxs_ls")) {
 					confp->chan.sig = SIG_FXSLS;
-					confp->chan.radio = 0;
 				} else if (!strcasecmp(v->value, "fxs_gs")) {
 					confp->chan.sig = SIG_FXSGS;
-					confp->chan.radio = 0;
 				} else if (!strcasecmp(v->value, "fxs_ks")) {
 					confp->chan.sig = SIG_FXSKS;
-					confp->chan.radio = 0;
 				} else if (!strcasecmp(v->value, "fxo_ls")) {
 					confp->chan.sig = SIG_FXOLS;
-					confp->chan.radio = 0;
 				} else if (!strcasecmp(v->value, "fxo_gs")) {
 					confp->chan.sig = SIG_FXOGS;
-					confp->chan.radio = 0;
 				} else if (!strcasecmp(v->value, "fxo_ks")) {
 					confp->chan.sig = SIG_FXOKS;
-					confp->chan.radio = 0;
 				} else if (!strcasecmp(v->value, "fxs_rx")) {
 					confp->chan.sig = SIG_FXSKS;
 					confp->chan.radio = 1;
@@ -13199,22 +13195,16 @@ static int process_zap(struct zt_chan_co
 					confp->chan.radio = 2;
 				} else if (!strcasecmp(v->value, "sf")) {
 					confp->chan.sig = SIG_SF;
-					confp->chan.radio = 0;
 				} else if (!strcasecmp(v->value, "sf_w")) {
 					confp->chan.sig = SIG_SFWINK;
-					confp->chan.radio = 0;
 				} else if (!strcasecmp(v->value, "sf_featd")) {
 					confp->chan.sig = SIG_FEATD;
-					confp->chan.radio = 0;
 				} else if (!strcasecmp(v->value, "sf_featdmf")) {
 					confp->chan.sig = SIG_FEATDMF;
-					confp->chan.radio = 0;
 				} else if (!strcasecmp(v->value, "sf_featb")) {
 					confp->chan.sig = SIG_SF_FEATB;
-					confp->chan.radio = 0;
 				} else if (!strcasecmp(v->value, "sf")) {
 					confp->chan.sig = SIG_SF;
-					confp->chan.radio = 0;
 				} else if (!strcasecmp(v->value, "sf_rx")) {
 					confp->chan.sig = SIG_SF;
 					confp->chan.radio = 1;
@@ -13229,63 +13219,50 @@ static int process_zap(struct zt_chan_co
 					confp->chan.radio = 2;
 				} else if (!strcasecmp(v->value, "featd")) {
 					confp->chan.sig = SIG_FEATD;
-					confp->chan.radio = 0;
 				} else if (!strcasecmp(v->value, "featdmf")) {
 					confp->chan.sig = SIG_FEATDMF;
-					confp->chan.radio = 0;
 				} else if (!strcasecmp(v->value, "featdmf_ta")) {
 					confp->chan.sig = SIG_FEATDMF_TA;
-					confp->chan.radio = 0;
 				} else if (!strcasecmp(v->value, "e911")) {
 					confp->chan.sig = SIG_E911;
-					confp->chan.radio = 0;
 				} else if (!strcasecmp(v->value, "fgccama")) {
 					confp->chan.sig = SIG_FGC_CAMA;
-					confp->chan.radio = 0;
 				} else if (!strcasecmp(v->value, "fgccamamf")) {
 					confp->chan.sig = SIG_FGC_CAMAMF;
-					confp->chan.radio = 0;
 				} else if (!strcasecmp(v->value, "featb")) {
 					confp->chan.sig = SIG_FEATB;
-					confp->chan.radio = 0;
 #ifdef HAVE_PRI
 				} else if (!strcasecmp(v->value, "pri_net")) {
-					confp->chan.radio = 0;
 					confp->chan.sig = SIG_PRI;
 					confp->pri.nodetype = PRI_NETWORK;
 				} else if (!strcasecmp(v->value, "pri_cpe")) {
 					confp->chan.sig = SIG_PRI;
-					confp->chan.radio = 0;
 					confp->pri.nodetype = PRI_CPE;
 				} else if (!strcasecmp(v->value, "bri_cpe")) {
 					confp->chan.sig = SIG_BRI;
-					confp->chan.radio = 0;
 					confp->pri.nodetype = PRI_CPE;
 				} else if (!strcasecmp(v->value, "bri_net")) {
 					confp->chan.sig = SIG_BRI;
-					confp->chan.radio = 0;
 					confp->pri.nodetype = PRI_NETWORK;
 				} else if (!strcasecmp(v->value, "bri_cpe_ptmp")) {
 					confp->chan.sig = SIG_BRI_PTMP;
-					confp->chan.radio = 0;
 					confp->pri.nodetype = PRI_CPE;
 				} else if (!strcasecmp(v->value, "bri_net_ptmp")) {
 					ast_log(LOG_WARNING, "How cool would it be if someone implemented this mode!  For now, sucks for you.\n");
 				} else if (!strcasecmp(v->value, "gr303fxoks_net")) {
 					confp->chan.sig = SIG_GR303FXOKS;
-					confp->chan.radio = 0;
 					confp->pri.nodetype = PRI_NETWORK;
 				} else if (!strcasecmp(v->value, "gr303fxsks_cpe")) {
 					confp->chan.sig = SIG_GR303FXSKS;
-					confp->chan.radio = 0;
 					confp->pri.nodetype = PRI_CPE;
 #endif
 #ifdef HAVE_SS7
 				} else if (!strcasecmp(v->value, "ss7")) {
 					confp->chan.sig = SIG_SS7;
-					confp->chan.radio = 0;
 #endif
 				} else {
+					confp->chan.outsigmod = orig_outsigmod;
+					confp->chan.radio = orig_radio;
 					ast_log(LOG_ERROR, "Unknown signalling method '%s'\n", v->value);
 				}
 			 } else if (!strcasecmp(v->name, "outsignalling") || !strcasecmp(v->name, "outsignaling")) {
