David Backeberg
2009-May-06 16:15 UTC
[asterisk-users] Bridge() and Goto() and dialplan contexts, oh my!
I may or may not be experiencing the behavior described in: http://bugs.digium.com/view.php?id=14241 I'm using asterisk-1.6.0.6, Bridge(), and I'm having a hangup context executed when the caller is still on the line. These channels are all SIP. === I want a group of expert callers who can dial in to the system, stay put, and let other learner callers come to them. In between the learner callers, I want them to hear hold music. : exten => 111,1,Goto(Expert_Gateway) exten => 222,1,Goto(Learners) [Expert_Gateway] exten => s,1,Answer exten => s,2,AGI(authenticate_and_register) exten => s,3,MusicOnHold() exten => s,4,Goto(Expert_Gateway,s,3) exten => s,5,HangUp exten => h,1,AGI(cleanup_registration) exten => h,2,HangUp [Learners] exten => s,1,Answer exten => s,2,AGI(find_channel_with_expert) exten => s,3,Bridge(${EXPERT_CHANNEL}) exten => s,4,NoOp(${BRIDGERESULT}) exten => s,5,HangUp exten => h,1,NoOp(${BRIDGERESULT}) exten => h,2,HangUp Everything looks good at first. However, I think I'm misunderstanding something fundamental about Bridge(). Everything works great for the first Learner call, the learner gets bridged to the expert. The bad news is that on the Expert side of the dialplan, the Hangup side of the Expert_Gateway context gets executed during the Bridge() to the Learners, including the AGI(cleanup_registration). Is it expected that the Expert side gets hungup context executed if they haven't really hungup? When the learner hangs up the expert goes back to hold music, that is, after the Bridge() exits, the Expert s context continues and properly follows the Goto. Should I file a new bug about this, or is this expected behavior? Am I misunderstanding something fundamental about purpose of Bridge(), and is there something else I should be using instead?