<div dir="ltr">Hi Johan Wilfer,<br><br>Thanks for your reply. On the basis of your provided code I made all things into extensions.conf. But i have an small issue on which I need your attention again.<br>in below context what&#39;s  ${tz} ? Is this time zone value or else?<br>
and another things is what is the use of  <span style="color: rgb(0, 102, 0);">SayUnixTime(${time},${tz},d &#39;digits/of&#39; B);</span><br>this function in such case?<br><br> context conference_play_recordings_<div bgcolor="#ffffff">
conference_paused {<br>
        announce =&gt; {<br>
          Set(time=$[${epoch_start}+${position}/1000]);<br>
          while(true) {<br>
            WaitExten(1);<br>
            Background(conf_playrec_pause_part1);<br>
            SayUnixTime(${time},${tz},kM);<br>
            Background(conf_playrec_pause_part2);<br>
            SayUnixTime(${time},${tz},d &#39;digits/of&#39; B);<br>
            Background(conf_playrec_pause_part3);<br>
            WaitExten(5);<br>
          }<br>
        }</div><br>one thing which is also confusing is that what is the meaning or use of such lines in this application.<br><br><span style="color: rgb(0, 102, 0);">ControlPlayback(${filename},60000,3,1,*#2456790,,,o(${position}))</span><br>
<br>Please put some light on these too.<br><br><div class="gmail_quote">On Wed, Jun 1, 2011 at 1:50 AM, Johan Wilfer <span dir="ltr">&lt;<a href="mailto:lists@jttech.se">lists@jttech.se</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


  
    
    
  
  <div text="#000000" bgcolor="#ffffff"><div class="im">
    On 2011-05-30 14:32, virendra bhati wrote:
    <blockquote type="cite">
      <div dir="ltr">Hi List,<br>
        <br>
        Asterisk &#39;s <b>ControlPlayback</b> will used for play any
        recorded file as an audio player. Is it possible that we can use
        it for multiple forward and rewind ?<br>
        <br>
        ex:-  <br>
        original: ControlPlayback(filename,skipms,ff,rew,stop,pause) <br>
        expected
        ControlPlayback(filename,skip1,skip2,skip3,forward1,rewind1,forward2,rewind2,forward3,rewind3,stop,pause)
        :  <br>
      </div>
    </blockquote>
    <br></div>
    Yes, you can use the CPLAYBACKSTATUS, CPLAYBACKOFFSET and
    CPLAYBACKSTOPKEY variables to get this behavior. <br>
    All you have to do is to list the additional keys and stop keys and
    implement this in your dialplan...<br>
    <br>
    I&#39;ve attached some ael I use for this to implement 1 and 3 as 1
    minute rewind/forward. 4 and 6 as 5 minutes rewind/forward and 7 and
    9 as 15 minutes.<br>
    5 I use as the pause key, and */# to switch recording.<br>
    <br>
    Greetings,<br>
    Johan Wilfer<br>
    <br>
    ----<br>
    <br>
    <br>
      context conference_play_recordings_conference_connect {<br>
        playrec_intro =&gt; {<br>
          Set(position=0);<br>
          goto play,1;<br>
        }<br>
        <br>
        play =&gt; {<br>
          while (true) {<br>
            if (${position}==-1) { goto recording_end,1; }<br>
    <br>
            //rewind 5 seconds after every action (so the user doesn&#39;t
    feel lost...)<br>
            Set(position=$[${position}-5000]);<br>
            if (${position} &lt; 0) { Set(position=0); }<br>
            <br>
           
    ControlPlayback(${filename},60000,3,1,*#2456790,,,o(${position}));<br>
            Set(position=${CPLAYBACKOFFSET});<br>
    <br>
            if (${CPLAYBACKSTATUS}==ERROR) {<br>
              Playback(pbx_error_500);<br>
              Playback(pbx_endcall);<br>
              Wait(2);<br>
              Hangup();      <br>
            }        <br>
    <br>
            //If stopped by user<br>
            if (${CPLAYBACKSTATUS}==USERSTOPPED) {<br>
              if (!${ISNULL(${CPLAYBACKSTOPKEY})}) { goto
    ${CPLAYBACKSTOPKEY},1; }<br>
            }<br>
          }<br>
        }<br>
    <br>
        recording_end =&gt; {<br>
          //The end of the recording is reached<br>
          Set(position=0);<br>
          Background(pbx_endcall);<br>
          WaitExten(2);<br>
          Hangup();      <br>
        }<br>
    <br>
        1 =&gt; {<br>
          Set(position=$[${position}-60000]); //Rewind 1 minute<br>
          goto play,1;<br>
        }<br>
        <br>
        2 =&gt; {<br>
          //Instructions, that could be aborted with 2.<br>
          //1 and 3 could be used to forward/rewind 0 ms effectivly
    disabling the defalut..<br>
          ControlPlayback(conf_playrec_instructions_full,0,1,3,2); <br>
          Wait(1);<br>
          goto play,1;     <br>
        }<br>
        <br>
        3 =&gt; {<br>
          Set(position=$[${position}+60000]); //Forward 1 minute<br>
          goto play,1;<br>
        }<br>
    <br>
        4 =&gt; {<br>
          Set(position=$[${position}-300000]); //Rewind 5 minutes<br>
          goto play,1;<br>
        }<br>
        <br>
        5 =&gt; {<br>
          goto conference_play_recordings_conference_paused, announce,
    1; //Pause<br>
        }<br>
        <br>
        6 =&gt; {<br>
          Set(position=$[${position}+300000]); //Forward 5 minutes<br>
          goto play,1;<br>
        }<br>
        <br>
        7 =&gt; {<br>
          Set(position=$[${position}-900000]); //Rewind 15 minutes<br>
          goto play,1;<br>
        }<br>
        <br>
        9 =&gt; {<br>
          Set(position=$[${position}+900000]); //Forward 15 minutes<br>
          goto play,1;<br>
        }<br>
        <br>
        0 =&gt; {<br>
          goto playrec_intro,1; //Restart playback of the current
    recording<br>
        }<br>
        <br>
        * =&gt; {<br>
          //Previous recording<br>
          //If no recording found, resume playback<br>
          goto play,1;<br>
        }<br>
        <br>
        # =&gt; {<br>
          //Next recording<br>
          //If no recording found, resume playback<br>
          goto play,1;<br>
        }<br>
    <br>
        i =&gt; {<br>
          goto play,1;<br>
        }<br>
    <br>
      }<br>
    <br>
      context conference_play_recordings_conference_paused {<br>
        announce =&gt; {<br>
          Set(time=$[${epoch_start}+${position}/1000]);<br>
          while(true) {<br>
            WaitExten(1);<br>
            Background(conf_playrec_pause_part1);<br>
            SayUnixTime(${time},${tz},kM);<br>
            Background(conf_playrec_pause_part2);<br>
            SayUnixTime(${time},${tz},d &#39;digits/of&#39; B);<br>
            Background(conf_playrec_pause_part3);<br>
            WaitExten(5);<br>
          }<br>
        }<br>
    <br>
        i =&gt; {<br>
          //Every inputs goes here<br>
          Wait(1);<br>
          goto conference_play_recordings_conference_connect,play,1;<br>
        }<br>
      }<br>
    <br>
    <br>
    <blockquote type="cite"><div class="im">
      <div dir="ltr">     <br>
        <div dir="ltr"><br>
          -----<br>
          Thanks and regards<br>
          <br>
           Virendra Bhati<br>
          +91-9172341457<br>
          Asterisk Engineer<br>
        </div>
        <br>
      </div>
      </div><pre><fieldset></fieldset>
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a>

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a></pre>
    </blockquote>
    <br>
    <br>
    <pre cols="72">-- 
Med vänlig hälsning

Johan Wilfer                 email: <a href="mailto:johan@jttech.se" target="_blank">johan@jttech.se</a>
JT Tech | Utvecklare         webb: <a href="http://jttech.se" target="_blank">http://jttech.se</a>
direkt: +46 31 380 91 01  support: +46 31 380 91 00
</pre>
  </div>

<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
               <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr"><br><br>
<br>-----<br>Thanks and regards<br><br> Virendra Bhati<br>+91-9172341457<br>Asterisk Engineer<br></div><br>
</div>