summaryrefslogtreecommitdiff
path: root/channels/sig_ss7.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2012-09-15 00:32:37 +0000
committerRichard Mudgett <rmudgett@digium.com>2012-09-15 00:32:37 +0000
commitb0f01e5a6f871f42ded30d77984b32aeb05817a6 (patch)
tree512ed7bb6a218772b62e545789cd694208bf6a19 /channels/sig_ss7.c
parentf92bb6265c86d6bd1b22e50a4fe41766ecdec489 (diff)
Made companding law for SS7 calls only determined by SS7 signaling type.
For SS7, the companding law for a call was chosen inconsistently depending upon ss7type (ITU vs ANSI) and the DAHDI companding default (T1 vs E1). For incoming calls, the companding law was determined by ss7type. For outgoing calls, the companding law was determined by the DAHDI default. With the wrong combination you would get A-law/u-law conflicts. An A-law/u-law conflict sounds like bad static on the line. SS7 ITU signaling with E1 line: ok SS7 ITU signaling with T1 line: noise SS7 ANSI signaling with E1 line: noise SS7 ANSI signaling with T1 line: ok * Fix the companding law used to be determined by the SS7 signaling type only. ........ Merged revisions 373090 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 373101 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 373107 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/sig_ss7.c')
-rw-r--r--channels/sig_ss7.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/channels/sig_ss7.c b/channels/sig_ss7.c
index 0c9b8f51e..795887123 100644
--- a/channels/sig_ss7.c
+++ b/channels/sig_ss7.c
@@ -570,6 +570,7 @@ static void ss7_start_call(struct sig_ss7_chan *p, struct sig_ss7_linkset *links
p->call_level = SIG_SS7_CALL_LEVEL_SETUP;
}
+ /* Companding law is determined by SS7 signaling type. */
if (linkset->type == SS7_ITU) {
law = SIG_SS7_ALAW;
} else {
@@ -1872,6 +1873,13 @@ struct ast_channel *sig_ss7_request(struct sig_ss7_chan *p, enum sig_ss7_law law
{
struct ast_channel *ast;
+ /* Companding law is determined by SS7 signaling type. */
+ if (p->ss7->type == SS7_ITU) {
+ law = SIG_SS7_ALAW;
+ } else {
+ law = SIG_SS7_ULAW;
+ }
+
sig_ss7_set_outgoing(p, 1);
ast = sig_ss7_new_ast_channel(p, AST_STATE_RESERVED, law, transfercapability, p->exten, requestor);
if (!ast) {