diff --git a/conf/vanilla/dialplan/default.xml b/conf/vanilla/dialplan/default.xml
index 7f5002152f..72b9431a40 100644
--- a/conf/vanilla/dialplan/default.xml
+++ b/conf/vanilla/dialplan/default.xml
@@ -695,14 +695,14 @@
-
+
-
+
diff --git a/src/mod/formats/mod_tone_stream/mod_tone_stream.c b/src/mod/formats/mod_tone_stream/mod_tone_stream.c
index fe3080f4c5..bf373f4162 100644
--- a/src/mod/formats/mod_tone_stream/mod_tone_stream.c
+++ b/src/mod/formats/mod_tone_stream/mod_tone_stream.c
@@ -136,6 +136,15 @@ static switch_status_t tone_stream_file_open(switch_file_handle_t *handle, const
switch_buffer_create_dynamic(&audio_buffer, 1024, 1024, 0);
switch_assert(audio_buffer);
+ if ((tmp = (char *)switch_stristr(";loops=", tonespec))) {
+ *tmp = '\0';
+ tmp += 7;
+ if (tmp) {
+ loops = atoi(tmp);
+ switch_buffer_set_loops(audio_buffer, loops);
+ }
+ }
+
if (handle->params) {
if ((tmp = switch_event_get_header(handle->params, "loops"))) {
loops = atoi(tmp);