Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CDR's / Call Log / DDI's sending #1726

Open
5 of 6 tasks
SniperVegeta opened this issue Feb 28, 2022 · 0 comments
Open
5 of 6 tasks

CDR's / Call Log / DDI's sending #1726

SniperVegeta opened this issue Feb 28, 2022 · 0 comments
Labels
Milestone

Comments

@SniperVegeta
Copy link

  • IvozProvider version: 2.192.19.020211109.3402

  • Related sections:

    • SIP & Telephony
    • vPBX Functionalities
    • Billing & Invoicing
    • Web Interface
    • API
    • Other

Troubleshooting

Desire off sending ANNY DDI option from an brand or client

File: /etc/kamailio/proxyusers/kamailio.cfg

route[VALIDATE_CLID_NUMBER] {
    sql_query("cb", "SELECT id, DDIE164 FROM DDIs WHERE companyId='$dlg_var(companyId)' AND DDIE164='$var(transformated)'", "rc");

    if ($dbr(rc=>rows) > 0) {
        xinfo("[$dlg_var(cidhash)] VALIDATE-CLID-NUMBER: $var(transformated) is VALID for company $dlg_var(companyId)\n");
        $dlg_var(valid_clid) = "yes";
        append_hf("X-Info-DdiId: $dbr(rc=>[0,0])\r\n");
    } else {
        xwarn("[$dlg_var(cidhash)] VALIDATE-CLID-NUMBER: $var(transformated) is NOT VALID for company $dlg_var(companyId)\n");
        xerr("[$dlg_var(cidhash)] VALIDATE-CLID-NUMBER: Here /etc/kamailio/proxyusers/kamailio.cfg and using it annyway\n");
        $dlg_var(valid_clid) = "yes";
        append_hf("X-Info-DdiId: $dbr(rc=>[0,0])\r\n");
    }

    sql_result_free("rc");
}

We set an red alert on the log
we set the $dlg_var(valid_clid) = "no"; to yes
and append it annyway append_hf("X-Info-DdiId: $dbr(rc=>[0,0])\r\n")

Additional Information

So What ive seen is:
the LOGS only are written if DDIs are filled in ( imo this is poor coded work, we NEVER should log on the "if DDI" but on the unique ID)

So you should make an checkbox in Brand or Client "Make CLID bound to DDI's --> "yes or no" (Discrption = if Yes only DDI CLID's are premitted"
and in code:
$dlg_var(valid_clid) = "yes"; must be triggerd to yes or no

but u need to fix your CLID logs to NOT use DDIs for logging calls

Fun part = in tp_cdrs u log it - so cost is out the global DDI, but brand and client never logged whare u use somehow the DDIs as key to log......

@Kaian Kaian added the +request label Jun 7, 2022
@Kaian Kaian added this to the Future milestone Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants