Play a sound file after user answer the call

i have installed asterisk on a virtual machine (Centos) and i have two (x-lite) for simulation

i want the user1 make a call to the user2 and when the user2 answer the call he listens to an audio file

how i can do it

my sip.conf

[general]

[user1]
host=dynamic
username=user1
type=peer
context=default

[user2]
host=dynamic
username=user2
type=peer
context=default

Look at the option A of Dial application.
wiki.asterisk.org/wiki/display/ … ation_Dial

Everybody seems to be running behind this feature. :smile:

–Satish Barot
satish4asterisk@gmail.com

Some of the people asking this question seem to want user1 to hear the message, which is more difficult. As “A” is the first option in Dial’s documentation, it should have been found by due dilligence.

X-Lite phones have significant nobbling, compared with the paid for version, and at least some versions have significant bugs. Hard phones are not that expensive and will ccause a lot less grief.

thanks gays :smiley: ,

i did it, it’s ok for the communication the user2 hear a audio file when he answered call

but now i need the communication ended after 7 seconds

1,dial(sip/test,10,A(hello)
2,hangup()

Option S of Dial.

Suggest you to go through asteriskdocs.org/

–Satish Barot
satish4asterisk@gmail.com

thans for you reply satish4asterisk

but ican’t find the S option

For the definitive documentation for your version type the following at the CLI prompt:

core show application dial