Playback while dialing out

Home » Asterisk Users » Playback while dialing out
Asterisk Users 3 Comments

Hi, please help me with dialplan below.

My current dialplan looks like this, it plays a file and then connects
the caller to my phone by dialing out. As you can see, it waits for
file to be played completely before dialing out. What I would really
like is that it should play the file (preferably repetitively) and
simultaneously dial out the number, playback should stop as soon as
dial answers or early media detected.

exten => 500,1,Answer
exten => 500,2,Playback(wait-while-we-connect-you)
exten => 500,3,Dial(SIP/14085551234@myprovider)

How do I make it work?


3 thoughts on - Playback while dialing out

  • A(x) does not accomplish this. It completes the playback and then
    dials. What I would like is that dialing should start in parallel and
    playback should stop as soon as early media or ringing starts.

    Similarly, music-on-hold is not an option, it’s too hard coded, I like
    to be able to change playback file dynamically.

    Any hints??

  • Hi,

    you can configure a new music on hold, example:

    nano /etc/asterisk/musiconhold.conf


    and put the audio file in this directory; then change your dialplan like:

    exten => 500,1,NoOp
    exten => 500,2,Dial(SIP/14085551234@myprovider,m(default1))
    exten => 503,3,Hangup


  • I am not sure you even read my mail, no music on hold option – it
    should work dynamically with any file.