Click here for the code.

Configuration files for any given phone within a CTID home folder on the PPT server need to reflect the correct outbound proxy address in order for that phone to successfully register with the PBX. Automatic configuration file generation via the tool at p.ringfree.biz does not set this value. The value may be set by manually editing the relevant configuration files or by using the rf-sbc-repair tool.

The rf-sbc-repair tool parses the CTID home folder for all instances of the reg.1.outboundProxy.address within the configuration files that have an empty value. It then calls a sed command to replace the empty value with the correct value of sbc001.ringfree.biz. It does attempt to identify and skip template files during this process. Finally it runs the rf-ppt-repair script to repair permissions and ownership of all files within the directory.

To use rf-sbc-repair, simply run it with the target CTID as the only argument:

rf-sbc-repair 1900027

It will output details regarding any files it edits and any template files it skips. Because it runs rf-ppt-repair within it, there is no need to run it separately before or after.