[Pkg-voip-commits] r5179 - in /asterisk/trunk/debian/patches: ./ bristuff/

paravoid at alioth.debian.org paravoid at alioth.debian.org
Thu Jan 31 13:09:40 UTC 2008


Author: paravoid
Date: Thu Jan 31 13:09:40 2008
New Revision: 5179

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=5179
Log:
Do a quilt refresh on all patches

Modified:
    asterisk/trunk/debian/patches/bristuff/ast-device-state-CID
    asterisk/trunk/debian/patches/bristuff/ast-send-message
    asterisk/trunk/debian/patches/bristuff/uniqueid-10-channel-ops-uniqueid
    asterisk/trunk/debian/patches/bristuff/uniqueid-40-manager
    asterisk/trunk/debian/patches/bristuff/zapata-bri+euroisdn
    asterisk/trunk/debian/patches/bristuff/zapata-gsm
    asterisk/trunk/debian/patches/bristuff/zapata_euroisdn_holded
    asterisk/trunk/debian/patches/bristuff/zapata_num_spans
    asterisk/trunk/debian/patches/use-libpri-bristuffed

Modified: asterisk/trunk/debian/patches/bristuff/ast-device-state-CID
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/bristuff/ast-device-state-CID?rev=5179&op=diff
==============================================================================
--- asterisk/trunk/debian/patches/bristuff/ast-device-state-CID (original)
+++ asterisk/trunk/debian/patches/bristuff/ast-device-state-CID Thu Jan 31 13:09:40 2008
@@ -113,7 +113,7 @@
  		} else {
 --- a/include/asterisk/channel.h
 +++ b/include/asterisk/channel.h
-@@ -590,8 +590,13 @@ int ast_channel_datastore_remove(struct 
+@@ -591,8 +591,13 @@ int ast_channel_datastore_remove(struct 
  /*! \brief Find a datastore on a channel */
  struct ast_datastore *ast_channel_datastore_find(struct ast_channel *chan, const struct ast_datastore_info *info, char *uid);
  

Modified: asterisk/trunk/debian/patches/bristuff/ast-send-message
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/bristuff/ast-send-message?rev=5179&op=diff
==============================================================================
--- asterisk/trunk/debian/patches/bristuff/ast-send-message (original)
+++ asterisk/trunk/debian/patches/bristuff/ast-send-message Thu Jan 31 13:09:40 2008
@@ -12,7 +12,7 @@
  
  	/*! \brief Display or send an image */
  	int (* const send_image)(struct ast_channel *chan, struct ast_frame *frame);
-@@ -671,6 +671,16 @@ struct ast_channel *ast_request_and_dial
+@@ -672,6 +672,16 @@ struct ast_channel *ast_request_and_dial
  
  struct ast_channel *__ast_request_and_dial(const char *type, int format, void *data, int timeout, int *reason, const char *cidnum, const char *cidname, struct outgoing_helper *oh);
  
@@ -29,7 +29,7 @@
  /*!\brief Register a channel technology (a new channel driver)
   * Called by a channel module to register the kind of channels it supports.
   * \param tech Structure defining channel technology or "type"
-@@ -887,10 +897,12 @@ int ast_set_write_format(struct ast_chan
+@@ -888,10 +898,12 @@ int ast_set_write_format(struct ast_chan
  /*! \brief Sends text to a channel 
   * Write text to a display on a channel
   * \param chan channel to act upon

Modified: asterisk/trunk/debian/patches/bristuff/uniqueid-10-channel-ops-uniqueid
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/bristuff/uniqueid-10-channel-ops-uniqueid?rev=5179&op=diff
==============================================================================
--- asterisk/trunk/debian/patches/bristuff/uniqueid-10-channel-ops-uniqueid (original)
+++ asterisk/trunk/debian/patches/bristuff/uniqueid-10-channel-ops-uniqueid Thu Jan 31 13:09:40 2008
@@ -2,7 +2,7 @@
 
 --- a/include/asterisk/channel.h
 +++ b/include/asterisk/channel.h
-@@ -659,6 +659,18 @@ void  ast_channel_free(struct ast_channe
+@@ -660,6 +660,18 @@ void  ast_channel_free(struct ast_channe
   */
  struct ast_channel *ast_request(const char *type, int format, void *data, int *status);
  
@@ -21,7 +21,7 @@
  /*!
   * \brief Request a channel of a given type, with data as optional information used 
   * by the low level module and attempt to place a call on it
-@@ -672,9 +684,9 @@ struct ast_channel *ast_request(const ch
+@@ -673,9 +685,9 @@ struct ast_channel *ast_request(const ch
   * \return Returns an ast_channel on success or no answer, NULL on failure.  Check the value of chan->_state
   * to know if the call was answered or not.
   */
@@ -33,7 +33,7 @@
  
  /*! \brief "Requests" a channel for sending a message
   * \param type type of channel to request
-@@ -959,6 +971,8 @@ struct ast_channel *ast_get_channel_by_e
+@@ -960,6 +972,8 @@ struct ast_channel *ast_get_channel_by_e
  /*! \brief Get next channel by exten (and optionally context) and lock it */
  struct ast_channel *ast_walk_channel_by_exten_locked(const struct ast_channel *chan, const char *exten,
  						     const char *context);

Modified: asterisk/trunk/debian/patches/bristuff/uniqueid-40-manager
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/bristuff/uniqueid-40-manager?rev=5179&op=diff
==============================================================================
--- asterisk/trunk/debian/patches/bristuff/uniqueid-40-manager (original)
+++ asterisk/trunk/debian/patches/bristuff/uniqueid-40-manager Thu Jan 31 13:09:40 2008
@@ -193,7 +193,7 @@
  #include <unistd.h>
  #ifdef POLLCOMPAT 
  #include "asterisk/poll-compat.h"
-@@ -1004,6 +1007,8 @@ int ast_waitfordigit_full(struct ast_cha
+@@ -1005,6 +1008,8 @@ int ast_waitfordigit_full(struct ast_cha
  int ast_readstring(struct ast_channel *c, char *s, int len, int timeout, int rtimeout, char *enders);
  int ast_readstring_full(struct ast_channel *c, char *s, int len, int timeout, int rtimeout, char *enders, int audiofd, int ctrlfd);
  

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=5179&op=diff
==============================================================================
--- asterisk/trunk/debian/patches/bristuff/zapata-bri+euroisdn (original)
+++ asterisk/trunk/debian/patches/bristuff/zapata-bri+euroisdn Thu Jan 31 13:09:40 2008
@@ -1,6 +1,6 @@
 --- a/include/asterisk/channel.h
 +++ b/include/asterisk/channel.h
-@@ -417,6 +417,7 @@
+@@ -420,6 +420,7 @@ struct ast_channel {
  	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;
@@ -21,7 +21,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.
-@@ -216,8 +220,6 @@
+@@ -216,8 +220,6 @@ static struct ast_channel inuse;
  #ifdef PRI_GETSET_TIMERS
  static int pritimers[PRI_MAX_TIMERS];
  #endif
@@ -30,7 +30,7 @@
  #endif
  
  /*! \brief Wait up to 16 seconds for first digit (FXO logic) */
-@@ -235,10 +237,6 @@
+@@ -235,10 +237,6 @@ AST_MUTEX_DEFINE_STATIC(iflock);
  
  static int ifcount = 0;
  
@@ -41,7 +41,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);
-@@ -253,6 +251,7 @@
+@@ -253,6 +251,7 @@ static enum ast_bridge_result zt_bridge(
  
  static int zt_sendtext(struct ast_channel *c, const char *text);
  
@@ -49,7 +49,7 @@
  /*! \brief Avoid the silly zt_getevent which ignores a bunch of events */
  static inline int zt_get_event(int fd)
  {
-@@ -297,6 +296,14 @@
+@@ -297,6 +296,14 @@ static int ringt_base = DEFAULT_RINGT;
  #define PRI_SPAN(p) (((p) >> 8) & 0xff)
  #define PRI_EXPLICIT(p) (((p) >> 16) & 0x01)
  
@@ -64,7 +64,7 @@
  struct zt_pri {
  	pthread_t master;						/*!< Thread of master */
  	ast_mutex_t lock;						/*!< Mutex */
-@@ -310,6 +317,8 @@
+@@ -310,6 +317,8 @@ struct zt_pri {
  	int nsf;							/*!< Network-Specific Facilities */
  	int dialplan;							/*!< Dialing plan */
  	int localdialplan;						/*!< Local dialing plan */
@@ -73,7 +73,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) */
-@@ -321,6 +330,7 @@
+@@ -321,6 +330,7 @@ struct zt_pri {
  	int prilogicalspan;						/*!< Logical span number within trunk group */
  	int numchans;							/*!< Num of channels we represent */
  	int overlapdial;						/*!< In overlap dialing mode */
@@ -81,7 +81,7 @@
  	int facilityenable;						/*!< Enable facility IEs */
  	struct pri *dchans[NUM_DCHANS];					/*!< Actual d-channels */
  	int dchanavail[NUM_DCHANS];					/*!< Whether each channel is available */
-@@ -336,6 +346,8 @@
+@@ -336,6 +346,8 @@ struct zt_pri {
  	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 */
@@ -90,7 +90,7 @@
  };
  
  
-@@ -453,6 +465,8 @@
+@@ -453,6 +465,8 @@ static struct zt_pvt {
  	unsigned int echocanbridged:1;
  	unsigned int echocanon:1;
  	unsigned int faxhandled:1;			/*!< Has a fax tone already been handled? */
@@ -99,7 +99,7 @@
  	unsigned int firstradio:1;
  	unsigned int hanguponpolarityswitch:1;
  	unsigned int hardwaredtmf:1;
-@@ -466,7 +480,8 @@
+@@ -466,7 +480,8 @@ static struct zt_pvt {
  	unsigned int overlapdial:1;
  	unsigned int permcallwaiting:1;
  	unsigned int permhidecallerid:1;		/*!< Whether to hide our outgoing caller ID or not */
@@ -109,7 +109,7 @@
  	unsigned int priexclusive:1;
  	unsigned int pulse:1;
  	unsigned int pulsedial:1;			/*!< whether a pulse dial phone is detected */
-@@ -503,6 +518,7 @@
+@@ -503,6 +518,7 @@ static struct zt_pvt {
  #endif
  	char cid_num[AST_MAX_EXTENSION];
  	int cid_ton;					/*!< Type Of Number (TON) */
@@ -117,7 +117,7 @@
  	char cid_name[AST_MAX_EXTENSION];
  	char lastcid_num[AST_MAX_EXTENSION];
  	char lastcid_name[AST_MAX_EXTENSION];
-@@ -568,6 +584,8 @@
+@@ -568,6 +584,8 @@ static struct zt_pvt {
  	struct zt_pvt *bearer;
  	struct zt_pvt *realcall;
  	q931_call *call;
@@ -126,7 +126,7 @@
  	int prioffset;
  	int logicalspan;
  #endif	
-@@ -613,11 +631,14 @@
+@@ -613,11 +631,14 @@ static struct zt_chan_conf zt_chan_conf_
  			.minunused = 2,
  			.idleext = "",
  			.idledial = "",
@@ -141,7 +141,7 @@
  
  			.resetinterval = 3600
  		},
-@@ -629,6 +650,8 @@
+@@ -629,6 +650,8 @@ static struct zt_chan_conf zt_chan_conf_
  			.mohinterpret = "default",
  			.mohsuggest = "",
  			.transfertobusy = 1,
@@ -150,7 +150,7 @@
  
  			.cid_signalling = CID_SIG_BELL,
  			.cid_start = CID_START_RING,
-@@ -683,6 +706,8 @@
+@@ -683,6 +706,8 @@ static int zt_indicate(struct ast_channe
  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); 
@@ -159,7 +159,7 @@
  
  static const struct ast_channel_tech zap_tech = {
  	.type = "Zap",
-@@ -714,6 +739,13 @@
+@@ -714,6 +739,13 @@ static const struct ast_channel_tech zap
  struct zt_pvt *round_robin[32];
  
  #ifdef HAVE_PRI
@@ -173,7 +173,7 @@
  static inline int pri_grab(struct zt_pvt *pvt, struct zt_pri *pri)
  {
  	int res;
-@@ -1416,12 +1448,16 @@
+@@ -1416,12 +1448,16 @@ static void zt_enable_ec(struct zt_pvt *
  	int res;
  	if (!p)
  		return;
@@ -191,7 +191,7 @@
  		return;
  	}
  	if (p->echocancel) {
-@@ -1448,7 +1484,7 @@
+@@ -1448,7 +1484,7 @@ static void zt_train_ec(struct zt_pvt *p
  {
  	int x;
  	int res;
@@ -200,7 +200,7 @@
  		x = p->echotraining;
  		res = ioctl(p->subs[SUB_REAL].zfd, ZT_ECHOTRAIN, &x);
  		if (res)
-@@ -1809,7 +1845,12 @@
+@@ -1809,7 +1845,12 @@ static int zt_call(struct ast_channel *a
  		ast_log(LOG_WARNING, "Unable to flush input on channel %d\n", p->channel);
  	p->outgoing = 1;
  
@@ -214,7 +214,7 @@
  
  	mysig = p->sig;
  	if (p->outsigmod > -1)
-@@ -2040,6 +2081,7 @@
+@@ -2040,6 +2081,7 @@ static int zt_call(struct ast_channel *a
  	case SIG_PRI:
  		/* We'll get it in a moment -- but use dialdest to store pre-setup_ack digits */
  		p->dialdest[0] = '\0';
@@ -222,7 +222,7 @@
  		break;
  	default:
  		ast_log(LOG_DEBUG, "not yet implemented\n");
-@@ -2060,6 +2102,12 @@
+@@ -2060,6 +2102,12 @@ static int zt_call(struct ast_channel *a
  		const char *rr_str;
  		int redirect_reason;
  
@@ -235,7 +235,7 @@
  		c = strchr(dest, '/');
  		if (c)
  			c++;
-@@ -2082,6 +2130,7 @@
+@@ -2082,6 +2130,7 @@ static int zt_call(struct ast_channel *a
  			ast_mutex_unlock(&p->lock);
  			return -1;
  		}
@@ -243,7 +243,7 @@
  		if (mysig != SIG_FXSKS) {
  			p->dop.op = ZT_DIAL_OP_REPLACE;
  			s = strchr(c + p->stripmsd, 'w');
-@@ -2105,6 +2154,8 @@
+@@ -2105,6 +2154,8 @@ static int zt_call(struct ast_channel *a
  			pri_rel(p->pri);
  			ast_mutex_unlock(&p->lock);
  			return -1;
@@ -252,7 +252,7 @@
  		}
  		if (!(sr = pri_sr_new())) {
  			ast_log(LOG_WARNING, "Failed to allocate setup request channel %d\n", p->channel);
-@@ -2134,7 +2185,7 @@
+@@ -2134,7 +2185,7 @@ static int zt_call(struct ast_channel *a
  		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 : 
@@ -261,7 +261,7 @@
  		if (p->pri->facilityenable)
  			pri_facility_enable(p->pri->pri);
  
-@@ -2398,8 +2449,10 @@
+@@ -2398,8 +2449,10 @@ static int pri_find_dchan(struct zt_pri 
  	}
  	if (newslot < 0) {
  		newslot = 0;
@@ -273,7 +273,7 @@
  	}
  	if (old && (oldslot != newslot))
  		ast_log(LOG_NOTICE, "Switching from from d-channel %d to channel %d!\n",
-@@ -2409,6 +2462,16 @@
+@@ -2409,6 +2462,16 @@ static int pri_find_dchan(struct zt_pri 
  }
  #endif
  
@@ -290,7 +290,7 @@
  static int zt_hangup(struct ast_channel *ast)
  {
  	int res;
-@@ -2456,8 +2519,7 @@
+@@ -2456,8 +2519,7 @@ static int zt_hangup(struct ast_channel 
  	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);
@@ -300,7 +300,7 @@
  	if (index > -1) {
  		/* Real channel, do some fixup */
  		p->subs[index].owner = NULL;
-@@ -2559,6 +2621,7 @@
+@@ -2559,6 +2621,7 @@ static int zt_hangup(struct ast_channel 
  	}
  
  	if (!p->subs[SUB_REAL].owner && !p->subs[SUB_CALLWAIT].owner && !p->subs[SUB_THREEWAY].owner) {
@@ -308,7 +308,7 @@
  		p->owner = NULL;
  		p->ringt = 0;
  		p->distinctivering = 0;
-@@ -2601,7 +2664,7 @@
+@@ -2601,7 +2664,7 @@ static int zt_hangup(struct ast_channel 
  						pri_call_set_useruser(p->call, useruser);
  #endif
  
@@ -317,7 +317,7 @@
  						p->call = NULL;
  						if (p->bearer) 
  							p->bearer->call = NULL;
-@@ -2621,7 +2684,28 @@
+@@ -2621,7 +2684,28 @@ static int zt_hangup(struct ast_channel 
  							if (atoi(cause))
  								icause = atoi(cause);
  						}
@@ -347,7 +347,7 @@
  					}
  					if (res < 0) 
  						ast_log(LOG_WARNING, "pri_disconnect failed\n");
-@@ -2805,10 +2889,14 @@
+@@ -2805,10 +2889,14 @@ static int zt_answer(struct ast_channel 
  			p->proceeding = 1;
  			res = pri_answer(p->pri->pri, p->call, 0, !p->digital);
  			pri_rel(p->pri);
@@ -362,7 +362,7 @@
  		break;
  #endif
  	case 0:
-@@ -3445,6 +3533,15 @@
+@@ -3445,6 +3533,15 @@ static int zt_fixup(struct ast_channel *
  {
  	struct zt_pvt *p = newchan->tech_pvt;
  	int x;
@@ -378,7 +378,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) {
-@@ -3654,8 +3751,10 @@
+@@ -3654,8 +3751,10 @@ static void zt_handle_dtmfup(struct ast_
  					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);
@@ -390,7 +390,7 @@
  			} else if (option_debug)
  				ast_log(LOG_DEBUG, "Already in a fax extension, not redirecting\n");
  		} else if (option_debug)
-@@ -3814,7 +3913,7 @@
+@@ -3814,7 +3913,7 @@ static struct ast_frame *zt_handle_event
  				if (p->call) {
  					if (p->pri && p->pri->pri) {
  						if (!pri_grab(p, p->pri)) {
@@ -399,7 +399,7 @@
  							pri_destroycall(p->pri->pri, p->call);
  							p->call = NULL;
  							pri_rel(p->pri);
-@@ -4865,7 +4964,7 @@
+@@ -4865,7 +4964,7 @@ static struct ast_frame  *zt_read(struct
  		p->subs[index].f.data = NULL;
  		p->subs[index].f.datalen= 0;
  	}
@@ -408,7 +408,7 @@
  		/* Perform busy detection. etc on the zap line */
  		f = ast_dsp_process(ast, p->dsp, &p->subs[index].f);
  		if (f) {
-@@ -4877,8 +4976,9 @@
+@@ -4877,8 +4976,9 @@ static struct ast_frame  *zt_read(struct
  				}
  			} else if (f->frametype == AST_FRAME_DTMF) {
  #ifdef HAVE_PRI
@@ -420,7 +420,7 @@
  					f->frametype = AST_FRAME_NULL;
  					f->subclass = 0;
  				}
-@@ -4953,7 +5053,9 @@
+@@ -4953,7 +5053,9 @@ static int zt_write(struct ast_channel *
  #endif
  	/* Write a frame of (presumably voice) data */
  	if (frame->frametype != AST_FRAME_VOICE) {
@@ -431,7 +431,7 @@
  			ast_log(LOG_WARNING, "Don't know what to do with frame type '%d'\n", frame->frametype);
  		return 0;
  	}
-@@ -5021,7 +5123,7 @@
+@@ -5021,7 +5123,7 @@ static int zt_indicate(struct ast_channe
  		switch (condition) {
  		case AST_CONTROL_BUSY:
  #ifdef HAVE_PRI
@@ -440,7 +440,7 @@
  				chan->hangupcause = AST_CAUSE_USER_BUSY;
  				chan->_softhangup |= AST_SOFTHANGUP_DEV;
  				res = 0;
-@@ -5103,7 +5205,7 @@
+@@ -5103,7 +5205,7 @@ static int zt_indicate(struct ast_channe
  		case AST_CONTROL_CONGESTION:
  			chan->hangupcause = AST_CAUSE_CONGESTION;
  #ifdef HAVE_PRI
@@ -449,7 +449,7 @@
  				chan->hangupcause = AST_CAUSE_SWITCH_CONGESTION;
  				chan->_softhangup |= AST_SOFTHANGUP_DEV;
  				res = 0;
-@@ -5297,8 +5399,12 @@
+@@ -5297,8 +5399,12 @@ static struct ast_channel *zt_new(struct
  	if (state == AST_STATE_RING)
  		tmp->rings = 1;
  	tmp->tech_pvt = i;
@@ -463,7 +463,7 @@
  		tmp->callgroup = i->callgroup;
  		tmp->pickupgroup = i->pickupgroup;
  	}
-@@ -5428,6 +5534,7 @@
+@@ -5428,6 +5534,7 @@ static void *ss_thread(void *data)
  	int len = 0;
  	int res;
  	int index;
@@ -471,7 +471,7 @@
  
  	/* in the bizarre case where the channel has become a zombie before we
  	   even get started here, abort safely
-@@ -5456,10 +5563,17 @@
+@@ -5456,10 +5563,17 @@ static void *ss_thread(void *data)
  		len = strlen(exten);
  		res = 0;
  		while ((len < AST_MAX_EXTENSION-1) && ast_matchmore_extension(chan, chan->context, exten, 1, p->cid_num)) {
@@ -492,7 +492,7 @@
  			if (ast_exists_extension(chan, chan->context, exten, 1, p->cid_num))
  				timeout = matchdigittimeout;
  			else
-@@ -6675,18 +6789,44 @@
+@@ -6675,18 +6789,44 @@ static int handle_init_event(struct zt_p
  		break;
  	case ZT_EVENT_NOALARM:
  		i->inalarm = 0;
@@ -537,7 +537,7 @@
  		/* fall thru intentionally */
  	case ZT_EVENT_ONHOOK:
  		if (i->radio)
-@@ -6730,8 +6870,10 @@
+@@ -6730,8 +6870,10 @@ static int handle_init_event(struct zt_p
  			zt_set_hook(i->subs[SUB_REAL].zfd, ZT_ONHOOK);
  			break;
  		case SIG_PRI:
@@ -550,7 +550,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);
-@@ -7030,6 +7172,8 @@
+@@ -7030,6 +7172,8 @@ static int pri_resolve_span(int *span, i
  		} else {
  			if (si->totalchans == 31) { /* if it's an E1 */
  				pris[*span].dchannels[0] = 16 + offset;
@@ -559,7 +559,7 @@
  			} else {
  				pris[*span].dchannels[0] = 24 + offset;
  			}
-@@ -7282,6 +7426,11 @@
+@@ -7282,6 +7426,11 @@ static struct zt_pvt *mkintf(int channel
  							destroy_zt_pvt(&tmp);
  							return NULL;
  						}
@@ -571,7 +571,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);
-@@ -7299,6 +7448,11 @@
+@@ -7299,6 +7448,11 @@ static struct zt_pvt *mkintf(int channel
  							return NULL;
  						}
  						pris[span].nodetype = conf.pri.nodetype;
@@ -583,7 +583,7 @@
  						pris[span].switchtype = myswitchtype;
  						pris[span].nsf = conf.pri.nsf;
  						pris[span].dialplan = conf.pri.dialplan;
-@@ -7307,9 +7461,13 @@
+@@ -7307,9 +7461,13 @@ static struct zt_pvt *mkintf(int channel
  						pris[span].minunused = conf.pri.minunused;
  						pris[span].minidle = conf.pri.minidle;
  						pris[span].overlapdial = conf.pri.overlapdial;
@@ -597,7 +597,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));
-@@ -7445,6 +7603,7 @@
+@@ -7445,6 +7603,7 @@ static struct zt_pvt *mkintf(int channel
  		tmp->restrictcid = conf.chan.restrictcid;
  		tmp->use_callingpres = conf.chan.use_callingpres;
  		tmp->priindication_oob = conf.chan.priindication_oob;
@@ -605,7 +605,7 @@
  		tmp->priexclusive = conf.chan.priexclusive;
  		if (tmp->usedistinctiveringdetection) {
  			if (!tmp->use_callerid) {
-@@ -7724,7 +7883,7 @@
+@@ -7724,7 +7883,7 @@ static int pri_find_empty_chan(struct zt
  			break;
  		if (!backwards && (x >= pri->numchans))
  			break;
@@ -614,7 +614,7 @@
  			ast_log(LOG_DEBUG, "Found empty available channel %d/%d\n", 
  				pri->pvts[x]->logicalspan, pri->pvts[x]->prioffset);
  			return x;
-@@ -7920,6 +8079,11 @@
+@@ -7920,6 +8079,11 @@ static struct ast_channel *zt_request(co
  					p->digital = 1;
  					if (tmp)
  						tmp->transfercapability = AST_TRANS_CAP_DIGITAL;
@@ -626,7 +626,7 @@
  				} else {
  					ast_log(LOG_WARNING, "Unknown option '%c' in '%s'\n", opt, (char *)data);
  				}
-@@ -7953,13 +8117,14 @@
+@@ -7953,13 +8117,14 @@ next:
  				*cause = AST_CAUSE_BUSY;
  		} else if (groupmatched) {
  			*cause = AST_CAUSE_CONGESTION;
@@ -642,7 +642,7 @@
  #ifdef HAVE_PRI
  static struct zt_pvt *pri_find_crv(struct zt_pri *pri, int crv)
  {
-@@ -8004,7 +8169,9 @@
+@@ -8004,7 +8169,9 @@ static int pri_find_principle(struct zt_
  static int pri_fixup_principle(struct zt_pri *pri, int principle, q931_call *c)
  {
  	int x;
@@ -652,7 +652,7 @@
  	if (!c) {
  		if (principle < 0)
  			return -1;
-@@ -8032,6 +8199,7 @@
+@@ -8032,6 +8199,7 @@ static int pri_fixup_principle(struct zt
  				}
  				/* Fix it all up now */
  				pri->pvts[principle]->owner = pri->pvts[x]->owner;
@@ -660,7 +660,7 @@
  				if (pri->pvts[principle]->owner) {
  					ast_string_field_build(pri->pvts[principle]->owner, name, 
  							       "Zap/%d:%d-%d", pri->trunkgroup,
-@@ -8039,13 +8207,48 @@
+@@ -8039,13 +8207,48 @@ static int pri_fixup_principle(struct zt
  					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;
@@ -710,7 +710,7 @@
  			}
  			return principle;
  		}
-@@ -8074,7 +8277,9 @@
+@@ -8074,7 +8277,9 @@ static int pri_fixup_principle(struct zt
  		}
  		crv = crv->next;
  	}
@@ -721,7 +721,7 @@
  	return -1;
  }
  
-@@ -8133,86 +8338,21 @@
+@@ -8133,86 +8338,21 @@ static void *do_idle_thread(void *vchan)
  #ifndef PRI_RESTART
  #error "Upgrade your libpri"
  #endif
@@ -815,7 +815,7 @@
  	do {
  		pri->resetpos++;
  	} while ((pri->resetpos < pri->numchans) &&
-@@ -8296,13 +8436,30 @@
+@@ -8296,13 +8436,30 @@ static void apply_plan_to_number(char *b
  	}
  }
  
@@ -853,7 +853,7 @@
  }
  
  static void *pri_dchannel(void *vpri)
-@@ -8482,15 +8639,44 @@
+@@ -8482,15 +8639,44 @@ static void *pri_dchannel(void *vpri)
  					/* Check for an event */
  					x = 0;
  					res = ioctl(pri->fds[which], ZT_GETEVENT, &x);
@@ -901,7 +901,7 @@
  					}
  				
  					if (option_debug)
-@@ -8502,8 +8688,7 @@
+@@ -8502,8 +8688,7 @@ static void *pri_dchannel(void *vpri)
  					break;
  			}
  		} else if (errno != EINTR)
@@ -911,7 +911,7 @@
  		if (e) {
  			if (pri->debug)
  				pri_dump_event(pri->dchans[which], e);
-@@ -8516,32 +8701,86 @@
+@@ -8516,32 +8701,86 @@ static void *pri_dchannel(void *vpri)
  
  			switch (e->e) {
  			case PRI_EVENT_DCHAN_UP:
@@ -1015,7 +1015,7 @@
  					pri->resetting = 0;
  					/* Hangup active channels and put them in alarm mode */
  					for (i = 0; i < pri->numchans; i++) {
-@@ -8551,12 +8790,13 @@
+@@ -8551,12 +8790,13 @@ static void *pri_dchannel(void *vpri)
  								/* T309 is not enabled : hangup calls when alarm occurs */
  								if (p->call) {
  									if (p->pri && p->pri->pri) {
@@ -1030,7 +1030,7 @@
  								if (p->realcall) {
  									pri_hangup_all(p->realcall, pri);
  								} else if (p->owner)
-@@ -8565,6 +8805,7 @@
+@@ -8565,6 +8805,7 @@ static void *pri_dchannel(void *vpri)
  							p->inalarm = 1;
  						}
  					}
@@ -1038,7 +1038,7 @@
  				}
  				break;
  			case PRI_EVENT_RESTART:
-@@ -8599,8 +8840,8 @@
+@@ -8599,8 +8840,8 @@ static void *pri_dchannel(void *vpri)
  								pri_destroycall(pri->pri, pri->pvts[x]->call);
  								pri->pvts[x]->call = NULL;
  							}
@@ -1049,7 +1049,7 @@
   							else if (pri->pvts[x]->owner)
  								pri->pvts[x]->owner->_softhangup |= AST_SOFTHANGUP_DEV;
  							ast_mutex_unlock(&pri->pvts[x]->lock);
-@@ -8634,7 +8875,6 @@
+@@ -8634,7 +8875,6 @@ static void *pri_dchannel(void *vpri)
  					}
  				}
  				break;
@@ -1057,7 +1057,7 @@
  			case PRI_EVENT_INFO_RECEIVED:
  				chanpos = pri_find_principle(pri, e->ring.channel);
  				if (chanpos < 0) {
-@@ -8643,9 +8883,11 @@
+@@ -8643,9 +8883,11 @@ static void *pri_dchannel(void *vpri)
  				} else {
  					chanpos = pri_fixup_principle(pri, chanpos, e->ring.call);
  					if (chanpos > -1) {
@@ -1070,7 +1070,7 @@
  							/* how to do that */
  							int digitlen = strlen(e->ring.callednum);
  							char digit;
-@@ -8657,6 +8899,14 @@
+@@ -8657,6 +8899,14 @@ static void *pri_dchannel(void *vpri)
  									zap_queue_frame(pri->pvts[chanpos], &f, pri);
  								}
  							}
@@ -1085,7 +1085,7 @@
  						}
  						ast_mutex_unlock(&pri->pvts[chanpos]->lock);
  					}
-@@ -8664,36 +8914,59 @@
+@@ -8664,36 +8914,59 @@ static void *pri_dchannel(void *vpri)
  				break;
  			case PRI_EVENT_RING:
  				crv = NULL;
@@ -1161,7 +1161,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));
-@@ -8707,13 +8980,14 @@
+@@ -8707,13 +8980,14 @@ static void *pri_dchannel(void *vpri)
  								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);
@@ -1177,7 +1177,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) {
-@@ -8738,34 +9012,82 @@
+@@ -8738,34 +9012,82 @@ static void *pri_dchannel(void *vpri)
  					}
  					apply_plan_to_number(pri->pvts[chanpos]->rdnis, sizeof(pri->pvts[chanpos]->rdnis), pri,
  							     e->ring.redirectingnum, e->ring.callingplanrdnis);
@@ -1278,7 +1278,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)) {
-@@ -8784,19 +9106,36 @@
+@@ -8784,19 +9106,36 @@ static void *pri_dchannel(void *vpri)
  						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);
@@ -1318,7 +1318,7 @@
  						/* Get the use_callingpres state */
  						pri->pvts[chanpos]->callingpres = e->ring.callingpres;
  					
-@@ -8808,10 +9147,17 @@
+@@ -8808,10 +9147,17 @@ static void *pri_dchannel(void *vpri)
  								/* 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);
@@ -1336,7 +1336,7 @@
  							}
  
  							ast_mutex_unlock(&pri->pvts[chanpos]->lock);
-@@ -8819,6 +9165,16 @@
+@@ -8819,6 +9165,16 @@ static void *pri_dchannel(void *vpri)
  							if (!ast_strlen_zero(e->ring.callingsubaddr)) {
  								pbx_builtin_setvar_helper(c, "CALLINGSUBADDR", e->ring.callingsubaddr);
  							}
@@ -1353,7 +1353,7 @@
  							if (e->ring.ani2 >= 0) {
  								snprintf(ani2str, 5, "%.2d", e->ring.ani2);
  								pbx_builtin_setvar_helper(c, "ANI2", ani2str);
-@@ -8842,8 +9198,8 @@
+@@ -8842,8 +9198,8 @@ static void *pri_dchannel(void *vpri)
  							pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
  							if (c && !ast_pthread_create(&threadid, &attr, ss_thread, c)) {
  								if (option_verbose > 2)
@@ -1364,7 +1364,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", 
-@@ -8851,15 +9207,19 @@
+@@ -8851,15 +9207,19 @@ static void *pri_dchannel(void *vpri)
  								if (c)
  									ast_hangup(c);
  								else {
@@ -1385,7 +1385,7 @@
  							if (c) {
  								char calledtonstr[10];
  
-@@ -8886,26 +9246,43 @@
+@@ -8886,26 +9246,43 @@ static void *pri_dchannel(void *vpri)
  								ast_mutex_lock(&pri->lock);
  
  								if (option_verbose > 2)
@@ -1433,7 +1433,7 @@
  						pri->pvts[chanpos]->call = NULL;
  						pri->pvts[chanpos]->exten[0] = '\0';
  					}
-@@ -8914,9 +9291,9 @@
+@@ -8914,9 +9291,9 @@ static void *pri_dchannel(void *vpri)
  					ast_mutex_unlock(&pri->pvts[chanpos]->lock);
  				} else {
  					if (e->ring.flexible)
@@ -1445,7 +1445,7 @@
  				}
  				break;
  			case PRI_EVENT_RINGING:
-@@ -8932,7 +9309,7 @@
+@@ -8932,7 +9309,7 @@ static void *pri_dchannel(void *vpri)
  					} else {
  						ast_mutex_lock(&pri->pvts[chanpos]->lock);
  						if (ast_strlen_zero(pri->pvts[chanpos]->dop.dialstr)) {
@@ -1454,7 +1454,7 @@
  							pri->pvts[chanpos]->subs[SUB_REAL].needringing = 1;
  							pri->pvts[chanpos]->alerting = 1;
  						} else
-@@ -8964,9 +9341,16 @@
+@@ -8964,9 +9341,16 @@ static void *pri_dchannel(void *vpri)
  				}
  				break;
  			case PRI_EVENT_PROGRESS:
@@ -1472,7 +1472,7 @@
  #ifdef PRI_PROGRESS_MASK
  					if ((!pri->pvts[chanpos]->progress) || (e->proceeding.progressmask & PRI_PROG_INBAND_AVAILABLE)) {
  #else
-@@ -9013,6 +9397,12 @@
+@@ -9013,6 +9397,12 @@ static void *pri_dchannel(void *vpri)
  			case PRI_EVENT_PROCEEDING:
  				chanpos = pri_find_principle(pri, e->proceeding.channel);
  				if (chanpos > -1) {
@@ -1485,7 +1485,7 @@
  					if (!pri->pvts[chanpos]->proceeding) {
  						struct ast_frame f = { AST_FRAME_CONTROL, AST_CONTROL_PROCEEDING, };
  						
-@@ -9060,6 +9450,163 @@
+@@ -9060,6 +9450,163 @@ static void *pri_dchannel(void *vpri)
  					}
  				}
  				break;				
@@ -1649,7 +1649,7 @@
  			case PRI_EVENT_ANSWER:
  				chanpos = pri_find_principle(pri, e->answer.channel);
  				if (chanpos < 0) {
-@@ -9072,6 +9619,7 @@
+@@ -9072,6 +9619,7 @@ static void *pri_dchannel(void *vpri)
  							PRI_SPAN(e->answer.channel), PRI_CHANNEL(e->answer.channel), pri->span);
  					} else {
  						ast_mutex_lock(&pri->pvts[chanpos]->lock);
@@ -1657,7 +1657,7 @@
  						/* Now we can do call progress detection */
  
  						/* We changed this so it turns on the DSP no matter what... progress or no progress.
-@@ -9101,11 +9649,16 @@
+@@ -9101,11 +9649,16 @@ static void *pri_dchannel(void *vpri)
  								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) {
@@ -1675,7 +1675,7 @@
  						}
  
  #ifdef SUPPORT_USERUSER
-@@ -9162,20 +9715,29 @@
+@@ -9162,20 +9715,29 @@ static void *pri_dchannel(void *vpri)
  								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 {
@@ -1712,7 +1712,7 @@
  
  #ifdef SUPPORT_USERUSER
  						if (pri->pvts[chanpos]->owner && !ast_strlen_zero(e->hangup.useruserinfo)) {
-@@ -9188,8 +9750,9 @@
+@@ -9188,8 +9750,9 @@ static void *pri_dchannel(void *vpri)
  
  						ast_mutex_unlock(&pri->pvts[chanpos]->lock);
  					} else {
@@ -1724,7 +1724,7 @@
  					}
  				} 
  				break;
-@@ -9199,15 +9762,23 @@
+@@ -9199,15 +9762,23 @@ static void *pri_dchannel(void *vpri)
  			case PRI_EVENT_HANGUP_REQ:
  				chanpos = pri_find_principle(pri, e->hangup.channel);
  				if (chanpos < 0) {
@@ -1751,7 +1751,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;
-@@ -9234,16 +9805,34 @@
+@@ -9234,16 +9805,34 @@ static void *pri_dchannel(void *vpri)
  								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");
@@ -1790,7 +1790,7 @@
  						}
  
  #ifdef SUPPORT_USERUSER
-@@ -9257,9 +9846,27 @@
+@@ -9257,9 +9846,27 @@ static void *pri_dchannel(void *vpri)
  
  						ast_mutex_unlock(&pri->pvts[chanpos]->lock);
  					} else {
@@ -1819,7 +1819,7 @@
  				break;
  			case PRI_EVENT_HANGUP_ACK:
  				chanpos = pri_find_principle(pri, e->hangup.channel);
-@@ -9271,6 +9878,7 @@
+@@ -9271,6 +9878,7 @@ static void *pri_dchannel(void *vpri)
  					if (chanpos > -1) {
  						ast_mutex_lock(&pri->pvts[chanpos]->lock);
  						pri->pvts[chanpos]->call = NULL;
@@ -1827,7 +1827,7 @@
  						pri->pvts[chanpos]->resetting = 0;
  						if (pri->pvts[chanpos]->owner) {
  							if (option_verbose > 2) 
-@@ -9287,7 +9895,9 @@
+@@ -9287,7 +9895,9 @@ static void *pri_dchannel(void *vpri)
  #endif
  
  						ast_mutex_unlock(&pri->pvts[chanpos]->lock);
@@ -1837,7 +1837,7 @@
  				}
  				break;
  			case PRI_EVENT_CONFIG_ERR:
-@@ -9377,10 +9987,22 @@
+@@ -9377,10 +9987,22 @@ static void *pri_dchannel(void *vpri)
  					ast_mutex_lock(&pri->pvts[chanpos]->lock);
  					switch (e->notify.info) {
  					case PRI_NOTIFY_REMOTE_HOLD:
@@ -1860,7 +1860,7 @@
  						f.subclass = AST_CONTROL_UNHOLD;
  						zap_queue_frame(pri->pvts[chanpos], &f, pri);
  						break;
-@@ -9388,6 +10010,23 @@
+@@ -9388,6 +10010,23 @@ static void *pri_dchannel(void *vpri)
  					ast_mutex_unlock(&pri->pvts[chanpos]->lock);
  				}
  				break;
@@ -1884,7 +1884,7 @@
  			default:
  				ast_log(LOG_DEBUG, "Event: %d\n", e->e);
  			}
-@@ -9449,7 +10088,7 @@
+@@ -9449,7 +10088,7 @@ static int start_pri(struct zt_pri *pri)
  			pri->fds[i] = -1;
  			return -1;
  		}
@@ -1893,7 +1893,7 @@
  		/* Force overlap dial if we're doing GR-303! */
  		if (pri->switchtype == PRI_SWITCH_GR303_TMC)
  			pri->overlapdial = 1;
-@@ -9517,39 +10156,77 @@
+@@ -9517,39 +10156,77 @@ static char *complete_span_5(const char 
  
  static int handle_pri_set_debug_file(int fd, int argc, char **argv)
  {
@@ -1989,7 +1989,7 @@
  	}
  
  	return RESULT_SUCCESS;
-@@ -9583,6 +10260,7 @@
+@@ -9583,6 +10260,7 @@ static int handle_pri_debug(int fd, int 
  
  
  
@@ -1997,7 +1997,7 @@
  static int handle_pri_no_debug(int fd, int argc, char *argv[])
  {
  	int span;
-@@ -9732,10 +10410,6 @@
+@@ -9732,10 +10410,6 @@ static int handle_pri_show_debug(int fd,
  		}
  
  	}
@@ -2008,7 +2008,7 @@
  	    
  	if (!count) 
  		ast_cli(fd, "No debug set or no PRI running\n");
-@@ -9762,6 +10436,18 @@
+@@ -9762,6 +10436,18 @@ static const char pri_show_spans_help[] 
  	"Usage: pri show spans\n"
  	"       Displays PRI Information\n";
  
@@ -2027,7 +2027,7 @@
  static struct ast_cli_entry zap_pri_cli[] = {
  	{ { "pri", "debug", "span", NULL },
  	handle_pri_debug, "Enables PRI debugging on a span",
-@@ -9786,6 +10472,15 @@
+@@ -9786,6 +10472,15 @@ static struct ast_cli_entry zap_pri_cli[
  	{ { "pri", "show", "debug", NULL },
  	handle_pri_show_debug, "Displays current PRI debug settings" },
  
@@ -2043,7 +2043,7 @@
  	{ { "pri", "set", "debug", "file", NULL },
  	handle_pri_set_debug_file, "Sends PRI debug output to the specified file" },
  
-@@ -9793,8 +10488,76 @@
+@@ -9793,8 +10488,76 @@ static struct ast_cli_entry zap_pri_cli[
  	handle_pri_set_debug_file, "Ends PRI debug output to file" },
  };
  
@@ -2120,7 +2120,7 @@
  static int zap_destroy_channel(int fd, int argc, char **argv)
  {
  	int channel;
-@@ -10375,8 +11138,11 @@
+@@ -10375,8 +11138,11 @@ static int __unload_module(void)
  	}
  	ast_cli_unregister_multiple(zap_pri_cli, sizeof(zap_pri_cli) / sizeof(struct ast_cli_entry));
  	ast_unregister_application(zap_send_keypad_facility_app);
@@ -2132,7 +2132,7 @@
  	ast_manager_unregister( "ZapDialOffhook" );
  	ast_manager_unregister( "ZapHangup" );
  	ast_manager_unregister( "ZapTransfer" );
-@@ -10878,6 +11644,22 @@
+@@ -10878,6 +11644,22 @@ static int process_zap(struct zt_chan_co
  					confp->chan.sig = SIG_GR303FXSKS;
  					confp->chan.radio = 0;
  					confp->pri.nodetype = PRI_CPE;
@@ -2155,7 +2155,7 @@
  #endif
  				} else {
  					ast_log(LOG_ERROR, "Unknown signalling method '%s'\n", v->value);
-@@ -10990,9 +11772,21 @@
+@@ -10990,9 +11772,21 @@ static int process_zap(struct zt_chan_co
  					confp->chan.priindication_oob = 1;
  				else if (!strcasecmp(v->value, "inband"))
  					confp->chan.priindication_oob = 0;
@@ -2178,7 +2178,7 @@
  			} else if (!strcasecmp(v->name, "priexclusive")) {
  				confp->chan.priexclusive = ast_true(v->value);
  			} else if (!strcasecmp(v->name, "internationalprefix")) {
-@@ -11005,6 +11799,10 @@
+@@ -11005,6 +11799,10 @@ static int process_zap(struct zt_chan_co
  				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));
@@ -2189,7 +2189,7 @@
  			} else if (!strcasecmp(v->name, "resetinterval")) {
  				if (!strcasecmp(v->value, "never"))
  					confp->pri.resetinterval = -1;
-@@ -11021,6 +11819,8 @@
+@@ -11021,6 +11819,8 @@ static int process_zap(struct zt_chan_co
  				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));
@@ -2198,7 +2198,7 @@
  			} else if (!strcasecmp(v->name, "overlapdial")) {
  				confp->pri.overlapdial = ast_true(v->value);
  			} else if (!strcasecmp(v->name, "pritimer")) {
-@@ -11322,6 +12122,7 @@
+@@ -11322,6 +12122,7 @@ static int setup_zap(int reload)
  #ifdef HAVE_PRI
  	if (!reload) {
  		for (x = 0; x < NUM_SPANS; x++) {
@@ -2206,7 +2206,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);
-@@ -11369,7 +12170,10 @@
+@@ -11369,7 +12170,10 @@ static int load_module(void)
  	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));
@@ -2217,7 +2217,7 @@
  	ast_cli_register_multiple(zap_cli, sizeof(zap_cli) / sizeof(struct ast_cli_entry));
  	
  	memset(round_robin, 0, sizeof(round_robin));
-@@ -11403,6 +12207,7 @@
+@@ -11403,6 +12207,7 @@ static int zt_sendtext(struct ast_channe
  	float scont = 0.0;
  	int index;
  
@@ -2227,7 +2227,7 @@
  		ast_log(LOG_WARNING, "Huh?  I don't exist?\n");
 --- a/configs/zapata.conf.sample
 +++ b/configs/zapata.conf.sample
-@@ -123,9 +123,20 @@
+@@ -123,9 +123,20 @@ switchtype=national
  ; 
  ; outofband:      Signal Busy/Congestion out of band with RELEASE/DISCONNECT
  ; inband:         Signal Busy/Congestion using in-band tones

Modified: asterisk/trunk/debian/patches/bristuff/zapata-gsm
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/bristuff/zapata-gsm?rev=5179&op=diff
==============================================================================
--- asterisk/trunk/debian/patches/bristuff/zapata-gsm (original)
+++ asterisk/trunk/debian/patches/bristuff/zapata-gsm Thu Jan 31 13:09:40 2008
@@ -10,7 +10,7 @@
  
  #include "asterisk/lock.h"
  #include "asterisk/channel.h"
-@@ -187,6 +190,7 @@ static const char config[] = "zapata.con
+@@ -185,6 +188,7 @@ static const char config[] = "zapata.con
  #define SIG_FXOGS	ZT_SIG_FXOGS
  #define SIG_FXOKS	ZT_SIG_FXOKS
  #define SIG_PRI		ZT_SIG_CLEAR
@@ -18,7 +18,7 @@
  #define	SIG_SF		ZT_SIG_SF
  #define SIG_SFWINK 	(0x0100000 | ZT_SIG_SF)
  #define SIG_SF_FEATD	(0x0200000 | ZT_SIG_SF)
-@@ -236,6 +240,8 @@ static int matchdigittimeout = 3000;
+@@ -234,6 +238,8 @@ static int matchdigittimeout = 3000;
  /*! \brief Protect the interface list (of zt_pvt's) */
  AST_MUTEX_DEFINE_STATIC(iflock);
  
@@ -27,7 +27,7 @@
  
  static int ifcount = 0;
  
-@@ -251,7 +257,7 @@ static int restart_monitor(void);
+@@ -249,7 +255,7 @@ static int restart_monitor(void);
  
  static enum ast_bridge_result zt_bridge(struct ast_channel *c0, struct ast_channel *c1, int flags, struct ast_frame **fo, struct ast_channel **rc, int timeoutms);
  
@@ -36,7 +36,7 @@
  
  
  /*! \brief Avoid the silly zt_getevent which ignores a bunch of events */
-@@ -366,6 +372,19 @@ struct zt_pri {
+@@ -364,6 +370,19 @@ struct zt_pri {
  	int debugfd;
  };
  
@@ -56,7 +56,7 @@
  
  static struct zt_pri pris[NUM_SPANS];
  
-@@ -394,6 +413,7 @@ struct zt_pri;
+@@ -392,6 +411,7 @@ struct zt_pri;
  #define POLARITY_REV    1
  
  
@@ -64,7 +64,7 @@
  static struct zt_distRings drings;
  
  struct distRingData {
-@@ -605,6 +625,9 @@ static struct zt_pvt {
+@@ -603,6 +623,9 @@ static struct zt_pvt {
  	int prioffset;
  	int logicalspan;
  #endif	
@@ -74,7 +74,7 @@
  	int polarity;
  	int dsp_features;
  	char begindigit;
-@@ -711,7 +734,7 @@ static struct zt_chan_conf zt_chan_conf_
+@@ -709,7 +732,7 @@ static struct zt_chan_conf zt_chan_conf_
  static struct ast_channel *zt_request(const char *type, int format, void *data, int *cause);
  static int zt_digit_begin(struct ast_channel *ast, char digit);
  static int zt_digit_end(struct ast_channel *ast, char digit, unsigned int duration);
@@ -83,7 +83,7 @@
  static int zt_call(struct ast_channel *ast, char *rdest, int timeout);
  static int zt_hangup(struct ast_channel *ast);
  static int zt_answer(struct ast_channel *ast);
-@@ -1370,6 +1393,8 @@ static char *zap_sig2str(int sig)
+@@ -1261,6 +1284,8 @@ static char *zap_sig2str(int sig)
  		return "GR-303 with FXOKS";
  	case SIG_GR303FXSKS:
  		return "GR-303 with FXSKS";
@@ -92,7 +92,7 @@
  	case 0:
  		return "Pseudo";
  	default:
-@@ -1791,7 +1816,7 @@ static inline int zt_confmute(struct zt_
+@@ -1682,7 +1707,7 @@ static inline int zt_confmute(struct zt_
  {
  	int x, y, res;
  	x = muted;
@@ -101,7 +101,7 @@
  		y = 1;
  		res = ioctl(p->subs[SUB_REAL].zfd, ZT_AUDIOMODE, &y);
  		if (res)
-@@ -2206,6 +2231,25 @@ static int zt_call(struct ast_channel *a
+@@ -2097,6 +2122,25 @@ static int zt_call(struct ast_channel *a
  		p->dialdest[0] = '\0';
  		disable_dtmf_detect(p);
  		break;
@@ -127,7 +127,7 @@
  	default:
  		ast_log(LOG_DEBUG, "not yet implemented\n");
  		ast_mutex_unlock(&p->lock);
-@@ -2845,7 +2889,13 @@ static int zt_hangup(struct ast_channel 
+@@ -2736,7 +2780,13 @@ static int zt_hangup(struct ast_channel 
  			}
  		}
  #endif
@@ -142,7 +142,7 @@
  			res = zt_set_hook(p->subs[SUB_REAL].zfd, ZT_ONHOOK);
  		if (res < 0) {
  			ast_log(LOG_WARNING, "Unable to hangup line %s\n", ast->name);
-@@ -3022,6 +3072,13 @@ static int zt_answer(struct ast_channel 
+@@ -2913,6 +2963,13 @@ static int zt_answer(struct ast_channel 
  		zt_train_ec(p);
  		break;
  #endif
@@ -156,7 +156,7 @@
  	case 0:
  		ast_mutex_unlock(&p->lock);
  		return 0;
-@@ -7384,6 +7441,10 @@ static int pri_create_spanmap(int span, 
+@@ -7275,6 +7332,10 @@ static int pri_create_spanmap(int span, 
  
  #endif
  
@@ -167,7 +167,7 @@
  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) */
-@@ -7612,6 +7673,37 @@ static struct zt_pvt *mkintf(int channel
+@@ -7503,6 +7564,37 @@ static struct zt_pvt *mkintf(int channel
  				tmp->prioffset = 0;
  			}
  #endif
@@ -205,7 +205,7 @@
  		} else {
  			conf.chan.sig = tmp->sig;
  			conf.chan.radio = tmp->radio;
-@@ -7895,6 +7987,12 @@ static inline int available(struct zt_pv
+@@ -7786,6 +7878,12 @@ static inline int available(struct zt_pv
  				return 1;
  		}
  #endif
@@ -218,7 +218,7 @@
  		if (!(p->radio || (p->oprmode < 0)))
  		{
  			if (!p->sig || (p->sig == SIG_FXSLS))
-@@ -8249,6 +8347,235 @@ next:
+@@ -8140,6 +8238,235 @@ next:
  	return tmp;
  }
  
@@ -454,7 +454,7 @@
  #ifdef HAVE_PRI
  static struct zt_pvt *pri_find_crv(struct zt_pri *pri, int crv)
  {
-@@ -8524,6 +8851,18 @@ static void zt_pri_error(char *s, int sp
+@@ -8415,6 +8742,18 @@ static void zt_pri_error(char *s, int sp
  	ast_log(LOG_WARNING, "%d %s", span, s);
  }
  
@@ -473,7 +473,7 @@
  static int pri_check_restart(struct zt_pri *pri)
  {
  	if ((pri->nodetype != PRI_NETWORK) && (pri->nodetype != PRI_CPE)) {
-@@ -10957,6 +11296,243 @@ static int app_zapInband(struct ast_chan
+@@ -10851,6 +11190,243 @@ static int app_zapInband(struct ast_chan
  
  #endif /* HAVE_PRI */
  
@@ -717,7 +717,7 @@
  static int app_zapEC(struct ast_channel *chan, void *data)
  {
   int res=-1;
-@@ -11578,6 +12154,12 @@ static int __unload_module(void)
+@@ -11472,6 +12048,12 @@ static int __unload_module(void)
  	ast_unregister_application(zapCD_app);
  	ast_unregister_application(zapInband_app);
  #endif
@@ -730,7 +730,7 @@
  	ast_cli_unregister_multiple(zap_cli, sizeof(zap_cli) / sizeof(struct ast_cli_entry));
  	ast_unregister_application(zapEC_app);
  	ast_manager_unregister( "ZapDialOffhook" );
-@@ -12098,6 +12680,11 @@ static int process_zap(struct zt_chan_co
+@@ -11992,6 +12574,11 @@ static int process_zap(struct zt_chan_co
   					confp->chan.radio = 0;
   					confp->pri.nodetype = BRI_CPE;
  #endif
@@ -742,7 +742,7 @@
  				} else {
  					ast_log(LOG_ERROR, "Unknown signalling method '%s'\n", v->value);
  				}
-@@ -12240,6 +12827,10 @@ static int process_zap(struct zt_chan_co
+@@ -12134,6 +12721,10 @@ static int process_zap(struct zt_chan_co
    				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));
@@ -753,7 +753,7 @@
  			} else if (!strcasecmp(v->name, "resetinterval")) {
  				if (!strcasecmp(v->value, "never"))
  					confp->pri.resetinterval = -1;
-@@ -12594,6 +13185,10 @@ static int load_module(void)
+@@ -12488,6 +13079,10 @@ static int load_module(void)
  	ast_register_application(zap_send_keypad_facility_app, zap_send_keypad_facility_exec,
  			zap_send_keypad_facility_synopsis, zap_send_keypad_facility_descrip);
  #endif
@@ -764,7 +764,7 @@
  	res = setup_zap(0);
  	/* Make sure we can register our Zap channel type */
  	if (res)
-@@ -12612,6 +13207,12 @@ static int load_module(void)
+@@ -12506,6 +13101,12 @@ static int load_module(void)
  #endif	
  	ast_register_application(zapEC_app, app_zapEC, zapEC_synopsis, zapEC_tdesc);
  	ast_cli_register_multiple(zap_cli, sizeof(zap_cli) / sizeof(struct ast_cli_entry));
@@ -777,7 +777,7 @@
  	
  	memset(round_robin, 0, sizeof(round_robin));
  	ast_manager_register( "ZapTransfer", 0, action_transfer, "Transfer Zap Channel" );
-@@ -12625,7 +13226,48 @@ static int load_module(void)
+@@ -12519,7 +13120,48 @@ static int load_module(void)
  	return res;
  }
  

Modified: asterisk/trunk/debian/patches/bristuff/zapata_euroisdn_holded
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/bristuff/zapata_euroisdn_holded?rev=5179&op=diff
==============================================================================
--- asterisk/trunk/debian/patches/bristuff/zapata_euroisdn_holded (original)
+++ asterisk/trunk/debian/patches/bristuff/zapata_euroisdn_holded Thu Jan 31 13:09:40 2008
@@ -1,6 +1,6 @@
 --- a/main/pbx.c
 +++ b/main/pbx.c
-@@ -5128,7 +5128,7 @@
+@@ -5132,7 +5132,7 @@ struct app_tmp {
  };
  
  /*! \brief run the application and free the descriptor once done */
@@ -11,7 +11,7 @@
  	struct ast_app *app;
 --- a/include/asterisk/pbx.h
 +++ b/include/asterisk/pbx.h
-@@ -145,6 +145,8 @@
+@@ -145,6 +145,8 @@ void ast_unregister_switch(struct ast_sw
   */
  struct ast_app *pbx_findapp(const char *app);
  
@@ -22,7 +22,7 @@
   *
 --- a/channels/chan_zap.c
 +++ b/channels/chan_zap.c
-@@ -304,6 +304,19 @@
+@@ -304,6 +304,19 @@ struct zt_suspended_call {
  	struct zt_suspended_call *next;
  };
  
@@ -42,7 +42,7 @@
  struct zt_pri {
  	pthread_t master;						/*!< Thread of master */
  	ast_mutex_t lock;						/*!< Mutex */
-@@ -347,6 +360,7 @@
+@@ -347,6 +360,7 @@ struct zt_pri {
  	struct zt_pvt *crvs;						/*!< Member CRV structs */
  	struct zt_pvt *crvend;						/*!< Pointer to end of CRV structs */
   	struct zt_suspended_call *suspended_calls; /* Calls parked with SUSPEND messages */
@@ -50,7 +50,7 @@
  	int debugfd;
  };
  
-@@ -7463,6 +7477,7 @@
+@@ -7463,6 +7477,7 @@ static struct zt_pvt *mkintf(int channel
  						pris[span].overlapdial = conf.pri.overlapdial;
  						pris[span].usercid = conf.pri.usercid;
  						pris[span].suspended_calls = NULL;
@@ -58,7 +58,7 @@
  						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));
-@@ -8138,6 +8153,58 @@
+@@ -8138,6 +8153,58 @@ static struct zt_pvt *pri_find_crv(struc
  	return NULL;
  }
  
@@ -117,7 +117,7 @@
  
  static int pri_find_principle(struct zt_pri *pri, int channel)
  {
-@@ -9582,18 +9649,150 @@
+@@ -9582,18 +9649,150 @@ static void *pri_dchannel(void *vpri)
  				    pri_hold_reject(pri->pri, e->hold_req.call);
  				    break;
  				}
@@ -274,7 +274,7 @@
  			case PRI_EVENT_DISPLAY_RECEIVED:
  				ast_log(LOG_NOTICE, "DISPLAY IE: [ %s ] received\n",e->display.text);
  				chanpos = pri_find_principle(pri, e->display.channel);
-@@ -9750,9 +9949,20 @@
+@@ -9750,9 +9949,20 @@ static void *pri_dchannel(void *vpri)
  
  						ast_mutex_unlock(&pri->pvts[chanpos]->lock);
  					} else {
@@ -298,7 +298,7 @@
  					}
  				} 
  				break;
-@@ -9815,11 +10025,63 @@
+@@ -9815,11 +10025,63 @@ static void *pri_dchannel(void *vpri)
  							    	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");
  							}
@@ -367,7 +367,7 @@
  						} else {
  							pri_hangup(pri->pri, pri->pvts[chanpos]->call, e->hangup.cause, -1);
  							pri->pvts[chanpos]->call = NULL;
-@@ -9849,7 +10111,19 @@
+@@ -9849,7 +10111,19 @@ static void *pri_dchannel(void *vpri)
   						if (pri->nodetype != BRI_NETWORK_PTMP) {
    						    ast_log(LOG_WARNING, "Hangup REQ on bad channel %d/%d on span %d\n", PRI_SPAN(e->hangup.channel), PRI_CHANNEL(e->hangup.channel), pri->span);
   						} else {
@@ -388,7 +388,7 @@
   						}
  					}
  				} 
-@@ -10011,16 +10285,73 @@
+@@ -10011,16 +10285,73 @@ static void *pri_dchannel(void *vpri)
  				}
  				break;
   			case PRI_EVENT_FACILITY:

Modified: asterisk/trunk/debian/patches/bristuff/zapata_num_spans
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/bristuff/zapata_num_spans?rev=5179&op=diff
==============================================================================
--- asterisk/trunk/debian/patches/bristuff/zapata_num_spans (original)
+++ asterisk/trunk/debian/patches/bristuff/zapata_num_spans Thu Jan 31 13:09:40 2008
@@ -5,7 +5,7 @@
 
 --- a/channels/chan_zap.c
 +++ b/channels/chan_zap.c
-@@ -190,7 +194,7 @@ static const char config[] = "zapata.con
+@@ -190,7 +190,7 @@ static const char config[] = "zapata.con
  #define SIG_GR303FXOKS	(0x0100000 | ZT_SIG_FXOKS)
  #define SIG_GR303FXSKS	(0x0100000 | ZT_SIG_FXSKS)
  

Modified: asterisk/trunk/debian/patches/use-libpri-bristuffed
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/use-libpri-bristuffed?rev=5179&op=diff
==============================================================================
--- asterisk/trunk/debian/patches/use-libpri-bristuffed (original)
+++ asterisk/trunk/debian/patches/use-libpri-bristuffed Thu Jan 31 13:09:40 2008
@@ -119,7 +119,7 @@
  else
 --- a/configure.ac
 +++ b/configure.ac
-@@ -824,7 +824,7 @@ fi
+@@ -823,7 +823,7 @@ fi
  
  AST_EXT_LIB_CHECK([POPT], [popt], [poptStrerror], [popt.h])
  
@@ -130,12 +130,12 @@
  	if test -n "${PWLIB_DIR}"; then
 --- a/channels/chan_zap.c
 +++ b/channels/chan_zap.c
-@@ -75,7 +75,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
+@@ -71,7 +71,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
  #include <zaptel/tonezone.h>
  
  #ifdef HAVE_PRI
 -#include <libpri.h>
 +#include <bristuffed/libpri.h>
  #endif
- #ifdef HAVE_GSMAT
- #include <libgsmat.h>
+ 
+ #include "asterisk/lock.h"




More information about the Pkg-voip-commits mailing list