[OpenSIPS-Users] Cant get CPL to work for inbound calls

Кисляков Степан Викторович Stepan.Kislyakov at kaspi.kz
Mon Jun 8 06:40:26 UTC 2026


Hi!
Could you please help me get this working?
I’m using OpenSIPS v3.6.
I need to set up something like a hunt list: when user 300 is called and is busy or unavailable, the call should be routed to 301 and 302 (just an example).
To achieve this, I’m trying to use the CPL_C module.

This is my config in opensips.cfg:
modparam("cpl_c", "db_url", "postgres://alfauser:somepass123@127.0.0.1/opensips")
#modparam("cpl_c", "cpl_table", "cpl")
modparam("cpl_c", "cpl_dtd_file", "/etc/opensips/cpl.dtd")
modparam("cpl_c","log_dir","/var/log/opensips")
modparam("cpl_c","username_column","username")
modparam("cpl_c","domain_column","domain")
modparam("cpl_c","cpl_xml_column","cpl_xml")
modparam("cpl_c","cpl_bin_column","cpl_bin")
modparam("cpl_c","log_dir","/var/log/opensips/cpl")
modparam("cpl_c","case_sensitive",0)

I don’t know why, but if I set modparam("cpl_c", "cpl_table", "cpl") – I get error that “cpl_table command is not found in cpl_c module”.
Anyway if I run:  opensips-cli -x mi LOAD_CPL sip:300 at local.lcl /usr/share/opensips/cpl_scripts/300.xml
I get "OK"
I can see a new row in the database, and it looks correct. The cpl_bin and cpl_xml columns contain binary data.
However, when I run:
opensips-cli -x mi GET_CPL sip:300 at local.lcl
I get an empty response:

{
    "script": ""
}

I’ve tried to write very simple script to database in cpl_xml column:
<?xml version="1.0" encoding="UTF-8"?>
<cpl>
  <incoming >
    <location url="sip:301 at local.lcl" >
      <proxy >
        <noanswer >
          <location url=" sip:302 at local.lcl " />
        </noanswer>
      </proxy>
    </location>
  </incoming>
</cpl>

When I run opensips-cli -x mi GET_CPL sip:300 at local.lcl
I still get the same empty response.
I don’t know how to make this work.
I would be very grateful for any advice.



Best regards,
Stepan
VOIP dep.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20260608/40cfca25/attachment.html>


More information about the Users mailing list