[SR-Users] Module dispatcher no

Евгений Голей goley_ev_sp at mail.ru
Tue Dec 26 14:22:03 CET 2017


Hello!

Sorry for English, I know only Russian .
There was a situation when it is necessary to control 1 IP address of the remote gateway from different sockets to kamailio. This is necessary to provide a backup bypass to a remote gateway through two independent Internet providers.
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.

Here are the settings

                                                                           ------------(PROV-1)----------------\
                                                                           /                                                     \
                                                                         /                                                       (socket:udp:Y1.Y1.Y1.Y1:7060)
Remote GW (sip:A1.A1.A1.A1:5060)------ (INTERNET)                                             KAMAILIO
                                                                         \                                                        (socket:udp:X1.X1.X1.X1:7060)
                                                                          \                                                      /
                                                                           -----------(PROV-2)------------------/

kamailio.cfg
...
loadmodule "dispatcher.so"
#################################################################
    modparam("dispatcher", "db_url", "mysql://root:@localhost/kamailio510")
    modparam("dispatcher", "dst_avp", "$avp(test)")
    modparam("dispatcher", "flags", 2)
    modparam("dispatcher", "ds_ping_method", "OPTIONS")
    modparam("dispatcher", "ds_ping_interval", 30)
    modparam("dispatcher", "ds_probing_threshold", 1)
    modparam("dispatcher", "ds_inactive_threshold", 2)
    modparam("dispatcher", "ds_probing_mode", 1)

List gw dispatcher
]# kamcmd dispatcher.list
{
    NRSETS: 1
    RECORDS: {
                          SET: {
                                      ID: 1
                                      TARGETS: {
                                                            DEST: {
                                                                                URI: sip:A1.A1.A1.A1:5060
                                                                                FLAGS: AP
                                                                                PRIORITY: 2
                                                                                ATTRS: {
                                                                                                    BODY: socket=udp:Y1.Y1.Y1.Y1:7060   
                                                                                                    DUID: 
                                                                                                    MAXLOAD: 0
                                                                                                    WEIGHT: 0
                                                                                                    RWEIGHT: 0
                                                                                                    SOCKET: udp:Y1.Y1.Y1.Y1:7060
                                                                                                 }
                                                                       }
                                                                 
                                                              DEST: {
                                                                                 URI: sip:A1.A1.A1.A1:5060
                                                                                 FLAGS: AP
                                                                                 PRIORITY: 1
                                                                                 ATTRS: {
                                                                                                          BODY: socket=udp:X1.X1.X1.X1:7060
                                                                                                          DUID: 
                                                                                                          MAXLOAD: 0
                                                                                                          WEIGHT: 0
                                                                                                          RWEIGHT: 0
                                                                                                          SOCKET: udp:X1.X1.X1.X1:7060
                                                                                                }
                                                                            }
                                                           }
                                        }
                            }
   }

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.

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. But the status changes for some reason at the first.

# kamcmd dispatcher.list
{
    NRSETS: 1
    RECORDS: {
                          SET: {
                                      ID: 1
                                      TARGETS: {
                                                            DEST: {
                                                                                URI: sip:A1.A1.A1.A1:5060
                                                                                FLAGS: IP
                                                                                PRIORITY: 2
                                                                                ATTRS: {
                                                                                                    BODY: socket=udp:Y1.Y1.Y1.Y1:7060   
                                                                                                    DUID: 
                                                                                                    MAXLOAD: 0
                                                                                                    WEIGHT: 0
                                                                                                    RWEIGHT: 0
                                                                                                    SOCKET: udp:Y1.Y1.Y1.Y1:7060
                                                                                                 }
                                                                       }
                                                                 
                                                              DEST: {
                                                                                 URI: sip:A1.A1.A1.A1:5060
                                                                                 FLAGS: AP
                                                                                 PRIORITY: 1
                                                                                 ATTRS: {
                                                                                                          BODY: socket=udp:X1.X1.X1.X1:7060
                                                                                                          DUID: 
                                                                                                          MAXLOAD: 0
                                                                                                          WEIGHT: 0
                                                                                                          RWEIGHT: 0
                                                                                                          SOCKET: udp:X1.X1.X1.X1:7060
                                                                                                }
                                                                            }
                                                           }
                                        }
                            }
   }

At testing it was found out, that камаилио does not allow to supervise a condition at use my circuit.  I tried on 5.0.3 and on 5.1.0 the dispatcher works similarly.
Please help with advice.

                                                          
Best regards
Evgeniy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20171226/25dd3a7e/attachment.html>


More information about the sr-users mailing list