title: mysql asterisk country code prefixes query
body: <p>I have a table with prefixes. Before the call routing I want to have mysql query that checks presence of prefix in db.</p>
  
  <p>For example US prefix is 1 and Trinidad and Tobago is 1 868. But US prefix can be in that table and T&amp;T prefix - no. If it is absent I want the call to be terminated.</p>
  
  <pre><code>1  | US
  38 | Ukraine
  
  And for example I dial 18681111111 to T&amp;T
  </code></pre>