0
votes

I am configuring kamailio with 2 or more asterisk servers from dispatcher. I configured dispatcher table with 2 asterisk servers.

+----+-------+------------------------+-------+----------+---------------------------------------+-------------+
| id | setid | destination            | flags | priority | attrs                                 | description |
+----+-------+------------------------+-------+----------+---------------------------------------+-------------+
|  1 |     1 | sip:*.*.*.*:5160 |     2 |        1 | duid=ABC;maxload=0;my=XYZ             | sip 1       |
|  2 |     1 | sip:*.*.*.*:5160 |     2 |        1 | duid=DEF;weight=10;maxload=1;my=SRV02 | sip 2       |
+----+-------+------------------------+-------+----------+---------------------------------------+-------------+

In kamailio.cfg file i configured as

 ds_select_dst("1", "10");

I am getting problem while connecting to asterisk. It's giving error and it's taking first entry from dispatcher table.

Error is :

ERROR: dispatcher [dispatch.c:1748]: ds_select_dst_limit(): no dst ID avp for load distribution - using first entry...

Could you please tell me the configuration with argument 10 in ds_select_dest(); and what should i give in "dstid_avp".

1

1 Answers

1
votes

The parameter dstid_avp has to be set to a name of an AVP variable and be sure that the AVP is not used by anything else but dispatcher module. For example:

modparam("dispatcher", "dstid_avp", "$avp(dsdstid)")

If $avp(dsdstid) is not used anywhere else in the config, then all should be fine. Actuallt, the AVP can be used for reading its value, but do not delete or modify it.

As extra remark, it might be needed to set the other dispatcher parameters sufixed with _avp (e.g., if you want failure re-routing), the examples from the README of the dispatcher module can be simply taken and added to kamailio.cfg.