Revision
16511
Author
gmaruzz
Date
2010-01-25 08:48:11 -0600 (Mon, 25 Jan 2010)

Log Message

gsmopen: asterisk, trying to fix a 'no carrier' after 'ath'

Modified Paths

Diff

Modified: freeswitch/branches/gmaruzz/mod_gsmopen/asterisk/Makefile (16510 => 16511)


--- freeswitch/branches/gmaruzz/mod_gsmopen/asterisk/Makefile	2010-01-25 14:19:23 UTC (rev 16510)
+++ freeswitch/branches/gmaruzz/mod_gsmopen/asterisk/Makefile	2010-01-25 14:48:11 UTC (rev 16511)
@@ -17,7 +17,7 @@
 #ASTERISK INCLUDE FILES
 #The directory that contains the Asterisk include files (eg: /usr/include or /usr/include/asterisk or /usr/src/asterisk/include or ...)
 #AST_INCLUDE_DIR=/usr/src/off_dev/asterisk-1.2.rev137401/include
-AST_INCLUDE_DIR=/usr/src/asterisk-1.4.26.2/include
+AST_INCLUDE_DIR=/usr/src/asterisk-1.4.27.1/include
 #AST_INCLUDE_DIR=/usr/src/asterisk-1.6.0.10/include
 
 #ASTERISK VERSION

Modified: freeswitch/branches/gmaruzz/mod_gsmopen/asterisk/celliax.h (16510 => 16511)


--- freeswitch/branches/gmaruzz/mod_gsmopen/asterisk/celliax.h	2010-01-25 14:19:23 UTC (rev 16510)
+++ freeswitch/branches/gmaruzz/mod_gsmopen/asterisk/celliax.h	2010-01-25 14:48:11 UTC (rev 16511)
@@ -151,6 +151,7 @@
 #define 	CALLFLOW_CALL_OUTGOINGRESTRICTED   107
 #define 	CALLFLOW_CALL_SECURITYFAIL   108
 #define 	CALLFLOW_CALL_NOANSWER   109
+#define 	CALLFLOW_CALL_HANGUP_REQUESTED   110
   //fixme CALLFLOW_GOT_IMEI to be removed
 #define 	CALLFLOW_GOT_IMEI   1009
   //fixme CALLFLOW_INCOMING_CALLID to be removed

Modified: freeswitch/branches/gmaruzz/mod_gsmopen/asterisk/celliax_additional.c (16510 => 16511)


--- freeswitch/branches/gmaruzz/mod_gsmopen/asterisk/celliax_additional.c	2010-01-25 14:19:23 UTC (rev 16510)
+++ freeswitch/branches/gmaruzz/mod_gsmopen/asterisk/celliax_additional.c	2010-01-25 14:48:11 UTC (rev 16511)
@@ -1483,18 +1483,20 @@
         }
       }
       if ((strcmp(p->line_array.result[i], "NO CARRIER") == 0)) {
-        p->phone_callflow = CALLFLOW_CALL_NOCARRIER;
-        if (option_debug > 1)
-          DEBUGA_AT("|%s| CALLFLOW_CALL_NOCARRIER\n", CELLIAX_P_LOG,
-                    p->line_array.result[i]);
-	p->control_to_send = 0;
-	usleep(20000);
-        if (p->interface_state != AST_STATE_DOWN && p->owner) {
-          p->owner->hangupcause = AST_CAUSE_FAILURE;
-          celliax_queue_control(p->owner, AST_CONTROL_HANGUP);
-        } else {
-          ERRORA("Why NO CARRIER now?\n", CELLIAX_P_LOG);
-        }
+	      if (p->phone_callflow != CALLFLOW_CALL_HANGUP_REQUESTED) {
+		      p->phone_callflow = CALLFLOW_CALL_NOCARRIER;
+		      if (option_debug > 1)
+			      DEBUGA_AT("|%s| CALLFLOW_CALL_NOCARRIER\n", CELLIAX_P_LOG,
+					      p->line_array.result[i]);
+		      p->control_to_send = 0;
+		      usleep(20000);
+		      if (p->interface_state != AST_STATE_DOWN && p->owner) {
+			      p->owner->hangupcause = AST_CAUSE_FAILURE;
+			      celliax_queue_control(p->owner, AST_CONTROL_HANGUP);
+		      } else {
+			      ERRORA("Why NO CARRIER now?\n", CELLIAX_P_LOG);
+		      }
+	      }
       }
 
       if ((strncmp(p->line_array.result[i], "+CBC:", 5) == 0)) {

Modified: freeswitch/branches/gmaruzz/mod_gsmopen/asterisk/chan_celliax.c (16510 => 16511)


--- freeswitch/branches/gmaruzz/mod_gsmopen/asterisk/chan_celliax.c	2010-01-25 14:19:23 UTC (rev 16510)
+++ freeswitch/branches/gmaruzz/mod_gsmopen/asterisk/chan_celliax.c	2010-01-25 14:48:11 UTC (rev 16511)
@@ -656,6 +656,7 @@
     DEBUGA_PBX("ENTERING FUNC\n", CELLIAX_P_LOG);
   }
 
+    p->phone_callflow = CALLFLOW_CALL_HANGUP_REQUESTED;
   /* shutdown the serial monitoring thread */
   if (p->controldev_thread && (p->controldev_thread != AST_PTHREADT_NULL)
       && (p->controldev_thread != AST_PTHREADT_STOP)) {