Sure, I can think of a few ways to do this. How about this:
Define this instance variable in the context entrypoint for your
application. I think "adhearsion" is your entrypoint in your example
so I'll use that.
adhearsion {
@mishap_handler = lambda do |link|
link.on_invalid { play 'invalid' }
link.on_premature_timeout { play 'sorry' }
link.on_failure { play 'goodbye' }
end
menu do |link|
@mishap_handler[link]
link.other_context 1
# Rest of menu here
end
}
other_context {
menu do |link|
@mishap_handler[link]
link.somewhere 1
end
}
Alternatively, you could create a custom dialplan command (dry_menu()
maybe?) that automatically ran those callbacks on the "link"
MenuBuilder object.
Jay Phillips
That'll work fine when :tries => 1. If you have multiple tries, it
won't continue trying once you've jumped to another context.
Jay Phillips
wyde{
play 'tt-monkeys'
}
then i define my context in extensions_custom.conf like
[wyde ]
exten 456,1,AGI(agi://174.78.99.20)
but i does not work. I appreciate yo help. thanks for you time.
I am using that in Elastix on the extensions_custom.conf but it
does not work at all
but with asterisk it does work with no problems.
how do i go about in Elastix, you got any clue for me, man i 'd appreciate .
thanks man for the response
cheers