How to get variable from other leg in a bridged call

Dear all,
i’m installing a asterisk based voice broadcasting system that enable people to send pre-recorded message to multiple numbers at the same time.

My plan is generating a call by call file to make a call to destination number using context [broadcast_dst], when they pickup then send this call to context [Playing] which will play pre-recorded message.

Everything are fine but i have a problem in researching how to get feedback from customer who received broadcast message. System will get feedback from peoble in context [Playing] while I must insert call log in context [broadcast_dst]. And that’s problem when I can not get value of variable ${feedback} in [Playing] from [broadcast_dst].

Below are detail:

Channel: Local/0904451101@broadcast_dst/n CallerID: 243245345345 MaxRetries: 0 RetryTime: 0 WaitTime: 50 Account: 30 Set: dst=0904451101 Archive: yes Context: Playing Extension: 10 Priority: 1 Set: record_path=record/2/1259921911/1259921911_wav Set: is_feedback=0 Set: feedback_instruct_record= Set: feedback_finish_record= Set: press_1=1 Set: press_2=1 Set: press_3=1 Set: press_4=0 Set: press_5=0 Set: press_6=0 Set: press_7=0 Set: press_8=0 Set: press_9=0

with 2 contexts :

[code][Playing]
exten => 10,1,Answer()
exten => 10,n,Set(feedback=“no Enter”)
exten => 10,n,Wait(1)
exten => 10,n,ControlPlayback(/var/www/html/voicebroadcast/${record_path},5000,6,4,#,5,*)
exten => 10,n,GotoIf($[${is_feedback} = 0]?no_fb:fb)
exten => 10,n(fb),BackGround(/var/www/html/voicebroadcast/${feedback_instruct_record})
exten => 10,n,BackGround(/var/www/html/voicebroadcast/sys/MoH)
exten => 10,n(no_fb),Hangup()

exten => 1,1,GotoIf($[${press_1} = 1]?select:no_select)
exten => 1,n(select),Set(feedback=1)
exten => 1,n,BackGround(/var/www/html/voicebroadcast/${feedback_finish_record})
exten => 1,n,Hangup()
exten => 1,n(no_select),Playback(/var/www/html/voicebroadcast/sys/invalid_option)
exten => 1,n,Goto(Playing,10,6)

exten => 2,1,GotoIf($[${press_2} = 1]?select:no_select)
exten => 2,n(select),Set(feedback=2)
exten => 2,n,BackGround(/var/www/html/voicebroadcast/${feedback_finish_record})
exten => 2,n,Hangup()
exten => 2,n(no_select),Playback(/var/www/html/voicebroadcast/sys/invalid_option)
exten => 2,n,Goto(Playing,10,6)

exten => 9,1,GotoIf($[${press_9} = 1]?select:no_select)
exten => 9,n(select),Set(feedback=9)
exten => 9,n,BackGround(/var/www/html/voicebroadcast/${feedback_finish_record})
exten => 9,n,Hangup()
exten => 9,n(no_select),Playback(/var/www/html/voicebroadcast/sys/invalid_option)
exten => 9,n,Goto(Playing,10,6)
exten => h,1,NoOp(${feedback})[/code]

[broadcast_dst] exten => _X.,1,Dial(Zap/g0/${EXTEN}) exten => _X.,n,Hangup() exten => h,1,NoOp(php /var/www/html/bc_cdr_update.php ${UNIQUEID} ${dst} ${DIALSTATUS} ${CDR(accountcode)} ${DIALEDTIME} ${ANSWEREDTIME} ${feedback})

can anybody give me any advise on this, any comment, advise would be much appreciated.

Regards,
Vinh Phan

any advise on this ? :frowning: