Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>First of all, it would appear that you don't really understand how the Asterisk dialplan works. The code block you put up there is just plain wrong, Asterisk won't complain - as dialplan isn't supposed to do so. </p> <p>Let's examine one by one:</p> <pre><code>[macro-queue] exten =&gt; s, 1, Queue(${ARG1}) [default] exten =&gt; s, 1, Answer exten =&gt; s/9999, 2 ,Hangup exten =&gt; s, 2, BackGround(welcome) exten =&gt; s, 3, Macro(queue,operator) </code></pre> <p>The reason the above is wrong is due to the fact that you can't put a CALLERID matching on a single line of the extension - it's should be all the way. So technically, you would need:</p> <pre><code>[macro-queue] exten =&gt; s, 1, Queue(${ARG1}) [default] exten =&gt; s/9999, 1, Answer exten =&gt; s/9999, 2 ,Hangup exten =&gt; s/9999, 2, BackGround(welcome) exten =&gt; s/9999, 3, Hangup exten =&gt; s, 1, Answer exten =&gt; s, 2 ,Hangup exten =&gt; s, 2, BackGround(welcome) exten =&gt; s, 3, Macro(queue,operator) </code></pre> <p>Now, that isn't a proper way of doing this - simply because you'll be replicating lines over and over again. The right way of doing it is very much similar to the previous answer, however, this is what I would do:</p> <pre><code>exten =&gt; s, 1, Answer exten =&gt; s, n, Gotoif($["${CALLERID(num)}" = "9999"]?reject:continue) exten =&gt; s, n(continue), Background(Welcome) exten =&gt; s, n, Macro(queue, operator) exten =&gt; s, n(reject), Hangup() </code></pre> <p>Now, you can extend the various CALLERID numbers you want to block. Again, assuming this is the result you were looking to achieve.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload