Asterisk anti Ex-girlfriend Recruitment plan?

I wrote a simple dial plan in an asterisk. The purpose of this dial plan is to check the caller ID for an incoming call and for a specific hang :)!

but this subscription plan will damage the entire incoming call using identifier-identifier. So what am I doing ?; (

[general] static=yes writeprotect=yes autofallthrough=yes clearglobalvars=no priorityjumping=yes include "exten_gvars.inc" [macro-queue] exten => s, 1, Queue(${ARG1}) [default] exten => s, 1, Answer exten => s/9999, 2 ,Hangup exten => s, 2, BackGround(welcome) exten => s, 3, Macro(queue,operator) 

Edit

I will change my subscriber plan to this, but it does not work, incoming calls hang after two beeps (I know that this is due to an error in my subscriber group)!

  [general] static=yes writeprotect=yes autofallthrough=yes clearglobalvars=no priorityjumping=yes #include "exten_gvars.inc" [macro-monitor] exten => s, 1, MixMonitor(${UNIQUEID}.wav) exten => s, 2, SetCIDName(${UNIQUEID}#${CALLERIDNAME},a) [macro-defaultLine] exten => s, 1, Macro(monitor) exten => s, 2, Dial(SIP/${ARG1},60,T) [macro-queue] exten => s, 1, Macro(monitor) exten => s, 2, Queue(${ARG1}) [inbound] exten => _XX, 1, Macro(defaultLine,${EXTEN}) [default] exten => 123,1,GotoIf($[${CALLERID(num)} = XX]?reject:allow) exten => 123,n(allow),Answer exten => 123,n,BackGround(welcome) exten => 123,n,Macro(queue,operator) exten => 123,n(reject),BackGround(WTF) exten => 123,n,Hangup() include => inbound 
+7
asterisk
source share
4 answers

Here is your ex-girlfriend Dailplan, suggesting xxxxx is your ex-girlfriend.

 exten => 123,1,GotoIf($[${CALLERID(num)} = xxxxx]?reject:allow) exten => 123,n(allow),Dial(Zap/4) exten => 123,n,Hangup() exten => 123,n(reject),Playback(abandon-all-hope) exten => 123,n,Hangup() 

Hope this helps you

+13
source share

You do not have step 2 for other callers, and the autofalltrhough function is enabled, which means (in 1.6) that the call will be deleted after step 1.

 [default] exten => s, 1, Answer exten => s/9999, 2 ,Hangup exten => s, 2, NoOp exten => s, 3, BackGround(welcome) exten => s, 4, Macro(queue,operator) 

Edit: Are you sure callerID EXACTELLY 9999? Try replacing this line with

 exten => s, 2, NoOp((${CALLERID(all)}) 

then look at the console and see what callerID is.

use:

  asterisk -r 

then enter:

  core set verbose 5 

also enter

 show dialplan 

and see if the dialplan is correctly loaded in the asterisk

+3
source share

First of all, it looks like you really don't understand how the Asterisk dialplan works. The code block that you installed there is simply incorrect, Asterisk will not complain - since dialplan should not do this.

Consider one by one:

 [macro-queue] exten => s, 1, Queue(${ARG1}) [default] exten => s, 1, Answer exten => s/9999, 2 ,Hangup exten => s, 2, BackGround(welcome) exten => s, 3, Macro(queue,operator) 

The reason this is wrong is because you cannot match the CALLERID on the same extension line - it should be complete. Technically, you will need:

 [macro-queue] exten => s, 1, Queue(${ARG1}) [default] exten => s/9999, 1, Answer exten => s/9999, 2 ,Hangup exten => s/9999, 2, BackGround(welcome) exten => s/9999, 3, Hangup exten => s, 1, Answer exten => s, 2 ,Hangup exten => s, 2, BackGround(welcome) exten => s, 3, Macro(queue,operator) 

Now this is not the right way to do this - simply because you will replicate the lines again and again. The correct way to do this is very similar to the previous answer, however, this is what I would do:

 exten => s, 1, Answer exten => s, n, Gotoif($["${CALLERID(num)}" = "9999"]?reject:continue) exten => s, n(continue), Background(Welcome) exten => s, n, Macro(queue, operator) exten => s, n(reject), Hangup() 

Now you can expand the various CALLERID numbers you want to block. Again, assuming that this is the result that you wanted to achieve.

0
source share

It is pretty simple:

 [default] exten => s/9999,1,Hangup exten => s,1,Answer exten => s,2,BackGround(welcome) exten => s,3,Macro(queue,operator) 
0
source share

All Articles