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

Stas Kobzar staskobzar at gmail.com
Mon Jun 8 10:06:44 UTC 2026


Hi,

I think the parameter should be "db_table".
It looks like there is a typo in the docs in the example.

You can also increase log level to debug and try to get more info from logs

Best regards,


On Mon, Jun 8, 2026 at 3:36 AM Кисляков Степан Викторович via Users <
users at lists.opensips.org> wrote:

> 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 at 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.
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20260608/c2cafc9f/attachment-0001.html>


More information about the Users mailing list