[asterisk-users] ${CALLERID(name)} question

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Thu Apr 30 12:34:14 CDT 2009


On Thursday 30 April 2009 10:45:48 Justin Piszcz wrote:
> What is the recommended way to remove spaces in the name of the caller ID?

You could use the FILTER function, something along the lines of
Set(CALLERID(name)=${FILTER(ABCDEFGHIJKLMNOPQRSTUVWXYZ,${CALLERID(name)})})

In 1.6.0 and later, you can use ranges to simplify things, i.e.
Set(CALLERID(name)=${FILTER(A-Za-z0-9,${CALLERID(name)})})

-- 
Tilghman



More information about the asterisk-users mailing list