]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-5160 --resolve This is depricated in favor of {loops=10}tone_stream://path=/foo...
authorAnthony Minessale <anthm@freeswitch.org>
Sat, 9 Mar 2013 13:58:09 +0000 (07:58 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Sat, 9 Mar 2013 13:58:15 +0000 (07:58 -0600)
conf/vanilla/dialplan/default.xml
src/mod/formats/mod_tone_stream/mod_tone_stream.c

index 7f5002152f39a59e69b9370df16671c743d99eac..72b9431a40d8b16213f5ff851d5dcb3f16ff1b16 100644 (file)
     <extension name="milliwatt">
       <condition field="destination_number" expression="^9197$">
        <action application="answer"/>
-       <action application="playback" data="tone_stream://%(251,0,1004);loops=-1"/>
+       <action application="playback" data="{loops=-1}tone_stream://%(251,0,1004)"/>
       </condition>
     </extension>
 
     <extension name="tone_stream">
       <condition field="destination_number" expression="^9198$">
        <action application="answer"/>
-       <action application="playback" data="tone_stream://path=${base_dir}/conf/tetris.ttml;loops=10"/>
+       <action application="playback" data="{loops=10}tone_stream://path=${base_dir}/conf/tetris.ttml"/>
       </condition>
     </extension>
 
index fe3080f4c5886a6334964b631226862d1bc394b7..bf373f4162b0f28eeaa4b6c26a45418f93b124bc 100644 (file)
@@ -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);