Le 23/07/2010 16:44, Zeeshan Zakaria a écrit : > Hi, > > I try to avoid any warnings, as they can turn into errors later. well, that's exactly the point of this inquiry :) > > I remember having problems with GoSub long time ago, don't remember > what it was, but I moved to macros after that. > > For what you are trying to achieve, I use macros. Just jump to a > macro, evaluate what you need to, save the results in variables, and > use these variables in the calling context to proceed further. For > example, in my context for outbound calls, called [outbound], I jump > to macro [user-account-info], get account info, come back to > [outbound], then jump to [blacklist], check the caller ID against a > blacklist, come back to [outbound], jump to two other macros, and > finally I have all the info I need to proceed with a call, stored in > various variables. Based on these variables I trigger the Dial > command, or do something else as needed. > > In your case, you can make it even simpler, e.g. like this: Already though of this, doesn't really suit the need.
The extract was only a really short version of the original system, the routing is a bit more complex than that and redoing it using if/switch won't be very efficient, especially since context are really made for this. -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
