{"action":"created","issue":{"url":"https://api.github.com/repos/kamailio/kamailio/issues/1235","repository_url":"https://api.github.com/repos/kamailio/kamailio","labels_url":"https://api.github.com/repos/kamailio/kamailio/issues/1235/labels{/name}","comments_url":"https://api.github.com/repos/kamailio/kamailio/issues/1235/comments","events_url":"https://api.github.com/repos/kamailio/kamailio/issues/1235/events","html_url":"https://github.com/kamailio/kamailio/issues/1235","id":258112957,"number":1235,"title":"Dispatcher ds_is_from_list","user":{"login":"iliesh","id":14953151,"avatar_url":"https://avatars0.githubusercontent.com/u/14953151?v=4","gravatar_id":"","url":"https://api.github.com/users/iliesh","html_url":"https://github.com/iliesh","followers_url":"https://api.github.com/users/iliesh/followers","following_url":"https://api.github.com/users/iliesh/following{/other_user}","gists_url":"https://api.github.com/users/iliesh/gists{/gist_id}","starred_url":"https://api.github.com/users/iliesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iliesh/subscriptions","organizations_url":"https://api.github.com/users/iliesh/orgs","repos_url":"https://api.github.com/users/iliesh/repos","events_url":"https://api.github.com/users/iliesh/events{/privacy}","received_events_url":"https://api.github.com/users/iliesh/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-15T17:38:48Z","updated_at":"2017-09-17T08:17:04Z","closed_at":"2017-09-17T08:17:04Z","author_association":"NONE","body":"<!--\r\nKamailio Project uses GitHub Issues only for bugs in the code or feature requests.\r\n\r\nIf you have questions about using Kamailio or related to its configuration file,\r\nask on sr-users mailing list:\r\n\r\n  * http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users\r\n\r\nIf you have questions about developing extensions to Kamailio or its existing\r\nC code, ask on sr-dev mailing list\r\n\r\n  * http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev\r\n\r\nPlease try to fill this template as much as possible for any issue. It helps the\r\ndevelopers to troubleshoot the issue.\r\n\r\nIf you submit a feature request (or enhancement), you can delete the text of\r\nthe template and only add the description of what you would like to be added.\r\n\r\nIf there is no content to be filled in a section, the entire section can be removed.\r\n\r\nYou can delete the comments from the template sections when filling.\r\n\r\nYou can delete next line and everything above before submitting (it is a comment).\r\n-->\r\n\r\n### Description\r\n\"ds_is_from_list\" function from Dispatcher module give false result - when actually it should be true.\r\n<!--\r\nExplain what you did, what you expected to happen, and what actually happened.\r\n-->\r\n\r\n### Troubleshooting\r\n\r\n#### Reproduction\r\n\r\n```\r\nmodparam(\"dispatcher\", \"db_url\",DBURL)\r\nmodparam(\"dispatcher\", \"table_name\", \"dispatcher\")\r\nmodparam(\"dispatcher\", \"setid_col\", \"setid\")\r\nmodparam(\"dispatcher\", \"destination_col\", \"destination\")\r\nmodparam(\"dispatcher\", \"flags\", 2)\r\nmodparam(\"dispatcher\", \"dst_avp\", \"$avp(AVP_DST)\")\r\nmodparam(\"dispatcher\", \"grp_avp\", \"$avp(AVP_GRP)\")\r\nmodparam(\"dispatcher\", \"cnt_avp\", \"$avp(AVP_CNT)\")\r\nmodparam(\"dispatcher\", \"sock_avp\", \"$avp(AVP_SOCK)\")\r\n\r\nrequest_route {\r\n\r\nxlog(\"L_INFO\",\"[=Start Routing=]\")\r\n\r\nif(ds_is_from_list()) {\r\n                xlog(\"L_INFO\",\"[=FROM ASTERISK=]\");\r\n        } else {\r\n                xlog(\"L_INFO\",\"[=TO ASTERISK=]\");\r\n        }\r\n\r\nif($si==\"192.168.1.10\") {\r\n        xlog(\"L_INFO\",\"[=FROM ASTERISK BY IP=]\");\r\n        } else {\r\n        xlog(\"L_INFO\",\"[=TO ASTERISK BY IP=]\");\r\n}\r\n```\r\n\r\nroot@kamailio:/var/log# kamctl dispatcher show\r\n\r\n```\r\ndispatcher gateways\r\n+----+-------+---------------------+-------+----------+-------+-----------------+\r\n| id | setid | destination         | flags | priority | attrs | description     |\r\n+----+-------+---------------------+-------+----------+-------+-----------------+\r\n|  1 |     1 | sip:192.168.1.10:5060 |     0 |        3 |       | Main Asterisk   |\r\n|  2 |     2 | sip:192.168.1.11:5060 |     0 |        2 |       | Backup Asterisk |\r\n|  3 |     3 | sip:192.168.1.12:5060 |     0 |        1 |       | Test Asterisk   |\r\n+----+-------+---------------------+-------+----------+-------+-----------------+\r\n```\r\n\r\nroot@kamailio:/var/log#\r\n\r\ncat /var/log/kamailio.log\r\n```\r\n[=Start Routing=]\r\n**[=TO ASTERISK=]**\r\n**[=FROM ASTERISK BY IP=]**\r\n```\r\n\r\n### Additional Information\r\n\r\n  * **SIP Packet**\r\n```\r\n2017/09/15 19:21:57.589451 192.168.1.50:5061 -> 192.168.1.1:5060\r\nREGISTER sip:192.168.1.1 SIP/2.0\r\nVia: SIP/2.0/UDP 192.168.1.50:5061;branch=z9hG4bK-5219-1-0\r\nFrom: <sip:10@192.168.1.50>;tag=1\r\nTo: <sip:10@192.168.1.50>\r\nCall-ID: 1-5219@192.168.1.50\r\nCSeq: 1 REGISTER\r\nContact: sip:10@192.168.1.50:5061\r\nMax-Forwards: 10\r\nExpires: 120\r\nUser-Agent: SIPp/Win32\r\nContent-Length: 0\r\n```\r\n\r\n  * **Kamailio Version** - output of `kamailio -v`\r\n\r\n```\r\nroot@kamailio:/var/log# kamailio -v\r\nversion: kamailio 5.0.3 (x86_64/linux)\r\nflags: 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\r\nADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB\r\npoll method support: poll, epoll_lt, epoll_et, sigio_rt, select.\r\nid: unknown\r\ncompiled on 12:12:14 Sep  7 2017 with gcc 6.3.0\r\nroot@kamailio:/var/log#\r\n```\r\n\r\n* **Operating System**:\r\n\r\n<!--\r\nDetails about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;\r\nKernel details (output of `uname -a`)\r\n-->\r\n\r\n```\r\nDebian 9.1/ Linux kamailio1 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u3 (2017-08-06) x86_64 GNU/Linux\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/kamailio/kamailio/issues/comments/330028791","html_url":"https://github.com/kamailio/kamailio/issues/1235#issuecomment-330028791","issue_url":"https://api.github.com/repos/kamailio/kamailio/issues/1235","id":330028791,"user":{"login":"miconda","id":184809,"avatar_url":"https://avatars1.githubusercontent.com/u/184809?v=4","gravatar_id":"","url":"https://api.github.com/users/miconda","html_url":"https://github.com/miconda","followers_url":"https://api.github.com/users/miconda/followers","following_url":"https://api.github.com/users/miconda/following{/other_user}","gists_url":"https://api.github.com/users/miconda/gists{/gist_id}","starred_url":"https://api.github.com/users/miconda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miconda/subscriptions","organizations_url":"https://api.github.com/users/miconda/orgs","repos_url":"https://api.github.com/users/miconda/repos","events_url":"https://api.github.com/users/miconda/events{/privacy}","received_events_url":"https://api.github.com/users/miconda/received_events","type":"User","site_admin":false},"created_at":"2017-09-17T08:17:04Z","updated_at":"2017-09-17T08:17:04Z","author_association":"OWNER","body":"The source port for the SIP request is 5061, in the dispatcher records all addresses have the port 5060."}}
{"actor":{"display_login":"miconda"}}