I’m getting unwanted block element coming through the calls and its causing a lot of headache. So I want to start filtering, can ‘Set Caller ID’ module accomplish this task?
Can I use this function in Set Caller ID module?
Blockquote
${FILTER(0-9a-zA-z,${CALLERID(num)})})
Blockquote
or would I have to put that into extensions_custom.conf?
I’m not sure what your question is, but if you are asking how to block certain caller IDs then it is easiest to use admin > blacklist. I don’t think there can be anything in the callerID other than the characters your filter allows, but to do what i think you are trying to do you would do something like this in extension_custom.conf:
My question regards to blocking certain characters in the CallerID, not blocking a certain number. My system is throwing
ERROR[17900][C-000000d4]:json.c:861 ast_json_vpack: Error building JSON from ‘{s: s, s: s}’: Invalid UTF-8 string.
I then found out that the CallerID is including an invalid character, showing as a block element like this : ▒15169877970. So now I want to use Filter function to block out invalid characters and only allow 0-9 a-z A-Z. Can I achieve this in the Caller ID module, or has to be set in the conf file?
The code snipped I gave you should filter ${CALLERID(num)}, ${CALLERID(name)} or put in a line for both.
But dicko’s code is better – put a line for each in his snippet and you should be good.
TTBOMK “same = n,” will break your dialplan. “=” is an assignment operator and I never heard of “same” function. Did you try dicko’s code? The best plan is to start here: https://www.voip-info.org/asterisk-config-extensionsconf