Blacklist - Caller ID Config

Trying to get Blacklisting working via feature codes. This actually works - the problem is that my carrier (Twilio) sends me the number in E.164 format. But via the feature code there’s no way for me to enter a + via the phone keypad.

So I’d like to be able to strip the +1 from the inbound Caller ID.

I’ve read through the forums and have tried adding


to the inbound trunks - but this only works sporadically. When looking at the Asterisk log files, it appears as though some of the calls are coming in on the Outbound Trunks - which doesn’t make any sense. I have two outbound trunks and eight inbound trunks (one for each of the IP addresses Twilio calls will come in on).

Suggestions / thoughts?

Are these outbound trunks identified as “type=friend” trunks? If so, there’s your problem.

Don’t worry about whether a trunk is outbound/inbound, just set the context for all twilio trunks. The context line is ignored for outbound calls.


I have set the inbound user context as mentioned on all trunks but when it’s still sporadic.

Add a “context=from-pstn-e164-us” all of your trunks that don’t currently have one. If a call comes in on one of your outbound trunks, it will get processed to the e164 context, which should solve your issue.

So in testing that - it seems that if I have that entered, I can make a call from my cell phone and I get the correct message - but if I call from another phone on another VoIP system running through the same carrier (Twilio) I get “number not in service”.

Found my issue. All my inbound routes were looking for DIDs with +1. Not realizing the +1 would get stripped that early I guess.

After adding new inbound routes without the +1, inbound calls began flowing as expected.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.