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

tzafrir-guest at alioth.debian.org tzafrir-guest at alioth.debian.org
Mon Nov 19 10:59:04 UTC 2007


Author: tzafrir-guest
Date: Mon Nov 19 10:59:04 2007
New Revision: 4843

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=4843
Log:
bristuff/zapata-bri+euroisdn: proper initialization and length of nocid
and withheldcid fields of zt_pri .

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=4843&op=diff
==============================================================================
--- asterisk/trunk/debian/patches/bristuff/zapata-bri+euroisdn (original)
+++ asterisk/trunk/debian/patches/bristuff/zapata-bri+euroisdn Mon Nov 19 10:59:04 2007
@@ -1,7 +1,7 @@
 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
+--- asterisk-1.4.14~dfsg.orig/include/asterisk/channel.h	2007-11-19 12:33:35.000000000 +0200
++++ asterisk-1.4.14~dfsg/include/asterisk/channel.h	2007-11-19 12:33:35.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 */
@@ -12,8 +12,8 @@
  	int nativeformats;				/*!< Kinds of data this channel can natively handle */
 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
+--- asterisk-1.4.14~dfsg.orig/main/pbx.c	2007-11-19 12:33:34.000000000 +0200
++++ asterisk-1.4.14~dfsg/main/pbx.c	2007-11-19 12:33:35.000000000 +0200
 @@ -5109,7 +5109,7 @@
  };
  
@@ -25,8 +25,8 @@
  	struct ast_app *app;
 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
+--- asterisk-1.4.14~dfsg.orig/include/asterisk/pbx.h	2007-11-19 12:33:34.000000000 +0200
++++ asterisk-1.4.14~dfsg/include/asterisk/pbx.h	2007-11-19 12:33:35.000000000 +0200
 @@ -145,6 +145,8 @@
   */
  struct ast_app *pbx_findapp(const char *app);
@@ -38,8 +38,8 @@
   *
 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
+--- asterisk-1.4.14~dfsg.orig/channels/chan_zap.c	2007-11-19 12:31:59.000000000 +0200
++++ asterisk-1.4.14~dfsg/channels/chan_zap.c	2007-11-19 12:48:21.000000000 +0200
 @@ -11,6 +11,10 @@
   * the project provides a web site, mailing lists and IRC
   * channels for your use.
@@ -69,17 +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 char defaultcic[64] = "";
- static char defaultozz[64] = "";
- 
-+static char nocid[256] = "No CID available";
-+static char withheldcid[256] = "CID withheld";
-+
- static char progzone[10] = "";
- 
- static int distinctiveringaftercid = 0;
-@@ -215,8 +224,6 @@
+@@ -215,8 +221,6 @@
  #ifdef PRI_GETSET_TIMERS
  static int pritimers[PRI_MAX_TIMERS];
  #endif
@@ -88,7 +78,7 @@
  #endif
  
  /*! \brief Wait up to 16 seconds for first digit (FXO logic) */
-@@ -234,10 +241,6 @@
+@@ -234,10 +238,6 @@
  
  static int ifcount = 0;
  
@@ -99,7 +89,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 @@
+@@ -252,6 +252,7 @@
  
  static int zt_sendtext(struct ast_channel *c, const char *text);
  
@@ -107,7 +97,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 @@
+@@ -296,6 +297,27 @@
  #define PRI_SPAN(p) (((p) >> 8) & 0xff)
  #define PRI_EXPLICIT(p) (((p) >> 16) & 0x01)
  
@@ -135,16 +125,16 @@
  struct zt_pri {
  	pthread_t master;						/*!< Thread of master */
  	ast_mutex_t lock;						/*!< Mutex */
-@@ -309,6 +334,8 @@
+@@ -309,6 +331,8 @@
  	int nsf;							/*!< Network-Specific Facilities */
  	int dialplan;							/*!< Dialing plan */
  	int localdialplan;						/*!< Local dialing plan */
-+ 	char nocid[256];
-+ 	char withheldcid[256];
++ 	char nocid[AST_MAX_EXTENSION];					/*!< CallerID string to use if none provided */
++ 	char withheldcid[AST_MAX_EXTENSION];				/*!< CallerID string to use if CallerID is withheld */
  	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 @@
+@@ -320,6 +344,7 @@
  	int prilogicalspan;						/*!< Logical span number within trunk group */
  	int numchans;							/*!< Num of channels we represent */
  	int overlapdial;						/*!< In overlap dialing mode */
@@ -152,7 +142,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 @@
+@@ -335,6 +360,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 */
@@ -162,7 +152,7 @@
  };
  
  
-@@ -452,6 +483,8 @@
+@@ -452,6 +480,8 @@
  	unsigned int echocanbridged:1;
  	unsigned int echocanon:1;
  	unsigned int faxhandled:1;			/*!< Has a fax tone already been handled? */
@@ -171,7 +161,7 @@
  	unsigned int firstradio:1;
  	unsigned int hanguponpolarityswitch:1;
  	unsigned int hardwaredtmf:1;
-@@ -465,7 +498,8 @@
+@@ -465,7 +495,8 @@
  	unsigned int overlapdial:1;
  	unsigned int permcallwaiting:1;
  	unsigned int permhidecallerid:1;		/*!< Whether to hide our outgoing caller ID or not */
@@ -181,7 +171,7 @@
  	unsigned int priexclusive:1;
  	unsigned int pulse:1;
  	unsigned int pulsedial:1;			/*!< whether a pulse dial phone is detected */
-@@ -502,6 +536,7 @@
+@@ -502,6 +533,7 @@
  #endif
  	char cid_num[AST_MAX_EXTENSION];
  	int cid_ton;					/*!< Type Of Number (TON) */
@@ -189,7 +179,7 @@
  	char cid_name[AST_MAX_EXTENSION];
  	char lastcid_num[AST_MAX_EXTENSION];
  	char lastcid_name[AST_MAX_EXTENSION];
-@@ -567,6 +602,8 @@
+@@ -567,6 +599,8 @@
  	struct zt_pvt *bearer;
  	struct zt_pvt *realcall;
  	q931_call *call;
@@ -198,7 +188,14 @@
  	int prioffset;
  	int logicalspan;
  #endif	
-@@ -617,6 +654,7 @@
+@@ -612,11 +646,14 @@
+ 			.minunused = 2,
+ 			.idleext = "",
+ 			.idledial = "",
++			.nocid = "No CID available",
++			.withheldcid = "CID withheld",
+ 			.internationalprefix = "",
+ 			.nationalprefix = "",
  			.localprefix = "",
  			.privateprefix = "",
  			.unknownprefix = "",
@@ -206,7 +203,7 @@
  
  			.resetinterval = 3600
  		},
-@@ -628,6 +666,8 @@
+@@ -628,6 +665,8 @@
  			.mohinterpret = "default",
  			.mohsuggest = "",
  			.transfertobusy = 1,
@@ -215,7 +212,7 @@
  
  			.cid_signalling = CID_SIG_BELL,
  			.cid_start = CID_START_RING,
-@@ -682,6 +722,8 @@
+@@ -682,6 +721,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); 
@@ -224,7 +221,7 @@
  
  static const struct ast_channel_tech zap_tech = {
  	.type = "Zap",
-@@ -702,6 +744,7 @@
+@@ -702,6 +743,7 @@
  	.fixup = zt_fixup,
  	.setoption = zt_setoption,
  	.func_channel_read = zt_func_read,
@@ -232,7 +229,7 @@
  };
  
  #ifdef HAVE_PRI
-@@ -713,6 +756,13 @@
+@@ -713,6 +755,13 @@
  struct zt_pvt *round_robin[32];
  
  #ifdef HAVE_PRI
@@ -246,7 +243,7 @@
  static inline int pri_grab(struct zt_pvt *pvt, struct zt_pri *pri)
  {
  	int res;
-@@ -760,6 +810,112 @@
+@@ -760,6 +809,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) */)
  
@@ -359,7 +356,7 @@
  static int zt_get_index(struct ast_channel *ast, struct zt_pvt *p, int nullok)
  {
  	int res;
-@@ -1415,12 +1571,16 @@
+@@ -1415,12 +1570,16 @@
  	int res;
  	if (!p)
  		return;
@@ -377,7 +374,7 @@
  		return;
  	}
  	if (p->echocancel) {
-@@ -1447,7 +1607,7 @@
+@@ -1447,7 +1606,7 @@
  {
  	int x;
  	int res;
@@ -386,7 +383,7 @@
  		x = p->echotraining;
  		res = ioctl(p->subs[SUB_REAL].zfd, ZT_ECHOTRAIN, &x);
  		if (res)
-@@ -1808,7 +1968,12 @@
+@@ -1808,7 +1967,12 @@
  		ast_log(LOG_WARNING, "Unable to flush input on channel %d\n", p->channel);
  	p->outgoing = 1;
  
@@ -400,7 +397,7 @@
  
  	mysig = p->sig;
  	if (p->outsigmod > -1)
-@@ -2039,6 +2204,7 @@
+@@ -2039,6 +2203,7 @@
  	case SIG_PRI:
  		/* We'll get it in a moment -- but use dialdest to store pre-setup_ack digits */
  		p->dialdest[0] = '\0';
@@ -408,7 +405,7 @@
  		break;
  	default:
  		ast_log(LOG_DEBUG, "not yet implemented\n");
-@@ -2059,6 +2225,12 @@
+@@ -2059,6 +2224,12 @@
  		const char *rr_str;
  		int redirect_reason;
  
@@ -421,7 +418,7 @@
  		c = strchr(dest, '/');
  		if (c)
  			c++;
-@@ -2081,6 +2253,7 @@
+@@ -2081,6 +2252,7 @@
  			ast_mutex_unlock(&p->lock);
  			return -1;
  		}
@@ -429,7 +426,7 @@
  		if (mysig != SIG_FXSKS) {
  			p->dop.op = ZT_DIAL_OP_REPLACE;
  			s = strchr(c + p->stripmsd, 'w');
-@@ -2104,6 +2277,8 @@
+@@ -2104,6 +2276,8 @@
  			pri_rel(p->pri);
  			ast_mutex_unlock(&p->lock);
  			return -1;
@@ -438,7 +435,7 @@
  		}
  		if (!(sr = pri_sr_new())) {
  			ast_log(LOG_WARNING, "Failed to allocate setup request channel %d\n", p->channel);
-@@ -2133,7 +2308,7 @@
+@@ -2133,7 +2307,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 : 
@@ -447,7 +444,7 @@
  		if (p->pri->facilityenable)
  			pri_facility_enable(p->pri->pri);
  
-@@ -2397,8 +2572,10 @@
+@@ -2397,8 +2571,10 @@
  	}
  	if (newslot < 0) {
  		newslot = 0;
@@ -459,7 +456,7 @@
  	}
  	if (old && (oldslot != newslot))
  		ast_log(LOG_NOTICE, "Switching from from d-channel %d to channel %d!\n",
-@@ -2408,6 +2585,16 @@
+@@ -2408,6 +2584,16 @@
  }
  #endif
  
@@ -476,7 +473,7 @@
  static int zt_hangup(struct ast_channel *ast)
  {
  	int res;
-@@ -2455,8 +2642,7 @@
+@@ -2455,8 +2641,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);
@@ -486,7 +483,7 @@
  	if (index > -1) {
  		/* Real channel, do some fixup */
  		p->subs[index].owner = NULL;
-@@ -2558,6 +2744,7 @@
+@@ -2558,6 +2743,7 @@
  	}
  
  	if (!p->subs[SUB_REAL].owner && !p->subs[SUB_CALLWAIT].owner && !p->subs[SUB_THREEWAY].owner) {
@@ -494,7 +491,7 @@
  		p->owner = NULL;
  		p->ringt = 0;
  		p->distinctivering = 0;
-@@ -2600,7 +2787,7 @@
+@@ -2600,7 +2786,7 @@
  						pri_call_set_useruser(p->call, useruser);
  #endif
  
@@ -503,7 +500,7 @@
  						p->call = NULL;
  						if (p->bearer) 
  							p->bearer->call = NULL;
-@@ -2620,7 +2807,28 @@
+@@ -2620,7 +2806,28 @@
  							if (atoi(cause))
  								icause = atoi(cause);
  						}
@@ -533,7 +530,7 @@
  					}
  					if (res < 0) 
  						ast_log(LOG_WARNING, "pri_disconnect failed\n");
-@@ -2804,10 +3012,14 @@
+@@ -2804,10 +3011,14 @@
  			p->proceeding = 1;
  			res = pri_answer(p->pri->pri, p->call, 0, !p->digital);
  			pri_rel(p->pri);
@@ -548,7 +545,7 @@
  		break;
  #endif
  	case 0:
-@@ -3444,6 +3656,15 @@
+@@ -3444,6 +3655,15 @@
  {
  	struct zt_pvt *p = newchan->tech_pvt;
  	int x;
@@ -564,7 +561,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) {
-@@ -3653,8 +3874,10 @@
+@@ -3653,8 +3873,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);
@@ -576,7 +573,7 @@
  			} else if (option_debug)
  				ast_log(LOG_DEBUG, "Already in a fax extension, not redirecting\n");
  		} else if (option_debug)
-@@ -3808,7 +4031,7 @@
+@@ -3808,7 +4030,7 @@
  				if (p->call) {
  					if (p->pri && p->pri->pri) {
  						if (!pri_grab(p, p->pri)) {
@@ -585,7 +582,7 @@
  							pri_destroycall(p->pri->pri, p->call);
  							p->call = NULL;
  							pri_rel(p->pri);
-@@ -4867,7 +5090,7 @@
+@@ -4867,7 +5089,7 @@
  		p->subs[index].f.data = NULL;
  		p->subs[index].f.datalen= 0;
  	}
@@ -594,7 +591,7 @@
  		/* Perform busy detection. etc on the zap line */
  		f = ast_dsp_process(ast, p->dsp, &p->subs[index].f);
  		if (f) {
-@@ -4879,8 +5102,9 @@
+@@ -4879,8 +5101,9 @@
  				}
  			} else if (f->frametype == AST_FRAME_DTMF) {
  #ifdef HAVE_PRI
@@ -606,7 +603,7 @@
  					f->frametype = AST_FRAME_NULL;
  					f->subclass = 0;
  				}
-@@ -4955,7 +5179,9 @@
+@@ -4955,7 +5178,9 @@
  #endif
  	/* Write a frame of (presumably voice) data */
  	if (frame->frametype != AST_FRAME_VOICE) {
@@ -617,7 +614,7 @@
  			ast_log(LOG_WARNING, "Don't know what to do with frame type '%d'\n", frame->frametype);
  		return 0;
  	}
-@@ -5023,7 +5249,7 @@
+@@ -5023,7 +5248,7 @@
  		switch (condition) {
  		case AST_CONTROL_BUSY:
  #ifdef HAVE_PRI
@@ -626,7 +623,7 @@
  				chan->hangupcause = AST_CAUSE_USER_BUSY;
  				chan->_softhangup |= AST_SOFTHANGUP_DEV;
  				res = 0;
-@@ -5105,7 +5331,7 @@
+@@ -5105,7 +5330,7 @@
  		case AST_CONTROL_CONGESTION:
  			chan->hangupcause = AST_CAUSE_CONGESTION;
  #ifdef HAVE_PRI
@@ -635,7 +632,7 @@
  				chan->hangupcause = AST_CAUSE_SWITCH_CONGESTION;
  				chan->_softhangup |= AST_SOFTHANGUP_DEV;
  				res = 0;
-@@ -5299,8 +5525,12 @@
+@@ -5299,8 +5524,12 @@
  	if (state == AST_STATE_RING)
  		tmp->rings = 1;
  	tmp->tech_pvt = i;
@@ -649,7 +646,7 @@
  		tmp->callgroup = i->callgroup;
  		tmp->pickupgroup = i->pickupgroup;
  	}
-@@ -5430,6 +5660,7 @@
+@@ -5430,6 +5659,7 @@
  	int len = 0;
  	int res;
  	int index;
@@ -657,7 +654,7 @@
  
  	/* in the bizarre case where the channel has become a zombie before we
  	   even get started here, abort safely
-@@ -5458,10 +5689,17 @@
+@@ -5458,10 +5688,17 @@
  		len = strlen(exten);
  		res = 0;
  		while ((len < AST_MAX_EXTENSION-1) && ast_matchmore_extension(chan, chan->context, exten, 1, p->cid_num)) {
@@ -678,7 +675,7 @@
  			if (ast_exists_extension(chan, chan->context, exten, 1, p->cid_num))
  				timeout = matchdigittimeout;
  			else
-@@ -6669,18 +6907,44 @@
+@@ -6669,18 +6906,44 @@
  		break;
  	case ZT_EVENT_NOALARM:
  		i->inalarm = 0;
@@ -723,7 +720,7 @@
  		/* fall thru intentionally */
  	case ZT_EVENT_ONHOOK:
  		if (i->radio)
-@@ -6724,8 +6988,10 @@
+@@ -6724,8 +6987,10 @@
  			zt_set_hook(i->subs[SUB_REAL].zfd, ZT_ONHOOK);
  			break;
  		case SIG_PRI:
@@ -736,7 +733,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);
-@@ -7017,6 +7283,8 @@
+@@ -7017,6 +7282,8 @@
  		} else {
  			if (si->totalchans == 31) { /* if it's an E1 */
  				pris[*span].dchannels[0] = 16 + offset;
@@ -745,7 +742,7 @@
  			} else {
  				pris[*span].dchannels[0] = 24 + offset;
  			}
-@@ -7269,6 +7537,11 @@
+@@ -7269,6 +7536,11 @@
  							destroy_zt_pvt(&tmp);
  							return NULL;
  						}
@@ -757,7 +754,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);
-@@ -7286,6 +7559,11 @@
+@@ -7286,6 +7558,11 @@
  							return NULL;
  						}
  						pris[span].nodetype = conf.pri.nodetype;
@@ -769,7 +766,7 @@
  						pris[span].switchtype = myswitchtype;
  						pris[span].nsf = conf.pri.nsf;
  						pris[span].dialplan = conf.pri.dialplan;
-@@ -7294,9 +7572,14 @@
+@@ -7294,9 +7571,14 @@
  						pris[span].minunused = conf.pri.minunused;
  						pris[span].minidle = conf.pri.minidle;
  						pris[span].overlapdial = conf.pri.overlapdial;
@@ -779,12 +776,12 @@
  						pris[span].facilityenable = conf.pri.facilityenable;
  						ast_copy_string(pris[span].idledial, conf.pri.idledial, sizeof(pris[span].idledial));
  						ast_copy_string(pris[span].idleext, conf.pri.idleext, sizeof(pris[span].idleext));
-+  						ast_copy_string(pris[span].nocid, conf.pri.nocid, sizeof(pris[span].nocid) - 1);
-+  						ast_copy_string(pris[span].withheldcid, conf.pri.withheldcid, sizeof(pris[span].withheldcid) - 1);
++  						ast_copy_string(pris[span].nocid, conf.pri.nocid, sizeof(pris[span].nocid));
++  						ast_copy_string(pris[span].withheldcid, conf.pri.withheldcid, sizeof(pris[span].withheldcid));
  						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));
-@@ -7432,6 +7715,7 @@
+@@ -7432,6 +7714,7 @@
  		tmp->restrictcid = conf.chan.restrictcid;
  		tmp->use_callingpres = conf.chan.use_callingpres;
  		tmp->priindication_oob = conf.chan.priindication_oob;
@@ -792,7 +789,7 @@
  		tmp->priexclusive = conf.chan.priexclusive;
  		if (tmp->usedistinctiveringdetection) {
  			if (!tmp->use_callerid) {
-@@ -7711,7 +7995,7 @@
+@@ -7711,7 +7994,7 @@
  			break;
  		if (!backwards && (x >= pri->numchans))
  			break;
@@ -801,7 +798,7 @@
  			ast_log(LOG_DEBUG, "Found empty available channel %d/%d\n", 
  				pri->pvts[x]->logicalspan, pri->pvts[x]->prioffset);
  			return x;
-@@ -7907,6 +8191,11 @@
+@@ -7907,6 +8190,11 @@
  					p->digital = 1;
  					if (tmp)
  						tmp->transfercapability = AST_TRANS_CAP_DIGITAL;
@@ -813,7 +810,7 @@
  				} else {
  					ast_log(LOG_WARNING, "Unknown option '%c' in '%s'\n", opt, (char *)data);
  				}
-@@ -7940,13 +8229,14 @@
+@@ -7940,13 +8228,14 @@
  				*cause = AST_CAUSE_BUSY;
  		} else if (groupmatched) {
  			*cause = AST_CAUSE_CONGESTION;
@@ -829,7 +826,7 @@
  #ifdef HAVE_PRI
  static struct zt_pvt *pri_find_crv(struct zt_pri *pri, int crv)
  {
-@@ -7960,6 +8250,58 @@
+@@ -7960,6 +8249,58 @@
  	return NULL;
  }
  
@@ -888,7 +885,7 @@
  
  static int pri_find_principle(struct zt_pri *pri, int channel)
  {
-@@ -7991,7 +8333,9 @@
+@@ -7991,7 +8332,9 @@
  static int pri_fixup_principle(struct zt_pri *pri, int principle, q931_call *c)
  {
  	int x;
@@ -898,7 +895,7 @@
  	if (!c) {
  		if (principle < 0)
  			return -1;
-@@ -8019,6 +8363,7 @@
+@@ -8019,6 +8362,7 @@
  				}
  				/* Fix it all up now */
  				pri->pvts[principle]->owner = pri->pvts[x]->owner;
@@ -906,7 +903,7 @@
  				if (pri->pvts[principle]->owner) {
  					ast_string_field_build(pri->pvts[principle]->owner, name, 
  							       "Zap/%d:%d-%d", pri->trunkgroup,
-@@ -8026,13 +8371,48 @@
+@@ -8026,13 +8370,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;
@@ -956,7 +953,7 @@
  			}
  			return principle;
  		}
-@@ -8061,7 +8441,9 @@
+@@ -8061,7 +8440,9 @@
  		}
  		crv = crv->next;
  	}
@@ -967,7 +964,7 @@
  	return -1;
  }
  
-@@ -8120,86 +8502,21 @@
+@@ -8120,86 +8501,21 @@
  #ifndef PRI_RESTART
  #error "Upgrade your libpri"
  #endif
@@ -1061,7 +1058,7 @@
  	do {
  		pri->resetpos++;
  	} while ((pri->resetpos < pri->numchans) &&
-@@ -8283,13 +8600,30 @@
+@@ -8283,13 +8599,30 @@
  	}
  }
  
@@ -1099,7 +1096,7 @@
  }
  
  static void *pri_dchannel(void *vpri)
-@@ -8469,15 +8803,44 @@
+@@ -8469,15 +8802,44 @@
  					/* Check for an event */
  					x = 0;
  					res = ioctl(pri->fds[which], ZT_GETEVENT, &x);
@@ -1147,7 +1144,7 @@
  					}
  				
  					if (option_debug)
-@@ -8489,8 +8852,7 @@
+@@ -8489,8 +8851,7 @@
  					break;
  			}
  		} else if (errno != EINTR)
@@ -1157,7 +1154,7 @@
  		if (e) {
  			if (pri->debug)
  				pri_dump_event(pri->dchans[which], e);
-@@ -8503,32 +8865,86 @@
+@@ -8503,32 +8864,86 @@
  
  			switch (e->e) {
  			case PRI_EVENT_DCHAN_UP:
@@ -1261,7 +1258,7 @@
  					pri->resetting = 0;
  					/* Hangup active channels and put them in alarm mode */
  					for (i = 0; i < pri->numchans; i++) {
-@@ -8538,12 +8954,13 @@
+@@ -8538,12 +8953,13 @@
  								/* T309 is not enabled : hangup calls when alarm occurs */
  								if (p->call) {
  									if (p->pri && p->pri->pri) {
@@ -1276,7 +1273,7 @@
  								if (p->realcall) {
  									pri_hangup_all(p->realcall, pri);
  								} else if (p->owner)
-@@ -8552,6 +8969,7 @@
+@@ -8552,6 +8968,7 @@
  							p->inalarm = 1;
  						}
  					}
@@ -1284,7 +1281,7 @@
  				}
  				break;
  			case PRI_EVENT_RESTART:
-@@ -8586,8 +9004,8 @@
+@@ -8586,8 +9003,8 @@
  								pri_destroycall(pri->pri, pri->pvts[x]->call);
  								pri->pvts[x]->call = NULL;
  							}
@@ -1295,7 +1292,7 @@
   							else if (pri->pvts[x]->owner)
  								pri->pvts[x]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
  							ast_mutex_unlock(&pri->pvts[x]->lock);
-@@ -8621,7 +9039,6 @@
+@@ -8621,7 +9038,6 @@
  					}
  				}
  				break;
@@ -1303,7 +1300,7 @@
  			case PRI_EVENT_INFO_RECEIVED:
  				chanpos = pri_find_principle(pri, e->ring.channel);
  				if (chanpos < 0) {
-@@ -8630,9 +9047,11 @@
+@@ -8630,9 +9046,11 @@
  				} else {
  					chanpos = pri_fixup_principle(pri, chanpos, e->ring.call);
  					if (chanpos > -1) {
@@ -1316,7 +1313,7 @@
  							/* how to do that */
  							int digitlen = strlen(e->ring.callednum);
  							char digit;
-@@ -8644,6 +9063,14 @@
+@@ -8644,6 +9062,14 @@
  									zap_queue_frame(pri->pvts[chanpos], &f, pri);
  								}
  							}
@@ -1331,7 +1328,7 @@
  						}
  						ast_mutex_unlock(&pri->pvts[chanpos]->lock);
  					}
-@@ -8651,36 +9078,59 @@
+@@ -8651,36 +9077,59 @@
  				break;
  			case PRI_EVENT_RING:
  				crv = NULL;
@@ -1407,7 +1404,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));
-@@ -8694,13 +9144,14 @@
+@@ -8694,13 +9143,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);
@@ -1423,7 +1420,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) {
-@@ -8725,29 +9176,78 @@
+@@ -8725,29 +9175,78 @@
  					}
  					apply_plan_to_number(pri->pvts[chanpos]->rdnis, sizeof(pri->pvts[chanpos]->rdnis), pri,
  							     e->ring.redirectingnum, e->ring.callingplanrdnis);
@@ -1434,10 +1431,10 @@
 +					    case PRES_PROHIB_USER_NUMBER_PASSED_SCREEN:
 +					    case PRES_PROHIB_USER_NUMBER_FAILED_SCREEN:
 +					    case PRES_PROHIB_NETWORK_NUMBER:
-+						strncpy(pri->pvts[chanpos]->cid_name, pri->withheldcid, sizeof(pri->pvts[chanpos]->cid_name));
++						ast_copy_string(pri->pvts[chanpos]->cid_name, pri->withheldcid, sizeof(pri->pvts[chanpos]->cid_name));
 +						break;
 +					    case PRES_NUMBER_NOT_AVAILABLE:
-+						strncpy(pri->pvts[chanpos]->cid_name, pri->nocid, sizeof(pri->pvts[chanpos]->cid_name));
++						ast_copy_string(pri->pvts[chanpos]->cid_name, pri->nocid, sizeof(pri->pvts[chanpos]->cid_name));
 +						break;
 +					}
  					/* If immediate=yes go to s|1 */
@@ -1515,7 +1512,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)) {
-@@ -8766,19 +9266,36 @@
+@@ -8766,19 +9265,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);
@@ -1555,7 +1552,7 @@
  						/* Get the use_callingpres state */
  						pri->pvts[chanpos]->callingpres = e->ring.callingpres;
  					
-@@ -8790,14 +9307,31 @@
+@@ -8790,14 +9306,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);
@@ -1587,7 +1584,7 @@
  							if (e->ring.ani2 >= 0) {
  								snprintf(ani2str, 5, "%.2d", e->ring.ani2);
  								pbx_builtin_setvar_helper(c, "ANI2", ani2str);
-@@ -8819,8 +9353,8 @@
+@@ -8819,8 +9352,8 @@
  							pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
  							if (c && !ast_pthread_create(&threadid, &attr, ss_thread, c)) {
  								if (option_verbose > 2)
@@ -1598,7 +1595,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", 
-@@ -8828,15 +9362,19 @@
+@@ -8828,15 +9361,19 @@
  								if (c)
  									ast_hangup(c);
  								else {
@@ -1619,7 +1616,7 @@
  							ast_mutex_lock(&pri->lock);
  							if (c) {
  								char calledtonstr[10];
-@@ -8857,23 +9395,40 @@
+@@ -8857,23 +9394,40 @@
  								snprintf(calledtonstr, sizeof(calledtonstr)-1, "%d", e->ring.calledplan);
  								pbx_builtin_setvar_helper(c, "CALLEDTON", calledtonstr);
  								if (option_verbose > 2)
@@ -1664,7 +1661,7 @@
  						pri->pvts[chanpos]->call = NULL;
  						pri->pvts[chanpos]->exten[0] = '\0';
  					}
-@@ -8882,9 +9437,9 @@
+@@ -8882,9 +9436,9 @@
  					ast_mutex_unlock(&pri->pvts[chanpos]->lock);
  				} else {
  					if (e->ring.flexible)
@@ -1676,7 +1673,7 @@
  				}
  				break;
  			case PRI_EVENT_RINGING:
-@@ -8900,7 +9455,7 @@
+@@ -8900,7 +9454,7 @@
  					} else {
  						ast_mutex_lock(&pri->pvts[chanpos]->lock);
  						if (ast_strlen_zero(pri->pvts[chanpos]->dop.dialstr)) {
@@ -1685,7 +1682,7 @@
  							pri->pvts[chanpos]->subs[SUB_REAL].needringing = 1;
  							pri->pvts[chanpos]->alerting = 1;
  						} else
-@@ -8929,9 +9484,16 @@
+@@ -8929,9 +9483,16 @@
  				}
  				break;
  			case PRI_EVENT_PROGRESS:
@@ -1703,7 +1700,7 @@
  #ifdef PRI_PROGRESS_MASK
  					if ((!pri->pvts[chanpos]->progress) || (e->proceeding.progressmask & PRI_PROG_INBAND_AVAILABLE)) {
  #else
-@@ -8978,6 +9540,12 @@
+@@ -8978,6 +9539,12 @@
  			case PRI_EVENT_PROCEEDING:
  				chanpos = pri_find_principle(pri, e->proceeding.channel);
  				if (chanpos > -1) {
@@ -1716,7 +1713,7 @@
  					if (!pri->pvts[chanpos]->proceeding) {
  						struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_PROCEEDING, };
  						
-@@ -9025,6 +9593,295 @@
+@@ -9025,6 +9592,295 @@
  					}
  				}
  				break;				
@@ -2012,7 +2009,7 @@
  			case PRI_EVENT_ANSWER:
  				chanpos = pri_find_principle(pri, e->answer.channel);
  				if (chanpos < 0) {
-@@ -9037,6 +9894,7 @@
+@@ -9037,6 +9893,7 @@
  							PRI_SPAN(e->answer.channel), PRI_CHANNEL(e->answer.channel), pri->span);
  					} else {
  						ast_mutex_lock(&pri->pvts[chanpos]->lock);
@@ -2020,7 +2017,7 @@
  						/* Now we can do call progress detection */
  
  						/* We changed this so it turns on the DSP no matter what... progress or no progress.
-@@ -9066,11 +9924,16 @@
+@@ -9066,11 +9923,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) {
@@ -2038,7 +2035,7 @@
  						}
  
  #ifdef SUPPORT_USERUSER
-@@ -9124,20 +9987,29 @@
+@@ -9124,20 +9986,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 {
@@ -2075,7 +2072,7 @@
  
  #ifdef SUPPORT_USERUSER
  						if (pri->pvts[chanpos]->owner && !ast_strlen_zero(e->hangup.useruserinfo)) {
-@@ -9147,8 +10019,20 @@
+@@ -9147,8 +10018,20 @@
  
  						ast_mutex_unlock(&pri->pvts[chanpos]->lock);
  					} else {
@@ -2098,7 +2095,7 @@
  					}
  				} 
  				break;
-@@ -9158,15 +10042,23 @@
+@@ -9158,15 +10041,23 @@
  			case PRI_EVENT_HANGUP_REQ:
  				chanpos = pri_find_principle(pri, e->hangup.channel);
  				if (chanpos < 0) {
@@ -2125,7 +2122,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;
-@@ -9193,16 +10085,86 @@
+@@ -9193,16 +10084,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");
@@ -2216,7 +2213,7 @@
  						}
  
  #ifdef SUPPORT_USERUSER
-@@ -9213,9 +10175,39 @@
+@@ -9213,9 +10174,39 @@
  
  						ast_mutex_unlock(&pri->pvts[chanpos]->lock);
  					} else {
@@ -2257,7 +2254,7 @@
  				break;
  			case PRI_EVENT_HANGUP_ACK:
  				chanpos = pri_find_principle(pri, e->hangup.channel);
-@@ -9227,6 +10219,7 @@
+@@ -9227,6 +10218,7 @@
  					if (chanpos > -1) {
  						ast_mutex_lock(&pri->pvts[chanpos]->lock);
  						pri->pvts[chanpos]->call = NULL;
@@ -2265,7 +2262,7 @@
  						pri->pvts[chanpos]->resetting = 0;
  						if (pri->pvts[chanpos]->owner) {
  							if (option_verbose > 2) 
-@@ -9240,7 +10233,9 @@
+@@ -9240,7 +10232,9 @@
  #endif
  
  						ast_mutex_unlock(&pri->pvts[chanpos]->lock);
@@ -2275,7 +2272,7 @@
  				}
  				break;
  			case PRI_EVENT_CONFIG_ERR:
-@@ -9330,10 +10325,22 @@
+@@ -9330,10 +10324,22 @@
  					ast_mutex_lock(&pri->pvts[chanpos]->lock);
  					switch (e->notify.info) {
  					case PRI_NOTIFY_REMOTE_HOLD:
@@ -2298,7 +2295,7 @@
  						f.subclass = AST_CONTROL_UNHOLD;
  						zap_queue_frame(pri->pvts[chanpos], &f, pri);
  						break;
-@@ -9341,6 +10348,77 @@
+@@ -9341,6 +10347,77 @@
  					ast_mutex_unlock(&pri->pvts[chanpos]->lock);
  				}
  				break;
@@ -2376,7 +2373,7 @@
  			default:
  				ast_log(LOG_DEBUG, "Event: %d\n", e->e);
  			}
-@@ -9402,7 +10480,7 @@
+@@ -9402,7 +10479,7 @@
  			pri->fds[i] = -1;
  			return -1;
  		}
@@ -2385,7 +2382,7 @@
  		/* Force overlap dial if we're doing GR-303! */
  		if (pri->switchtype == PRI_SWITCH_GR303_TMC)
  			pri->overlapdial = 1;
-@@ -9470,39 +10548,77 @@
+@@ -9470,39 +10547,77 @@
  
  static int handle_pri_set_debug_file(int fd, int argc, char **argv)
  {
@@ -2485,7 +2482,7 @@
  	}
  
  	return RESULT_SUCCESS;
-@@ -9536,6 +10652,7 @@
+@@ -9536,6 +10651,7 @@
  
  
  
@@ -2493,7 +2490,7 @@
  static int handle_pri_no_debug(int fd, int argc, char *argv[])
  {
  	int span;
-@@ -9685,10 +10802,6 @@
+@@ -9685,10 +10801,6 @@
  		}
  
  	}
@@ -2504,7 +2501,7 @@
  	    
  	if (!count) 
  		ast_cli(fd, "No debug set or no PRI running\n");
-@@ -9715,6 +10828,18 @@
+@@ -9715,6 +10827,18 @@
  	"Usage: pri show spans\n"
  	"       Displays PRI Information\n";
  
@@ -2523,7 +2520,7 @@
  static struct ast_cli_entry zap_pri_cli[] = {
  	{ { "pri", "debug", "span", NULL },
  	handle_pri_debug, "Enables PRI debugging on a span",
-@@ -9739,6 +10864,15 @@
+@@ -9739,6 +10863,15 @@
  	{ { "pri", "show", "debug", NULL },
  	handle_pri_show_debug, "Displays current PRI debug settings" },
  
@@ -2539,7 +2536,7 @@
  	{ { "pri", "set", "debug", "file", NULL },
  	handle_pri_set_debug_file, "Sends PRI debug output to the specified file" },
  
-@@ -9746,8 +10880,76 @@
+@@ -9746,8 +10879,76 @@
  	handle_pri_set_debug_file, "Ends PRI debug output to file" },
  };
  
@@ -2616,7 +2613,7 @@
  static int zap_destroy_channel(int fd, int argc, char **argv)
  {
  	int channel;
-@@ -10328,8 +11530,11 @@
+@@ -10328,8 +11529,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);
@@ -2628,7 +2625,7 @@
  	ast_manager_unregister( "ZapDialOffhook" );
  	ast_manager_unregister( "ZapHangup" );
  	ast_manager_unregister( "ZapTransfer" );
-@@ -10831,6 +12036,22 @@
+@@ -10831,6 +12035,22 @@
  					confp->chan.sig = SIG_GR303FXSKS;
  					confp->chan.radio = 0;
  					confp->pri.nodetype = PRI_CPE;
@@ -2651,7 +2648,7 @@
  #endif
  				} else {
  					ast_log(LOG_ERROR, "Unknown signalling method '%s'\n", v->value);
-@@ -10943,9 +12164,21 @@
+@@ -10943,9 +12163,21 @@
  					confp->chan.priindication_oob = 1;
  				else if (!strcasecmp(v->value, "inband"))
  					confp->chan.priindication_oob = 0;
@@ -2674,18 +2671,18 @@
  			} else if (!strcasecmp(v->name, "priexclusive")) {
  				confp->chan.priexclusive = ast_true(v->value);
  			} else if (!strcasecmp(v->name, "internationalprefix")) {
-@@ -10958,6 +12191,10 @@
+@@ -10958,6 +12190,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));
 + 			} else if (!strcasecmp(v->name, "nocid")) {
-+  				ast_copy_string(confp->pri.nocid, v->value, sizeof(confp->pri.nocid) - 1);
++  				ast_copy_string(confp->pri.nocid, v->value, sizeof(confp->pri.nocid));
 +  			} else if (!strcasecmp(v->name, "withheldcid")) {
-+  				ast_copy_string(confp->pri.withheldcid, v->value, sizeof(confp->pri.withheldcid) - 1);
++  				ast_copy_string(confp->pri.withheldcid, v->value, sizeof(confp->pri.withheldcid));
  			} else if (!strcasecmp(v->name, "resetinterval")) {
  				if (!strcasecmp(v->value, "never"))
  					confp->pri.resetinterval = -1;
-@@ -10974,6 +12211,8 @@
+@@ -10974,6 +12210,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));
@@ -2694,7 +2691,7 @@
  			} else if (!strcasecmp(v->name, "overlapdial")) {
  				confp->pri.overlapdial = ast_true(v->value);
  			} else if (!strcasecmp(v->name, "pritimer")) {
-@@ -11275,6 +12514,7 @@
+@@ -11275,6 +12513,7 @@
  #ifdef HAVE_PRI
  	if (!reload) {
  		for (x = 0; x < NUM_SPANS; x++) {
@@ -2702,7 +2699,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);
-@@ -11322,7 +12562,10 @@
+@@ -11322,7 +12561,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));
@@ -2713,7 +2710,7 @@
  	ast_cli_register_multiple(zap_cli, sizeof(zap_cli) / sizeof(struct ast_cli_entry));
  	
  	memset(round_robin, 0, sizeof(round_robin));
-@@ -11356,6 +12599,7 @@
+@@ -11356,6 +12598,7 @@
  	float scont = 0.0;
  	int index;
  
@@ -2723,8 +2720,8 @@
  		ast_log(LOG_WARNING, "Huh?  I don't exist?\n");
 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
+--- asterisk-1.4.14~dfsg.orig/configs/zapata.conf.sample	2007-11-19 12:31:59.000000000 +0200
++++ asterisk-1.4.14~dfsg/configs/zapata.conf.sample	2007-11-19 12:33:36.000000000 +0200
 @@ -123,9 +123,20 @@
  ; 
  ; outofband:      Signal Busy/Congestion out of band with RELEASE/DISCONNECT
@@ -2748,8 +2745,8 @@
  ; priexclusive = yes
 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
+--- asterisk-1.4.14~dfsg.orig/main/channel.c	2007-11-19 12:33:35.000000000 +0200
++++ asterisk-1.4.14~dfsg/main/channel.c	2007-11-19 12:33:36.000000000 +0200
 @@ -4173,6 +4173,10 @@
  			c1->name, c1->_bridge->name);
  		return -1;




More information about the Pkg-voip-commits mailing list