Jean Aunis
2016-Aug-22 15:45 UTC
[asterisk-users] Dial and start music on hold after timeout
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.aunis at prescom.fr > <mailto:jean.aunis at 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 > <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 > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20160822/27fc83e0/attachment.html>
John Kiniston
2016-Aug-22 15:57 UTC
[asterisk-users] Dial and start music on hold after timeout
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.aunis at 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.aunis at 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20160822/4693affa/attachment.html>
Jean Aunis
2016-Aug-22 16:19 UTC
[asterisk-users] Dial and start music on hold after timeout
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.aunis at prescom.fr > <mailto:jean.aunis at 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.aunis at prescom.fr <mailto:jean.aunis at 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 >> <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 > <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 > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20160822/b32c9d1f/attachment.html>
John Kiniston
2016-Aug-23 18:42 UTC
[asterisk-users] Dial and start music on hold after timeout
Damn, I was going to suggest trying a Queue with a single member using the 'r' option to play ringing instead of MOH and using an announcement but the queue will stop ringing your agent while it plays the announcement. It'd go right back to ringing after the announcement however. On Mon, Aug 22, 2016 at 8:45 AM, Jean Aunis <jean.aunis at 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.aunis at 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20160823/2bb967f1/attachment.html>