From: Anthony Minessale Date: Sat, 9 Mar 2013 13:58:09 +0000 (-0600) Subject: FS-5160 --resolve This is depricated in favor of {loops=10}tone_stream://path=/foo... X-Git-Tag: v1.3.17-final~116 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9425718762b4c4e38ba86a3d2483d34bf1b454d;p=thirdparty%2Ffreeswitch.git FS-5160 --resolve This is depricated in favor of {loops=10}tone_stream://path=/foo/bar.ttml adding legacy code to let both ways work --- 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);