Control Route to Destination with Filter + DestinationID

153 views
Skip to first unread message

Vivian Alan

unread,
Dec 2, 2021, 7:46:13 PM12/2/21
to CGRateS
Hello,

I've been using CGRates for outbound and it's been working great thus far.

Now I'm in the process of setup of inbound DIDs on the CGRates, system. Initially I'm assigning an account to the provider ( I may use Attributes to assign to client account based on Destination later)
I am able to get the call inbound and routed to the customer route like so:
1. Routes.csv
cgrates.org,ROUTE_INCOMING,FLTR_PROV_IN,,*qos,*tcc;*tcd,,,,,,,,false,,10
cgrates.org,ROUTE_INCOMING,,,,,SUN-IB1,FLTR_SUN,,,,Stats2,20,,,

2.Filters.csv
cgrates.org,FLTR_PROV_IN,*string,~*req.Account,1120,
cgrates.org,FLTR_SUN,*prefix,~*req.Destination,12127453388,

Call CDR output:
RatePlanID: RP_DIDUS
DestinationID: DID-SUN
DestionationPrefix:  12127453388

The above works.

However, I would not like to create an entry for every DID. So, I'm trying to use the following in Filters.csv:
cgrates.org,FLTR_SUN,*destinations,~*req.Destination,DID-SUN,

Results in {"id":1001399026,"result":null,"error":"ROUTES_ERROR:NOT_FOUND"}.

As a note, the account does have access to the destination DID-SUN through the rateplan as seen in call output above.

I'm hoping somebody here can help.

Thank you

Vivian






Adrian Porosnicu

unread,
Dec 16, 2021, 8:56:25 AM12/16/21
to CGRateS
Hi,

The "*destinations" filter seems to be ok. In order to find the problem, I need to see what event are you sending to your request. Please, can you ngrep the calls and give me the request and results from those:
1.GetRouteProfile,
2.GetRoutes
3.GetFilter

Thanks,
Porosnicu Adrian

Vivian Alan

unread,
Dec 16, 2021, 11:54:03 AM12/16/21
to CGRateS

Hi Adrian,

I found the problem. It was that Filters needs a connection enabled to apiers_conns.
"filters": {                                                            // Filters configuration (*new)
        "enabled": true,
        "apiers_conns": ["*localhost"],                                         // added this line.
},

Thank you
Vivian
Reply all
Reply to author
Forward
0 new messages