exten => 44205551234,1,Zapateller(nocallerid)
same => n,GotoIf(${BLACKLIST()}?hangup)
same => n,Dial(SIP/mySip)
same => n(hangup),Hangup()
New CLI command to add number(note the plus sign in prefix)
The blacklisted number is not ringing now, however, the dialplan keeps looping and doesn’t hang up and disconnect the blacklisted party.
As seen via CLI interface:
== Using SIP RTP CoS mark 5
-- Executing [44205551234@from-didProvider:1] GotoIf("SIP/didProvider_did9-000004e6", "1?hangup") in new stack
-- Goto (from-didProvider,44205551234,5)
-- Executing [44205551234@from-didProvider:5] Hangup("SIP/didProvider_did9-000004e6", "") in new stack
== Spawn extension (from-didProvider, 44205551234, 5) exited non-zero on 'SIP/didProvider_did9-000004e6'
== Using SIP RTP CoS mark 5
-- Executing [44205551234@from-didProvider:1] GotoIf("SIP/didProvider_did10-000004e7", "1?hangup") in new stack
-- Goto (from-didProvider,44205551234,5)
-- Executing [44205551234@from-didProvider:5] Hangup("SIP/didProvider_did10-000004e7", "") in new stack
== Spawn extension (from-didProvider, 44205551234, 5) exited non-zero on 'SIP/didProvider_did10-000004e7'
This continues until the blocked caller hangs up. Eventually, after about 50 seconds, if the caller hasn’t hung up he hears ringing. I need to hang up his phone or I will be charged if he leaves the phone off the hook.