[Freeswitch-svn] [commit] r8449 - in freeswitch/trunk: . conf/lang/en/vm src src/include src/mod/languages/mod_java src/mod/languages/mod_java/src/org/freeswitch/swig src/mod/languages/mod_lua src/mod/languages/mod_perl src/mod/languages/mod_python

Freeswitch SVN anthm at freeswitch.org
Fri May 16 14:40:39 EDT 2008


Author: anthm
Date: Fri May 16 14:40:39 2008
New Revision: 8449

Modified:
   freeswitch/trunk/Makefile.am
   freeswitch/trunk/conf/lang/en/vm/sounds.xml
   freeswitch/trunk/conf/lang/en/vm/tts.xml
   freeswitch/trunk/src/include/switch_cpp.h
   freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/CoreSession.java
   freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java
   freeswitch/trunk/src/mod/languages/mod_java/switch_swig_wrap.cpp
   freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_wrap.cpp
   freeswitch/trunk/src/mod/languages/mod_perl/mod_perl_wrap.cpp
   freeswitch/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp
   freeswitch/trunk/src/switch_ivr_play_say.c

Log:
lang fixes

Modified: freeswitch/trunk/Makefile.am
==============================================================================
--- freeswitch/trunk/Makefile.am	(original)
+++ freeswitch/trunk/Makefile.am	Fri May 16 14:40:39 2008
@@ -191,6 +191,13 @@
 $(switch_builddir)/quiet_libtool: $(switch_builddir)/libtool
 	@cat libtool | sed -e 's|$$show "$$command"|if test -z "$$suppress_output" ; then $$show "Compiling $$srcfile ..." ; fi|' > quiet_libtool
 
+vm-sync:
+	test -d $(DESTDIR)$(prefix)/conf || $(mkinstalldirs) $(DESTDIR)$(prefix)/conf
+	test -d $(DESTDIR)$(prefix)/conf/lang || $(mkinstalldirs) $(DESTDIR)$(prefix)/conf/lang
+	test -d $(DESTDIR)$(prefix)/conf/lang/en || $(mkinstalldirs) $(DESTDIR)$(prefix)/conf/lang/en
+	test -d $(DESTDIR)$(prefix)/conf/lang/en/vm || $(mkinstalldirs) $(DESTDIR)$(prefix)/conf/lang/en/vm
+	$(INSTALL) -m 644 conf/lang/en/vm/* $(DESTDIR)$(prefix)/conf/lang/en/vm
+
 samples-conf:
 	test -d $(DESTDIR)$(prefix)/conf || $(mkinstalldirs) $(DESTDIR)$(prefix)/conf
 	test -d $(DESTDIR)$(prefix)/conf/dialplan/extensions || $(mkinstalldirs) $(DESTDIR)$(prefix)/conf/dialplan/extensions

Modified: freeswitch/trunk/conf/lang/en/vm/sounds.xml
==============================================================================
--- freeswitch/trunk/conf/lang/en/vm/sounds.xml	(original)
+++ freeswitch/trunk/conf/lang/en/vm/sounds.xml	Fri May 16 14:40:39 2008
@@ -50,7 +50,7 @@
   </macro>
 
   <macro name="voicemail_message_count">
-    <input pattern="^(1):(.*)$">
+    <input pattern="^(1):(.*)$" break_on_match="true">
       <match>
 	<action function="play-file" data="voicemail/vm-you_have.wav"/>
 	<action function="say" data="$1" method="pronounced" type="items"/>
@@ -59,7 +59,7 @@
 	<action function="play-file" data="voicemail/vm-in_folder.wav"/>
       </match>
     </input>
-    <input pattern="^([0,2-9]+):(.*)$">
+    <input pattern="^(\d+):(.*)$">
       <match>
 	<action function="play-file" data="voicemail/vm-you_have.wav"/>
 	<action function="say" data="$1" method="pronounced" type="items"/>

Modified: freeswitch/trunk/conf/lang/en/vm/tts.xml
==============================================================================
--- freeswitch/trunk/conf/lang/en/vm/tts.xml	(original)
+++ freeswitch/trunk/conf/lang/en/vm/tts.xml	Fri May 16 14:40:39 2008
@@ -48,12 +48,12 @@
   </macro>
 
   <macro name="voicemail_message_count">
-    <input pattern="^1:(.*)$">
+    <input pattern="^1:(.*)$" break_on_match="true">
       <match>
 	<action function="speak-text" data="you have 1 $1 message in folder ${voicemail_current_folder}."/>
       </match>
     </input>
-    <input pattern="^([0,2-9]+):(.*)$">
+    <input pattern="^(\d+):(.*)$">
       <match>
 	<action function="speak-text" data="you have $1 $2 messages in folder ${voicemail_current_folder}."/>
       </match>

Modified: freeswitch/trunk/src/include/switch_cpp.h
==============================================================================
--- freeswitch/trunk/src/include/switch_cpp.h	(original)
+++ freeswitch/trunk/src/include/switch_cpp.h	Fri May 16 14:40:39 2008
@@ -310,7 +310,7 @@
 
 	SWITCH_DECLARE(bool) ready();
 
-	SWITCH_DECLARE(void) execute(char *app, char *data);
+	SWITCH_DECLARE(void) execute(char *app, char *data=NULL);
 
 	SWITCH_DECLARE(void) sendEvent(Event *sendME);
 

Modified: freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/CoreSession.java
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/CoreSession.java	(original)
+++ freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/CoreSession.java	Fri May 16 14:40:39 2008
@@ -226,7 +226,11 @@
   }
 
   public void execute(String app, String data) {
-    freeswitchJNI.CoreSession_execute(swigCPtr, this, app, data);
+    freeswitchJNI.CoreSession_execute__SWIG_0(swigCPtr, this, app, data);
+  }
+
+  public void execute(String app) {
+    freeswitchJNI.CoreSession_execute__SWIG_1(swigCPtr, this, app);
   }
 
   public void sendEvent(Event sendME) {

Modified: freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java	(original)
+++ freeswitch/trunk/src/mod/languages/mod_java/src/org/freeswitch/swig/freeswitchJNI.java	Fri May 16 14:40:39 2008
@@ -107,7 +107,8 @@
   public final static native int CoreSession_setAutoHangup(long jarg1, CoreSession jarg1_, boolean jarg2);
   public final static native void CoreSession_setHangupHook(long jarg1, CoreSession jarg1_, long jarg2);
   public final static native boolean CoreSession_ready(long jarg1, CoreSession jarg1_);
-  public final static native void CoreSession_execute(long jarg1, CoreSession jarg1_, String jarg2, String jarg3);
+  public final static native void CoreSession_execute__SWIG_0(long jarg1, CoreSession jarg1_, String jarg2, String jarg3);
+  public final static native void CoreSession_execute__SWIG_1(long jarg1, CoreSession jarg1_, String jarg2);
   public final static native void CoreSession_sendEvent(long jarg1, CoreSession jarg1_, long jarg2, Event jarg2_);
   public final static native void CoreSession_setEventData(long jarg1, CoreSession jarg1_, long jarg2, Event jarg2_);
   public final static native String CoreSession_getXMLCDR(long jarg1, CoreSession jarg1_);

Modified: freeswitch/trunk/src/mod/languages/mod_java/switch_swig_wrap.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_java/switch_swig_wrap.cpp	(original)
+++ freeswitch/trunk/src/mod/languages/mod_java/switch_swig_wrap.cpp	Fri May 16 14:40:39 2008
@@ -2119,7 +2119,7 @@
 }
 
 
-SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1execute(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
+SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1execute_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
   CoreSession *arg1 = (CoreSession *) 0 ;
   char *arg2 = (char *) 0 ;
   char *arg3 = (char *) 0 ;
@@ -2144,6 +2144,24 @@
 }
 
 
+SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1execute_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
+  CoreSession *arg1 = (CoreSession *) 0 ;
+  char *arg2 = (char *) 0 ;
+  
+  (void)jenv;
+  (void)jcls;
+  (void)jarg1_;
+  arg1 = *(CoreSession **)&jarg1; 
+  arg2 = 0;
+  if (jarg2) {
+    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
+    if (!arg2) return ;
+  }
+  (arg1)->execute(arg2);
+  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
+}
+
+
 SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1sendEvent(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
   CoreSession *arg1 = (CoreSession *) 0 ;
   Event *arg2 = (Event *) 0 ;

Modified: freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_wrap.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_wrap.cpp	(original)
+++ freeswitch/trunk/src/mod/languages/mod_lua/mod_lua_wrap.cpp	Fri May 16 14:40:39 2008
@@ -4907,7 +4907,7 @@
 }
 
 
-static int _wrap_CoreSession_execute(lua_State* L) {
+static int _wrap_CoreSession_execute__SWIG_0(lua_State* L) {
   int SWIG_arg = -1;
   CoreSession *arg1 = (CoreSession *) 0 ;
   char *arg2 = (char *) 0 ;
@@ -4937,6 +4937,89 @@
 }
 
 
+static int _wrap_CoreSession_execute__SWIG_1(lua_State* L) {
+  int SWIG_arg = -1;
+  CoreSession *arg1 = (CoreSession *) 0 ;
+  char *arg2 = (char *) 0 ;
+  
+  SWIG_check_num_args("execute",2,2)
+  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("execute",1,"CoreSession *");
+  if(!lua_isstring(L,2)) SWIG_fail_arg("execute",2,"char *");
+  
+  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
+    SWIG_fail_ptr("CoreSession_execute",1,SWIGTYPE_p_CoreSession);
+  }
+  
+  arg2 = (char *)lua_tostring(L, 2);
+  (arg1)->execute(arg2);
+  SWIG_arg=0;
+  
+  return SWIG_arg;
+  
+  if(0) SWIG_fail;
+  
+fail:
+  lua_error(L);
+  return SWIG_arg;
+}
+
+
+static int _wrap_CoreSession_execute(lua_State* L) {
+  int argc;
+  int argv[4]={
+    1,2,3,4
+  };
+  
+  argc = lua_gettop(L);
+  if (argc == 2) {
+    int _v;
+    {
+      void *ptr;
+      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) {
+        _v = 0;
+      } else {
+        _v = 1;
+      }
+    }
+    if (_v) {
+      {
+        _v = lua_isstring(L,argv[1]);
+      }
+      if (_v) {
+        return _wrap_CoreSession_execute__SWIG_1(L);
+      }
+    }
+  }
+  if (argc == 3) {
+    int _v;
+    {
+      void *ptr;
+      if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) {
+        _v = 0;
+      } else {
+        _v = 1;
+      }
+    }
+    if (_v) {
+      {
+        _v = lua_isstring(L,argv[1]);
+      }
+      if (_v) {
+        {
+          _v = lua_isstring(L,argv[2]);
+        }
+        if (_v) {
+          return _wrap_CoreSession_execute__SWIG_0(L);
+        }
+      }
+    }
+  }
+  
+  lua_pushstring(L,"No matching function for overloaded 'CoreSession_execute'");
+  lua_error(L);return 0;
+}
+
+
 static int _wrap_CoreSession_sendEvent(lua_State* L) {
   int SWIG_arg = -1;
   CoreSession *arg1 = (CoreSession *) 0 ;

Modified: freeswitch/trunk/src/mod/languages/mod_perl/mod_perl_wrap.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_perl/mod_perl_wrap.cpp	(original)
+++ freeswitch/trunk/src/mod/languages/mod_perl/mod_perl_wrap.cpp	Fri May 16 14:40:39 2008
@@ -6547,7 +6547,7 @@
 }
 
 
-XS(_wrap_CoreSession_execute) {
+XS(_wrap_CoreSession_execute__SWIG_0) {
   {
     CoreSession *arg1 = (CoreSession *) 0 ;
     char *arg2 = (char *) 0 ;
@@ -6596,6 +6596,130 @@
 }
 
 
+XS(_wrap_CoreSession_execute__SWIG_1) {
+  {
+    CoreSession *arg1 = (CoreSession *) 0 ;
+    char *arg2 = (char *) 0 ;
+    void *argp1 = 0 ;
+    int res1 = 0 ;
+    int res2 ;
+    char *buf2 = 0 ;
+    int alloc2 = 0 ;
+    int argvi = 0;
+    dXSARGS;
+    
+    if ((items < 2) || (items > 2)) {
+      SWIG_croak("Usage: CoreSession_execute(self,app);");
+    }
+    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 |  0 );
+    if (!SWIG_IsOK(res1)) {
+      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_execute" "', argument " "1"" of type '" "CoreSession *""'"); 
+    }
+    arg1 = reinterpret_cast< CoreSession * >(argp1);
+    res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
+    if (!SWIG_IsOK(res2)) {
+      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char *""'");
+    }
+    arg2 = reinterpret_cast< char * >(buf2);
+    (arg1)->execute(arg2);
+    
+    
+    if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+    XSRETURN(argvi);
+  fail:
+    
+    if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+    SWIG_croak_null();
+  }
+}
+
+
+XS(_wrap_CoreSession_execute) {
+  dXSARGS;
+  
+  {
+    unsigned long _index = 0;
+    SWIG_TypeRank _rank = 0; 
+    if (items == 2) {
+      SWIG_TypeRank _ranki = 0;
+      SWIG_TypeRank _rankm = 0;
+      SWIG_TypeRank _pi = 1;
+      int _v = 0;
+      {
+        void *vptr = 0;
+        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0);
+        _v = SWIG_CheckState(res);
+      }
+      if (!_v) goto check_1;
+      _ranki += _v*_pi;
+      _rankm += _pi;
+      _pi *= SWIG_MAXCASTRANK;
+      {
+        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
+        _v = SWIG_CheckState(res);
+      }
+      if (!_v) goto check_1;
+      _ranki += _v*_pi;
+      _rankm += _pi;
+      _pi *= SWIG_MAXCASTRANK;
+      if (!_index || (_ranki < _rank)) {
+        _rank = _ranki; _index = 1;
+        if (_rank == _rankm) goto dispatch;
+      }
+    }
+  check_1:
+    
+    if (items == 3) {
+      SWIG_TypeRank _ranki = 0;
+      SWIG_TypeRank _rankm = 0;
+      SWIG_TypeRank _pi = 1;
+      int _v = 0;
+      {
+        void *vptr = 0;
+        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0);
+        _v = SWIG_CheckState(res);
+      }
+      if (!_v) goto check_2;
+      _ranki += _v*_pi;
+      _rankm += _pi;
+      _pi *= SWIG_MAXCASTRANK;
+      {
+        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
+        _v = SWIG_CheckState(res);
+      }
+      if (!_v) goto check_2;
+      _ranki += _v*_pi;
+      _rankm += _pi;
+      _pi *= SWIG_MAXCASTRANK;
+      {
+        int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
+        _v = SWIG_CheckState(res);
+      }
+      if (!_v) goto check_2;
+      _ranki += _v*_pi;
+      _rankm += _pi;
+      _pi *= SWIG_MAXCASTRANK;
+      if (!_index || (_ranki < _rank)) {
+        _rank = _ranki; _index = 2;
+        if (_rank == _rankm) goto dispatch;
+      }
+    }
+  check_2:
+    
+  dispatch:
+    switch(_index) {
+    case 1:
+      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CoreSession_execute__SWIG_1); return;
+    case 2:
+      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CoreSession_execute__SWIG_0); return;
+    }
+  }
+  
+  croak("No matching function for overloaded 'CoreSession_execute'");
+  XSRETURN(0);
+}
+
+
 XS(_wrap_CoreSession_sendEvent) {
   {
     CoreSession *arg1 = (CoreSession *) 0 ;

Modified: freeswitch/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp	(original)
+++ freeswitch/trunk/src/mod/languages/mod_python/mod_python_wrap.cpp	Fri May 16 14:40:39 2008
@@ -6760,7 +6760,7 @@
 }
 
 
-SWIGINTERN PyObject *_wrap_CoreSession_execute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+SWIGINTERN PyObject *_wrap_CoreSession_execute__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   CoreSession *arg1 = (CoreSession *) 0 ;
   char *arg2 = (char *) 0 ;
@@ -6805,6 +6805,89 @@
 }
 
 
+SWIGINTERN PyObject *_wrap_CoreSession_execute__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
+  PyObject *resultobj = 0;
+  CoreSession *arg1 = (CoreSession *) 0 ;
+  char *arg2 = (char *) 0 ;
+  void *argp1 = 0 ;
+  int res1 = 0 ;
+  int res2 ;
+  char *buf2 = 0 ;
+  int alloc2 = 0 ;
+  PyObject * obj0 = 0 ;
+  PyObject * obj1 = 0 ;
+  
+  if (!PyArg_ParseTuple(args,(char *)"OO:CoreSession_execute",&obj0,&obj1)) SWIG_fail;
+  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 |  0 );
+  if (!SWIG_IsOK(res1)) {
+    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_execute" "', argument " "1"" of type '" "CoreSession *""'"); 
+  }
+  arg1 = reinterpret_cast< CoreSession * >(argp1);
+  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
+  if (!SWIG_IsOK(res2)) {
+    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char *""'");
+  }
+  arg2 = reinterpret_cast< char * >(buf2);
+  (arg1)->execute(arg2);
+  resultobj = SWIG_Py_Void();
+  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+  return resultobj;
+fail:
+  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
+  return NULL;
+}
+
+
+SWIGINTERN PyObject *_wrap_CoreSession_execute(PyObject *self, PyObject *args) {
+  int argc;
+  PyObject *argv[4];
+  int ii;
+  
+  if (!PyTuple_Check(args)) SWIG_fail;
+  argc = (int)PyObject_Length(args);
+  for (ii = 0; (ii < argc) && (ii < 3); ii++) {
+    argv[ii] = PyTuple_GET_ITEM(args,ii);
+  }
+  if (argc == 2) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
+      _v = SWIG_CheckState(res);
+      if (_v) {
+        return _wrap_CoreSession_execute__SWIG_1(self, args);
+      }
+    }
+  }
+  if (argc == 3) {
+    int _v;
+    void *vptr = 0;
+    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0);
+    _v = SWIG_CheckState(res);
+    if (_v) {
+      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
+      _v = SWIG_CheckState(res);
+      if (_v) {
+        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
+        _v = SWIG_CheckState(res);
+        if (_v) {
+          return _wrap_CoreSession_execute__SWIG_0(self, args);
+        }
+      }
+    }
+  }
+  
+fail:
+  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CoreSession_execute'.\n"
+    "  Possible C/C++ prototypes are:\n"
+    "    execute(CoreSession *,char *,char *)\n"
+    "    execute(CoreSession *,char *)\n");
+  return NULL;
+}
+
+
 SWIGINTERN PyObject *_wrap_CoreSession_sendEvent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   CoreSession *arg1 = (CoreSession *) 0 ;

Modified: freeswitch/trunk/src/switch_ivr_play_say.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_play_say.c	(original)
+++ freeswitch/trunk/src/switch_ivr_play_say.c	Fri May 16 14:40:39 2008
@@ -209,7 +209,8 @@
 
 	while (input && !done) {
 		char *pattern = (char *) switch_xml_attr(input, "pattern");
-
+		const char *do_break = switch_xml_attr_soft(input, "break_on_match");
+		
 		if (pattern) {
 			switch_regex_t *re = NULL;
 			int proceed = 0, ovector[30];
@@ -220,7 +221,7 @@
 			switch_xml_t match = NULL;
 
 			status = SWITCH_STATUS_SUCCESS;
-
+			
 			if ((proceed = switch_regex_perform(data, pattern, &re, ovector, sizeof(ovector) / sizeof(ovector[0])))) {
 				match = switch_xml_child(input, "match");
 			} else {
@@ -232,7 +233,7 @@
 				for (action = switch_xml_child(match, "action"); action && status == SWITCH_STATUS_SUCCESS; action = action->next) {
 					char *adata = (char *) switch_xml_attr_soft(action, "data");
 					char *func = (char *) switch_xml_attr_soft(action, "function");
-
+					
 					if (strchr(pattern, '(') && strchr(adata, '$')) {
 						len = (uint32_t) (strlen(data) + strlen(adata) + 10);
 						if (!(substituted = malloc(len))) {
@@ -313,6 +314,12 @@
 			switch_regex_safe_free(re);
 			switch_safe_free(expanded);
 			switch_safe_free(substituted);
+
+			
+			if (match && do_break && switch_true(do_break)) {
+				break;
+			}
+			
 		}
 
 		if (status != SWITCH_STATUS_SUCCESS) {



More information about the Freeswitch-svn mailing list