There are several articles and examples showing how to integrate Homer and OpenSIPS for SIP tracing/capturing purposes – capturing SIP, log, REST queries, network data, Management commands and more. This is an integration at data exchange level.
But an integration is also possible at the Web portal level – to integrate the Homer portal into the OpenSIPS Control Panel, the OpenSIPS provisioning interface.
Why? To get fast control over your whole system, with a single login. Why login and check two web interfaces, when you can have only one.
The OpenSIPS Control Panel 7.2.3, matching OpenSIPS 2.3, can integrate the Homer portal as an internal tool.
Nice, isn’t it?
The integration is done with full security consideration (the two web portals are performing cross authentication via REST APIs) and with no loss in functionality.
So, how can you can set this up?
OpenSIPS Control Panel configuration
First, be sure you have the Homer tool enabled in your OpenSIPS Control Panel installation. In the config/modules.inc.php file, in the $config_modules array, in the “system” section, for the “homer” entry, be sure you have set “enabled” => true.
After that, you need to configure the Homer tool, to be able to talk to the Homer portal. In the config/tools/system/homer/local.inc.php file you need to set a couple of options:
- $homer_URL – this is the HTTP URL pointing the Homer portal
- $homer_auth_method – the authentication method against Homer; the easiest and most flexible is the “get” method.
For Homer, all the changes to be done are in the api/preferences.php file.
First of all, switch the authentication engine from “Internal” (via passwords) to “External” (via API):
Then configure the External Authentication engine as follows:
/*********[EXTERNAL AUTH ]********/
The only custom option is the EXTERNAL_AUTH_URI which is an HTTP URL pointing back to your OpenSIPS Control Panel installation – this must be constructed as
where http://OCP_HOST/OCP_PATH is the HTTP URL you normally use to access your OpenSIPS Control Panel login page.
And you are done!
Note that you will not be able to login anymore into Homer portal via username and password.
The result is a handy way to check CDRs, ongoing dialog, traces, everything, under the same umbrella.
Even more, if the Homer tool is present, the CDRviewer tool in OpenSIPS Control Panel (for listing the CDRs) will automatically generate a link from the SIP call-ID value of the CDR to the call flow in Homer – with a single click you can view the call flow for a given CDR.