[asterisk-commits] russell: branch 1.4 r69518 - /branches/1.4/apps/app_meetme.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jun 15 10:27:35 CDT 2007


Author: russell
Date: Fri Jun 15 10:27:34 2007
New Revision: 69518

URL: http://svn.digium.com/view/asterisk?view=rev&rev=69518
Log:
The SLATRUNK_STATUS variable indicated "SUCCESS" for both an answer of the
incoming call on the trunk, or if the trunk reached its ring timeout.
This patch changes the variable to say "RINGTIMEOUT" in that case.
(issue #9973, reported by n00dle, patch by me)

Modified:
    branches/1.4/apps/app_meetme.c

Modified: branches/1.4/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_meetme.c?view=diff&rev=69518&r1=69517&r2=69518
==============================================================================
--- branches/1.4/apps/app_meetme.c (original)
+++ branches/1.4/apps/app_meetme.c Fri Jun 15 10:27:34 2007
@@ -296,13 +296,21 @@
 "the argument \"station\" should be just the station name.  If the call was\n"
 "initiated by pressing a line key, then the station name should be preceded\n"
 "by an underscore and the trunk name associated with that line button.\n"
-"For example: \"station1_line1\".";
+"For example: \"station1_line1\"."
+"  On exit, this application will set the variable SLASTATION_STATUS to\n"
+"one of the following values:\n"
+"    FAILURE | CONGESTION | SUCCESS\n"
+"";
 
 static const char *slatrunk_desc =
 "  SLATrunk(trunk):\n"
 "This application should be executed by an SLA trunk on an inbound call.\n"
 "The channel calling this application should correspond to the SLA trunk\n"
-"with the name \"trunk\" that is being passed as an argument.\n";
+"with the name \"trunk\" that is being passed as an argument.\n"
+"  On exit, this application will set the variable SLATRUNK_STATUS to\n"
+"one of the following values:\n"
+"   FAILURE | SUCCESS | UNANSWERED | RINGTIMEOUT\n" 
+"";
 
 #define MAX_CONFNUM 80
 #define MAX_PIN     80
@@ -3725,6 +3733,7 @@
 		time_elapsed = ast_tvdiff_ms(ast_tvnow(), ringing_trunk->ring_begin);
 		time_left = (ringing_trunk->trunk->ring_timeout * 1000) - time_elapsed;
 		if (time_left <= 0) {
+			pbx_builtin_setvar_helper(ringing_trunk->trunk->chan, "SLATRUNK_STATUS", "RINGTIMEOUT");
 			AST_LIST_REMOVE_CURRENT(&sla.ringing_trunks, entry);
 			sla_stop_ringing_trunk(ringing_trunk);
 			res = 1;
@@ -4298,8 +4307,9 @@
 	conf = NULL;
 	trunk->chan = NULL;
 	trunk->on_hold = 0;
-
-	pbx_builtin_setvar_helper(chan, "SLATRUNK_STATUS", "SUCCESS");
+	
+	if (!pbx_builtin_getvar_helper(chan, "SLATRUNK_STATUS"))
+		pbx_builtin_setvar_helper(chan, "SLATRUNK_STATUS", "SUCCESS");
 
 	/* Remove the entry from the list of ringing trunks if it is still there. */
 	ast_mutex_lock(&sla.lock);




More information about the asterisk-commits mailing list