Hi Roger, Both regex should work fine, while the second expression with extra \ is more correct and I suggest you use that. To turn on debug logging for Sprout, writie log_level=5 to /etc/clearwater/user_settings (creating it if it doesn’t exist already), then restart Sprout (by running sudo service sprout stop - it will be restarted by monit). Then you can check /var/log/sprout/sprout_current.txt while performing the operations. For more suggestions, see http://clearwater.readthedocs.io/en/stable/Troubleshooting_and_Recovery.html?highlight=debug
The regex is doing what you expect – it matches on the entire number but takes out the bit in (.*$) to put it in the \\1 part. So +1333666 will be replaced by sip:[email protected], where the +1 has been stripped off. You can modify the second part of the regex to be how you want the number to be sent to the internal domain. If anything unclear you can come back to this thread. Thanks, Ying From: Clearwater [mailto:[email protected]] On Behalf Of Roger Case Sent: 07 November 2017 01:53 To: [email protected] Subject: [Project Clearwater] enum.json for +1 numbers Dear Clearwater, The ENUM DOCS show an entry in enum.json for +1 dialed internal numbers of: { "name" : "Clearwater internal numbers dialled with +1 prefix", "prefix" : "+1650555", "regex" : "!^+1(.*$)!sip:\\[email protected]!" } This underlined piece of the expression is shown later in the document, inside a NAPTR record, as: naptr-record=5.5.5.0.5.6.1.e164.arpa,1,1,U,E2U+SIP,!^\+1(.*$)!sip:\[email protected]! The second expression contains an extra \ before the +1. Which is correct, or are both correct? I ask because neither seem to work in my enum.json file. Also, is there a way in the enum.json file expressions to remove the + or 1+, before sending the Invite to the internal or IBCF domain? Thanks very much, Roger Case GCI, Alaska (old telephone guy trying to understand new telephone technology)
_______________________________________________ Clearwater mailing list [email protected] http://lists.projectclearwater.org/mailman/listinfo/clearwater_lists.projectclearwater.org
