<HTML><BODY><br><span id="result_box" lang="en"><span>Hello!</span><br><br><span id="result_box" class="short_text" lang="en"><span>Sorry for English, I know only Russian</span></span>.<br><span>There was a situation when it is necessary to control 1 IP address of the remote gateway from different sockets to kamailio.</span> <span>This is necessary to provide a backup bypass to a remote gateway through two independent Internet providers.</span><br><span>Previously, I used the dispatcher module, but in this situation it did not help, I want to understand it the way it should or it's a bug.<br><br><span id="result_box" lang="en"><span>Here are the settings<br><br>                                                                           ------------(PROV-1)----------------\<br>                                                      </span></span>                    /                                                     \<br>                                                                         /                                                       (socket:udp:Y1.Y1.Y1.Y1:7060)<br>Remote GW (sip:A1.A1.A1.A1:5060)------ (INTERNET)                                             KAMAILIO<br></span></span>                                                                         \                                                        (socket:udp:X1.X1.X1.X1:7060)<br>                                                                          \                                                      /<br>                                                                           -----------(PROV-2)------------------/<br><br>kamailio.cfg<br>...<br>loadmodule "dispatcher.so"<br>#################################################################<br>    modparam("dispatcher", "db_url", "mysql://root:@localhost/kamailio510")<br>    modparam("dispatcher", "dst_avp", "$avp(test)")<br>    modparam("dispatcher", "flags", 2)<br>    modparam("dispatcher", "ds_ping_method", "OPTIONS")<br>    modparam("dispatcher", "ds_ping_interval", 30)<br>    modparam("dispatcher", "ds_probing_threshold", 1)<br>    modparam("dispatcher", "ds_inactive_threshold", 2)<br>    modparam("dispatcher", "ds_probing_mode", 1)<br><br>List gw dispatcher<br>]# kamcmd dispatcher.list<br>{<br>    NRSETS: 1<br>    RECORDS: {<br>                          SET: {<br>                                      ID: 1<br>                                      TARGETS: {<br>                                                            DEST: {<br>                                                                                URI: sip:A1.A1.A1.A1:5060<br>                                                                                FLAGS: AP<br>                                                                                PRIORITY: 2<br>                                                                                ATTRS: {<br>                                                                                                    BODY: socket=udp:Y1.Y1.Y1.Y1:7060   <br>                                                                                                    DUID: <br>                                                                                                    MAXLOAD: 0<br>                                                                                                    WEIGHT: 0<br>                                                                                                    RWEIGHT: 0<br>                                                                                                    SOCKET: udp:Y1.Y1.Y1.Y1:7060<br>                                                                                                 }<br>                                                                       }<br>                                                                 <br>                                                              DEST: {<br>                                                                                 URI: sip:A1.A1.A1.A1:5060<br>                                                                                 FLAGS: AP<br>                                                                                 PRIORITY: 1<br>                                                                                 ATTRS: {<br>                                                                                                          BODY: socket=udp:X1.X1.X1.X1:7060<br>                                                                                                          DUID: <br>                                                                                                          MAXLOAD: 0<br>                                                                                                          WEIGHT: 0<br>                                                                                                          RWEIGHT: 0<br>                                                                                                          SOCKET: udp:X1.X1.X1.X1:7060<br>                                                                                                }<br>                                                                            }<br>                                                           }<br>                                        }<br>                            }<br>   }<br><br><span id="result_box" lang="en"><span title="Результ если удалённый шлюз не доступен через сеть провайдера 2(), по неизвестной причине изменяется статус первой записи, которая соответствует провайдеру 1.

">Result if the remote gateway is not accessible through the network of the provider 2 (udp:X1.X1.X1.X1:7060), for the unknown reason the status of the first record, which corresponds to the provider 1 (udp:Y1.Y1.Y1.Y1:7060), changes.<br><br><span id="result_box" lang="en"><span>There are no errors with sockets, OPTIONS packages are sent and a response of 200 OK from the provider is received. 1. OPTIONS requests are sent through provider 2, but there are no answers.</span> <span>But the status changes for some reason at the first.<br><br></span></span># kamcmd dispatcher.list<br>{<br>    NRSETS: 1<br>    RECORDS: {<br>                          SET: {<br>                                      ID: 1<br>                                      TARGETS: {<br>                                                            DEST: {<br>                                                                                URI: sip:A1.A1.A1.A1:5060<br>                                                                                FLAGS: IP<br>                                                                                PRIORITY: 2<br>                                                                                ATTRS: {<br>                                                                                                    BODY: socket=udp:Y1.Y1.Y1.Y1:7060   <br>                                                                                                    DUID: <br>                                                                                                    MAXLOAD: 0<br>                                                                                                    WEIGHT: 0<br>                                                                                                    RWEIGHT: 0<br>                                                                                                    SOCKET: udp:Y1.Y1.Y1.Y1:7060<br>                                                                                                 }<br>                                                                       }<br>                                                                 <br>                                                              DEST: {<br>                                                                                 URI: sip:A1.A1.A1.A1:5060<br>                                                                                 FLAGS: AP<br>                                                                                 PRIORITY: 1<br>                                                                                 ATTRS: {<br>                                                                                                          BODY: socket=udp:X1.X1.X1.X1:7060<br>                                                                                                          DUID: <br>                                                                                                          MAXLOAD: 0<br>                                                                                                          WEIGHT: 0<br>                                                                                                          RWEIGHT: 0<br>                                                                                                          SOCKET: udp:X1.X1.X1.X1:7060<br>                                                                                                }<br>                                                                            }<br>                                                           }<br>                                        }<br>                            }<br>   }<br><br></span><span title="При тестировании выяснилось, что камаилио не позволяет контролировать состояние при использовании моей схеме.
">At testing it was found out, that камаилио does not allow to supervise a condition at use my circuit. <span id="result_box" lang="en"><span>I tried on 5.0.3 and on 5.1.0 the dispatcher works similarly.</span></span><br></span><span title="Просьба помогите советом.">Please help with advice.</span></span><br><br>                                                          <br>Best regards<br>Evgeniy<br></BODY></HTML>