]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
chan_dahdi: Add inband_on_proceeding compatibility option.
authorRichard Mudgett <rmudgett@digium.com>
Wed, 3 Apr 2013 20:13:18 +0000 (20:13 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 3 Apr 2013 20:13:18 +0000 (20:13 +0000)
The new inband_on_proceeding option causes Asterisk to assume inband audio
may be present when a PROCEEDING message is received.

Q.931 Section 5.1.2 says the network cannot assume that the CPE side has
attached to the B channel at this time without explicitly sending the
progress indicator ie informing the CPE side to attach to the B channel
for audio.  However, some non-compliant ISDN switches send a PROCEEDING
without the progress indicator ie indicating inband audio is available and
assume that the CPE device has connected the media path for listening to
ringback and other messages.

ASTERISK-17834 which causes this issue was dealing with a non-compliant
network switch.

(closes issue ASTERISK-21151)
Reported by: Gianluca Merlo
Tested by: rmudgett

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

channels/chan_dahdi.c
channels/sig_pri.c
channels/sig_pri.h
configs/chan_dahdi.conf.sample

index bdd52e23112535d40f94fd331b1cd101f13db522..f047b551b50122070f0b01dd8ab94bad518fe032 100644 (file)
@@ -1365,6 +1365,7 @@ static struct dahdi_chan_conf dahdi_chan_conf_default(void)
                        .localdialplan = PRI_NATIONAL_ISDN + 1,
                        .nodetype = PRI_CPE,
                        .qsigchannelmapping = DAHDI_CHAN_MAPPING_PHYSICAL,
+                       .inband_on_proceeding = 1,
 
 #if defined(HAVE_PRI_CCSS)
                        .cc_ptmp_recall_mode = 1,/* specificRecall */
@@ -12680,6 +12681,7 @@ static struct dahdi_pvt *mkintf(int channel, const struct dahdi_chan_conf *conf,
                                                        pris[span].pri.layer1_ignored = 0;
                                                }
                                                pris[span].pri.append_msn_to_user_tag = conf->pri.pri.append_msn_to_user_tag;
+                                               pris[span].pri.inband_on_proceeding = conf->pri.pri.inband_on_proceeding;
                                                ast_copy_string(pris[span].pri.initial_user_tag, conf->chan.cid_tag, sizeof(pris[span].pri.initial_user_tag));
                                                ast_copy_string(pris[span].pri.msn_list, conf->pri.pri.msn_list, sizeof(pris[span].pri.msn_list));
 #if defined(HAVE_PRI_MWI)
@@ -17677,6 +17679,8 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct
 #endif /* defined(HAVE_PRI_MWI) */
                        } else if (!strcasecmp(v->name, "append_msn_to_cid_tag")) {
                                confp->pri.pri.append_msn_to_user_tag = ast_true(v->value);
+                       } else if (!strcasecmp(v->name, "inband_on_proceeding")) {
+                               confp->pri.pri.inband_on_proceeding = ast_true(v->value);
                        } else if (!strcasecmp(v->name, "layer1_presence")) {
                                if (!strcasecmp(v->value, "required")) {
                                        confp->pri.pri.layer1_ignored = 0;
index fcd24661b8d432ad61cf8bd9b59897db52d016fd..fcea9b57c2aaa4459f5e5d6e4be7d542d6ba4357 100644 (file)
@@ -5678,9 +5678,11 @@ static void *pri_dchannel(void *vpri)
                                        /* Bring voice path up */
                                        pri_queue_control(pri, chanpos, AST_CONTROL_PROGRESS);
                                        pri->pvts[chanpos]->progress = 1;
+                                       sig_pri_set_dialing(pri->pvts[chanpos], 0);
                                        sig_pri_open_media(pri->pvts[chanpos]);
+                               } else if (pri->inband_on_proceeding) {
+                                       sig_pri_set_dialing(pri->pvts[chanpos], 0);
                                }
-                               sig_pri_set_dialing(pri->pvts[chanpos], 0);
                                sig_pri_unlock_private(pri->pvts[chanpos]);
                                break;
                        case PRI_EVENT_FACILITY:
index 929756b3f7b0488c1a9519f105ff8f1179328641..f9ccf443667cde9bc39a3f5991c8009017042482 100644 (file)
@@ -393,6 +393,8 @@ struct sig_pri_span {
         * appended to the initial_user_tag[].
         */
        unsigned int append_msn_to_user_tag:1;
+       /*! TRUE if a PROCEEDING message needs to unsquelch the received audio. */
+       unsigned int inband_on_proceeding:1;
        int dialplan;                                                   /*!< Dialing plan */
        int localdialplan;                                              /*!< Local dialing plan */
        char internationalprefix[10];                   /*!< country access code ('00' for european dialplans) */
index ce0ae9a05c49a0bad5c45d917256712b04fe919e..e92c0d6b4b8ff459bce5704b67b4b405f7a3f319 100644 (file)
 ;
 ;resetinterval = 3600
 ;
+; Assume inband audio may be present when a PROCEEDING message is received.
+; Q.931 Section 5.1.2 says the network cannot assume that the CPE side has
+; attached to the B channel at this time without explicitly sending the
+; progress indicator ie informing the CPE side to attach to the B channel
+; for audio.  However, some non-compliant ISDN switches send a PROCEEDING
+; without the progress indicator ie indicating inband audio is available and
+; assume that the CPE device has connected the media path for listening to
+; ringback and other messages.
+; Default yes in current release branches for backward compatibility.
+;
+;inband_on_proceeding=yes
+;
 ; Overlap dialing mode (sending overlap digits)
 ; Cannot be changed on a reload.
 ;