title: static queue and dynamic extensions
body: <p>I use the odbc function and get the number of the manager from the MSSQL table if the client calls me a second or more times.</p>
  
  <pre><code>[incoming_calls]
  exten =&gt; s,1,Set(fname=${CDR(uniqueid)})
  exten=&gt;  s,2,Set(extext=${ODBC_GET_EXTEN(${CALLERID(num)})})
  exten =&gt; s,3,Dial(SIP/${extext})
  exten =&gt; s,n,Hangup()
  </code></pre>
  
  <p>But if a client calls me the first time, the call must have got the manager according to the queue.</p>
  
  <p>How can I combine a queue and a dynamic function? Is this a good solution?</p>