Re: [SR-Users] Disable GW's on runtime

2019-08-28 Thread David Villasmil
Gotcha. I have a similar scenario. I use SQLops to set a gw status to 4
where it’s ATTRS is “whatever” and reload ds_reload()


That might work for you as well.

On Wed, 28 Aug 2019 at 16:36, Duarte Rocha  wrote:

> > Why not just calling dispatcher.set_state directly to the kamailio? That
> would only set the state in memory. Unless you do a reload.
>
> Set_state works with gw uri and group as argument. In this scenario both
> gws have the same uri and group and i only want to disable the one that has
> a socket that doesn't exist in the machine
>
>
>
> A quarta, 28/08/2019, 11:32, Duarte Rocha 
> escreveu:
>
>> Greetings,
>>
>> I have two Kamailio's working on a HA scenario. Both Kamailio's have DB
>> replication and each machine has one HA IP. In order to set this up, i have
>> every GW on the DB duplicated, one with Socket IPA and another with socket
>> IPB.
>>
>> I have both GWs in a active state configurated in the replicated DB. They
>> also both have the same URI and the same group id
>>
>> Example :
>> GW1 : Socket = IPA ; GroupID = 1 ; Uri = sip:1.1.1.1:5060
>> GW2 : Socket = IPB ; GroupID = 1 ; Uri = sip:1.1.1.1:5060
>>
>> In order to avoid errors, i want to disable on runtime the GWs that have
>> a socket that doesn't belong, at the moment, to that machine (GW with
>> Socket IPB on machine with IPA). To do that i would use the
>> dispatcher.set_state, however it works with group id and address, which in
>> this case it is the same.
>>
>> Is there other method to disable the GWs on runtime using other arguments
>> like duid or socket ?
>>
>> I thought about using probing for this, since it will disable
>> automatically the GWs with non-existent socket, but not all my clients
>> support probing, so it isn't feasible.
>>
>> Thanks in advance
>>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-- 
Regards,

David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Disable GW's on runtime

2019-08-28 Thread Duarte Rocha
> Why not just calling dispatcher.set_state directly to the kamailio? That
would only set the state in memory. Unless you do a reload.

Set_state works with gw uri and group as argument. In this scenario both
gws have the same uri and group and i only want to disable the one that has
a socket that doesn't exist in the machine



A quarta, 28/08/2019, 11:32, Duarte Rocha 
escreveu:

> Greetings,
>
> I have two Kamailio's working on a HA scenario. Both Kamailio's have DB
> replication and each machine has one HA IP. In order to set this up, i have
> every GW on the DB duplicated, one with Socket IPA and another with socket
> IPB.
>
> I have both GWs in a active state configurated in the replicated DB. They
> also both have the same URI and the same group id
>
> Example :
> GW1 : Socket = IPA ; GroupID = 1 ; Uri = sip:1.1.1.1:5060
> GW2 : Socket = IPB ; GroupID = 1 ; Uri = sip:1.1.1.1:5060
>
> In order to avoid errors, i want to disable on runtime the GWs that have a
> socket that doesn't belong, at the moment, to that machine (GW with Socket
> IPB on machine with IPA). To do that i would use the dispatcher.set_state,
> however it works with group id and address, which in this case it is the
> same.
>
> Is there other method to disable the GWs on runtime using other arguments
> like duid or socket ?
>
> I thought about using probing for this, since it will disable
> automatically the GWs with non-existent socket, but not all my clients
> support probing, so it isn't feasible.
>
> Thanks in advance
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Disable GW's on runtime

2019-08-28 Thread David Villasmil
Why not just calling dispatcher.set_state directly to the kamailio? That
would only set the state in memory. Unless you do a reload.

On Wed, 28 Aug 2019 at 13:21, Duarte Rocha  wrote:

> Yes, i only want to disable it on one Kamailio.
>
> A quarta, 28/08/2019, 11:32, Duarte Rocha 
> escreveu:
>
>> Greetings,
>>
>> I have two Kamailio's working on a HA scenario. Both Kamailio's have DB
>> replication and each machine has one HA IP. In order to set this up, i have
>> every GW on the DB duplicated, one with Socket IPA and another with socket
>> IPB.
>>
>> I have both GWs in a active state configurated in the replicated DB. They
>> also both have the same URI and the same group id
>>
>> Example :
>> GW1 : Socket = IPA ; GroupID = 1 ; Uri = sip:1.1.1.1:5060
>> GW2 : Socket = IPB ; GroupID = 1 ; Uri = sip:1.1.1.1:5060
>>
>> In order to avoid errors, i want to disable on runtime the GWs that have
>> a socket that doesn't belong, at the moment, to that machine (GW with
>> Socket IPB on machine with IPA). To do that i would use the
>> dispatcher.set_state, however it works with group id and address, which in
>> this case it is the same.
>>
>> Is there other method to disable the GWs on runtime using other arguments
>> like duid or socket ?
>>
>> I thought about using probing for this, since it will disable
>> automatically the GWs with non-existent socket, but not all my clients
>> support probing, so it isn't feasible.
>>
>> Thanks in advance
>>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-- 
Regards,

David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Disable GW's on runtime

2019-08-28 Thread Duarte Rocha
Yes, i only want to disable it on one Kamailio.

A quarta, 28/08/2019, 11:32, Duarte Rocha 
escreveu:

> Greetings,
>
> I have two Kamailio's working on a HA scenario. Both Kamailio's have DB
> replication and each machine has one HA IP. In order to set this up, i have
> every GW on the DB duplicated, one with Socket IPA and another with socket
> IPB.
>
> I have both GWs in a active state configurated in the replicated DB. They
> also both have the same URI and the same group id
>
> Example :
> GW1 : Socket = IPA ; GroupID = 1 ; Uri = sip:1.1.1.1:5060
> GW2 : Socket = IPB ; GroupID = 1 ; Uri = sip:1.1.1.1:5060
>
> In order to avoid errors, i want to disable on runtime the GWs that have a
> socket that doesn't belong, at the moment, to that machine (GW with Socket
> IPB on machine with IPA). To do that i would use the dispatcher.set_state,
> however it works with group id and address, which in this case it is the
> same.
>
> Is there other method to disable the GWs on runtime using other arguments
> like duid or socket ?
>
> I thought about using probing for this, since it will disable
> automatically the GWs with non-existent socket, but not all my clients
> support probing, so it isn't feasible.
>
> Thanks in advance
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Disable GW's on runtime

2019-08-28 Thread David Villasmil
You want to disable it on only one kamailio, correct?

On Wed, 28 Aug 2019 at 12:34, Duarte Rocha  wrote:

> Greetings,
>
> I have two Kamailio's working on a HA scenario. Both Kamailio's have DB
> replication and each machine has one HA IP. In order to set this up, i have
> every GW on the DB duplicated, one with Socket IPA and another with socket
> IPB.
>
> I have both GWs in a active state configurated in the replicated DB. They
> also both have the same URI and the same group id
>
> Example :
> GW1 : Socket = IPA ; GroupID = 1 ; Uri = sip:1.1.1.1:5060
> GW2 : Socket = IPB ; GroupID = 1 ; Uri = sip:1.1.1.1:5060
>
> In order to avoid errors, i want to disable on runtime the GWs that have a
> socket that doesn't belong, at the moment, to that machine (GW with Socket
> IPB on machine with IPA). To do that i would use the dispatcher.set_state,
> however it works with group id and address, which in this case it is the
> same.
>
> Is there other method to disable the GWs on runtime using other arguments
> like duid or socket ?
>
> I thought about using probing for this, since it will disable
> automatically the GWs with non-existent socket, but not all my clients
> support probing, so it isn't feasible.
>
> Thanks in advance
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-- 
Regards,

David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Disable GW's on runtime

2019-08-28 Thread Duarte Rocha
Greetings,

I have two Kamailio's working on a HA scenario. Both Kamailio's have DB
replication and each machine has one HA IP. In order to set this up, i have
every GW on the DB duplicated, one with Socket IPA and another with socket
IPB.

I have both GWs in a active state configurated in the replicated DB. They
also both have the same URI and the same group id

Example :
GW1 : Socket = IPA ; GroupID = 1 ; Uri = sip:1.1.1.1:5060
GW2 : Socket = IPB ; GroupID = 1 ; Uri = sip:1.1.1.1:5060

In order to avoid errors, i want to disable on runtime the GWs that have a
socket that doesn't belong, at the moment, to that machine (GW with Socket
IPB on machine with IPA). To do that i would use the dispatcher.set_state,
however it works with group id and address, which in this case it is the
same.

Is there other method to disable the GWs on runtime using other arguments
like duid or socket ?

I thought about using probing for this, since it will disable automatically
the GWs with non-existent socket, but not all my clients support probing,
so it isn't feasible.

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