[SR-Users] how to remove non-digits using dp_translate

Henry Fernandes henry at usinternet.com
Wed Jul 2 23:11:21 CEST 2014


I'd like to use the dialplan module to remove all non-digits from a string.
For example, "1-306-555-1234" becomes "13065551234" and "(306) 555-1234"
becomes "3065551234".

Unfortunately, I can't figure out the regular expressions for subst_exp and
repl_exp.  I can easily replace one instance of a non-digit, however I can't
figure out how to replace all non-digits.

-H



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20140702/429a530f/attachment.html>


More information about the sr-users mailing list