John Wu
2011-May-09 07:41 UTC
[asterisk-users] how to play music when dial fail or time out
Hi all, I need to support this feature. When caller dial if the dial fail or no answer from the called number then play a music. So how to achieve that? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110509/c3bb9124/attachment.htm>
Dovid Bender
2011-May-09 09:30 UTC
[asterisk-users] how to play music when dial fail or time out
John,
You want to do it only after it fails ?
If so you can do something like.
Exten => _X., 1, Dial(SIP/${EXTEN}@<PEER>)
Exten => _X., 2, GotoIf($["${DIALSTATUS}" = "ANSWER"]?10)
Exten => _X., 4, MusicOnHold()
Exten => _X., 10, Hangup
----- Original Message -----
From: John Wu
To: Asterisk Users Mailing List - Non-Commercial Discussion
Sent: Monday, May 09, 2011 10:41
Subject: [asterisk-users] how to play music when dial fail or time out
Hi all,
I need to support this feature. When caller dial if the dial fail or no answer
from the
called number then play a music. So how to achieve that?
Thanks!
------------------------------------------------------------------------------
--
_____________________________________________________________________
-- 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.digium.com/pipermail/asterisk-users/attachments/20110509/8ec8d459/attachment.htm>
Enrico Cicconi
2011-May-09 13:37 UTC
[asterisk-users] how to play music when dial fail or time out
Hi, have you tried to manage all with dialplane ? just an example: [incoming] **exten => s,1,Dial (SIP/your_called_party,20) exten => s,n, Playback(music_message) ..... In the first step the call is redirect to the configured called party and if without answer (busy, not logged, not answered) ... ... in the second step a music is played. You can also do other kind of job instead of 'playback' if you need. Hoping to have helped you, have a nice day Enrico www.rdmnet.it http://www.rdmnet.it/asterisk/104-asterisk-in-pillole-impostare-il-dialplan.html Il 09/05/2011 09:41, John Wu ha scritto:> Hi all, > I need to support this feature. When caller dial if the dial fail or > no answer from the > called number then play a music. So how to achieve that? > > Thanks! > > > -- > _____________________________________________________________________ > -- 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-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110509/0421b4f1/attachment.htm>
John Wu
2011-May-11 03:12 UTC
[asterisk-users] how to play music when dial fail or time out
thanks Dovid. On Mon, May 9, 2011 at 5:30 PM, Dovid Bender <asteriskusers at dovid.net>wrote:> John, > > You want to do it only after it fails ? > > If so you can do something like. > > Exten => _X., 1, Dial(SIP/${EXTEN}@<PEER> <SIP/$%7BEXTEN%7D@%3CPEER%3E,20> > ) > Exten => _X., 2, GotoIf($["${DIALSTATUS}" = "ANSWER"]?10) > Exten => _X., 4, MusicOnHold() > Exten => _X., 10, Hangup > > > ----- Original Message ----- > *From:* John Wu <jwjohn0 at gmail.com> > *To:* Asterisk Users Mailing List - Non-Commercial Discussion<asterisk-users at lists.digium.com> > *Sent:* Monday, May 09, 2011 10:41 > *Subject:* [asterisk-users] how to play music when dial fail or time out > > Hi all, > I need to support this feature. When caller dial if the dial fail or no > answer from the > called number then play a music. So how to achieve that? > > Thanks! > > ------------------------------ > > -- > _____________________________________________________________________ > -- 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 -- > 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 >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110511/cb3ae636/attachment.htm>