[asterisk-users] Dial and start music on hold after timeout

David Duffett dduffett at digium.com
Tue Aug 23 09:07:36 CDT 2016


How about:

exten => s,1,Dial(SIP/alice&LOCAL/555 at 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 <isrlgb at 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.aunis at 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.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
>>
>>
>>
>>
>> --
>> _____________________________________________________________________
>> -- 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/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20160823/96008e48/attachment.html>


More information about the asterisk-users mailing list