Summary:ASTERISK-19372: BUSY/INCOMPLETE/CONGESTION indications not passed to SS7 channel
Reporter:Igor Nikolaev (microlana)Labels:
Date Opened:2012-02-16 04:42:12.000-0600Date Closed:2012-03-05 16:32:19.000-0600
Versions:10.1.0 Frequency of
Environment:OpenSuSe 12.1, 2xE1 Digium card, SS7 signalling /etc/asterisk/extensions.conf [pstn] exten => _X.,1,NoOp(SS7 --> VoIP) exten => _X.,n,Set(CALLERID(num-pres)=allowed) exten => _X.,n,Set(FAXOPT(gateway)=yes) exten => _X.,n,Dial(SIP/sip_voip_trunk/${EXTEN}) Attachments:( 0) debug.log
( 1) jira_asterisk_19372_v1.8.patch
( 2) jira_asterisk_19372_v10.patch
( 3) ss7_busy_congestion.patch
Description:Call flow:
PSTN --> (via SS7) --> Asterisk --> (SIP) --> endpoint

Call originated from PSTN, landing on Asterisk context [pstn] and dialing via SIP trunk sip_voip_trunk.
Remote SIP endpoint is BUSY, we got BUSY indication from SIP channel. Then chan_dahdi is notifyed by BUSY condition, but it's not send to SS7 link immediatly. Therefore, we have lot delay between BUSY state from SIP endpoint and BUSY indication at PSTN (full debug log see at attached file):

[Feb 16 12:32:43] VERBOSE[10095] app_dial.c:     -- Called SIP/sip_voip_trunk/1111
[Feb 16 12:32:43] VERBOSE[10095] app_dial.c:     -- SIP/sip_voip_trunk-00003618 is busy
[Feb 16 12:32:43] DEBUG[10095] channel.c: Hanging up channel 'SIP/sip_voip_trunk-00003618'
[Feb 16 12:32:43] DEBUG[10095] chan_sip.c: Hanging up zombie call. Be scared.
[Feb 16 12:32:43] DEBUG[10095] res_rtp_asterisk.c: Setting RTCP address on RTP instance '0x7f4c25ca2f28'
[Feb 16 12:32:43] DEBUG[10095] res_rtp_asterisk.c: Setting RTCP address on RTP instance '0x7f4c26119638'
[Feb 16 12:32:43] VERBOSE[10095] app_dial.c:   == Everyone is busy/congested at this time (1:1/0/0)
[Feb 16 12:32:43] DEBUG[10095] app_dial.c: Exiting with DIALSTATUS=BUSY.
[Feb 16 12:32:43] VERBOSE[10095] pbx.c:     -- Auto fallthrough, channel 'DAHDI/15-1' status is 'BUSY'
[Feb 16 12:32:43] DEBUG[10095] chan_dahdi.c: Requested indication 5 on channel DAHDI/15-1

11 seconds left!

[Feb 16 12:32:54] DEBUG[10095] channel.c: Soft-Hanging up channel 'DAHDI/15-1'
[Feb 16 12:32:54] DEBUG[10095] channel.c: Hanging up channel 'DAHDI/15-1'
[Feb 16 12:32:54] DEBUG[10095] chan_dahdi.c: dahdi_hangup(DAHDI/15-1)

Comments:By: Igor Nikolaev (microlana) 2012-02-16 04:43:08.041-0600

PSTN --> Asterisk --> SIP
Debug trace

By: Igor Nikolaev (microlana) 2012-02-16 04:44:15.350-0600


Send BUSY/INCOMPLETE/CONGESTION initication to the SS7 link and hangup a call.

By: Richard Mudgett (rmudgett) 2012-03-02 16:01:56.260-0600

[^jira_asterisk_19372_v1.8.patch] and [^jira_asterisk_19372_v10.patch] will drop the call correctly if it is not connected yet when the BUSY/INCOMPLETE/CONGESTION indications happen.  It doesn't make sense to disconnect the call with BUSY or CONGESTION causes if the call is already connected, so the tones are played instead.

Please test to confirm the patch does what you are intending.

By: Richard Mudgett (rmudgett) 2012-03-05 16:21:48.621-0600

Never mind.  Patch works as expected.