[asterisk-users] Caller ID Rewrite

David Bath david.bath at triaddo.com
Fri Dec 1 07:26:42 MST 2006


 

Hi All,

 

I have a quick query which I'm sure someone will have done before.
Essentially, I have a 3rd party desktop app which does number lookup in
Outook via the manager interface.   Works wonderfully.   However, it's
not very clever in the number matching.  I have all my contacts stored
in +country code <number> format.  My service provider passes all
numbers, apart from UK numbers, to me in this format.  Hence, UK number
lookups don't work correctly.

 

So onto the problem... I'm trying to write a quick on-liner which will
fix up incoming UK format numbers (0 + 10digits) into (44 + 9 digits).
I got as far as this:

 

exten => <incoming extension>,1,Set(foo=${IF(REGEX("^0[1-9][0-9]\{9\}$"
{CALLERID(number)})?Set(CALLERID(number)=44${CALLERID(number):1})})

 

The regex is correctly triggered, and the Set(CALLERID(number)= xxx )
method is called, but I am struggling to concatenate the two strings.

 

I'm trying to set the new callerid to be 44 concatenated with the
original callerid without the leading 0. 

 

Any wisdom would be greatly appreciated.

 

Cheers,


Dave

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20061201/81b3efe5/attachment.htm


More information about the asterisk-users mailing list