I am developing a call service for my company that shall be able to answer any incoming call from anywhere in the world.
Basically it works like this; the calling party (A) calls in to our asterisk (*) which plays a menu of choices and if all input entries are correct, ends up with a Dial() to C (called party). An info message will be played to C before A and C are connected.
Everything works fine, except that we want a feature that provides audio feedback to both calling party and called party after the called party has answered. The reason for this is while the info message is played for C, all A can hear is silence. Which we are afraid will confuse the calling party resulting in A hanging up before A and C are connected with audio.
I have tried different solutions, and for the called party there are no issues. I can use both the A(x) option or the M(macro) option and the correct message is played to the called party when call is answered.
My challenge is to play a message to the calling party(A) after C has answered.
I have tried the G() option, but I cannot make it to work properly. It solves one problem, but creates a new one.
Problem solved: Yes, soundfile can be played to both A and C after C has answered.
New problem: Both ends do hangup() instead of connecting after extension completes.
I don’t quite understand how the G() option is meant to work. So if someone knows, please educate me. I guess the Bridge() function might be the solution, but I could not get that to work either…
Here’s the code for my G() option which does not work:
...Answer() ...some menu code... ...that ends up in dial... exten => .... exten => .... same => n,Dial(Technology/Resource,90,G(msg,1)) ; Dial message helper exten => msg,1,Goto(anum,1) exten => msg,2,Goto(cnum,1) ; Playback message to calling party exten => anum,1,Playback(soundfile_to_calling_party) ; Playback message to calling party exten => cnum,1,Wait(2) exten => cnum,n,Playback(soundfile_to_called_party) exten => cnum,n,Wait(1)
I will really appreciate some feedback and help.
Until then, our asterisk is set up to use the M() option and only inform C while A listens to the lovely silence until A and C get connected with audio…
exten => .... same => n,Dial(Technology/Resource,90,M(play_message)) [macro-play_message] exten => s,1,Wait(2) exten => s,n,Playback(info_message) exten => s,n,Wait(1)