<!-- Kamailio Project uses GitHub Issues only for bugs in the code or feature requests.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list
* http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
If you submit a feature request (or enhancement), you can delete the text of the template and only add the description of what you would like to be added.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment). -->
### Description "ds_is_from_list" function from Dispatcher module give false result - when actually it should be true. <!-- Explain what you did, what you expected to happen, and what actually happened. -->
### Troubleshooting
#### Reproduction
modparam("dispatcher", "db_url",DBURL) modparam("dispatcher", "table_name", "dispatcher") modparam("dispatcher", "setid_col", "setid") modparam("dispatcher", "destination_col", "destination") modparam("dispatcher", "flags", 2) modparam("dispatcher", "dst_avp", "$avp(AVP_DST)") modparam("dispatcher", "grp_avp", "$avp(AVP_GRP)") modparam("dispatcher", "cnt_avp", "$avp(AVP_CNT)") modparam("dispatcher", "sock_avp", "$avp(AVP_SOCK)")
request_route {
xlog("L_INFO","[=Start Routing=]")
if(ds_is_from_list("1")) { xlog("L_INFO","[=FROM ASTERISK=]"); } else { xlog("L_INFO","[=TO ASTERISK=]"); }
if($si=="192.168.1.10") { xlog("L_INFO","[=FROM ASTERISK BY IP=]"); } else { xlog("L_INFO","[=TO ASTERISK BY IP=]"); }
root@kamailio:/var/log# kamctl dispatcher show dispatcher gateways +----+-------+---------------------+-------+----------+-------+-----------------+ | id | setid | destination | flags | priority | attrs | description | +----+-------+---------------------+-------+----------+-------+-----------------+ | 1 | 1 | sip:192.168.1.10:5060 | 0 | 3 | | Main Asterisk | | 2 | 2 | sip:192.168.1.11:5060 | 0 | 2 | | Backup Asterisk | | 3 | 3 | sip:192.168.1.12:5060 | 0 | 1 | | Test Asterisk | +----+-------+---------------------+-------+----------+-------+-----------------+ root@kamailio:/var/log#
cat /var/log/kamailio.log [=Start Routing=] **[=TO ASTERISK=]** **[=FROM ASTERISK BY IP=]**
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
``` root@kamailio:/var/log# kamailio -v version: kamailio 5.0.3 (x86_64/linux) flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: unknown compiled on 12:12:14 Sep 7 2017 with gcc 6.3.0 root@kamailio:/var/log# ```
* **Operating System**:
<!-- Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...; Kernel details (output of `uname -a`) -->
``` Debian 9.1/ Linux kamailio1 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u3 (2017-08-06) x86_64 GNU/Linux ```
The source port for the SIP request is 5061, in the dispatcher records all addresses have the port 5060.
Closed #1235.