[asterisk-users] how to strip + from the caller-ID

Leif Madsen leif.madsen at asteriskdocs.org
Thu Jan 14 07:52:23 CST 2010


Szasz Szabolcs wrote:
> How can I strip + from the front of the caller ID?
> I have tried this:
> exten => s/_+X.,1,Set(CALLERID(name)=${CALLERID(name):1})
> 
> But it is not working.

I thought that worked, but I haven't tested it in quite some time.

How about setting the value to a temporary variable, then stripping from that 
when you reassign it to CALLERID() ?

Also, you're using name, and I think you meant CALLERID(num)?

exten => s/_+X.,1,Set(TMP_CID_NUM=${CALLERID(num)})
exten => s/_+X.,n,Set(CALLERID(num)=${TMP_CID_NUM:1})

Leif Madsen.



More information about the asterisk-users mailing list