Steve Davies
2011-Mar-28 12:55 UTC
[asterisk-users] DAHDI, IAX2 and SIP considerations for Early-Media / Alerting
Hi, Short version: Is it possible or even legal to convert an IAX2 PROGRESS/EARLY-MEDIA indication into a DAHDI/q.931 ALERTING signal when your ISDN provider does not pass early media on receipt of an PROGRESS(8) indication? Long version: I have an Asterisk 1.6.2.18-rc1 based system with a DAHDI trunk (UK E1 line), also, the system has IAX2 trunks, and several SIP handsets. All 3 protocols (q.931/IAX2/SIP) have a mechanism to indicate either ALERTING/RINGING, or to specify PROGRESS/EARLY-MEDIA. Based on this you'd think call setup would all work happily all of the time :) What happens based on the call direction is as follows: SIP -> DAHDI ISDN returns ALERTING, SIP uses 180 Ringing, all OK SIP -> IAX2 IAX2 returns PROGRESS, SIP uses 183 Progress, early audio works OK IAX2 -> DAHDI ISDN returns ALERTING, IAX2 uses RINGING, all OK IAX2 -> SIP SIP returns 180 ringing, IAX2 uses RINGING, all OK DAHDI -> SIP SIP returns 180 ringing, ISDN uses ALERTING, all OK DAHDI -> IAX2 IAX2 returns PROGRESS, ISDN uses PROGRESS(8), but the caller hears no ringing. I believe that my issue is that my UK ISDN provider does not accept early media, and will simply send silence instead of using the provided early audio stream. DAHDI is configured with: ? ? ? ?priindication=outofband The IAX2 trunk provider is using early-media to send the ringing tone, and as above, this mostly seems to work okay. The exception is when the call is bridged to ISDN, where I believe the ISDN provider does not pass on early media. I checked the IAX2 RFCs 5456/5457, but cannot find a definition of how RINGING/PROGRESS is meant to work. Is my IAX2 trunk provider doing something wring by not also sending RINGING? Is there a workaround that converts either IAX2 PROGRESS into RINGING, or allows DAHDI to send ALERTING if it receives an early media indication? I suspect the code to do the latter would be reasonably simple, but would appreciate pointers for any badness that it may cause. Thanks in advance for any suggestions. Regards, Steve