Maybe try progress() instead of answer () בתאריך 23 באוג׳ 2016 7:19 PM, "Jean Aunis" <jean.au...@prescom.fr> כתב:
> Thank you, I just tried your suggestion. Strangely, the announcement is > played only if I try to dial a SIP peer which is not available (not > registered to be more precise). If the SIP peer is available, I only get > the ring tone, and never hear the announcement. Here is the dialplan (I had > to add an Answer() before the Dial, otherwise the announcement is never > played, even in the first case) : > > exten = 007,1,Answer() > same = n,Dial(SIP/foo&Local/s@playme,40) > > [playme] > exten = s,1,Ringing() > same = n,Wait(10) > same = n,Playback(/var/lib/asterisk/sounddir/announce,noanswer) > When it is working, I can see the following output in the CLI, which is > not there otherwise : > -- SIP/xxxxxxxxx requested media update control 26, passing it to > Local/s@playme-000005be;1 > > Otherwise, no error message, Asterisk tells he is playing the announcement > but I don't hear it. > > Best regards > > Jean Aunis > > Le 23/08/2016 à 16:07, David Duffett a écrit : > > How about: > > exten => s,1,Dial(SIP/alice&LOCAL/555@delayed-announce,40) > > [delayed-announce] > exten => 555,1,Wait(20) > same => n,Playback(myannouncement,noanswer) > same => n,NoOP(Whatever else you want to do goes here) > > The 'noanswer' option on the Playback means that SIP/alice should continue > to ring for the remaining 20 of the 40 seconds, as the Playback will not > answer (terminate) the call. > > Don't forget AstriCon this year - www.astricon.net > > On 23 August 2016 at 12:52, Israel Gottlieb <isr...@gmail.com> wrote: > >> You could m and make a moh file that has ringing the first 30 sec and >> then the anouncment >> >> בתאריך 22 באוג׳ 2016 7:19 PM, "Jean Aunis" <jean.au...@prescom.fr> כתב: >> >> 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. >>> >>> Le 22/08/2016 à 17:57, John Kiniston a écrit : >>> >>> You could try using RetryDial() instead of Dial, It supports playing an >>> announcement. >>> >>> >>> On Mon, Aug 22, 2016 at 8:45 AM, Jean Aunis <jean.au...@prescom.fr> >>> wrote: >>> >>>> Sorry, I forgot to write that the SIP peer must keep ringing while the >>>> announcement is being played. >>>> >>>> Le 22/08/2016 à 17:42, John Kiniston a écrit : >>>> >>>> This seems like the obvious answer but maybe I'm misunderstanding the >>>> question. >>>> >>>> exten => s,1,Dial(SIP/alice,20) >>>> same => n,Playback(myannouncement) >>>> same => n,NoOP(Whatever else you want to do goes here) >>>> >>>> On Mon, Aug 22, 2016 at 8:36 AM, Jean Aunis <jean.au...@prescom.fr> >>>> wrote: >>>> >>>>> Hello, >>>>> >>>>> 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. >>>>> >>>>> 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. >>>>> >>>>> Does anybody have an idea ? >>>>> >>>>> Best regards, >>>>> >>>>> Jean Aunis >>>>> >>>>> >>>>> -- >>>>> _____________________________________________________________________ >>>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- >>>>> New to Asterisk? Join us for a live introductory webinar every Thurs: >>>>> http://www.asterisk.org/hello >>>>> >>>>> asterisk-users mailing list >>>>> To UNSUBSCRIBE or update options visit: >>>>> http://lists.digium.com/mailman/listinfo/asterisk-users >>>>> >>>> >>>> >>>> >>>> -- >>>> 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. >>>> ---Heinlein >>>> >>>> >>>> >>>> >>>> -- >>>> _____________________________________________________________________ >>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- >>>> New to Asterisk? Join us for a live introductory webinar every Thurs: >>>> http://www.asterisk.org/hello >>>> >>>> asterisk-users mailing list >>>> To UNSUBSCRIBE or update options visit: >>>> http://lists.digium.com/mailman/listinfo/asterisk-users >>>> >>> >>> >>> >>> -- >>> 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. >>> ---Heinlein >>> >>> >>> >>> >>> -- >>> _____________________________________________________________________ >>> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- >>> New to Asterisk? Join us for a live introductory webinar every Thurs: >>> http://www.asterisk.org/hello >>> >>> asterisk-users mailing list >>> To UNSUBSCRIBE or update options visit: >>> http://lists.digium.com/mailman/listinfo/asterisk-users >>> >> >> -- >> _____________________________________________________________________ >> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- >> >> Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016 >> http://www.asterisk.org/community/astricon-user-conference >> >> New to Asterisk? Start here: >> https://wiki.asterisk.org/wiki/display/AST/Getting+Started >> >> asterisk-users mailing list >> To UNSUBSCRIBE or update options visit: >> http://lists.digium.com/mailman/listinfo/asterisk-users >> > > > > -- > [image: Digium logo] > *David Duffett* > Digium, Inc. · Director, Worldwide Asterisk Community > 6 Landscape Close · Weston on the Green · Bicester · Oxfordshire OX25 3SX > · UK > direct/fax: +1 256 428 6119 · mobile: +44 7722 442236 > twitter: dduffett · linkedin: www.linkedin.com/in/davidduffett > Check us out at: http://digium.com · http://asterisk.org > <http://www.asterisk.org/> > > > > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016 > http://www.asterisk.org/community/astricon-user-conference > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016 http://www.asterisk.org/community/astricon-user-conference New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users