[asterisk-commits] rmudgett: trunk r318232 - in /trunk: ./ channels/sig_pri.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon May 9 12:00:11 CDT 2011


Author: rmudgett
Date: Mon May  9 12:00:05 2011
New Revision: 318232

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=318232
Log:
Merged revisions 318231 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r318231 | rmudgett | 2011-05-09 11:57:18 -0500 (Mon, 09 May 2011) | 41 lines
  
  Don't get early media for ISDN on outgoing calls.
  
  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
................

Modified:
    trunk/   (props changed)
    trunk/channels/sig_pri.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: trunk/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/sig_pri.c?view=diff&rev=318232&r1=318231&r2=318232
==============================================================================
--- trunk/channels/sig_pri.c (original)
+++ trunk/channels/sig_pri.c Mon May  9 12:00:05 2011
@@ -6247,13 +6247,19 @@
 					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]);
 				}
 
@@ -6305,7 +6311,8 @@
 				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
@@ -6347,7 +6354,8 @@
 				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




More information about the asterisk-commits mailing list