Hello,

I am  using freeswitch in kubernetes and IPaddresses are not fixed instead I am using domain names in the dispatcher.list. Also I am using ds_is_from_list to set the destination to either  upstream or downstream. The issue I have is that when freeswitch sends an invite message to Kamailio it is sending IP address and dispatcher.list is in domain format. What will be the best way to match these two? Currently calls are failing with 404 No destination

Here

# Dispatch requests
route[DISPATCH] {
       
if(ds_is_from_list("9")) {
ds_select_dst("1","4");
t_on_failure("RTF_DISPATCH");
route(RELAY);
exit;
}
if(ds_is_from_list("1")) {
ds_select_dst("9","4");
t_on_failure("RTF_DISPATCH");
route(RELAY);
exit;
}

}


dispatcher.list

# setid(int) destination(sip uri) flags(int,opt) priority(int,opt) attributes(str,opt)
1 sip:a.freeswitch-0.freeswitch-svc.voip.svc.cluster.local:5060 16 0 Freeswitch0
1 sip:a.freeswitch-1.freeswitch-svc.voip.svc.cluster.local:5060 16 0 Freeswitch1
9 sip:172.28.250.189:5060 2 0 mediagw


Thanks!