]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't get early media for ISDN on outgoing calls.
authorRichard Mudgett <rmudgett@digium.com>
Mon, 9 May 2011 16:57:18 +0000 (16:57 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Mon, 9 May 2011 16:57:18 +0000 (16:57 +0000)
It looks to be a long-standing misinterpretation of the progress indicator
ie values:
1 - Call is not end-to-end ISDN; further call progress information may be
available in-band.
8 - In-band information or an appropriate pattern is now available.

Only value 8 is handled by chan_dahdi/sig_pri.  The 1 value is not handled
as early media probably because the meaning of the second half of it's
description was overlooked.

* Test to see if either PRI_PROG_CALL_NOT_E2E_ISDN(1) or
PRI_PROG_INBAND_AVAILABLE(8) bits are set to open the media path.

(closes issue #18868)
Reported by: isrl
Patches:
      issue18868_19246_v1.8.patch uploaded by rmudgett (license 664)
Tested by: satish_lx

..........

No inband progress on PRI_EVENT_RINGING even if inband flag set.

My ISDN-PRI provider sends an ALERTING with "Inband information or
appropriate pattern now available", but Asterisk only generates and passes
the RING to the SIP extension, not the inband message.  Unfortunately, the
inband message is not a ringback tone but a prompt that says the number is
not in service.  The SIP extension then hears two rings and the call is
hungup which confuses the caller.

* Post an AST_CONTROL_PROGRESS as well as opening the media path if inband
audio is indicated with an ALERTING message.

(closes issue #19246)
Reported by: cristiandimache
Patches:
      issue19246_v1.8.patch uploaded by rmudgett (license 664)
Tested by: cristiandimache

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

channels/sig_pri.c

index 6cf84882c48744a5b613dd305b49490024f0b59e..e8e8addecdc0ca8cb8b63eb68f50d44615b3052a 100644 (file)
@@ -5379,13 +5379,19 @@ static void *pri_dchannel(void *vpri)
                                        pri->pvts[chanpos]->call_level = SIG_PRI_CALL_LEVEL_ALERTING;
                                }
 
-                               if (
+                               if (!pri->pvts[chanpos]->progress
+                                       && !pri->pvts[chanpos]->no_b_channel
 #ifdef PRI_PROGRESS_MASK
-                                       e->ringing.progressmask & PRI_PROG_INBAND_AVAILABLE
+                                       && (e->ringing.progressmask
+                                               & (PRI_PROG_CALL_NOT_E2E_ISDN | PRI_PROG_INBAND_AVAILABLE))
 #else
-                                       e->ringing.progress == 8
+                                       && e->ringing.progress == 8
 #endif
                                        ) {
+                                       /* 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]);
                                }
 
@@ -5437,7 +5443,8 @@ static void *pri_dchannel(void *vpri)
                                if (!pri->pvts[chanpos]->progress
                                        && !pri->pvts[chanpos]->no_b_channel
 #ifdef PRI_PROGRESS_MASK
-                                       && (e->proceeding.progressmask & PRI_PROG_INBAND_AVAILABLE)
+                                       && (e->proceeding.progressmask
+                                               & (PRI_PROG_CALL_NOT_E2E_ISDN | PRI_PROG_INBAND_AVAILABLE))
 #else
                                        && e->proceeding.progress == 8
 #endif
@@ -5479,7 +5486,8 @@ static void *pri_dchannel(void *vpri)
                                if (!pri->pvts[chanpos]->progress
                                        && !pri->pvts[chanpos]->no_b_channel
 #ifdef PRI_PROGRESS_MASK
-                                       && (e->proceeding.progressmask & PRI_PROG_INBAND_AVAILABLE)
+                                       && (e->proceeding.progressmask
+                                               & (PRI_PROG_CALL_NOT_E2E_ISDN | PRI_PROG_INBAND_AVAILABLE))
 #else
                                        && e->proceeding.progress == 8
 #endif