Thanks for the help.

Adding sip is not changing anything, however, kamctl dispatcher dump fails: 

{
  "jsonrpc":  "2.0",
  "error":  {
    "code": -32000,
    "message":  "Execution Error"
  },
  "id": 774
}

and the log file shows: 

DEBUG: jsonrpcs [jsonrpcs_fifo.c:449]: jsonrpc_fifo_server(): preparing to execute fifo jsonrpc [{"jsonrpc": "2.0", "method": "dispatcher.list", "reply_name": "kamailio_receiver_774", "id": 774}]
ERROR: dispatcher [dispatcher.c:1133]: dispatcher_rpc_list(): no destination sets
DEBUG: jsonrpcs [jsonrpcs_mod.c:395]: jsonrpc_send(): sending response with body: (nil) - 500 No Destination Sets
DEBUG: jsonrpcs [jsonrpcs_fifo.c:461]: jsonrpc_fifo_server(): command executed - result: [kamailio_receiver_774] [500] [0x8ecd3a0] [{#012#011"jsonrpc":#011"2.0",#012#011"error":#011{#012#011#011"code":#011-32000,#012#011#011"message":#011"Execution Error"#012#011},#012#011"id":#011774#012}]
May 24 15:54:40 kamailio /usr/local/sbin/kamailio[654]: DEBUG: <core> [core/udp_server.c:475]: udp_rcv_loop(): probing packet received from 192.168.2.200 56595


On Wed, May 24, 2017 at 3:52 PM, Daniel-Constantin Mierla <miconda@gmail.com> wrote:
Helo,

destination has to be a full sip address, so you have to add 'sip:' in front of the ip addresses.

Cheers,
Daniel

On Wed, May 24, 2017 at 9:35 PM, Jean Cérien <cerien.jean@gmail.com> wrote:

Hello

I am working with Kamaiio 5.0 on the dispatcher, with the default dispatcher.cfg file ( https://github.com/kamailio/kamailio/blob/master/src/modules/dispatcher/doc/dispatcher.cfg )

I've added via mysql a gateway:

mysql> select * from dispatcher \G;
*************************** 1. row ***************************
         id: 1
      setid: 1
destination: 192.168.2.20
      flags: 0
   priority: 0
      attrs: 
description: local gw
1 row in set (0.00 sec)

Kamctl sees it correctly: 
kamctl dispatcher show
dispatcher gateways
+----+-------+--------------+-------+----------+-------+-------------+
| id | setid | destination  | flags | priority | attrs | description |
+----+-------+--------------+-------+----------+-------+-------------+
|  1 |     1 | 192.168.2.20 |     0 |        0 |       | local gw    |
+----+-------+--------------+-------+----------+-------+-------------+


Here is the piece of cfg:
if(ds_list_exist(1)) {
        xlog("L_INFO", "----------- data in set 1");
} else {
        xlog("L_INFO", "----------- NO data in set 1");
}


if(!ds_select_dst("1", "4")) {
        send_reply("404", "No destination");
        exit;
}

Yet, when an INVITE arrives, I get the following errors:

DEBUG: dispatcher [dispatcher.c:876]: w_ds_list_exist(): --- Looking for dispatcher set 1
DEBUG: dispatcher [dispatch.c:1314]: ds_list_exist(): -- Looking for set 1
INFO: dispatcher [dispatch.c:1320]: ds_list_exist(): destination set [1] not found
INFO: <script>: ----------- NO data in set 1
ERROR: dispatcher [dispatch.c:1679]: ds_select_dst_limit(): no destination sets

same result wether I state the dataset as 1 or "1" - Mysql table column type is int(11).

What could be wrong ? 

Thanks for the help

J.

_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users




--

_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users