]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Made companding law for SS7 calls only determined by SS7 signaling type.
authorRichard Mudgett <rmudgett@digium.com>
Sat, 15 Sep 2012 00:13:39 +0000 (00:13 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Sat, 15 Sep 2012 00:13:39 +0000 (00:13 +0000)
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.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@373090 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/sig_ss7.c

index fb9bca1ba597d7ff180cdf56ac7fdf0e2b4e6a67..e768b41c0c3d2b6dbbe0ee4ddec6e774496c74f3 100644 (file)
@@ -528,6 +528,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 {
@@ -1778,6 +1779,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) {