[asterisk-commits] wedhorn: trunk r340973 - /trunk/channels/chan_skinny.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Oct 14 16:15:37 CDT 2011


Author: wedhorn
Date: Fri Oct 14 16:15:33 2011
New Revision: 340973

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=340973
Log:
Fix simple switch to not progress a call when call already progressed.

If a simple switch was started on a device and then a specific call
made (such as redial or speed dial), on timeout of the simple switch
the call would be attempted again. This patch only allows the simple
switch to make a call if the substate is still in the collecting
digits mode.

Also added small debug message to dialAndAactivate sub. 

Tested by snuff and myself.


Modified:
    trunk/channels/chan_skinny.c

Modified: trunk/channels/chan_skinny.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_skinny.c?view=diff&rev=340973&r1=340972&r2=340973
==============================================================================
--- trunk/channels/chan_skinny.c (original)
+++ trunk/channels/chan_skinny.c Fri Oct 14 16:15:33 2011
@@ -4309,7 +4309,9 @@
 					}
 					return NULL;
 				} else {
-					dialandactivatesub(sub, sub->exten);
+					if (sub->substate == SUBSTATE_OFFHOOK) {
+						dialandactivatesub(sub, sub->exten);
+					}
 					return NULL;
 				}
 			} else {
@@ -5463,6 +5465,9 @@
 
 static void dialandactivatesub(struct skinny_subchannel *sub, char exten[AST_MAX_EXTENSION])
 {
+	if (skinnydebug) {
+		ast_verb(3, "Sub %d - Dial %s and Activate\n", sub->callid, exten);
+	}
 	ast_copy_string(sub->exten, exten, sizeof(sub->exten));
 	activatesub(sub, SUBSTATE_DIALING);
 }




More information about the asterisk-commits mailing list