Does any body know how to make a bridged call?


#1

Does any body know how to make a bridged call?

I’m trying tomake a Dial cmd and it should work like this:

Caller inputs phone number to dial. Asterisk makes a Dial cmd on an available channel, when the called person answers the Dial cmd show play a sound file (sepecified in A option). I would like to make the caller person listen to the sound file and the voice of the the called person. The system only lets me listen the called person after the play of the sound file (gag). I will use this for gags. Can any one help me on this.

[gag]

exten => s,1,Playback(/etc/asterisk/soundfile/gag_audio_file)

exten => s,2,Background(/etc/asterisk/soundfile/please_enter_phone_number)

exten => _3XXXXXXX,1,Setvar(gag_phone=${EXTEN})

exten => _3XXXXXXX,2,Dial(ZAP/g1/${gag_phone}|30|gHA(/etc/asterisk/soundfile/gag))

exten => t,1,Goto(s,2)

exten => i,1,Playback(/etc/asterisk/soundfile/sorry_invalid_phone_number)

exten => i,2,Goto(s,1)

exten => h,1,Macro(hangup)