Last active
May 21, 2024 13:41
-
-
Save jontow/42e37d8aed919c976fb7eb589b9eac9c to your computer and use it in GitHub Desktop.
freeswitch 1.10.11 spandsp fix: https://github.com/signalwire/freeswitch/issues/2158#issuecomment-1633877159
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/mod/applications/mod_spandsp/mod_spandsp_dsp.c b/src/mod/applications/mod_spandsp/mod_spandsp_dsp.c | |
index 836808a48d..ef809acc27 100644 | |
--- a/src/mod/applications/mod_spandsp/mod_spandsp_dsp.c | |
+++ b/src/mod/applications/mod_spandsp/mod_spandsp_dsp.c | |
@@ -156,11 +156,11 @@ static int get_v18_mode(switch_core_session_t *session) | |
{ | |
switch_channel_t *channel = switch_core_session_get_channel(session); | |
const char *var; | |
- int r = V18_MODE_5BIT_4545; | |
+ int r = V18_MODE_WEITBRECHT_5BIT_4545; | |
if ((var = switch_channel_get_variable(channel, "v18_mode"))) { | |
if (!strcasecmp(var, "5BIT_45") || !strcasecmp(var, "baudot")) { | |
- r = V18_MODE_5BIT_4545; | |
+ r = V18_MODE_WEITBRECHT_5BIT_4545; | |
} else if (!strcasecmp(var, "5BIT_50")) { | |
r = V18_MODE_5BIT_50; | |
} else if (!strcasecmp(var, "DTMF")) { | |
@@ -213,7 +213,7 @@ switch_status_t spandsp_tdd_send_session(switch_core_session_t *session, const c | |
return SWITCH_STATUS_FALSE; | |
} | |
- tdd_state = v18_init(NULL, TRUE, get_v18_mode(session), V18_AUTOMODING_GLOBAL, put_text_msg, NULL); | |
+ tdd_state = v18_init(NULL, TRUE, get_v18_mode(session), V18_AUTOMODING_GLOBAL, put_text_msg, NULL, NULL, NULL); | |
v18_put(tdd_state, text, -1); | |
@@ -260,7 +260,7 @@ switch_status_t spandsp_tdd_encode_session(switch_core_session_t *session, const | |
} | |
pvt->session = session; | |
- pvt->tdd_state = v18_init(NULL, TRUE, get_v18_mode(session), V18_AUTOMODING_GLOBAL, put_text_msg, NULL); | |
+ pvt->tdd_state = v18_init(NULL, TRUE, get_v18_mode(session), V18_AUTOMODING_GLOBAL, put_text_msg, NULL, NULL, NULL); | |
pvt->head_lead = TDD_LEAD; | |
v18_put(pvt->tdd_state, text, -1); | |
@@ -338,7 +338,7 @@ switch_status_t spandsp_tdd_decode_session(switch_core_session_t *session) | |
} | |
pvt->session = session; | |
- pvt->tdd_state = v18_init(NULL, FALSE, get_v18_mode(session), V18_AUTOMODING_GLOBAL, put_text_msg, pvt); | |
+ pvt->tdd_state = v18_init(NULL, FALSE, get_v18_mode(session), V18_AUTOMODING_GLOBAL, put_text_msg, pvt, NULL, NULL); | |
if ((status = switch_core_media_bug_add(session, "spandsp_tdd_decode", NULL, | |
tdd_decode_callback, pvt, 0, SMBF_READ_REPLACE | SMBF_NO_PAUSE, &bug)) != SWITCH_STATUS_SUCCESS) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment