[Pkg-voip-commits] r5786 - /asterisk/trunk/debian/patches/bristuff/zapata-bri+euroisdn
paravoid at alioth.debian.org
paravoid at alioth.debian.org
Sun May 25 18:56:02 UTC 2008
Author: paravoid
Date: Sun May 25 18:56:01 2008
New Revision: 5786
URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=5786
Log:
zapata merge of 0.4.0-RC1, part 5
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=5786&op=diff
==============================================================================
--- asterisk/trunk/debian/patches/bristuff/zapata-bri+euroisdn (original)
+++ asterisk/trunk/debian/patches/bristuff/zapata-bri+euroisdn Sun May 25 18:56:01 2008
@@ -653,48 +653,54 @@
#ifdef HAVE_PRI
static struct zt_pvt *pri_find_crv(struct zt_pri *pri, int crv)
{
-@@ -8046,7 +8200,9 @@ static int pri_find_principle(struct zt_
+@@ -8046,6 +8206,7 @@ static int pri_find_principle(struct zt_
static int pri_fixup_principle(struct zt_pri *pri, int principle, q931_call *c)
{
int x;
+ int res = 0;
struct zt_pvt *crv;
-+ char tmpname[256];
if (!c) {
if (principle < 0)
- return -1;
-@@ -8077,6 +8233,7 @@ static int pri_fixup_principle(struct zt
+@@ -8076,6 +8237,7 @@ static int pri_fixup_principle(struct zt
+ }
/* Fix it all up now */
new->owner = old->owner;
++ new->outgoing = old->outgoing;
old->owner = NULL;
-+ new->outgoing = old->outgoing;
if (new->owner) {
ast_string_field_build(new->owner, name,
- "Zap/%d:%d-%d", pri->trunkgroup,
-@@ -8089,6 +8246,38 @@ static int pri_fixup_principle(struct zt
- ast_log(LOG_WARNING, "Whoa, there's no owner, and we're having to fix up channel %d to channel %d\n", old->channel, new->channel);
- new->call = old->call;
+@@ -8091,11 +8253,39 @@ static int pri_fixup_principle(struct zt
old->call = NULL;
+
+ /* Copy any DSP that may be present */
+- new->dsp = old->dsp;
+ new->dsp = old->dsp;
-+ new->alreadyhungup = old->alreadyhungup;
+ new->dsp_features = old->dsp_features;
+ old->dsp = NULL;
+ old->dsp_features = 0;
+- }
++
++ /* Copy faxhandled/digial, alreadyhungup */
++ new->faxhandled = old->faxhandled;
+ new->digital = old->digital;
-+ new->faxhandled = old->faxhandled;
-+
-+ if ((pri->nodetype == BRI_CPE_PTMP) || (pri->nodetype == BRI_CPE)) {
-+ /* this might also apply for other pri types! */
++ new->alreadyhungup = old->alreadyhungup;
++
++ /* Copy law, gains, etc */
+ new->law = old->law;
-+ if (ioctl(new->subs[SUB_REAL].zfd, ZT_AUDIOMODE, &pri->pvts[principle]->law) == -1)
-+ ast_log(LOG_WARNING, "Unable to set audio mode on channel %d to %d\n", new->channel, pri->pvts[principle]->law);
-+ res = zt_setlaw(new->subs[SUB_REAL].zfd, pri->pvts[principle]->law);
++ if (ioctl(new->subs[SUB_REAL].zfd, ZT_AUDIOMODE, &new->law) == -1)
++ ast_log(LOG_WARNING, "Unable to set audio mode on channel %d to %d\n", new->channel, new->law);
++ res = zt_setlaw(new->subs[SUB_REAL].zfd, new->law);
+ if (res < 0)
+ ast_log(LOG_WARNING, "Unable to set law on channel %d\n", new->channel);
+ if (!new->digital) {
-+ res = set_actual_gain(new->subs[SUB_REAL].zfd, 0, pri->pvts[principle]->rxgain, pri->pvts[principle]->txgain, pri->pvts[principle]->law);
++ res = set_actual_gain(new->subs[SUB_REAL].zfd, 0, new->rxgain, new->txgain, new->law);
+ } else {
-+ res = set_actual_gain(new->subs[SUB_REAL].zfd, 0, 0, 0, pri->pvts[principle]->law);
++ res = set_actual_gain(new->subs[SUB_REAL].zfd, 0, 0, 0, new->law);
+ }
+ if (res < 0)
+ ast_log(LOG_WARNING, "Unable to set gains on channel %d\n", new->channel);
++
++ /* Shutdown old channel */
+ zt_confmute(old, 0);
+ update_conf(old);
+ reset_conf(old);
@@ -702,15 +708,10 @@
+ zt_disable_ec(old);
+ zt_setlinear(old->subs[SUB_REAL].zfd, 0);
+ }
-+
-+ if (new->owner) {
-+ snprintf(tmpname, sizeof(tmpname), "Zap/%d-1", new->channel);
-+ ast_change_name(new->owner, tmpname);
-+ }
-
- /* Copy any DSP that may be present */
- new->dsp = old->dsp;
-@@ -8123,7 +8312,9 @@ static int pri_fixup_principle(struct zt
+ return principle;
+ }
+ }
+@@ -8123,7 +8313,9 @@ static int pri_fixup_principle(struct zt
}
crv = crv->next;
}
@@ -942,19 +943,19 @@
}
if ((e->e != PRI_EVENT_DCHAN_UP) && (e->e != PRI_EVENT_DCHAN_DOWN) && (pri->pri != pri->dchans[which]))
-@@ -8579,24 +8760,63 @@ static void *pri_dchannel(void *vpri)
+@@ -8579,24 +8761,63 @@ static void *pri_dchannel(void *vpri)
case PRI_EVENT_DCHAN_UP:
if (!pri->pri) pri_find_dchan(pri);
- /* Note presense of D-channel */
- time(&pri->lastreset);
+ if (pri->nodetype == BRI_NETWORK_PTMP) {
-+
+
+- /* Restart in 5 seconds */
+- if (pri->resetinterval > -1) {
+ /* Note presense of D-channel */
+ time(&pri->lastreset);
-
-- /* Restart in 5 seconds */
-- if (pri->resetinterval > -1) {
++
+ pri->resetting = 0;
+ /* Take the channels from inalarm condition */
+ for (i=0; i<pri->numchans; i++)
More information about the Pkg-voip-commits
mailing list