dOpensource/dsiprouter

CDR records not inserting into the DB & outbound routes failing -latest release v0.642

Closed this issue · 5 comments

Let me preface this with, if I need to RTFM that is a perfectly acceptable answer to my questions, however, the documentation is lacking in a sense for the OSS community. Maybe the enterprise version is better so if this the case, just let me know. I will not be offended by that answer :). Read on for details.

Fresh vanilla dsiprouter installation from git release v0.642 on Debian 10 HVM (BHYVE) host. I manually set everything up in the GUI, ie: carriers, endpoints, inbound and outbound rules. I'm simply using dsiprouter as a common SIP router between my peering carriers and my end customer PBX VM's. All traffic gets passed to different freeswitch hosts. No domains are configured in the mix at this time. This is a very simple configuration OOB. Because this is a basic config, the dsriprouter.cfg still has the default dsiprouter.org hostnames in the template. I believe that this is why I am getting certificate errors. I will review the docs to properly configure the domain and certs if you believe this could be related to the errors I am receiving. To clarify in addition to the aforementioned errors I also get errors when Kamilio attempts to update records through the local host API, error: self-signed certificate.

On my deployment, CDR's are not inserting due to either src_gwgroupid or dst_gwgroupid being null (Maybe not correctly detected in the dr_gateways table. Could this be a configuration issue on my end, could it be a bug in the CDR code, or is my database somehow corrupted?

Shouldn't a call be logged whether the src/dst gwid's are properly detected or not? Leading me to believe that the table cdrs schema should allow NULL values in either column. I should also mention that after I set everything up, and all was working, I deleted the default gateways that come out of the box, and then I added 2 outbound routes, and reloaded. Subsequently, the newly added outbound routes, return an error about failing to convert a string to an integer, and from my interpretation of the logs it appears to be related to the kamailio server IP address.

dSIPRouter is a very cool project BTW. Thanks for contributing great OSS.

CDR Errors

Sep 30 20:31:43 ad037e44-b2f9-4e9c-8aeb-f0fb4b5db83f /usr/sbin/kamailio[1304]: ERROR: db_mysql [km_dbase.c:122]: db_mysql_submit_query(): driver error on query: Incorrect integer value: '' for column `kamailio`.`acc`.`src_gwgroupid` at row 1 (1366)
Sep 30 20:31:43 ad037e44-b2f9-4e9c-8aeb-f0fb4b5db83f /usr/sbin/kamailio[1304]: ERROR: <core> [db_query.c:244]: db_do_insert_cmd(): error while submitting query
Sep 30 20:31:43 ad037e44-b2f9-4e9c-8aeb-f0fb4b5db83f /usr/sbin/kamailio[1304]: ERROR: acc [acc.c:477]: acc_db_request(): failed to insert into database

Kamailio Routing Errors - IP information scrubbed with X's

Sep 30 20:14:35 ad037e44-b2f9-4e9c-8aeb-f0fb4b5db83f /usr/sbin/kamailio[1304]: ERROR: pv [pv_trans.c:1314]: tr_eval_uri(): invalid uri [0]
Sep 30 20:14:35 ad037e44-b2f9-4e9c-8aeb-f0fb4b5db83f /usr/sbin/kamailio[1304]: ERROR: <core> [core/lvalue.c:346]: lval_pvar_assign(): non existing right pvar
Sep 30 20:14:35 ad037e44-b2f9-4e9c-8aeb-f0fb4b5db83f /usr/sbin/kamailio[1304]: ERROR: <core> [core/lvalue.c:404]: lval_assign(): assignment failed at pos: (1445,22-1445,61)
Sep 30 20:14:35 ad037e44-b2f9-4e9c-8aeb-f0fb4b5db83f /usr/sbin/kamailio[1304]: WARNING: <core> [core/rvalue.c:1009]: rval_get_int(): automatic string to int conversion for "X.X.X.X" failed
Sep 30 20:14:35 ad037e44-b2f9-4e9c-8aeb-f0fb4b5db83f /usr/sbin/kamailio[1304]: WARNING: <core> [core/rvalue.c:1915]: rval_expr_eval_int(): rval expression conversion to int failed (1447,27-1447,44)

Kamailio Certificate Errors:

Sep 30 20:14:35 ad037e44-b2f9-4e9c-8aeb-f0fb4b5db83f /usr/sbin/kamailio[1304]: ERROR: dialog [dialog.c:862]: w_unset_dlg_profile_helper(): failed to unset profile with key
Sep 30 20:14:35 ad037e44-b2f9-4e9c-8aeb-f0fb4b5db83f /usr/sbin/kamailio[1304]: INFO: <script>: [SEND_NOTIFICATION] <sbcctl_ucs02sb02_1376583047_vmapc05_appCtl.3_11013_2_2021093016143534_4916_61997> Sending request to https://127.0.0.1:5000/api/vi/notification/gwgroup for type 1
Sep 30 20:14:35 ad037e44-b2f9-4e9c-8aeb-f0fb4b5db83f /usr/sbin/kamailio[1311]: ERROR: http_async_client [http_multi.c:590]: check_multi_info(): handle 0x7f6addaea0c0 returned error 60: SSL certificate problem: self signed certificate
Sep 30 20:14:35 ad037e44-b2f9-4e9c-8aeb-f0fb4b5db83f /usr/sbin/kamailio[1311]: ERROR: <script>: [HTTP_REPLY] <123> error SSL certificate problem: self signed certificate)

Let me test this out. If it's an issue we will patch it

Thanks @mackhendricks I did notice that somehow in my midnight implementation that I skipped the hostname step, so I am assuming that is the reason for cert failures. I am going to reprovision tonight with that step included. Is there any reason why I couldn't restore the database after a snapshot is reverted and re-run the installer script? I didn't see any hostname references in any of the tables that I've played with today.

I just tested and I get CDR's. But I will try to walk thru your workflow of deleting the outbound routes and see if that makes a difference. I used Flowroute for my testing

image

I noticed another detail in the install docs that I missed being a specific release version of debian 10. It just dawned on me that the first thing that I did after deploying my base image on the hypervisor of course was login and run 'apt-get update; apt-get -y dist-upgrade && reboot' that could also be part of the problem haha. If youre not seeing anything wrong on your end we can close this issue and forget I opened it. Ill blast this instance and reprovision.

Closing issue - if you have any follow-up questions please use our email list: https://groups.google.com/g/dSIPRouter