Skip to content

Commit 1784fe8

Browse files
committed
patches: Rebase rtoutpulsing and blueboxing patches.
Rebase rtoutpulsing patches against current master, to fix compilation failure following asterisk/asterisk@fe7be89 and asterisk/asterisk@dc8e3ee
1 parent c3d74a9 commit 1784fe8

File tree

5 files changed

+8
-41
lines changed

5 files changed

+8
-41
lines changed
1 KB
Binary file not shown.

patches/ast_rtoutpulsing2.diff

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,26 @@ diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
22
index 3baabb0872..81feb3ad0b 100644
33
--- a/channels/chan_dahdi.c
44
+++ b/channels/chan_dahdi.c
5-
@@ -1050,6 +1050,7 @@ static struct dahdi_chan_conf dahdi_chan_conf_default(void)
5+
@@ -1050,4 +1050,5 @@ static struct dahdi_chan_conf dahdi_chan_conf_default(void)
66
.mohsuggest = "",
77
.parkinglot = "",
88
.transfertobusy = 1,
99
+ .realtimepulsing = 0,
10-
.dialmode = 0,
11-
12-
.ani_info_digits = 2,
10+
.permdialmode = ANALOG_DIALMODE_BOTH,
1311
@@ -12958,6 +12959,7 @@ static struct dahdi_pvt *mkintf(int channel, const struct dahdi_chan_conf *conf,
1412
tmp->immediate = conf->chan.immediate;
1513
tmp->immediatering = conf->chan.immediatering;
1614
tmp->transfertobusy = conf->chan.transfertobusy;
1715
+ tmp->realtimepulsing = conf->chan.realtimepulsing;
18-
tmp->dialmode = conf->chan.dialmode;
16+
tmp->permdialmode = conf->chan.permdialmode;
1917
if (chan_sig & __DAHDI_SIG_FXS) {
2018
tmp->mwimonitor_fsk = conf->chan.mwimonitor_fsk;
2119
@@ -13298,6 +13300,7 @@ static struct dahdi_pvt *mkintf(int channel, const struct dahdi_chan_conf *conf,
2220
analog_p->threewaycalling = conf->chan.threewaycalling;
2321
analog_p->transfer = conf->chan.transfer;
2422
analog_p->transfertobusy = conf->chan.transfertobusy;
2523
+ analog_p->realtimepulsing = conf->chan.realtimepulsing;
26-
analog_p->dialmode = conf->chan.dialmode;
24+
analog_p->permdialmode = conf->chan.permdialmode;
2725
analog_p->use_callerid = tmp->use_callerid;
2826
analog_p->usedistinctiveringdetection = tmp->usedistinctiveringdetection;
2927
@@ -18588,6 +18591,8 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct
@@ -34,4 +32,4 @@ index 3baabb0872..81feb3ad0b 100644
3432
+ confp->chan.realtimepulsing = ast_true(v->value);
3533
} else if (!strcasecmp(v->name, "dialmode")) {
3634
if (!strcasecmp(v->value, "pulse")) {
37-
confp->chan.dialmode = ANALOG_DIALMODE_PULSE;
35+
confp->chan.permdialmode = ANALOG_DIALMODE_PULSE;

patches/ast_rtoutpulsing_channels.diff

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,7 @@ index ae909ebba6..878794ba81 100644
129129
/*! \brief -1 = unknown, 0 = no messages, 1 = new messages available */
130130
int msgstate;
131131

132-
@@ -302,6 +311,7 @@ struct analog_pvt {
133-
unsigned int callwaitingdeluxe:1; /*!< TRUE if Call Waiting Deluxe options are available */
134-
unsigned int permhidecallerid:1; /*!< Whether to hide our outgoing caller ID or not */
132+
@@ -302,2 +311,3 @@ struct analog_pvt {
135133
unsigned int pulse:1;
136134
+ unsigned int realtimepulsing:1; /*!< TRUE if realtimepulsing is enabled */
137135
unsigned int threewaycalling:1;
138-
unsigned int threewaysilenthold:1; /*!< Whether to time out a three-way dial tone to silence */
139-
unsigned int transfer:1;

patches/blueboxing.diff

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,3 @@ index 8b4e3ee60f..9ddaf68bec 100644
1111

1212
#if defined(BUSYDETECT_TONEONLY) && defined(BUSYDETECT_COMPARE_TONE_AND_SILENCE)
1313
#error You cant use BUSYDETECT_TONEONLY together with BUSYDETECT_COMPARE_TONE_AND_SILENCE
14-
@@ -622,22 +622,23 @@ static int tone_detect(struct ast_dsp *dsp, tone_detect_state_t *s, int16_t *amp
15-
hit = 0;
16-
if (TONE_THRESHOLD <= tone_energy
17-
&& tone_energy > s->energy * s->threshold) {
18-
- ast_debug(10, "%d Hz tone Hit! %2d Ew=%.4E, Et=%.4E, s/n=%10.2f\n", s->freq, s->hit_count, tone_energy, s->energy, tone_energy / (s->energy - tone_energy));
19-
+ ast_debug(7, "%d Hz tone Hit! %2d Ew=%.4E, Et=%.4E, s/n=%10.2f\n", s->freq, s->hit_count, tone_energy, s->energy, tone_energy / (s->energy - tone_energy));
20-
hit = 1;
21-
}
22-
23-
- if (s->hit_count) {
24-
+ /* Sometimes we may get a lot of hits but not get 2 in succession, leading to a false negative, so always increment XXX Never mind. */
25-
+ if (s->hit_count) { /* XXX Was 'hit', but reverted because this broke the SF receiver, so reverting this part may make blue boxing slightly harder again */
26-
s->hit_count++;
27-
}
28-
29-
if (hit == s->last_hit) {
30-
if (!hit) {
31-
/* Two successive misses. Tone ended */
32-
+ if (s->hit_count) {
33-
+ ast_debug(9, "Tone ended (had %d/%d hits)\n", s->hit_count, s->hits_required);
34-
+ }
35-
s->hit_count = 0;
36-
- } else if (!s->hit_count) {
37-
- s->hit_count++;
38-
}
39-
-
40-
}
41-
42-
if (s->hit_count == s->hits_required) {

phreaknet.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2574,6 +2574,8 @@ phreak_patches() {
25742574

25752575
## Merged, not yet in a release version (use asterisk_pr_if, e.g. asterisk_pr_if 1234 220400 210900 201400)
25762576
asterisk_pr_if 1302 220600 211100 201600 # sig_analog: Fix STP, ST2P, ST3P for fgccamamf
2577+
asterisk_pr_if 1376 220600 211100 201600 # dsp.c debug - needed for blueboxing patch to apply
2578+
asterisk_pr_if 1379 220600 211100 201600 # chan_dahdi: permdialmode - needed for rtoutpulsing patches to apply
25772579

25782580
## Unmerged patches: remove or switch to asterisk_pr_if once merged
25792581

0 commit comments

Comments
 (0)