From 23303cf5e5b4c1126a3373266cf5191a29b7a596a26ee1c9a543e2a20c31eb71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20M=C3=B6llers?= Date: Tue, 9 Jul 2019 09:03:15 +0000 Subject: [PATCH] Accepting request 714181 from home:frispete:telephony:asterisk For some reason, I missed to submit this. It's tested thoughoutly, and works very well so far.. - add patch spandsp-handle-international-dialstring-prefix.diff in order to support the international dialing prefix - apply patch spandsp-raise-traintime-tolerance.diff as supplied with iaxmodem OBS-URL: https://build.opensuse.org/request/show/714181 OBS-URL: https://build.opensuse.org/package/show/network:telephony/spandsp?expand=0&rev=34 --- ...andle-international-dialstring-prefix.diff | 51 +++++++++++++++++++ spandsp-raise-traintime-tolerance.diff | 20 ++++++++ spandsp.changes | 12 +++++ spandsp.spec | 4 ++ 4 files changed, 87 insertions(+) create mode 100644 spandsp-handle-international-dialstring-prefix.diff create mode 100644 spandsp-raise-traintime-tolerance.diff diff --git a/spandsp-handle-international-dialstring-prefix.diff b/spandsp-handle-international-dialstring-prefix.diff new file mode 100644 index 0000000..b537fa6 --- /dev/null +++ b/spandsp-handle-international-dialstring-prefix.diff @@ -0,0 +1,51 @@ +Index: b/src/at_interpreter.c +=================================================================== +--- a/src/at_interpreter.c ++++ b/src/at_interpreter.c +@@ -847,6 +847,7 @@ static const char *at_cmd_A(at_state_t * + static const char *at_cmd_D(at_state_t *s, const char *t) + { + int ok; ++ int first; + char *u; + char num[100 + 1]; + char ch; +@@ -858,6 +859,7 @@ static const char *at_cmd_D(at_state_t * + s->command_dial = FALSE; + t += 1; + ok = FALSE; ++ first = TRUE; + /* There are a numbers of options in a dial command string. + Many are completely irrelevant in this application. */ + u = num; +@@ -867,6 +869,7 @@ static const char *at_cmd_D(at_state_t * + { + /* V.250 6.3.1.1 Basic digit set */ + *u++ = ch; ++ first = FALSE; + } + else + { +@@ -880,7 +883,10 @@ static const char *at_cmd_D(at_state_t * + case '#': + /* V.250 6.3.1.1 Full DTMF repertoire */ + if (!s->p.pulse_dial) ++ { + *u++ = ch; ++ first = FALSE; ++ } + break; + case ' ': + case '-': +@@ -890,7 +896,10 @@ static const char *at_cmd_D(at_state_t * + break; + case '+': + /* V.250 6.3.1.1 International access code */ +- /* TODO: */ ++ /* Allow + as first symbol in a dial string. */ ++ if (first) ++ *u++ = ch; ++ first = FALSE; + break; + case ',': + /* V.250 6.3.1.2 Pause */ diff --git a/spandsp-raise-traintime-tolerance.diff b/spandsp-raise-traintime-tolerance.diff new file mode 100644 index 0000000..9f4f78a --- /dev/null +++ b/spandsp-raise-traintime-tolerance.diff @@ -0,0 +1,20 @@ +Raise v17 training time tolerance, as found in iaxmodem supplied spandsp. + +diff -up -r spandsp-0.0.6/src/v17rx.c ../iaxmodem/iaxmodem-1.3.0/lib/spandsp/src/v17rx.c +--- a/src/v17rx.c 2016-02-07 02:24:28.000000000 +0100 ++++ b/src/v17rx.c 2014-06-30 18:21:39.000000000 +0200 +@@ -1046,10 +1046,10 @@ static void process_half_baud(v17_rx_sta + s->carrier_track_i = 100.0f; + s->carrier_track_p = 500000.0f; + #endif +- /* TODO: This was increased by a factor of 10 after studying real world failures. +- However, it is not clear why this is an improvement, If something gives +- a huge training error, surely it shouldn't decode too well? */ +- if (s->training_error < (V17_TRAINING_SHORT_SEG_2_LEN - 8)*4.0f*constellation_spacing[s->space_map]) ++ /* We need to be liberally accepting of poor fast-train training errors here. ++ Doing this affords the DTE the opportunity to make some use of whatever ++ valid Phase C data can be decoded. */ ++ if (s->training_error < (V17_TRAINING_SHORT_SEG_2_LEN - 8)*10.0f*constellation_spacing[s->space_map]) + { + s->training_count = 0; + if (s->bits_per_symbol == 2) diff --git a/spandsp.changes b/spandsp.changes index 297ad36..9156443 100644 --- a/spandsp.changes +++ b/spandsp.changes @@ -3,6 +3,18 @@ Thu May 23 11:06:20 UTC 2019 - Martin Liška - Disable LTO (boo#1136056). +------------------------------------------------------------------- +Tue Sep 11 09:29:34 UTC 2018 - Hans-Peter Jansen + +- add patch spandsp-handle-international-dialstring-prefix.diff + in order to support the international dialing prefix + +------------------------------------------------------------------- +Mon Sep 10 12:17:35 UTC 2018 - Hans-Peter Jansen + +- apply patch spandsp-raise-traintime-tolerance.diff + as supplied with iaxmodem + ------------------------------------------------------------------- Wed Mar 25 17:33:40 UTC 2015 - p.drouand@gmail.com diff --git a/spandsp.spec b/spandsp.spec index 83e0a62..29a9392 100644 --- a/spandsp.spec +++ b/spandsp.spec @@ -28,6 +28,8 @@ Url: http://soft-switch.org/ Source0: http://soft-switch.org/downloads/spandsp/%name-%version.tar.gz Source1: baselibs.conf Patch1: spandsp-autoconf.diff +Patch2: spandsp-raise-traintime-tolerance.diff +Patch3: spandsp-handle-international-dialstring-prefix.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: docbook-xsl-stylesheets BuildRequires: doxygen @@ -92,6 +94,8 @@ This package contains documentation for the libspandsp API. %prep %setup -qn %name-0.0.6 %patch1 -p1 +%patch2 -p1 +%patch3 -p1 %build %define _lto_cflags %{nil}