]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
added support to read from the configuration file ring_on_ms and ring_off_msg
authorMoises Silva <moy@sangoma.com>
Tue, 19 Jan 2010 19:45:52 +0000 (19:45 +0000)
committerMoises Silva <moy@sangoma.com>
Tue, 19 Jan 2010 19:45:52 +0000 (19:45 +0000)
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@990 a93c3328-9c30-0410-af19-c9cd2b2d52af

libs/openzap/src/ozmod/ozmod_wanpipe/ozmod_wanpipe.c

index a275acc352a218ecda78dd739927d0843bda7896..8dad35dca5a391b8cce2bc7cb5d953657f48dff1 100644 (file)
@@ -368,6 +368,20 @@ static ZIO_CONFIGURE_FUNCTION(wanpipe_configure)
                        } else {
                                wp_globals.flash_ms = num;
                        }
+               } else if (!strcasecmp(var, "ring_on_ms")) {
+                       num = atoi(val);
+                       if (num < 500 || num > 5000) {
+                               zap_log(ZAP_LOG_WARNING, "invalid ring_on_ms at line %d (valid range 500 to 5000)\n", lineno);
+                       } else {
+                               wp_globals.ring_on_ms = num;
+                       }
+               } else if (!strcasecmp(var, "ring_off_ms")) {
+                       num = atoi(val);
+                       if (num < 500 || num > 5000) {
+                               zap_log(ZAP_LOG_WARNING, "invalid ring_off_ms at line %d (valid range 500 to 5000)\n", lineno);
+                       } else {
+                               wp_globals.ring_off_ms = num;
+                       }
                }
        }