Play sound in active call?

How can a caller play sounds to callee?

asterisk dial callee.
I wish to click 1 to 9 om my phone to select different sound(files) to play for callee.

Someone have any idees how to do it?

It is not easy - at least what I can propose:

  1. Small modification of channel.c - to start fire DTMFs to AMI interface
  2. AMI script which listen for DTMFs.
  3. AMI script generates call file - one leg with chanspy to callee the other to playback (playing back whatever you want)
    Of course we speak about Asterisk 1.4 or above, or chanspy will not work

thanks for replay!

This way sounds complicated.
Any links there i can read more?
What is AMI Script?

I have tried to transfer a call to context with "G()"
But caller cant controll callee in a context.
Anyone knew if it can be done?

AGI - asterisk gateway interface
AMI - asterisk manager interface.
If you want to disconnect call and just forward callee to other context it should be possible. I think you should take a look at features.conf

you could actually bypass the modification to channel.c by using app_conference to bridge your audio (as opposed to native bridging). It runs great on 1.4 and is much higher performance than MeetMe.

App_Conference will send DTMF events to the manager if you specify the correct application argument. Then you can receive those on the AMI, dial a Local channel into the conference and play a sound. Should be pretty simple once you have the framework in place.

thanks for boths replay!
I will try to setup this soon!