[asterisk-users] Variable stripping/removing part of string

magnus.b at inputinterior.se magnus.b at inputinterior.se
Mon Apr 11 00:07:08 CDT 2011


Hi!

I try to get rid of some part of CALLERID(name) but I cant realy figure out a way to do it.
For example: CALLERID(name) = "Martela (fax)" I am just looking for the part before “ (“ in my case “Martela”.
I can’t serch for “ “, could be many “ “, but only one “ (“, thought i could do something like:

exten => 0424449631,n,NoOp(${CUT(CALLERID(name),\(,1):0:-1})

But that gave me “Martela “ so my way of doing it is wrong.
Any that can tell me what I am doing wrong or have any better suggestion howto do it?

/Magnus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110411/41add524/attachment.htm>


More information about the asterisk-users mailing list