how to play music when dial fail or time out

Home » Asterisk Users » how to play music when dial fail or time out
Asterisk Users 3 Comments

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!

3 thoughts on - 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
    http://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 Enrico
    thanks I do what u said but meet this problem:
    [May 11 11:08:49] WARNING[4545]: file.c:650 ast_openstream_full: File
    fail.wav does not exist in any format
    [May 11 11:08:49] WARNING[4545]: file.c:953 ast_streamfile: Unable to open
    fail.wav (format 0x2 (gsm)): No such file or directory
    [May 11 11:08:49] WARNING[4545]: app_playback.c:471 playback_exec:
    ast_streamfile failed on SIP/IMSI460020656177633-00000000 for fail.wav

    fail.wav is the sound which I want to playback, from the message this file
    can not be found,
    I put it under /var/lib/asterisk/sounds/