[asterisk-commits] rmudgett: trunk r358307 - in /trunk: ./ channels/sig_ss7.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Mar 5 16:32:50 CST 2012
Author: rmudgett
Date: Mon Mar 5 16:32:48 2012
New Revision: 358307
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=358307
Log:
Drop SS7 call if not connected yet when INCOMPLETE/BUSY/CONGESTION.
SS7 is a trunk protocol and should clear a failed call as soon as
possible.
* Made SS7 hangup a call immediately if it has not connected yet for
INCOMPLETE/BUSY/CONGESTION causes. Otherwise, play an appropriate inband
tone.
(closes issue ASTERISK-19372)
Reported by: Igor Nikolaev
........
Merged revisions 358278 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 358284 from http://svn.asterisk.org/svn/asterisk/branches/10
Modified:
trunk/ (props changed)
trunk/channels/sig_ss7.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.
Modified: trunk/channels/sig_ss7.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/sig_ss7.c?view=diff&rev=358307&r1=358306&r2=358307
==============================================================================
--- trunk/channels/sig_ss7.c (original)
+++ trunk/channels/sig_ss7.c Mon Mar 5 16:32:48 2012
@@ -1671,6 +1671,12 @@
switch (condition) {
case AST_CONTROL_BUSY:
+ if (p->call_level < SIG_SS7_CALL_LEVEL_CONNECT) {
+ ast_channel_hangupcause_set(chan, AST_CAUSE_USER_BUSY);
+ ast_channel_softhangup_internal_flag_add(chan, AST_SOFTHANGUP_DEV);
+ res = 0;
+ break;
+ }
res = sig_ss7_play_tone(p, SIG_SS7_TONE_BUSY);
break;
case AST_CONTROL_RINGING:
@@ -1729,15 +1735,23 @@
res = 0;
break;
case AST_CONTROL_INCOMPLETE:
- /* If the channel is connected, wait for additional input */
- if (p->call_level == SIG_SS7_CALL_LEVEL_CONNECT) {
+ if (p->call_level < SIG_SS7_CALL_LEVEL_CONNECT) {
+ ast_channel_hangupcause_set(chan, AST_CAUSE_INVALID_NUMBER_FORMAT);
+ ast_channel_softhangup_internal_flag_add(chan, AST_SOFTHANGUP_DEV);
res = 0;
break;
}
- ast_channel_hangupcause_set(chan, AST_CAUSE_INVALID_NUMBER_FORMAT);
+ /* Wait for DTMF digits to complete the dialed number. */
+ res = 0;
break;
case AST_CONTROL_CONGESTION:
- ast_channel_hangupcause_set(chan, AST_CAUSE_CONGESTION);
+ if (p->call_level < SIG_SS7_CALL_LEVEL_CONNECT) {
+ ast_channel_hangupcause_set(chan, AST_CAUSE_CONGESTION);
+ ast_channel_softhangup_internal_flag_add(chan, AST_SOFTHANGUP_DEV);
+ res = 0;
+ break;
+ }
+ res = sig_ss7_play_tone(p, SIG_SS7_TONE_CONGESTION);
break;
case AST_CONTROL_HOLD:
ast_moh_start(chan, data, p->mohinterpret);
More information about the asterisk-commits
mailing list