<p dir="ltr">You could m and make a moh file that has ringing the first 30 sec and then the anouncment </p>
<div class="gmail_extra"><br><div class="gmail_quote">בתאריך 22 באוג׳ 2016 7:19 PM,‏ "Jean Aunis" <<a href="mailto:jean.aunis@prescom.fr">jean.aunis@prescom.fr</a>> כתב:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <p>Thank you for the idea. The problem with RetryDial, is that it
      will cancel the first call, play the announce and then dial the
      SIP peer once again, so the telephone will display a missed call.
      I would prefer to do everything in a single call.<br>
    </p>
    <br>
    <div>Le 22/08/2016 à 17:57, John Kiniston a
      écrit :<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">You could try using RetryDial() instead of Dial, It
        supports playing an announcement.<br>
        <br>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Mon, Aug 22, 2016 at 8:45 AM, Jean
          Aunis <span dir="ltr"><<a href="mailto:jean.aunis@prescom.fr" target="_blank">jean.aunis@prescom.fr</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <p>Sorry, I forgot to write that the SIP peer must keep
                ringing while the announcement is being played.<br>
              </p>
              <div>
                <div> <br>
                  <div>Le 22/08/2016 à 17:42, John Kiniston a écrit :<br>
                  </div>
                  <blockquote type="cite">
                    <div dir="ltr">
                      <div>
                        <div>This seems like the obvious answer but
                          maybe I'm misunderstanding the question.<br>
                        </div>
                        <div><br>
                          exten => s,1,Dial(SIP/alice,20)<br>
                        </div>
                         same =>   n,Playback(myannouncement)<br>
                      </div>
                       same =>   n,NoOP(Whatever else you want to do
                      goes here)<br>
                    </div>
                    <div class="gmail_extra"><br>
                      <div class="gmail_quote">On Mon, Aug 22, 2016 at
                        8:36 AM, Jean Aunis <span dir="ltr"><<a href="mailto:jean.aunis@prescom.fr" target="_blank">jean.aunis@prescom.fr</a>></span>
                        wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
                          <br>
                          I am searching a way to dial a SIP peer, and
                          if it does not answer within 20 seconds, play
                          an announcement to the caller. This means that
                          the caller would hear a ring tone for 20
                          seconds, and only then hear the announcement
                          if the callee did not answer.<br>
                          <br>
                          I know it is possible to do this with ARI, but
                          in this particular case I do not want to use
                          ARI. I would like to do this purely with
                          dialplan and AGI scripts, but I cannot find a
                          way. I have read about the "m" option of Dial
                          application, but it starts the announcement
                          immediately, whereas I would like to start it
                          after 20 seconds of timeout.<br>
                          <br>
                          Does anybody have an idea ?<br>
                          <br>
                          Best regards,<br>
                          <br>
                          Jean Aunis<span><font color="#888888"><br>
                              <br>
                              <br>
                              -- <br>
                              ______________________________<wbr>______________________________<wbr>_________<br>
                              -- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" 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" rel="noreferrer" 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" rel="noreferrer" target="_blank">http://lists.digium.com/mailma<wbr>n/listinfo/asterisk-users</a><br>
                            </font></span></blockquote>
                      </div>
                      <br>
                      <br clear="all">
                      <br>
                      -- <br>
                      <div data-smartmail="gmail_signature">A human
                        being should be able to change a diaper, plan an
                        invasion, butcher a hog, conn a ship, design a
                        building, write a sonnet, balance accounts,
                        build a wall, set a bone, comfort the dying,
                        take orders, give orders, cooperate, act alone,
                        solve equations, analyze a new problem, pitch
                        manure, program a computer, cook a tasty meal,
                        fight efficiently, die gallantly. Specialization
                        is for insects.<br>
                        ---Heinlein</div>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
            <br>
            --<br>
            ______________________________<wbr>______________________________<wbr>_________<br>
            -- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" 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" rel="noreferrer" 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" rel="noreferrer" target="_blank">http://lists.digium.com/mailm<wbr>an/listinfo/asterisk-users</a><br>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <br>
        -- <br>
        <div data-smartmail="gmail_signature">A
          human being should be able to change a diaper, plan an
          invasion, butcher a hog, conn a ship, design a building, write
          a sonnet, balance accounts, build a wall, set a bone, comfort
          the dying, take orders, give orders, cooperate, act alone,
          solve equations, analyze a new problem, pitch manure, program
          a computer, cook a tasty meal, fight efficiently, die
          gallantly. Specialization is for insects.<br>
          ---Heinlein</div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
    </blockquote>
    <br>
  </div>

<br>--<br>
______________________________<wbr>______________________________<wbr>_________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" 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" rel="noreferrer" 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" rel="noreferrer" target="_blank">http://lists.digium.com/<wbr>mailman/listinfo/asterisk-<wbr>users</a><br></blockquote></div></div>