For monitoring purposes I’d like to have custom CDR’s based on tags.
How can I apply a filter to get all calls with a certain tag?
I’ve tried;
local_tag = “Name”
local_tag = tag id
Unfortunately both end with a ‘Something went wrong’ page.
Thank you!
EDIT:
I just noted that the local_tag is not even connected to the routing tags, which makes sense that it does not work then.
Is there a possible way to filter on routing tags?
Or perhaps on internal disconnect code?
internal_disconnect_reason=“Rejected by destination” also returns an error, while internal_disconnect_code works as expected.
local_tag CDR field is not related to yeti routing tags. This is internal session identifier.
Could you show screenshot of filled report creation form - I will try to reproduce issue.
I indeed noticed that the local_tag was not suited for my needs. Though I have attached a screenshot of what I had originally entered (it makes perfect sense that it crashes with this).
Unfortunately the docs could not help me further and custom CDR raised a few questions;
Can I add text/change the subject of the mail sent by the scheduler?
How can I filter on two fields? (eg. ‘profit < 0, rateplan_id != 17’ and ‘profit < 0 & rateplan_id != 17’ don’t seem to work), this also results in ’ We’re sorry, but something went wrong.’
Is it possible to get a report based on a tag that has been set/appended?
How can I filter on two fields? (eg. ‘profit < 0, rateplan_id != 17’ and ‘profit < 0 & rateplan_id != 17’ don’t seem to work), this also results in ’ We’re sorry, but something went wrong.’
profit < 0 AND rateplan_id != 17. and yes, this field inject text to SQL query so this report feature is security hole
Is it possible to get a report based on a tag that has been set/appended?
It is possible, but CDR contains array of routing tags. For example routing_tag_ids=‘{37,44}’::smallint[] for cdrs with routing tags 37,44(exact matching, order-sensitive), or routing_tag_ids@>‘{37,44}’::smallint[] cdrs that contains tags 37 and 44. See PostgreSQL: Documentation: 11: 9.18. Array Functions and Operators