[Pkg-voip-commits] r4842 - /asterisk/trunk/debian/patches/bristuff/zapata-bri+euroisdn

tzafrir-guest at alioth.debian.org tzafrir-guest at alioth.debian.org
Mon Nov 19 10:35:21 UTC 2007


Author: tzafrir-guest
Date: Mon Nov 19 10:35:21 2007
New Revision: 4842

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=4842
Log:
Refresh patch bristuff/zapata-bri+euroisdn .

Modified:
    asterisk/trunk/debian/patches/bristuff/zapata-bri+euroisdn

Modified: asterisk/trunk/debian/patches/bristuff/zapata-bri+euroisdn
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/bristuff/zapata-bri%2Beuroisdn?rev=4842&op=diff
==============================================================================
--- asterisk/trunk/debian/patches/bristuff/zapata-bri+euroisdn (original)
+++ asterisk/trunk/debian/patches/bristuff/zapata-bri+euroisdn Mon Nov 19 10:35:21 2007
@@ -1,6 +1,8 @@
---- asterisk-1.4.10.1~dfsg.orig/include/asterisk/channel.h
-+++ asterisk-1.4.10.1~dfsg/include/asterisk/channel.h
-@@ -413,6 +413,7 @@ struct ast_channel {
+Index: asterisk-1.4.14~dfsg/include/asterisk/channel.h
+===================================================================
+--- asterisk-1.4.14~dfsg.orig/include/asterisk/channel.h	2007-11-19 12:27:29.000000000 +0200
++++ asterisk-1.4.14~dfsg/include/asterisk/channel.h	2007-11-19 12:27:30.000000000 +0200
+@@ -420,6 +420,7 @@
  	unsigned int flags;				/*!< channel flags of AST_FLAG_ type */
  	unsigned short transfercapability;		/*!< ISDN Transfer Capbility - AST_FLAG_DIGITAL is not enough */
  	AST_LIST_HEAD_NOLOCK(, ast_frame) readq;
@@ -8,9 +10,11 @@
  	int alertpipe[2];
  
  	int nativeformats;				/*!< Kinds of data this channel can natively handle */
---- asterisk-1.4.10.1~dfsg.orig/main/pbx.c
-+++ asterisk-1.4.10.1~dfsg/main/pbx.c
-@@ -5101,7 +5101,7 @@ struct app_tmp {
+Index: asterisk-1.4.14~dfsg/main/pbx.c
+===================================================================
+--- asterisk-1.4.14~dfsg.orig/main/pbx.c	2007-11-19 12:27:29.000000000 +0200
++++ asterisk-1.4.14~dfsg/main/pbx.c	2007-11-19 12:27:30.000000000 +0200
+@@ -5109,7 +5109,7 @@
  };
  
  /*! \brief run the application and free the descriptor once done */
@@ -19,9 +23,11 @@
  {
  	struct app_tmp *tmp = data;
  	struct ast_app *app;
---- asterisk-1.4.10.1~dfsg.orig/include/asterisk/pbx.h
-+++ asterisk-1.4.10.1~dfsg/include/asterisk/pbx.h
-@@ -145,6 +145,8 @@ void ast_unregister_switch(struct ast_sw
+Index: asterisk-1.4.14~dfsg/include/asterisk/pbx.h
+===================================================================
+--- asterisk-1.4.14~dfsg.orig/include/asterisk/pbx.h	2007-11-19 12:27:29.000000000 +0200
++++ asterisk-1.4.14~dfsg/include/asterisk/pbx.h	2007-11-19 12:27:30.000000000 +0200
+@@ -145,6 +145,8 @@
   */
  struct ast_app *pbx_findapp(const char *app);
  
@@ -30,8 +36,10 @@
  /*!
   * \brief Execute an application
   *
---- asterisk-1.4.10.1~dfsg.orig/channels/chan_zap.c
-+++ asterisk-1.4.10.1~dfsg/channels/chan_zap.c
+Index: asterisk-1.4.14~dfsg/channels/chan_zap.c
+===================================================================
+--- asterisk-1.4.14~dfsg.orig/channels/chan_zap.c	2007-11-13 23:07:08.000000000 +0200
++++ asterisk-1.4.14~dfsg/channels/chan_zap.c	2007-11-19 12:27:38.000000000 +0200
 @@ -11,6 +11,10 @@
   * the project provides a web site, mailing lists and IRC
   * channels for your use.
@@ -43,7 +51,7 @@
   * This program is free software, distributed under the terms of
   * the GNU General Public License Version 2. See the LICENSE file
   * at the top of the source tree.
-@@ -103,6 +107,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
+@@ -103,6 +107,8 @@
  #include "asterisk/abstract_jb.h"
  #include "asterisk/smdi.h"
  #include "asterisk/astobj.h"
@@ -52,7 +60,7 @@
  #define SMDI_MD_WAIT_TIMEOUT 1500 /* 1.5 seconds */
  
  /*! Global jitterbuffer configuration - by default, jb is disabled */
-@@ -189,7 +195,7 @@ static const char config[] = "zapata.con
+@@ -189,7 +195,7 @@
  #define SIG_GR303FXOKS	(0x0100000 | ZT_SIG_FXOKS)
  #define SIG_GR303FXSKS	(0x0100000 | ZT_SIG_FXSKS)
  
@@ -61,7 +69,7 @@
  #define NUM_DCHANS		4	/*!< No more than 4 d-channels */
  #define MAX_CHANNELS	672		/*!< No more than a DS3 per trunk group */
  
-@@ -204,6 +210,9 @@ static const char config[] = "zapata.con
+@@ -204,6 +210,9 @@
  static char defaultcic[64] = "";
  static char defaultozz[64] = "";
  
@@ -71,7 +79,7 @@
  static char progzone[10] = "";
  
  static int distinctiveringaftercid = 0;
-@@ -215,8 +224,6 @@ static struct ast_channel inuse;
+@@ -215,8 +224,6 @@
  #ifdef PRI_GETSET_TIMERS
  static int pritimers[PRI_MAX_TIMERS];
  #endif
@@ -80,7 +88,7 @@
  #endif
  
  /*! \brief Wait up to 16 seconds for first digit (FXO logic) */
-@@ -234,10 +241,6 @@ AST_MUTEX_DEFINE_STATIC(iflock);
+@@ -234,10 +241,6 @@
  
  static int ifcount = 0;
  
@@ -91,7 +99,7 @@
  /*! \brief Protect the monitoring thread, so only one process can kill or start it, and not
     when it's doing something critical. */
  AST_MUTEX_DEFINE_STATIC(monlock);
-@@ -252,6 +255,7 @@ static enum ast_bridge_result zt_bridge(
+@@ -252,6 +255,7 @@
  
  static int zt_sendtext(struct ast_channel *c, const char *text);
  
@@ -99,7 +107,7 @@
  /*! \brief Avoid the silly zt_getevent which ignores a bunch of events */
  static inline int zt_get_event(int fd)
  {
-@@ -296,6 +300,27 @@ static int ringt_base = DEFAULT_RINGT;
+@@ -296,6 +300,27 @@
  #define PRI_SPAN(p) (((p) >> 8) & 0xff)
  #define PRI_EXPLICIT(p) (((p) >> 16) & 0x01)
  
@@ -127,7 +135,7 @@
  struct zt_pri {
  	pthread_t master;						/*!< Thread of master */
  	ast_mutex_t lock;						/*!< Mutex */
-@@ -309,6 +334,8 @@ struct zt_pri {
+@@ -309,6 +334,8 @@
  	int nsf;							/*!< Network-Specific Facilities */
  	int dialplan;							/*!< Dialing plan */
  	int localdialplan;						/*!< Local dialing plan */
@@ -136,7 +144,7 @@
  	char internationalprefix[10];					/*!< country access code ('00' for european dialplans) */
  	char nationalprefix[10];					/*!< area access code ('0' for european dialplans) */
  	char localprefix[20];						/*!< area access code + area code ('0'+area code for european dialplans) */
-@@ -320,6 +347,7 @@ struct zt_pri {
+@@ -320,6 +347,7 @@
  	int prilogicalspan;						/*!< Logical span number within trunk group */
  	int numchans;							/*!< Num of channels we represent */
  	int overlapdial;						/*!< In overlap dialing mode */
@@ -144,7 +152,7 @@
  	int facilityenable;						/*!< Enable facility IEs */
  	struct pri *dchans[NUM_DCHANS];					/*!< Actual d-channels */
  	int dchanavail[NUM_DCHANS];					/*!< Whether each channel is available */
-@@ -335,6 +363,9 @@ struct zt_pri {
+@@ -335,6 +363,9 @@
  	struct zt_pvt *pvts[MAX_CHANNELS];				/*!< Member channel pvt structs */
  	struct zt_pvt *crvs;						/*!< Member CRV structs */
  	struct zt_pvt *crvend;						/*!< Pointer to end of CRV structs */
@@ -154,7 +162,7 @@
  };
  
  
-@@ -452,6 +483,8 @@ static struct zt_pvt {
+@@ -452,6 +483,8 @@
  	unsigned int echocanbridged:1;
  	unsigned int echocanon:1;
  	unsigned int faxhandled:1;			/*!< Has a fax tone already been handled? */
@@ -163,7 +171,7 @@
  	unsigned int firstradio:1;
  	unsigned int hanguponpolarityswitch:1;
  	unsigned int hardwaredtmf:1;
-@@ -465,7 +498,8 @@ static struct zt_pvt {
+@@ -465,7 +498,8 @@
  	unsigned int overlapdial:1;
  	unsigned int permcallwaiting:1;
  	unsigned int permhidecallerid:1;		/*!< Whether to hide our outgoing caller ID or not */
@@ -173,7 +181,7 @@
  	unsigned int priexclusive:1;
  	unsigned int pulse:1;
  	unsigned int pulsedial:1;			/*!< whether a pulse dial phone is detected */
-@@ -502,6 +536,7 @@ static struct zt_pvt {
+@@ -502,6 +536,7 @@
  #endif
  	char cid_num[AST_MAX_EXTENSION];
  	int cid_ton;					/*!< Type Of Number (TON) */
@@ -181,7 +189,7 @@
  	char cid_name[AST_MAX_EXTENSION];
  	char lastcid_num[AST_MAX_EXTENSION];
  	char lastcid_name[AST_MAX_EXTENSION];
-@@ -567,6 +602,8 @@ static struct zt_pvt {
+@@ -567,6 +602,8 @@
  	struct zt_pvt *bearer;
  	struct zt_pvt *realcall;
  	q931_call *call;
@@ -190,7 +198,7 @@
  	int prioffset;
  	int logicalspan;
  #endif	
-@@ -617,6 +654,7 @@ static struct zt_chan_conf zt_chan_conf_
+@@ -617,6 +654,7 @@
  			.localprefix = "",
  			.privateprefix = "",
  			.unknownprefix = "",
@@ -198,7 +206,7 @@
  
  			.resetinterval = 3600
  		},
-@@ -628,6 +666,8 @@ static struct zt_chan_conf zt_chan_conf_
+@@ -628,6 +666,8 @@
  			.mohinterpret = "default",
  			.mohsuggest = "",
  			.transfertobusy = 1,
@@ -207,7 +215,7 @@
  
  			.cid_signalling = CID_SIG_BELL,
  			.cid_start = CID_START_RING,
-@@ -682,6 +722,8 @@ static int zt_indicate(struct ast_channe
+@@ -682,6 +722,8 @@
  static int zt_fixup(struct ast_channel *oldchan, struct ast_channel *newchan);
  static int zt_setoption(struct ast_channel *chan, int option, void *data, int datalen);
  static int zt_func_read(struct ast_channel *chan, char *function, char *data, char *buf, size_t len); 
@@ -216,7 +224,7 @@
  
  static const struct ast_channel_tech zap_tech = {
  	.type = "Zap",
-@@ -702,6 +744,7 @@ static const struct ast_channel_tech zap
+@@ -702,6 +744,7 @@
  	.fixup = zt_fixup,
  	.setoption = zt_setoption,
  	.func_channel_read = zt_func_read,
@@ -224,7 +232,7 @@
  };
  
  #ifdef HAVE_PRI
-@@ -713,6 +756,13 @@ static const struct ast_channel_tech zap
+@@ -713,6 +756,13 @@
  struct zt_pvt *round_robin[32];
  
  #ifdef HAVE_PRI
@@ -238,7 +246,7 @@
  static inline int pri_grab(struct zt_pvt *pvt, struct zt_pri *pri)
  {
  	int res;
-@@ -760,6 +810,112 @@ static int cidrings[NUM_CADENCE_MAX] = {
+@@ -760,6 +810,112 @@
  #define CANBUSYDETECT(p) (ISTRUNK(p) || (p->sig & (SIG_EM | SIG_EM_E1 | SIG_SF)) /* || (p->sig & __ZT_SIG_FXO) */)
  #define CANPROGRESSDETECT(p) (ISTRUNK(p) || (p->sig & (SIG_EM | SIG_EM_E1 | SIG_SF)) /* || (p->sig & __ZT_SIG_FXO) */)
  
@@ -351,7 +359,7 @@
  static int zt_get_index(struct ast_channel *ast, struct zt_pvt *p, int nullok)
  {
  	int res;
-@@ -1409,12 +1565,16 @@ static void zt_enable_ec(struct zt_pvt *
+@@ -1415,12 +1571,16 @@
  	int res;
  	if (!p)
  		return;
@@ -369,7 +377,7 @@
  		return;
  	}
  	if (p->echocancel) {
-@@ -1441,7 +1601,7 @@ static void zt_train_ec(struct zt_pvt *p
+@@ -1447,7 +1607,7 @@
  {
  	int x;
  	int res;
@@ -378,7 +386,7 @@
  		x = p->echotraining;
  		res = ioctl(p->subs[SUB_REAL].zfd, ZT_ECHOTRAIN, &x);
  		if (res)
-@@ -1802,7 +1962,12 @@ static int zt_call(struct ast_channel *a
+@@ -1808,7 +1968,12 @@
  		ast_log(LOG_WARNING, "Unable to flush input on channel %d\n", p->channel);
  	p->outgoing = 1;
  
@@ -392,7 +400,7 @@
  
  	mysig = p->sig;
  	if (p->outsigmod > -1)
-@@ -2033,6 +2198,7 @@ static int zt_call(struct ast_channel *a
+@@ -2039,6 +2204,7 @@
  	case SIG_PRI:
  		/* We'll get it in a moment -- but use dialdest to store pre-setup_ack digits */
  		p->dialdest[0] = '\0';
@@ -400,7 +408,7 @@
  		break;
  	default:
  		ast_log(LOG_DEBUG, "not yet implemented\n");
-@@ -2053,6 +2219,12 @@ static int zt_call(struct ast_channel *a
+@@ -2059,6 +2225,12 @@
  		const char *rr_str;
  		int redirect_reason;
  
@@ -413,7 +421,7 @@
  		c = strchr(dest, '/');
  		if (c)
  			c++;
-@@ -2074,6 +2246,7 @@ static int zt_call(struct ast_channel *a
+@@ -2081,6 +2253,7 @@
  			ast_mutex_unlock(&p->lock);
  			return -1;
  		}
@@ -421,7 +429,7 @@
  		if (mysig != SIG_FXSKS) {
  			p->dop.op = ZT_DIAL_OP_REPLACE;
  			s = strchr(c + p->stripmsd, 'w');
-@@ -2097,6 +2270,8 @@ static int zt_call(struct ast_channel *a
+@@ -2104,6 +2277,8 @@
  			pri_rel(p->pri);
  			ast_mutex_unlock(&p->lock);
  			return -1;
@@ -430,7 +438,7 @@
  		}
  		if (!(sr = pri_sr_new())) {
  			ast_log(LOG_WARNING, "Failed to allocate setup request channel %d\n", p->channel);
-@@ -2126,7 +2301,7 @@ static int zt_call(struct ast_channel *a
+@@ -2133,7 +2308,7 @@
  		pri_sr_set_channel(sr, p->bearer ? PVT_TO_CHANNEL(p->bearer) : PVT_TO_CHANNEL(p), exclusive, 1);
  		pri_sr_set_bearer(sr, p->digital ? PRI_TRANS_CAP_DIGITAL : ast->transfercapability, 
  					(p->digital ? -1 : 
@@ -439,7 +447,7 @@
  		if (p->pri->facilityenable)
  			pri_facility_enable(p->pri->pri);
  
-@@ -2390,8 +2565,10 @@ static int pri_find_dchan(struct zt_pri 
+@@ -2397,8 +2572,10 @@
  	}
  	if (newslot < 0) {
  		newslot = 0;
@@ -451,7 +459,7 @@
  	}
  	if (old && (oldslot != newslot))
  		ast_log(LOG_NOTICE, "Switching from from d-channel %d to channel %d!\n",
-@@ -2401,6 +2578,16 @@ static int pri_find_dchan(struct zt_pri 
+@@ -2408,6 +2585,16 @@
  }
  #endif
  
@@ -468,7 +476,7 @@
  static int zt_hangup(struct ast_channel *ast)
  {
  	int res;
-@@ -2448,8 +2635,7 @@ static int zt_hangup(struct ast_channel 
+@@ -2455,8 +2642,7 @@
  	if (option_debug)
  		ast_log(LOG_DEBUG, "Hangup: channel: %d index = %d, normal = %d, callwait = %d, thirdcall = %d\n",
  		p->channel, index, p->subs[SUB_REAL].zfd, p->subs[SUB_CALLWAIT].zfd, p->subs[SUB_THREEWAY].zfd);
@@ -478,7 +486,7 @@
  	if (index > -1) {
  		/* Real channel, do some fixup */
  		p->subs[index].owner = NULL;
-@@ -2551,6 +2737,7 @@ static int zt_hangup(struct ast_channel 
+@@ -2558,6 +2744,7 @@
  	}
  
  	if (!p->subs[SUB_REAL].owner && !p->subs[SUB_CALLWAIT].owner && !p->subs[SUB_THREEWAY].owner) {
@@ -486,7 +494,7 @@
  		p->owner = NULL;
  		p->ringt = 0;
  		p->distinctivering = 0;
-@@ -2593,7 +2780,7 @@ static int zt_hangup(struct ast_channel 
+@@ -2600,7 +2787,7 @@
  						pri_call_set_useruser(p->call, useruser);
  #endif
  
@@ -495,7 +503,7 @@
  						p->call = NULL;
  						if (p->bearer) 
  							p->bearer->call = NULL;
-@@ -2613,7 +2800,28 @@ static int zt_hangup(struct ast_channel 
+@@ -2620,7 +2807,28 @@
  							if (atoi(cause))
  								icause = atoi(cause);
  						}
@@ -525,7 +533,7 @@
  					}
  					if (res < 0) 
  						ast_log(LOG_WARNING, "pri_disconnect failed\n");
-@@ -2797,10 +3005,14 @@ static int zt_answer(struct ast_channel 
+@@ -2804,10 +3012,14 @@
  			p->proceeding = 1;
  			res = pri_answer(p->pri->pri, p->call, 0, !p->digital);
  			pri_rel(p->pri);
@@ -540,7 +548,7 @@
  		break;
  #endif
  	case 0:
-@@ -3428,6 +3640,15 @@ static int zt_fixup(struct ast_channel *
+@@ -3444,6 +3656,15 @@
  {
  	struct zt_pvt *p = newchan->tech_pvt;
  	int x;
@@ -556,7 +564,7 @@
  	ast_mutex_lock(&p->lock);
  	ast_log(LOG_DEBUG, "New owner for channel %d is %s\n", p->channel, newchan->name);
  	if (p->owner == oldchan) {
-@@ -3637,8 +3858,10 @@ static void zt_handle_dtmfup(struct ast_
+@@ -3653,8 +3874,10 @@
  					pbx_builtin_setvar_helper(ast, "FAXEXTEN", ast->exten);
  					if (ast_async_goto(ast, target_context, "fax", 1))
  						ast_log(LOG_WARNING, "Failed to async goto '%s' into fax of '%s'\n", ast->name, target_context);
@@ -568,7 +576,7 @@
  			} else if (option_debug)
  				ast_log(LOG_DEBUG, "Already in a fax extension, not redirecting\n");
  		} else if (option_debug)
-@@ -3792,7 +4015,7 @@ static struct ast_frame *zt_handle_event
+@@ -3808,7 +4031,7 @@
  				if (p->call) {
  					if (p->pri && p->pri->pri) {
  						if (!pri_grab(p, p->pri)) {
@@ -577,7 +585,7 @@
  							pri_destroycall(p->pri->pri, p->call);
  							p->call = NULL;
  							pri_rel(p->pri);
-@@ -4851,7 +5074,7 @@ static struct ast_frame  *zt_read(struct
+@@ -4867,7 +5090,7 @@
  		p->subs[index].f.data = NULL;
  		p->subs[index].f.datalen= 0;
  	}
@@ -586,7 +594,7 @@
  		/* Perform busy detection. etc on the zap line */
  		f = ast_dsp_process(ast, p->dsp, &p->subs[index].f);
  		if (f) {
-@@ -4863,8 +5086,9 @@ static struct ast_frame  *zt_read(struct
+@@ -4879,8 +5102,9 @@
  				}
  			} else if (f->frametype == AST_FRAME_DTMF) {
  #ifdef HAVE_PRI
@@ -598,7 +606,7 @@
  					f->frametype = AST_FRAME_NULL;
  					f->subclass = 0;
  				}
-@@ -4940,7 +5164,9 @@ static int zt_write(struct ast_channel *
+@@ -4955,7 +5179,9 @@
  #endif
  	/* Write a frame of (presumably voice) data */
  	if (frame->frametype != AST_FRAME_VOICE) {
@@ -609,7 +617,7 @@
  			ast_log(LOG_WARNING, "Don't know what to do with frame type '%d'\n", frame->frametype);
  		return 0;
  	}
-@@ -5012,7 +5238,7 @@ static int zt_indicate(struct ast_channe
+@@ -5023,7 +5249,7 @@
  		switch (condition) {
  		case AST_CONTROL_BUSY:
  #ifdef HAVE_PRI
@@ -618,7 +626,7 @@
  				chan->hangupcause = AST_CAUSE_USER_BUSY;
  				chan->_softhangup |= AST_SOFTHANGUP_DEV;
  				res = 0;
-@@ -5094,7 +5320,7 @@ static int zt_indicate(struct ast_channe
+@@ -5105,7 +5331,7 @@
  		case AST_CONTROL_CONGESTION:
  			chan->hangupcause = AST_CAUSE_CONGESTION;
  #ifdef HAVE_PRI
@@ -627,7 +635,7 @@
  				chan->hangupcause = AST_CAUSE_SWITCH_CONGESTION;
  				chan->_softhangup |= AST_SOFTHANGUP_DEV;
  				res = 0;
-@@ -5288,8 +5514,12 @@ static struct ast_channel *zt_new(struct
+@@ -5299,8 +5525,12 @@
  	if (state == AST_STATE_RING)
  		tmp->rings = 1;
  	tmp->tech_pvt = i;
@@ -641,7 +649,7 @@
  		tmp->callgroup = i->callgroup;
  		tmp->pickupgroup = i->pickupgroup;
  	}
-@@ -5423,6 +5653,7 @@ static void *ss_thread(void *data)
+@@ -5430,6 +5660,7 @@
  	int len = 0;
  	int res;
  	int index;
@@ -649,7 +657,7 @@
  
  	/* in the bizarre case where the channel has become a zombie before we
  	   even get started here, abort safely
-@@ -5451,10 +5682,17 @@ static void *ss_thread(void *data)
+@@ -5458,10 +5689,17 @@
  		len = strlen(exten);
  		res = 0;
  		while ((len < AST_MAX_EXTENSION-1) && ast_matchmore_extension(chan, chan->context, exten, 1, p->cid_num)) {
@@ -670,7 +678,7 @@
  			if (ast_exists_extension(chan, chan->context, exten, 1, p->cid_num))
  				timeout = matchdigittimeout;
  			else
-@@ -6660,18 +6898,44 @@ static int handle_init_event(struct zt_p
+@@ -6669,18 +6907,44 @@
  		break;
  	case ZT_EVENT_NOALARM:
  		i->inalarm = 0;
@@ -715,7 +723,7 @@
  		/* fall thru intentionally */
  	case ZT_EVENT_ONHOOK:
  		if (i->radio)
-@@ -6715,8 +6979,10 @@ static int handle_init_event(struct zt_p
+@@ -6724,8 +6988,10 @@
  			zt_set_hook(i->subs[SUB_REAL].zfd, ZT_ONHOOK);
  			break;
  		case SIG_PRI:
@@ -728,7 +736,7 @@
  			break;
  		default:
  			ast_log(LOG_WARNING, "Don't know how to handle on hook with signalling %s on channel %d\n", sig2str(i->sig), i->channel);
-@@ -7006,6 +7272,8 @@ static int pri_resolve_span(int *span, i
+@@ -7017,6 +7283,8 @@
  		} else {
  			if (si->totalchans == 31) { /* if it's an E1 */
  				pris[*span].dchannels[0] = 16 + offset;
@@ -737,7 +745,7 @@
  			} else {
  				pris[*span].dchannels[0] = 24 + offset;
  			}
-@@ -7258,6 +7526,11 @@ static struct zt_pvt *mkintf(int channel
+@@ -7269,6 +7537,11 @@
  							destroy_zt_pvt(&tmp);
  							return NULL;
  						}
@@ -749,7 +757,7 @@
  						if (pris[span].minunused && (pris[span].minunused != conf.pri.minunused)) {
  							ast_log(LOG_ERROR, "Span %d already has minunused of %d.\n", span + 1, conf.pri.minunused);
  							destroy_zt_pvt(&tmp);
-@@ -7275,6 +7548,11 @@ static struct zt_pvt *mkintf(int channel
+@@ -7286,6 +7559,11 @@
  							return NULL;
  						}
  						pris[span].nodetype = conf.pri.nodetype;
@@ -761,7 +769,7 @@
  						pris[span].switchtype = myswitchtype;
  						pris[span].nsf = conf.pri.nsf;
  						pris[span].dialplan = conf.pri.dialplan;
-@@ -7283,9 +7561,14 @@ static struct zt_pvt *mkintf(int channel
+@@ -7294,9 +7572,14 @@
  						pris[span].minunused = conf.pri.minunused;
  						pris[span].minidle = conf.pri.minidle;
  						pris[span].overlapdial = conf.pri.overlapdial;
@@ -776,7 +784,7 @@
  						ast_copy_string(pris[span].internationalprefix, conf.pri.internationalprefix, sizeof(pris[span].internationalprefix));
  						ast_copy_string(pris[span].nationalprefix, conf.pri.nationalprefix, sizeof(pris[span].nationalprefix));
  						ast_copy_string(pris[span].localprefix, conf.pri.localprefix, sizeof(pris[span].localprefix));
-@@ -7421,6 +7704,7 @@ static struct zt_pvt *mkintf(int channel
+@@ -7432,6 +7715,7 @@
  		tmp->restrictcid = conf.chan.restrictcid;
  		tmp->use_callingpres = conf.chan.use_callingpres;
  		tmp->priindication_oob = conf.chan.priindication_oob;
@@ -784,7 +792,7 @@
  		tmp->priexclusive = conf.chan.priexclusive;
  		if (tmp->usedistinctiveringdetection) {
  			if (!tmp->use_callerid) {
-@@ -7700,7 +7984,7 @@ static int pri_find_empty_chan(struct zt
+@@ -7711,7 +7995,7 @@
  			break;
  		if (!backwards && (x >= pri->numchans))
  			break;
@@ -793,7 +801,7 @@
  			ast_log(LOG_DEBUG, "Found empty available channel %d/%d\n", 
  				pri->pvts[x]->logicalspan, pri->pvts[x]->prioffset);
  			return x;
-@@ -7896,6 +8180,11 @@ static struct ast_channel *zt_request(co
+@@ -7907,6 +8191,11 @@
  					p->digital = 1;
  					if (tmp)
  						tmp->transfercapability = AST_TRANS_CAP_DIGITAL;
@@ -805,7 +813,7 @@
  				} else {
  					ast_log(LOG_WARNING, "Unknown option '%c' in '%s'\n", opt, (char *)data);
  				}
-@@ -7929,13 +8218,14 @@ next:
+@@ -7940,13 +8229,14 @@
  				*cause = AST_CAUSE_BUSY;
  		} else if (groupmatched) {
  			*cause = AST_CAUSE_CONGESTION;
@@ -821,7 +829,7 @@
  #ifdef HAVE_PRI
  static struct zt_pvt *pri_find_crv(struct zt_pri *pri, int crv)
  {
-@@ -7949,6 +8239,58 @@ static struct zt_pvt *pri_find_crv(struc
+@@ -7960,6 +8250,58 @@
  	return NULL;
  }
  
@@ -880,7 +888,7 @@
  
  static int pri_find_principle(struct zt_pri *pri, int channel)
  {
-@@ -7980,7 +8322,9 @@ static int pri_find_principle(struct zt_
+@@ -7991,7 +8333,9 @@
  static int pri_fixup_principle(struct zt_pri *pri, int principle, q931_call *c)
  {
  	int x;
@@ -890,7 +898,7 @@
  	if (!c) {
  		if (principle < 0)
  			return -1;
-@@ -8008,6 +8352,7 @@ static int pri_fixup_principle(struct zt
+@@ -8019,6 +8363,7 @@
  				}
  				/* Fix it all up now */
  				pri->pvts[principle]->owner = pri->pvts[x]->owner;
@@ -898,7 +906,7 @@
  				if (pri->pvts[principle]->owner) {
  					ast_string_field_build(pri->pvts[principle]->owner, name, 
  							       "Zap/%d:%d-%d", pri->trunkgroup,
-@@ -8015,13 +8360,48 @@ static int pri_fixup_principle(struct zt
+@@ -8026,13 +8371,48 @@
  					pri->pvts[principle]->owner->tech_pvt = pri->pvts[principle];
  					pri->pvts[principle]->owner->fds[0] = pri->pvts[principle]->subs[SUB_REAL].zfd;
  					pri->pvts[principle]->subs[SUB_REAL].owner = pri->pvts[x]->subs[SUB_REAL].owner;
@@ -948,7 +956,7 @@
  			}
  			return principle;
  		}
-@@ -8050,7 +8430,9 @@ static int pri_fixup_principle(struct zt
+@@ -8061,7 +8441,9 @@
  		}
  		crv = crv->next;
  	}
@@ -959,7 +967,7 @@
  	return -1;
  }
  
-@@ -8109,86 +8491,21 @@ static void *do_idle_thread(void *vchan)
+@@ -8120,86 +8502,21 @@
  #ifndef PRI_RESTART
  #error "Upgrade your libpri"
  #endif
@@ -1053,7 +1061,7 @@
  	do {
  		pri->resetpos++;
  	} while ((pri->resetpos < pri->numchans) &&
-@@ -8272,13 +8589,30 @@ static void apply_plan_to_number(char *b
+@@ -8283,13 +8600,30 @@
  	}
  }
  
@@ -1091,7 +1099,7 @@
  }
  
  static void *pri_dchannel(void *vpri)
-@@ -8458,15 +8792,44 @@ static void *pri_dchannel(void *vpri)
+@@ -8469,15 +8803,44 @@
  					/* Check for an event */
  					x = 0;
  					res = ioctl(pri->fds[which], ZT_GETEVENT, &x);
@@ -1139,7 +1147,7 @@
  					}
  				
  					if (option_debug)
-@@ -8478,8 +8841,7 @@ static void *pri_dchannel(void *vpri)
+@@ -8489,8 +8852,7 @@
  					break;
  			}
  		} else if (errno != EINTR)
@@ -1149,7 +1157,7 @@
  		if (e) {
  			if (pri->debug)
  				pri_dump_event(pri->dchans[which], e);
-@@ -8492,32 +8854,86 @@ static void *pri_dchannel(void *vpri)
+@@ -8503,32 +8865,86 @@
  
  			switch (e->e) {
  			case PRI_EVENT_DCHAN_UP:
@@ -1253,7 +1261,7 @@
  					pri->resetting = 0;
  					/* Hangup active channels and put them in alarm mode */
  					for (i = 0; i < pri->numchans; i++) {
-@@ -8527,12 +8943,13 @@ static void *pri_dchannel(void *vpri)
+@@ -8538,12 +8954,13 @@
  								/* T309 is not enabled : hangup calls when alarm occurs */
  								if (p->call) {
  									if (p->pri && p->pri->pri) {
@@ -1268,7 +1276,7 @@
  								if (p->realcall) {
  									pri_hangup_all(p->realcall, pri);
  								} else if (p->owner)
-@@ -8541,6 +8958,7 @@ static void *pri_dchannel(void *vpri)
+@@ -8552,6 +8969,7 @@
  							p->inalarm = 1;
  						}
  					}
@@ -1276,7 +1284,7 @@
  				}
  				break;
  			case PRI_EVENT_RESTART:
-@@ -8575,8 +8993,8 @@ static void *pri_dchannel(void *vpri)
+@@ -8586,8 +9004,8 @@
  								pri_destroycall(pri->pri, pri->pvts[x]->call);
  								pri->pvts[x]->call = NULL;
  							}
@@ -1287,7 +1295,7 @@
   							else if (pri->pvts[x]->owner)
  								pri->pvts[x]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
  							ast_mutex_unlock(&pri->pvts[x]->lock);
-@@ -8610,7 +9028,6 @@ static void *pri_dchannel(void *vpri)
+@@ -8621,7 +9039,6 @@
  					}
  				}
  				break;
@@ -1295,7 +1303,7 @@
  			case PRI_EVENT_INFO_RECEIVED:
  				chanpos = pri_find_principle(pri, e->ring.channel);
  				if (chanpos < 0) {
-@@ -8619,9 +9036,11 @@ static void *pri_dchannel(void *vpri)
+@@ -8630,9 +9047,11 @@
  				} else {
  					chanpos = pri_fixup_principle(pri, chanpos, e->ring.call);
  					if (chanpos > -1) {
@@ -1308,7 +1316,7 @@
  							/* how to do that */
  							int digitlen = strlen(e->ring.callednum);
  							char digit;
-@@ -8633,6 +9052,14 @@ static void *pri_dchannel(void *vpri)
+@@ -8644,6 +9063,14 @@
  									zap_queue_frame(pri->pvts[chanpos], &f, pri);
  								}
  							}
@@ -1323,7 +1331,7 @@
  						}
  						ast_mutex_unlock(&pri->pvts[chanpos]->lock);
  					}
-@@ -8640,36 +9067,59 @@ static void *pri_dchannel(void *vpri)
+@@ -8651,36 +9078,59 @@
  				break;
  			case PRI_EVENT_RING:
  				crv = NULL;
@@ -1399,7 +1407,7 @@
  					if (pri->switchtype == PRI_SWITCH_GR303_TMC) {
  						/* Should be safe to lock CRV AFAIK while bearer is still locked */
  						crv = pri_find_crv(pri, pri_get_crv(pri->pri, e->ring.call, NULL));
-@@ -8683,13 +9133,14 @@ static void *pri_dchannel(void *vpri)
+@@ -8694,13 +9144,14 @@
  								ast_log(LOG_WARNING, "Call received for busy CRV %d on span %d\n", pri_get_crv(pri->pri, e->ring.call, NULL), pri->span);
  							} else
  								ast_log(LOG_NOTICE, "Call received for unconfigured CRV %d on span %d\n", pri_get_crv(pri->pri, e->ring.call, NULL), pri->span);
@@ -1415,7 +1423,7 @@
  					pri->pvts[chanpos]->call = e->ring.call;
  					apply_plan_to_number(plancallingnum, sizeof(plancallingnum), pri, e->ring.callingnum, e->ring.callingplan);
  					if (pri->pvts[chanpos]->use_callerid) {
-@@ -8714,29 +9165,78 @@ static void *pri_dchannel(void *vpri)
+@@ -8725,29 +9176,78 @@
  					}
  					apply_plan_to_number(pri->pvts[chanpos]->rdnis, sizeof(pri->pvts[chanpos]->rdnis), pri,
  							     e->ring.redirectingnum, e->ring.callingplanrdnis);
@@ -1507,7 +1515,7 @@
  					/* Make sure extension exists (or in overlap dial mode, can exist) */
  					if ((pri->overlapdial && ast_canmatch_extension(NULL, pri->pvts[chanpos]->context, pri->pvts[chanpos]->exten, 1, pri->pvts[chanpos]->cid_num)) ||
  						ast_exists_extension(NULL, pri->pvts[chanpos]->context, pri->pvts[chanpos]->exten, 1, pri->pvts[chanpos]->cid_num)) {
-@@ -8755,19 +9255,36 @@ static void *pri_dchannel(void *vpri)
+@@ -8766,19 +9266,36 @@
  						res = zt_setlaw(pri->pvts[chanpos]->subs[SUB_REAL].zfd, law);
  						if (res < 0) 
  							ast_log(LOG_WARNING, "Unable to set law on channel %d\n", pri->pvts[chanpos]->channel);
@@ -1547,7 +1555,7 @@
  						/* Get the use_callingpres state */
  						pri->pvts[chanpos]->callingpres = e->ring.callingpres;
  					
-@@ -8779,14 +9296,31 @@ static void *pri_dchannel(void *vpri)
+@@ -8790,14 +9307,31 @@
  								/* Set bearer and such */
  								pri_assign_bearer(crv, pri, pri->pvts[chanpos]);
  								c = zt_new(crv, AST_STATE_RESERVED, 0, SUB_REAL, law, e->ring.ctype);
@@ -1579,7 +1587,7 @@
  							if (e->ring.ani2 >= 0) {
  								snprintf(ani2str, 5, "%.2d", e->ring.ani2);
  								pbx_builtin_setvar_helper(c, "ANI2", ani2str);
-@@ -8808,8 +9342,8 @@ static void *pri_dchannel(void *vpri)
+@@ -8819,8 +9353,8 @@
  							pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
  							if (c && !ast_pthread_create(&threadid, &attr, ss_thread, c)) {
  								if (option_verbose > 2)
@@ -1590,7 +1598,7 @@
  										pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span);
  							} else {
  								ast_log(LOG_WARNING, "Unable to start PBX on channel %d/%d, span %d\n", 
-@@ -8817,15 +9351,19 @@ static void *pri_dchannel(void *vpri)
+@@ -8828,15 +9362,19 @@
  								if (c)
  									ast_hangup(c);
  								else {
@@ -1611,7 +1619,7 @@
  							ast_mutex_lock(&pri->lock);
  							if (c) {
  								char calledtonstr[10];
-@@ -8846,23 +9384,40 @@ static void *pri_dchannel(void *vpri)
+@@ -8857,23 +9395,40 @@
  								snprintf(calledtonstr, sizeof(calledtonstr)-1, "%d", e->ring.calledplan);
  								pbx_builtin_setvar_helper(c, "CALLEDTON", calledtonstr);
  								if (option_verbose > 2)
@@ -1656,7 +1664,7 @@
  						pri->pvts[chanpos]->call = NULL;
  						pri->pvts[chanpos]->exten[0] = '\0';
  					}
-@@ -8871,9 +9426,9 @@ static void *pri_dchannel(void *vpri)
+@@ -8882,9 +9437,9 @@
  					ast_mutex_unlock(&pri->pvts[chanpos]->lock);
  				} else {
  					if (e->ring.flexible)
@@ -1668,7 +1676,7 @@
  				}
  				break;
  			case PRI_EVENT_RINGING:
-@@ -8889,7 +9444,7 @@ static void *pri_dchannel(void *vpri)
+@@ -8900,7 +9455,7 @@
  					} else {
  						ast_mutex_lock(&pri->pvts[chanpos]->lock);
  						if (ast_strlen_zero(pri->pvts[chanpos]->dop.dialstr)) {
@@ -1677,7 +1685,7 @@
  							pri->pvts[chanpos]->subs[SUB_REAL].needringing = 1;
  							pri->pvts[chanpos]->alerting = 1;
  						} else
-@@ -8918,9 +9473,16 @@ static void *pri_dchannel(void *vpri)
+@@ -8929,9 +9484,16 @@
  				}
  				break;
  			case PRI_EVENT_PROGRESS:
@@ -1695,7 +1703,7 @@
  #ifdef PRI_PROGRESS_MASK
  					if ((!pri->pvts[chanpos]->progress) || (e->proceeding.progressmask & PRI_PROG_INBAND_AVAILABLE)) {
  #else
-@@ -8967,6 +9529,12 @@ static void *pri_dchannel(void *vpri)
+@@ -8978,6 +9540,12 @@
  			case PRI_EVENT_PROCEEDING:
  				chanpos = pri_find_principle(pri, e->proceeding.channel);
  				if (chanpos > -1) {
@@ -1708,7 +1716,7 @@
  					if (!pri->pvts[chanpos]->proceeding) {
  						struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_PROCEEDING, };
  						
-@@ -9014,6 +9582,295 @@ static void *pri_dchannel(void *vpri)
+@@ -9025,6 +9593,295 @@
  					}
  				}
  				break;				
@@ -2004,7 +2012,7 @@
  			case PRI_EVENT_ANSWER:
  				chanpos = pri_find_principle(pri, e->answer.channel);
  				if (chanpos < 0) {
-@@ -9026,6 +9883,7 @@ static void *pri_dchannel(void *vpri)
+@@ -9037,6 +9894,7 @@
  							PRI_SPAN(e->answer.channel), PRI_CHANNEL(e->answer.channel), pri->span);
  					} else {
  						ast_mutex_lock(&pri->pvts[chanpos]->lock);
@@ -2012,7 +2020,7 @@
  						/* Now we can do call progress detection */
  
  						/* We changed this so it turns on the DSP no matter what... progress or no progress.
-@@ -9055,11 +9913,16 @@ static void *pri_dchannel(void *vpri)
+@@ -9066,11 +9924,16 @@
  								ast_log(LOG_DEBUG, "Sent deferred digit string: %s\n", pri->pvts[chanpos]->dop.dialstr);
  							pri->pvts[chanpos]->dop.dialstr[0] = '\0';
  						} else if (pri->pvts[chanpos]->confirmanswer) {
@@ -2030,7 +2038,7 @@
  						}
  
  #ifdef SUPPORT_USERUSER
-@@ -9113,20 +9976,29 @@ static void *pri_dchannel(void *vpri)
+@@ -9124,20 +9987,29 @@
  								ast_verbose(VERBOSE_PREFIX_3 "Channel %d/%d, span %d got hangup, cause %d\n", 
  									pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span, e->hangup.cause);
  						} else {
@@ -2066,8 +2074,8 @@
 +						}
  
  #ifdef SUPPORT_USERUSER
- 						if (!ast_strlen_zero(e->hangup.useruserinfo)) {
-@@ -9136,8 +10008,20 @@ static void *pri_dchannel(void *vpri)
+ 						if (pri->pvts[chanpos]->owner && !ast_strlen_zero(e->hangup.useruserinfo)) {
+@@ -9147,8 +10019,20 @@
  
  						ast_mutex_unlock(&pri->pvts[chanpos]->lock);
  					} else {
@@ -2090,7 +2098,7 @@
  					}
  				} 
  				break;
-@@ -9147,15 +10031,23 @@ static void *pri_dchannel(void *vpri)
+@@ -9158,15 +10042,23 @@
  			case PRI_EVENT_HANGUP_REQ:
  				chanpos = pri_find_principle(pri, e->hangup.channel);
  				if (chanpos < 0) {
@@ -2117,7 +2125,7 @@
  							pri->pvts[chanpos]->owner->hangupcause = e->hangup.cause;
  							if (pri->pvts[chanpos]->owner->_state == AST_STATE_UP)
  								pri->pvts[chanpos]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
-@@ -9182,16 +10074,86 @@ static void *pri_dchannel(void *vpri)
+@@ -9193,16 +10085,86 @@
  								if (option_verbose > 2)
  									ast_verbose(VERBOSE_PREFIX_3 "Channel %d/%d, span %d received AOC-E charging %d unit%s\n",
  										pri->pvts[chanpos]->logicalspan, pri->pvts[chanpos]->prioffset, pri->span, (int)e->hangup.aoc_units, (e->hangup.aoc_units == 1) ? "" : "s");
@@ -2208,7 +2216,7 @@
  						}
  
  #ifdef SUPPORT_USERUSER
-@@ -9202,9 +10164,39 @@ static void *pri_dchannel(void *vpri)
+@@ -9213,9 +10175,39 @@
  
  						ast_mutex_unlock(&pri->pvts[chanpos]->lock);
  					} else {
@@ -2249,7 +2257,7 @@
  				break;
  			case PRI_EVENT_HANGUP_ACK:
  				chanpos = pri_find_principle(pri, e->hangup.channel);
-@@ -9216,6 +10208,7 @@ static void *pri_dchannel(void *vpri)
+@@ -9227,6 +10219,7 @@
  					if (chanpos > -1) {
  						ast_mutex_lock(&pri->pvts[chanpos]->lock);
  						pri->pvts[chanpos]->call = NULL;
@@ -2257,7 +2265,7 @@
  						pri->pvts[chanpos]->resetting = 0;
  						if (pri->pvts[chanpos]->owner) {
  							if (option_verbose > 2) 
-@@ -9229,7 +10222,9 @@ static void *pri_dchannel(void *vpri)
+@@ -9240,7 +10233,9 @@
  #endif
  
  						ast_mutex_unlock(&pri->pvts[chanpos]->lock);
@@ -2267,7 +2275,7 @@
  				}
  				break;
  			case PRI_EVENT_CONFIG_ERR:
-@@ -9319,10 +10314,22 @@ static void *pri_dchannel(void *vpri)
+@@ -9330,10 +10325,22 @@
  					ast_mutex_lock(&pri->pvts[chanpos]->lock);
  					switch (e->notify.info) {
  					case PRI_NOTIFY_REMOTE_HOLD:
@@ -2290,7 +2298,7 @@
  						f.subclass = AST_CONTROL_UNHOLD;
  						zap_queue_frame(pri->pvts[chanpos], &f, pri);
  						break;
-@@ -9330,6 +10337,77 @@ static void *pri_dchannel(void *vpri)
+@@ -9341,6 +10348,77 @@
  					ast_mutex_unlock(&pri->pvts[chanpos]->lock);
  				}
  				break;
@@ -2368,7 +2376,7 @@
  			default:
  				ast_log(LOG_DEBUG, "Event: %d\n", e->e);
  			}
-@@ -9391,7 +10469,7 @@ static int start_pri(struct zt_pri *pri)
+@@ -9402,7 +10480,7 @@
  			pri->fds[i] = -1;
  			return -1;
  		}
@@ -2377,7 +2385,7 @@
  		/* Force overlap dial if we're doing GR-303! */
  		if (pri->switchtype == PRI_SWITCH_GR303_TMC)
  			pri->overlapdial = 1;
-@@ -9459,39 +10537,77 @@ static char *complete_span_5(const char 
+@@ -9470,39 +10548,77 @@
  
  static int handle_pri_set_debug_file(int fd, int argc, char **argv)
  {
@@ -2477,7 +2485,7 @@
  	}
  
  	return RESULT_SUCCESS;
-@@ -9525,6 +10641,7 @@ static int handle_pri_debug(int fd, int 
+@@ -9536,6 +10652,7 @@
  
  
  
@@ -2485,7 +2493,7 @@
  static int handle_pri_no_debug(int fd, int argc, char *argv[])
  {
  	int span;
-@@ -9674,10 +10791,6 @@ static int handle_pri_show_debug(int fd,
+@@ -9685,10 +10802,6 @@
  		}
  
  	}
@@ -2496,7 +2504,7 @@
  	    
  	if (!count) 
  		ast_cli(fd, "No debug set or no PRI running\n");
-@@ -9704,6 +10817,18 @@ static const char pri_show_spans_help[] 
+@@ -9715,6 +10828,18 @@
  	"Usage: pri show spans\n"
  	"       Displays PRI Information\n";
  
@@ -2515,7 +2523,7 @@
  static struct ast_cli_entry zap_pri_cli[] = {
  	{ { "pri", "debug", "span", NULL },
  	handle_pri_debug, "Enables PRI debugging on a span",
-@@ -9728,6 +10853,15 @@ static struct ast_cli_entry zap_pri_cli[
+@@ -9739,6 +10864,15 @@
  	{ { "pri", "show", "debug", NULL },
  	handle_pri_show_debug, "Displays current PRI debug settings" },
  
@@ -2531,7 +2539,7 @@
  	{ { "pri", "set", "debug", "file", NULL },
  	handle_pri_set_debug_file, "Sends PRI debug output to the specified file" },
  
-@@ -9735,8 +10869,76 @@ static struct ast_cli_entry zap_pri_cli[
+@@ -9746,8 +10880,76 @@
  	handle_pri_set_debug_file, "Ends PRI debug output to file" },
  };
  
@@ -2608,7 +2616,7 @@
  static int zap_destroy_channel(int fd, int argc, char **argv)
  {
  	int channel;
-@@ -10316,8 +11518,11 @@ static int __unload_module(void)
+@@ -10328,8 +11530,11 @@
  	}
  	ast_cli_unregister_multiple(zap_pri_cli, sizeof(zap_pri_cli) / sizeof(struct ast_cli_entry));
  	ast_unregister_application(zap_send_keypad_facility_app);
@@ -2620,7 +2628,7 @@
  	ast_manager_unregister( "ZapDialOffhook" );
  	ast_manager_unregister( "ZapHangup" );
  	ast_manager_unregister( "ZapTransfer" );
-@@ -10819,6 +12024,22 @@ static int process_zap(struct zt_chan_co
+@@ -10831,6 +12036,22 @@
  					confp->chan.sig = SIG_GR303FXSKS;
  					confp->chan.radio = 0;
  					confp->pri.nodetype = PRI_CPE;
@@ -2643,7 +2651,7 @@
  #endif
  				} else {
  					ast_log(LOG_ERROR, "Unknown signalling method '%s'\n", v->value);
-@@ -10931,9 +12152,21 @@ static int process_zap(struct zt_chan_co
+@@ -10943,9 +12164,21 @@
  					confp->chan.priindication_oob = 1;
  				else if (!strcasecmp(v->value, "inband"))
  					confp->chan.priindication_oob = 0;
@@ -2666,7 +2674,7 @@
  			} else if (!strcasecmp(v->name, "priexclusive")) {
  				confp->chan.priexclusive = ast_true(v->value);
  			} else if (!strcasecmp(v->name, "internationalprefix")) {
-@@ -10946,6 +12179,10 @@ static int process_zap(struct zt_chan_co
+@@ -10958,6 +12191,10 @@
  				ast_copy_string(confp->pri.privateprefix, v->value, sizeof(confp->pri.privateprefix));
  			} else if (!strcasecmp(v->name, "unknownprefix")) {
  				ast_copy_string(confp->pri.unknownprefix, v->value, sizeof(confp->pri.unknownprefix));
@@ -2677,7 +2685,7 @@
  			} else if (!strcasecmp(v->name, "resetinterval")) {
  				if (!strcasecmp(v->value, "never"))
  					confp->pri.resetinterval = -1;
-@@ -10962,6 +12199,8 @@ static int process_zap(struct zt_chan_co
+@@ -10974,6 +12211,8 @@
  				ast_copy_string(confp->pri.idleext, v->value, sizeof(confp->pri.idleext));
  			} else if (!strcasecmp(v->name, "idledial")) {
  				ast_copy_string(confp->pri.idledial, v->value, sizeof(confp->pri.idledial));
@@ -2686,7 +2694,7 @@
  			} else if (!strcasecmp(v->name, "overlapdial")) {
  				confp->pri.overlapdial = ast_true(v->value);
  			} else if (!strcasecmp(v->name, "pritimer")) {
-@@ -11263,6 +12502,7 @@ static int setup_zap(int reload)
+@@ -11275,6 +12514,7 @@
  #ifdef HAVE_PRI
  	if (!reload) {
  		for (x = 0; x < NUM_SPANS; x++) {
@@ -2694,7 +2702,7 @@
  			if (pris[x].pvts[0]) {
  				if (start_pri(pris + x)) {
  					ast_log(LOG_ERROR, "Unable to start D-channel on span %d\n", x + 1);
-@@ -11310,7 +12550,10 @@ static int load_module(void)
+@@ -11322,7 +12562,10 @@
  	ast_string_field_init(&inuse, 16);
  	ast_string_field_set(&inuse, name, "GR-303InUse");
  	ast_cli_register_multiple(zap_pri_cli, sizeof(zap_pri_cli) / sizeof(struct ast_cli_entry));
@@ -2705,7 +2713,7 @@
  	ast_cli_register_multiple(zap_cli, sizeof(zap_cli) / sizeof(struct ast_cli_entry));
  	
  	memset(round_robin, 0, sizeof(round_robin));
-@@ -11344,6 +12587,7 @@ static int zt_sendtext(struct ast_channe
+@@ -11356,6 +12599,7 @@
  	float scont = 0.0;
  	int index;
  
@@ -2713,9 +2721,11 @@
  	index = zt_get_index(c, p, 0);
  	if (index < 0) {
  		ast_log(LOG_WARNING, "Huh?  I don't exist?\n");
---- asterisk-1.4.10.1~dfsg.orig/configs/zapata.conf.sample
-+++ asterisk-1.4.10.1~dfsg/configs/zapata.conf.sample
-@@ -123,9 +123,20 @@ switchtype=national
+Index: asterisk-1.4.14~dfsg/configs/zapata.conf.sample
+===================================================================
+--- asterisk-1.4.14~dfsg.orig/configs/zapata.conf.sample	2007-09-15 00:17:08.000000000 +0300
++++ asterisk-1.4.14~dfsg/configs/zapata.conf.sample	2007-11-19 12:27:30.000000000 +0200
+@@ -123,9 +123,20 @@
  ; 
  ; outofband:      Signal Busy/Congestion out of band with RELEASE/DISCONNECT
  ; inband:         Signal Busy/Congestion using in-band tones
@@ -2736,9 +2746,11 @@
  ; If you need to override the existing channels selection routine and force all
  ; PRI channels to be marked as exclusively selected, set this to yes.
  ; priexclusive = yes
---- asterisk-1.4.10.1~dfsg.orig/main/channel.c
-+++ asterisk-1.4.10.1~dfsg/main/channel.c
-@@ -4112,6 +4112,10 @@ enum ast_bridge_result ast_channel_bridg
+Index: asterisk-1.4.14~dfsg/main/channel.c
+===================================================================
+--- asterisk-1.4.14~dfsg.orig/main/channel.c	2007-11-19 12:27:29.000000000 +0200
++++ asterisk-1.4.14~dfsg/main/channel.c	2007-11-19 12:27:30.000000000 +0200
+@@ -4173,6 +4173,10 @@
  			c1->name, c1->_bridge->name);
  		return -1;
  	}




More information about the Pkg-voip-commits mailing list