[asterisk-commits] mmichelson: branch 1.4 r98315 - /branches/1.4/main/channel.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jan 11 13:10:57 CST 2008


Author: mmichelson
Date: Fri Jan 11 13:10:57 2008
New Revision: 98315

URL: http://svn.digium.com/view/asterisk?view=rev&rev=98315
Log:
Properly report the hangup cause as no answer when someone does not answer

(closes issue #10574, reported by boch, patched by moy)


Modified:
    branches/1.4/main/channel.c

Modified: branches/1.4/main/channel.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/channel.c?view=diff&rev=98315&r1=98314&r2=98315
==============================================================================
--- branches/1.4/main/channel.c (original)
+++ branches/1.4/main/channel.c Fri Jan 11 13:10:57 2008
@@ -3112,6 +3112,7 @@
 	int cause = 0;
 	struct ast_channel *chan;
 	int res = 0;
+	int last_subclass = 0;
 	
 	if (outstate)
 		*outstate = 0;
@@ -3193,6 +3194,7 @@
 				default:
 					ast_log(LOG_NOTICE, "Don't know what to do with control frame %d\n", f->subclass);
 				}
+				last_subclass = f->subclass;
 			}
 			ast_frfree(f);
 		}
@@ -3211,6 +3213,8 @@
 		*outstate = AST_CONTROL_ANSWER;
 
 	if (res <= 0) {
+		if ( AST_CONTROL_RINGING == last_subclass ) 
+			chan->hangupcause = AST_CAUSE_NO_ANSWER;
 		if (!chan->cdr && (chan->cdr = ast_cdr_alloc()))
 			ast_cdr_init(chan->cdr, chan);
 		if (chan->cdr) {




More information about the asterisk-commits mailing list