Choose outgoing trunk in custom context FreePBX

asteriskfreepbx

I need to be able to choose some trunk based on result of some SQL query, while making outbound call, i spent many time google some answers, but i cant find any. I know i can use outbound routes in freepxb, but i need to be more specific in conditions that defines trunks choosing, so i need to do it directly from context.
Im sorry for my english (it's quite bad), but i hope u guys would able to understand what i mean.

Best Answer

In case someone is intrested in, you ll need to override [macro-dialout-trunk] to do that.