[Home]

Summary:ASTERISK-17459: [patch] dont get early media on outgoing calls
Reporter:isrl (isrl)Labels:
Date Opened:2011-02-22 08:30:43.000-0600Date Closed:2011-05-12 20:34:50
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_dahdi
Versions:1.8.2 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) console-debug-pri.txt
( 1) issue18868_19246_v1.8.patch
( 2) patch-LIBPRI-q931-handle-non-isdn-progress.diff.txt
( 3) pri-intense-debug.txt
Description:on most outgoing calls i dont get early media
card is a sangoma a101c
libpri tried 1.14.11.5 and 1.4.12
dahdi 2.4.0

Comments:By: isrl (isrl) 2011-02-22 08:34:49.000-0600

/etc/dahdi/system.conf

#autogenerated by /usr/sbin/wancfg_dahdi do not hand edit
#autogenrated on 2010-12-09
#Dahdi Channels Configurations
#For detailed Dahdi options, view /etc/dahdi/system.conf.bak


#Sangoma A101 port 1 [slot:11 bus:1 span:1] <wanpipe1>
span=1,1,0,ccs,hdb3,crc4
bchan=1-15,17-31
hardhdlc=16
echocanceller=oslec,1-15,17-31


loadzone=il
defaultzone=il



----------------------------------------------------------------------------------------
chan_dahdi.conf




;autogenerated by /usr/sbin/wancfg_dahdi do not hand edit
;autogenrated on 2010-12-09
;Dahdi Channels Configurations
;For detailed Dahdi options, view /etc/asterisk/chan_dahdi.conf.bak

[trunkgroups]

[channels]
#include chan_dahdi_additional.conf


language=he
context=default
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
rxgain=0.0
txgain=0.0
callgroup=1
pickupgroup=1
;immediate=no



faxdetect=incoming

language=he
switchtype=euroisdn
context=from-zaptel-cid-fix
group=0
signalling=pri_cpe
resetinterval=never
relaxdtmf=yes
channel => 1-15,17-31

By: isrl (isrl) 2011-02-22 08:51:14.000-0600

seems to have the same problem as
https://issues.asterisk.org/view.php?id=15420

but here its all dahdi even without  sip

By: Richard Mudgett (rmudgett) 2011-02-22 11:18:18.000-0600

It is not the same problem as ASTERISK-14397.

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.

By: cmaj (cmaj) 2011-03-06 18:32:44.000-0600

Attached a patch to clean this up in libpri. Solves the problem on a PRI T1 for me. Symptom appears on remote IVRs that start audio before answer. Please test.

By: cmaj (cmaj) 2011-03-06 19:03:33.000-0600

Also, in sip.conf, these general settings help in 1.8:

progressinband=yes
prematuremedia=yes

By: Richard Mudgett (rmudgett) 2011-03-07 10:07:04.000-0600

While the patch may work, it adds further misinterpretation to the mix.  The 1 and 8 codes have different meanings.  1 is used when the ISDN network is informed that the call has left the ISDN network and MAY have inband audio.  8 is used when the ISDN network generates or knows that there is inband audio.

The original misinterpretation is in chan_dahdi/sig_pri and not in libpri.  Libpri is just reporting what it has received on the link.

By: cmaj (cmaj) 2011-03-07 11:50:47.000-0600

Patch works for me. Pretty simple and doesn't seem to cause any harm.

And 8 could mean a pattern, as you wrote in your note on 2/22. So PRI_PROG_INBAND_AVAILABLE is technically not correct for that, either. Should be PRI_PROG_INBAND_OR_PATTERN_AVAILABLE.

These are larger issues, for sure. But I got bit on this during a 1.6 to 1.8 upgrade and consider it a major bug that can be fixed with just one line of extra code. So why the heck not?

Also, why would libpri assign the state by way of a bitmask'ed OR for progressmask if you'll only ever use one value?

I can provide you plenty of DIDs where this was breaking under 1.8 - people just hearing dead air when they call them, after it worked fine on 1.6.

By: isrl (isrl) 2011-03-09 10:13:23.000-0600

Thanks
Fixed it for me too

By: Richard Mudgett (rmudgett) 2011-05-06 15:23:24

The issue18868_19246_v1.8.patch file should fix this issue and ASTERISK-17813 as well.

By: Satish Patel (satish_lx) 2011-05-08 09:52:57

This patch works great for me.. Please add this patch in main branch

By: Digium Subversion (svnbot) 2011-05-09 11:57:20

Repository: asterisk
Revision: 318231

U   branches/1.8/channels/sig_pri.c

------------------------------------------------------------------------
r318231 | rmudgett | 2011-05-09 11:57:19 -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 ASTERISK-17459)
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 ASTERISK-17813)
Reported by: cristiandimache
Patches:
     issue19246_v1.8.patch uploaded by rmudgett (license 664)
Tested by: cristiandimache

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=318231

By: Digium Subversion (svnbot) 2011-05-09 12:00:06

Repository: asterisk
Revision: 318232

_U  trunk/
U   trunk/channels/sig_pri.c

------------------------------------------------------------------------
r318232 | rmudgett | 2011-05-09 12:00:06 -0500 (Mon, 09 May 2011) | 48 lines

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 ASTERISK-17459)
 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 ASTERISK-17813)
 Reported by: cristiandimache
 Patches:
       issue19246_v1.8.patch uploaded by rmudgett (license 664)
 Tested by: cristiandimache
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=318232