[SR-Users] ds_is_from_list with domain

Abdirahman A. Osman abdirahman.osm at gmail.com
Fri May 29 16:32:54 CEST 2020


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!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200529/1ee77f13/attachment.html>


More information about the sr-users mailing list