Hello Sergiu,

now its better understandable. Just looked briefly to the code, the function 
works more or less like this:

- it will take the URI and resolve it to an IP address

- it will then compare this IP to the dispatcher nodes (depending on the mode 
to all or one group)

So if there is a DNS name in the dispatcher list node entry, it will not match.

You could try as a workaround to add all IPs of the FQDN (e.g. deactivated or 
with higher priority) to the dispatcher list as well and see if it works then.

If yes, then the dispatcher module needs probably some extension.

Cheers,

Henning

Am 27.08.19 um 15:56 schrieb Sergiu Pojoga:
May be I didn't provide sufficient details, so I'll elaborate.

I'd like Kamailio to 'talk' to only known dispatcher gateways, so in the 
REQINIT route I do:

route[REQINIT] {
# Silently drop requests from unknown gateways, very strict mode
if(!ds_is_from_list()) {
   xlog("L_ALERT","blocking $rm request from unknown gateway, UA=<$ua>, 
IP=$si:$sp\n");
exit;
}

Now, after dispatching a call to some carrier who's gateway address is a FQDN 
that resolves into multiple IP addresses, when an in-dialog request like BYE or 
re-Invite from the downstream carriers arrives, ds_is_from_list() returns false 
and the request gets silently ignored as indicated in the above route block.

Is that the expected behavior of ds_is_from_list() function?

Thanks,
--Sergiu

On Wed, Aug 21, 2019 at 6:01 PM Sergiu Pojoga 
<[email protected]<mailto:[email protected]>> wrote:
Hi ppl,

The problem I'm facing is that function ds_is_from_list seems to return false 
when a gateway's address is a FQDN that resolves into multiple IP addresses 
(I'm talking about A records), consequently in-dialog requests like BYE and 
re-Invites get blocked since they don't pass the ds_is_from_list validation.

Am I missing some parameter or something?

Thanks,
--Sergiu



_______________________________________________
Kamailio (SER) - Users Mailing List
[email protected]<mailto:[email protected]>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://skalatan.de/services
_______________________________________________
Kamailio (SER) - Users Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to