Re: [OpenSIPS-Users] Load Balancer Probing Question

2024-04-18 Thread Bogdan-Andrei Iancu
Not really. The LB module uses internal unique ids for all the LB 
destinations it manages. So the probing replies will search back the LB 
destination based on this ID -> no chance to mismatch.


Regards.

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
  https://www.siphub.com

On 16.04.2024 10:45, Callum Guy via Users wrote:
If the backend servers are both the same instance then this seems to 
be the correct behaviour?


I believe the probing is supposed to be a simple SIP response 
healthcheck which applies to the destination globally (i.e. 1.2.3.4 is 
offline), the groups are just a way of splitting up resources 
logically for load balancing purposes.


On Tue, 16 Apr 2024 at 08:31, Bogdan-Andrei Iancu 
 wrote:


Hi,

What OpenSIPS version you have? And as I understand, as
configuration, you do permanent probing to the destinations and
the disabling happens because of this probing ?

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
   https://www.siphub.com

On 12.04.2024 05:41, Alexander Perkins wrote:

Hi.  I have an interesting issue.  We have two OpenSIPS servers
with load balancer (with two different group IDs in the lb table)
and we have probing set correctly and we are using the
event, E_LOAD_BALANCER_STATUS, to capture changes to servers that
were probed.  But we noticed that we have the same server URI
listed in the lb table, but with two different group IDs, if one
of the OpenSIPS servers probes that URI and it does not return,
then lb disables both groups.  I'd expect it to only disable one
group.

My question is how can we tell the LB module to disable the IP,
but also look for the groupID.  For example, I have a printout of
lb_list below.

"uri": "sip:1.2.3.4:5060 ", "id": 27,
"group": 12,"enabled": "no", "auto-reenable": "on", "Resources":
[ { "name": "vz12", "max": 600, "load": 0 } ], "attrs": "0"

AND
{ "uri": "sip:1.2.3.4:5060 ", "id": 29,
"group": 13,"enabled": "no", "auto-reenable": "on", "Resources":
[ { "name": "vz13", "max": 600, "load": 0 } ], "attrs": "0" },

Thank you,
Alex

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




*^0333 332   | x-on.co.uk   | **^  | 
**^Practice Index Reviews  *


*Our new office address: 22 Riduna Park, Melton IP12 1QT.*

X-on is a trading name of X-on Health Ltd a limited company registered 
in England and Wales.
Registered Office : Glebe Farm, Down Street, Dummer, Basingstoke, 
Hampshire, England RG25 2AD. Company Registration No. 2578478.
The information in this e-mail is confidential and for use by the 
addressee(s) only. If you are not the intended recipient, please 
notify X-on immediately on +44(0)333 332  and delete the
message from your computer. If you are not a named addressee you must 
not use, disclose, disseminate, distribute, copy, print or reply to 
this email. Views or opinions expressed by an individual
within this email may not necessarily reflect the views of X-on or its 
associated companies. Although X-on routinely screens for viruses, 
addressees should scan this email and any attachments
for viruses. X-on makes no representation or warranty as to the 
absence of viruses in this email or any attachments.



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer Probing Question

2024-04-16 Thread Callum Guy via Users
If the backend servers are both the same instance then this seems to be the
correct behaviour?

I believe the probing is supposed to be a simple SIP response healthcheck
which applies to the destination globally (i.e. 1.2.3.4 is offline), the
groups are just a way of splitting up resources logically for load
balancing purposes.

On Tue, 16 Apr 2024 at 08:31, Bogdan-Andrei Iancu 
wrote:

> Hi,
>
> What OpenSIPS version you have? And as I understand, as configuration, you
> do permanent probing to the destinations and the disabling happens because
> of this probing ?
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
>   https://www.siphub.com
>
> On 12.04.2024 05:41, Alexander Perkins wrote:
>
> Hi.  I have an interesting issue.  We have two OpenSIPS servers with load
> balancer (with two different group IDs in the lb table) and we have probing
> set correctly and we are using the event, E_LOAD_BALANCER_STATUS, to
> capture changes to servers that were probed.  But we noticed that we have
> the same server URI listed in the lb table, but with two different group
> IDs, if one of the OpenSIPS servers probes that URI and it does not return,
> then lb disables both groups.  I'd expect it to only disable one group.
>
> My question is how can we tell the LB module to disable the IP, but also
> look for the groupID.  For example, I have a printout of lb_list below.
>
> "uri": "sip:1.2.3.4:5060", "id": 27, "group": 12, "enabled": "no",
> "auto-reenable": "on", "Resources": [ { "name": "vz12", "max": 600, "load":
> 0 } ], "attrs": "0"
>
> AND
> { "uri": "sip:1.2.3.4:5060", "id": 29, "group": 13, "enabled": "no",
> "auto-reenable": "on", "Resources": [ { "name": "vz13", "max": 600, "load":
> 0 } ], "attrs": "0" },
>
> Thank you,
> Alex
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

-- 






*0333 332   |  x-on.co.uk   | **  |  
**Practice Index Reviews *

*Our new 
office address: 22 Riduna Park, Melton IP12 1QT.*

X-on
is a trading name 
of X-on Health Ltd a limited company registered in
England and Wales.

Registered Office : Glebe Farm, Down Street, Dummer, Basingstoke, 
Hampshire, England RG25 2AD. Company Registration No. 2578478.

The 
information in this e-mail is confidential and for use by the addressee(s)
only. If you are not the intended recipient, please notify X-on immediately 
on +44(0)333 332  and delete the
message from your computer. If you are 
not a named addressee you must not use,
disclose, disseminate, distribute, 
copy, print or reply to this email. Views
or opinions expressed by an 
individual
within this email may not necessarily
reflect the views of X-on 
or its associated companies. Although X-on routinely
screens for viruses, 
addressees should scan this email and any attachments
for
viruses. X-on 
makes no representation or warranty as to the absence of viruses
in this 
email or any attachments.








___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer Probing Question

2024-04-16 Thread Bogdan-Andrei Iancu

Hi,

What OpenSIPS version you have? And as I understand, as configuration, 
you do permanent probing to the destinations and the disabling happens 
because of this probing ?


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
  https://www.siphub.com

On 12.04.2024 05:41, Alexander Perkins wrote:
Hi.  I have an interesting issue.  We have two OpenSIPS servers with 
load balancer (with two different group IDs in the lb table) and we 
have probing set correctly and we are using the 
event, E_LOAD_BALANCER_STATUS, to capture changes to servers that were 
probed.  But we noticed that we have the same server URI listed in the 
lb table, but with two different group IDs, if one of the OpenSIPS 
servers probes that URI and it does not return, then lb disables both 
groups.  I'd expect it to only disable one group.


My question is how can we tell the LB module to disable the IP, but 
also look for the groupID.  For example, I have a printout of lb_list 
below.


"uri": "sip:1.2.3.4:5060 ", "id": 27, "group": 
12,"enabled": "no", "auto-reenable": "on", "Resources": [ { "name": 
"vz12", "max": 600, "load": 0 } ], "attrs": "0"


AND
{ "uri": "sip:1.2.3.4:5060 ", "id": 29, "group": 
13,"enabled": "no", "auto-reenable": "on", "Resources": [ { "name": 
"vz13", "max": 600, "load": 0 } ], "attrs": "0" },


Thank you,
Alex

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer add destination as probing status

2024-04-09 Thread John Sliney
Using the lb_status command with two params, the ID of the destination and 
desired status (0 if you want to disable), this does seem to disable probing 
though so the destination will stay disabled until you manually set status back 
to 1
https://opensips.org/docs/modules/3.2.x/load_balancer.html#mi_lb_status

From: Users  on behalf of Johan De Clercq 

Sent: Tuesday, April 9, 2024 4:01 PM
To: OpenSIPS users mailling list 
Subject: Re: [OpenSIPS-Users] Load Balancer add destination as probing status


CAUTION: EXTERNAL


Can you tell me how to disable a load balancer destination via mi ?

On Tue, 9 Apr 2024, 20:02 John Sliney, 
mailto:john.sli...@lcs.com>> wrote:
Is there currently a way to add a destination to the load_balancer set with a 
status of disabled but with probing enabled, like the dispatcher table 'state' 
column allows?

I have an osips working as  a SIP ingress/egress for Kubernetes traffic and as 
Asterisk Pods are created they are added to the load_balancer table as 
destinations, but OpenSIPS will route traffic to them before they're fully 
ready.
I've attempted to automatically mark them as disabled with the mi lb_status 
command and let the probe enable them, but disabling via mi seems to disable 
probing as well, so they're never actually enabled.
___
Users mailing list
Users@lists.opensips.org<mailto:Users@lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer add destination as probing status

2024-04-09 Thread Johan De Clercq
Can you tell me how to disable a load balancer destination via mi ?

On Tue, 9 Apr 2024, 20:02 John Sliney,  wrote:

> Is there currently a way to add a destination to the load_balancer set
> with a status of disabled but with probing enabled, like the dispatcher
> table 'state' column allows?
>
> I have an osips working as  a SIP ingress/egress for Kubernetes traffic
> and as Asterisk Pods are created they are added to the load_balancer table
> as destinations, but OpenSIPS will route traffic to them before they're
> fully ready.
> I've attempted to automatically mark them as disabled with the mi
> lb_status command and let the probe enable them, but disabling via mi seems
> to disable probing as well, so they're never actually enabled.
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer probing_method INVITE not sending contact header

2021-11-16 Thread Bogdan-Andrei Iancu

Schneur,

As a note here, using INVITE as probing method is a bit dangerous, as an 
INVITE creates a session (what kind of session do you do here, as I 
guess there is no SDP), a session that has to be confirmed by ACK and 
closed by a BYE.


Just saying you are twisting SIP ;)

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS eBootcamp 2021
  https://opensips.org/training/OpenSIPS_eBootcamp_2021/

On 11/11/21 1:38 PM, Schneur Rosenberg wrote:
Hi, thank you very much that fixed the error but then it's complained 
with a 484 Address Incomplete, I fixed the RURI too and now it's 
working fine.


Scott

On Wed, Nov 10, 2021, 21:47 Schneur Rosenberg 
mailto:rosenberg11...@gmail.com>> wrote:


No, I'll try and keep you posted.

On Wed, Nov 10, 2021 at 9:39 PM Vasilios Tzanoudakis
mailto:vasilios.tzanouda...@voiceland.gr>> wrote:
>
> Have you tried adding the extra contact header in local_route?
>
> Στις Τετ, 10 Νοε 2021, 21:18 ο χρήστης Schneur Rosenberg
mailto:rosenberg11...@gmail.com>> έγραψε:
>>
>> Hi, I'm using load balancer with probing_method INVITE, it
worked fine
>> for many years with my Asterisk and Freeswitch servers, I'm
migrating
>> my asterisk server from chan_sip to pjsip and now asterisk is
>> rejecting all the probing requests with a 400 Missing Contact
header,
>> I checked the modparams for the  "load_balancer" module but
couldn't
>> find how to have OpenSIPs add the contact header.
>>
>> S. Rosenberg
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org 
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

>
> ___
> Users mailing list
> Users@lists.opensips.org 
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer probing_method INVITE not sending contact header

2021-11-11 Thread Schneur Rosenberg
Hi, thank you very much that fixed the error but then it's complained with
a 484 Address Incomplete, I fixed the RURI too and now it's working fine.

Scott

On Wed, Nov 10, 2021, 21:47 Schneur Rosenberg 
wrote:

> No, I'll try and keep you posted.
>
> On Wed, Nov 10, 2021 at 9:39 PM Vasilios Tzanoudakis
>  wrote:
> >
> > Have you tried adding the extra contact header in local_route?
> >
> > Στις Τετ, 10 Νοε 2021, 21:18 ο χρήστης Schneur Rosenberg <
> rosenberg11...@gmail.com> έγραψε:
> >>
> >> Hi, I'm using load balancer with probing_method INVITE, it worked fine
> >> for many years with my Asterisk and Freeswitch servers, I'm migrating
> >> my asterisk server from chan_sip to pjsip and now asterisk is
> >> rejecting all the probing requests with a 400 Missing Contact header,
> >> I checked the modparams for the  "load_balancer" module but couldn't
> >> find how to have OpenSIPs add the contact header.
> >>
> >> S. Rosenberg
> >>
> >> ___
> >> Users mailing list
> >> Users@lists.opensips.org
> >> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer probing_method INVITE not sending contact header

2021-11-10 Thread Schneur Rosenberg
No, I'll try and keep you posted.

On Wed, Nov 10, 2021 at 9:39 PM Vasilios Tzanoudakis
 wrote:
>
> Have you tried adding the extra contact header in local_route?
>
> Στις Τετ, 10 Νοε 2021, 21:18 ο χρήστης Schneur Rosenberg 
>  έγραψε:
>>
>> Hi, I'm using load balancer with probing_method INVITE, it worked fine
>> for many years with my Asterisk and Freeswitch servers, I'm migrating
>> my asterisk server from chan_sip to pjsip and now asterisk is
>> rejecting all the probing requests with a 400 Missing Contact header,
>> I checked the modparams for the  "load_balancer" module but couldn't
>> find how to have OpenSIPs add the contact header.
>>
>> S. Rosenberg
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer probing_method INVITE not sending contact header

2021-11-10 Thread Vasilios Tzanoudakis
Have you tried adding the extra contact header in local_route?

Στις Τετ, 10 Νοε 2021, 21:18 ο χρήστης Schneur Rosenberg <
rosenberg11...@gmail.com> έγραψε:

> Hi, I'm using load balancer with probing_method INVITE, it worked fine
> for many years with my Asterisk and Freeswitch servers, I'm migrating
> my asterisk server from chan_sip to pjsip and now asterisk is
> rejecting all the probing requests with a 400 Missing Contact header,
> I checked the modparams for the  "load_balancer" module but couldn't
> find how to have OpenSIPs add the contact header.
>
> S. Rosenberg
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer Hooks

2020-07-08 Thread Chandan PR
Thanks for the info, Ben. Let me have a look.

On Wed, Jul 8, 2020 at 7:34 PM Ben Newlin  wrote:

> I don’t know if there is anything in 1.9, which is quite old, but in 2.0+
> there is an event that you can subscribe to.
>
>
>
>
> https://opensips.org/docs/modules/2.4.x/load_balancer.html#event_E_LOAD_BALANCER_STATUS
>
>
>
> Ben Newlin
>
>
>
> *From: *Users  on behalf of Chandan PR <
> chandan...@webshar.org>
> *Reply-To: *OpenSIPS users mailling list 
> *Date: *Wednesday, July 8, 2020 at 10:00 AM
> *To: *OpenSIPS users mailling list 
> *Cc: *Naveen Kumar 
> *Subject: *[OpenSIPS-Users] Load Balancer Hooks
>
>
>
> Hi,
>
>
>
> Is it possible to add hooks to notify an endpoint
>
>- when a particular destination is disabled (via lb_disable())
>- when a particular destination is enabled after a successful probing
>
> This is needed for us to slow down the requests to OpenSips when few
> destinations are down. Without this feedback loop, we won't be knowing if
> we need to limit the number of calls we need to send.
>
>
>
> We are currently on Opensips 1.9.
>
> --
>
>
>
> Regards,
>
> Chandan Ravishankar 
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>


-- 

Regards,
Chandan Ravishankar 
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer Hooks

2020-07-08 Thread Ben Newlin
I don’t know if there is anything in 1.9, which is quite old, but in 2.0+ there 
is an event that you can subscribe to.

https://opensips.org/docs/modules/2.4.x/load_balancer.html#event_E_LOAD_BALANCER_STATUS

Ben Newlin

From: Users  on behalf of Chandan PR 

Reply-To: OpenSIPS users mailling list 
Date: Wednesday, July 8, 2020 at 10:00 AM
To: OpenSIPS users mailling list 
Cc: Naveen Kumar 
Subject: [OpenSIPS-Users] Load Balancer Hooks

Hi,

Is it possible to add hooks to notify an endpoint

  *   when a particular destination is disabled (via lb_disable())
  *   when a particular destination is enabled after a successful probing
This is needed for us to slow down the requests to OpenSips when few 
destinations are down. Without this feedback loop, we won't be knowing if we 
need to limit the number of calls we need to send.

We are currently on Opensips 1.9.
--

Regards,
Chandan Ravishankar
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer cluster Opensips 3.0

2019-06-03 Thread Bogdan-Andrei Iancu

Please keep the list CC'ed to the discussion.

Thanks for the info, it seems to be an OpenSIPS bug - the anycast token 
is missing in the locally generated requests (like this OPTIONS). Could 
you open a bug report on the github tracker please ?


Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 2019
  https://www.opensips.org/events/Summit-2019Amsterdam/

On 06/03/2019 02:02 PM, Антон Ершов wrote:

Hi Bogdan,
node1 send

2019/06/03 16:01:17.484626 10.50.0.1:5060  -> 
10.7.0.201:5070 

OPTIONS sip:10.7.0.201:5070  SIP/2.0
Via: SIP/2.0/UDP 10.50.0.1:5060;branch=z9hG4bK119b.69e9c536.0
To: sip:10.7.0.201:5070 
From: >;tag=7f64a078bf34d12f31433ecf357bd91b-968b

CSeq: 10 OPTIONS
Call-ID: 0fa7a2ed14e0d2fe-14840@10.50.0.1 


Max-Forwards: 70
Content-Length: 0
User-Agent: OpenSIPS (3.0.0 (x86_64/linux))

and does not receive an answer as it goes to the second node

node 2 send and receive answer

2019/06/03 16:01:26.320354 10.50.0.1:5060  -> 
10.7.0.201:5070 

OPTIONS sip:10.7.0.201:5070  SIP/2.0
Via: SIP/2.0/UDP 10.50.0.1:5060;branch=z9hG4bK894b.277e074.0
To: sip:10.7.0.201:5070 
From: >;tag=7f64a078bf34d12f31433ecf357bd91b-9e0e

CSeq: 10 OPTIONS
Call-ID: 73aebff26b2035c7-17475@10.50.0.1 


Max-Forwards: 70
Content-Length: 0
User-Agent: OpenSIPS (3.0.0 (x86_64/linux))


2019/06/03 15:52:26.490325 10.7.0.201:5070  -> 
10.50.0.1:5060 

SIP/2.0 200 OK
Via: SIP/2.0/UDP 
10.50.0.1:5060;rport=5060;received=10.50.0.1;branch=z9hG4bK894b.277e074.0
Call-ID: 73aebff26b2035c7-17475@10.50.0.1 

From: >;tag=7f64a078bf34d12f31433ecf357bd91b-9e0e

To: ;tag=z9hG4bK894b.277e074.0
CSeq: 10 OPTIONS
Accept: application/dialog-info+xml, application/xpidf+xml, 
application/cpim-pidf+xml, application/simple-message-summary, 
application/pidf+xml, application/pidf+xml, 
application/dialog-info+xml, application/simple-message-summary, 
application/sdp, message/sipfrag;version=2.0
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, 
BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER

Supported: 100rel, timer, replaces, norefersub
Accept-Encoding: text/plain
Accept-Language: en
Server: Asterisk PBX 16.1.0
Content-Length:  0

my config node 1

loadmodule "load_balancer.so"
modparam("load_balancer", "db_url", 
 "postgres://postgres:1q2w3e4r@10.3.0.1/opensips2 
")

modparam("load_balancer", "probing_reply_codes", "501, 503, 403, 404")
modparam("load_balancer", "cluster_id", 1)
modparam("load_balancer", "cluster_sharing_tag", "node_SKN")
modparam("load_balancer", "probing_from", "sip:hchecker@10.50.0.1 
")

modparam("load_balancer", "probing_verbose", 1)

and node 2

loadmodule "load_balancer.so"
modparam("load_balancer", "db_url", 
 "postgres://postgres:1q2w3e4r@10.3.0.1/opensips2 
")

modparam("load_balancer", "probing_reply_codes", "501, 503, 403, 404")
modparam("load_balancer", "cluster_id", 1)
modparam("load_balancer", "cluster_sharing_tag", "node_PRM")
modparam("load_balancer", "probing_from", "sip:hchecker@10.50.0.1 
")

modparam("load_balancer", "probing_verbose", 1)


maybe I misunderstood how it should work?



пн, 3 июн. 2019 г. в 10:53, Bogdan-Andrei Iancu >:


Hi Anton,

That is an interesting combination - pinging via an anycast
interface.

Could you paste here the OPTIONS and its reply, to check if it is
correctly built from the anycast perspective ?

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
OpenSIPS Summit 2019
   https://www.opensips.org/events/Summit-2019Amsterdam/

On 05/27/2019 03:16 PM, Антон Ершов wrote:


Hello friends!

I'm testing new features of opensips 3. And I discovered the
following situation.

Configured cluster module in Anycast Сonfiguration. Load balanser
module

has cluster_sharing_tag. The lb module sends "options" to the
host from the common address, but the answer goes to the nearest
opensips node of the cluster. From what the remote host in lb is
considered inaccessible.

Something is not configured or I did not understand correctly how
the load balanser should work in a cluster



___
Users mailing list
Users@lists.opensips.org 

Re: [OpenSIPS-Users] Load Balancer cluster Opensips 3.0

2019-06-03 Thread Bogdan-Andrei Iancu

Hi Anton,

That is an interesting combination - pinging via an anycast interface.

Could you paste here the OPTIONS and its reply, to check if it is 
correctly built from the anycast perspective ?


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  https://www.opensips-solutions.com
OpenSIPS Summit 2019
  https://www.opensips.org/events/Summit-2019Amsterdam/

On 05/27/2019 03:16 PM, Антон Ершов wrote:


Hello friends!

I'm testing new features of opensips 3. And I discovered the following 
situation.


Configured cluster module in Anycast Сonfiguration. Load balanser module

has cluster_sharing_tag. The lb module sends "options" to the host 
from the common address, but the answer goes to the nearest opensips 
node of the cluster. From what the remote host in lb is considered 
inaccessible.


Something is not configured or I did not understand correctly how the 
load balanser should work in a cluster




___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer cluster Opensips 3.0

2019-05-28 Thread Kirill Galinurov
Hi Anton. You must correctly set
 cluster_sharing_tag (string)
parameter in you config file.
Please see

https://opensips.org/html/docs/modules/3.0.x/load_balancer.html#param_cluster_sharing_tag
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer cluster Opensips 3.0

2019-05-28 Thread Антон Ершов
opensips-cli -x mi lb_list
{
"Destinations": [
{
"uri": "sip:10.7.0.201:5070",
"id": 1,
"group": 1,
"enabled": "yes",
"auto-reenable": "on"
}
],
"Resources": [
{
"name": "PSTN",
"max": 1,
"load": 0
}
]
}

but when i do call lb return retcode *-3 (false)* - no destinations
available (the requested resources did not match any active destination)

вт, 28 мая 2019 г. в 11:02, Антон Ершов :

> node 1
> loadmodule "load_balancer.so"
> modparam("load_balancer", "db_url",  "postgres://
> postgres:1q2w3e4r@10.3.0.1/opensips1")
> modparam("load_balancer", "probing_reply_codes", "501, 503, 403")
> modparam("load_balancer", "cluster_id", 1)
> modparam("load_balancer", "cluster_sharing_tag", "node_SKN")
> modparam("load_balancer", "probing_from", "sip:hchecker@10.50.0.1")
> modparam ("load_balancer", "probing_verbose", 1)
>
> node2
> loadmodule "load_balancer.so"
> modparam("load_balancer", "db_url",  "postgres://
> postgres:1q2w3e4r@10.3.0.1/opensips1")
> modparam("load_balancer", "probing_reply_codes", "501, 503, 403")
> modparam("load_balancer", "cluster_id", 1)
> modparam("load_balancer", "cluster_sharing_tag", "node_PRM")
> modparam ("load_balancer", "probing_verbose", 1)
> modparam("load_balancer", "probing_from", "sip:hchecker@10.50.0.1")
>
> options send both node. only one node receives answer. In log i see what
> one node disable destination, second node re-enable destination.
>
> log node1
> INFO:load_balancer:set_dst_state_from_rplcode: disable destination 1  10.7.0.201:5070> after 408 reply on probe
>
> log node 2
> INFO:load_balancer:set_dst_state_from_rplcode: re-enable destination 1
>  after 200 reply on probe
>
> вт, 28 мая 2019 г. в 08:53, Alexey Kazantsev via Users <
> users@lists.opensips.org>:
>
>> Hello Anton,
>>
>> you'd better show here the load_balancer part of your config,
>> as it has some parameters regarding to working in the cluster.
>>
>>
>> Понедельник, 27 мая 2019, 17:17 +05:00 от Антон Ершов <
>> suhari...@gmail.com>:
>>
>> Hello friends!
>>
>>  I'm testing new features of opensips 3. And I discovered the following 
>> situation.
>>
>> Configured cluster module in Anycast Сonfiguration. Load balanser module
>>
>> has cluster_sharing_tag. The lb module sends "options" to the host from the 
>> common address, but the answer goes to the nearest opensips node of the 
>> cluster. From what the remote host in lb is considered inaccessible.
>>
>> Something is not configured or I did not understand correctly how the load 
>> balanser should work in a cluster
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
>> ---
>> BR, Alexey
>> http://alexeyka.zantsev.com/
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer cluster Opensips 3.0

2019-05-28 Thread Антон Ершов
node 1
loadmodule "load_balancer.so"
modparam("load_balancer", "db_url",  "postgres://
postgres:1q2w3e4r@10.3.0.1/opensips1")
modparam("load_balancer", "probing_reply_codes", "501, 503, 403")
modparam("load_balancer", "cluster_id", 1)
modparam("load_balancer", "cluster_sharing_tag", "node_SKN")
modparam("load_balancer", "probing_from", "sip:hchecker@10.50.0.1")
modparam ("load_balancer", "probing_verbose", 1)

node2
loadmodule "load_balancer.so"
modparam("load_balancer", "db_url",  "postgres://
postgres:1q2w3e4r@10.3.0.1/opensips1")
modparam("load_balancer", "probing_reply_codes", "501, 503, 403")
modparam("load_balancer", "cluster_id", 1)
modparam("load_balancer", "cluster_sharing_tag", "node_PRM")
modparam ("load_balancer", "probing_verbose", 1)
modparam("load_balancer", "probing_from", "sip:hchecker@10.50.0.1")

options send both node. only one node receives answer. In log i see what
one node disable destination, second node re-enable destination.

log node1
INFO:load_balancer:set_dst_state_from_rplcode: disable destination 1  after 408 reply on probe

log node 2
INFO:load_balancer:set_dst_state_from_rplcode: re-enable destination 1  after 200 reply on probe

вт, 28 мая 2019 г. в 08:53, Alexey Kazantsev via Users <
users@lists.opensips.org>:

> Hello Anton,
>
> you'd better show here the load_balancer part of your config,
> as it has some parameters regarding to working in the cluster.
>
>
> Понедельник, 27 мая 2019, 17:17 +05:00 от Антон Ершов  >:
>
> Hello friends!
>
>  I'm testing new features of opensips 3. And I discovered the following 
> situation.
>
> Configured cluster module in Anycast Сonfiguration. Load balanser module
>
> has cluster_sharing_tag. The lb module sends "options" to the host from the 
> common address, but the answer goes to the nearest opensips node of the 
> cluster. From what the remote host in lb is considered inaccessible.
>
> Something is not configured or I did not understand correctly how the load 
> balanser should work in a cluster
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> ---
> BR, Alexey
> http://alexeyka.zantsev.com/
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer cluster Opensips 3.0

2019-05-27 Thread Alexey Kazantsev via Users
Hello Anton,

you'd better show here the load_balancer part of your config,
as it has some parameters regarding to working in the cluster.


>Понедельник, 27 мая 2019, 17:17 +05:00 от Антон Ершов :
>
>Hello friends!
> I'm testing new features of opensips 3. And I discovered the following 
> situation.
>Configured cluster module in Anycast Сonfiguration. Load balanser module
>has cluster_sharing_tag. The lb module sends "options" to the host from the 
>common address, but the answer goes to the nearest opensips node of the 
>cluster. From what the remote host in lb is considered inaccessible.
>Something is not configured or I did not understand correctly how the load 
>balanser should work in a cluster
>___
>Users mailing list
>Users@lists.opensips.org
>http://lists.opensips.org/cgi-bin/mailman/listinfo/users


---
BR, Alexey
http://alexeyka.zantsev.com/
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load-Balancer Module - status destinations in database?

2017-01-24 Thread Johan De Clercq
as far as I know, you can only do this with mi. As the status depends on
probing, in my opinion, it doesn't make sense to store this in a db.

BR, Johan.

2017-01-25 1:16 GMT+01:00 Mundkowsky, Robert :

> Is there a way to get the status (enabled or disabled) of load balancer
> destinations in database?
>
> Or is lb_list MI only way?
>
>
>
> 
>
> This e-mail and any files transmitted with it may contain privileged or
> confidential information. It is solely for use by the individual for whom
> it is intended, even if addressed incorrectly. If you received this e-mail
> in error, please notify the sender; do not disclose, copy, distribute, or
> take any action in reliance on the contents of this information; and delete
> it from your system. Any other use of this e-mail is prohibited.
>
>
> Thank you for your compliance.
>
> 
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer - Checking Node Health

2017-01-11 Thread Chandan PR
Thanks a lot Razvan. Will try them and keep the group posted about the
results.

On Wed, Jan 11, 2017 at 2:01 PM, Răzvan Crainea  wrote:

> Hi, Chandan!
>
> Is there any way you could monitor the endpoints? If so, you can use the
> load balancer pinging, that will automatically disable the end point when
> it is not responding, and monitor the state over MI.
>
> If there is no way you monitor the endoints, you could:
> 1. Check the tm transactions ended with 4xx status. If you see a spike,
> send an alert. The comand to do that is:
> opensipsctl fifo get_statistics 4xx_transactions
>
> 2. Create your own statistics in the script based on the endpoint. In the
> script, do something like this:
> if (t_check_status("486"))
> update_stat("$stat(tran_486_$si)", "+1");
>
> Again, monitor these statistics over MI and if you see spikes, send alerts.
>
> These are the solutions I am thinking of. Hope they are helpful.
>
> Best regards,
>
> Răzvan Crainea
> OpenSIPS Solutionswww.opensips-solutions.com
>
> On 01/11/2017 08:51 AM, Chandan PR wrote:
>
> Hi,
>
> Recently one of our endpoints stopped responding and due to which nearly
> almost all of the calls ended up in 486.
>
> Is there any functions we can use to monitor the response codes per node
> over a duration so that we can raise an alert to take corrective actions in
> such cases.
>
> *The version of OpenSips we are using is 1.9.x*
>
> Regards,
> Chandan
>
>
> ___
> Users mailing 
> listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer - Delay in clearing dialogs

2016-08-17 Thread Chandan PR
Thanks for the input Bogdan.

We found that the problem was due to some calls failing to get the response.

Since we had the dialog timeout of 6 hours, which was not in sync with
application logic, we were sending more calls than available destinations.

We have updated the dialog timeout in par with the application and this
should resolve the issue for us.

Regards,
Chandan

On Wed, Aug 17, 2016 at 3:15 PM, Bogdan-Andrei Iancu 
wrote:

> Hi Chandan,
>
> Could you check what is the status of the calls (see the "State" field) ?
> I guess the call are listed in state 5 (terminated) - and this is the
> reason why you do not see them as counted by LB.
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 16.08.2016 12:47, Chandan PR wrote:
>
> Hi Guys,
>
> Opendsips Version : 1.9.x
>
> We have configured the load balancer with 8 ports.
>
> When the calls are ongoing, the lb_list shows the load balancer is running
> full.
>
> root@Dev-Chandan-Opensips-LB:/usr/local/opensips/sbin# ./opensipsctl fifo
> lb_list
> Destination:: sip:192.168.248.62:5060 id=152 group=1 enabled=yes
> auto-re=on
> Resource:: channel max=4 load=4
> Destination:: sip:192.168.248.64:5060 id=153 group=1 enabled=yes
> auto-re=on
> Resource:: channel max=4 load=4
>
> When I check the dialog_list, I see some older dialogs which are yet to be
> cleared.
>
> root@Dev-Chandan-Opensips-LB:/usr/local/opensips/sbin# ./opensipsctl fifo
> dlg_list | grep "callid"
> callid:: 14713396610041471339775929_ZTLT_931
> callid:: 14713396610151471339775929_ZTLT_937
> callid:: 14713396610221471339775929_ZTLT_942
> callid:: 14713396610081471339775929_ZTLT_933
> callid:: 14713396610181471339775929_ZTLT_939
> callid:: 14713396610191471339775929_ZTLT_940
> callid:: 14713396610131471339775929_ZTLT_936
> callid:: 14713396610031471339775929_ZTLT_930
> callid:: 14713396610061471339775929_ZTLT_932
> callid:: 14713396610161471339775929_ZTLT_938
> callid:: 14713396610271471339775929_ZTLT_945
> callid:: 14713396610371471339775929_ZTLT_951
> callid:: 14713396610101471339775929_ZTLT_934
> callid:: 14713396610311471339775929_ZTLT_947
> callid:: 14713396610211471339775929_ZTLT_941
> callid:: 14713396610241471339775929_ZTLT_943
> callid:: 14713396610341471339775929_ZTLT_949
> callid:: 14713396610011471339775929_ZTLT_929
> callid:: 14713396610111471339775929_ZTLT_935
> root@Dev-Chandan-Opensips-LB:/usr/local/opensips/sbin# ./opensipsctl fifo
> dlg_list | grep "callid" | wc -l
> 13
> root@Dev-Chandan-Opensips-LB:/usr/local/opensips/sbin#
>
> *Even when the lb_list shows the load as 0, I see some dialogs present and
> getting cleared after around 10-12 seconds.*
>
> What would be the impact of this delay in clearing the dialogs? Can this
> lead to lot many calls rejected with "Destination Full" (We are
> experiencing this issue in our production, where a huge number of calls
> rejected)?
>
> Is there any way to reduce this delay or clear the dialogs immediately?
>
> *Dialog Module Settings:*
>  DIALOG module
> loadmodule "dialog.so"
> modparam("dialog", "dlg_match_mode", 1)
> modparam("dialog", "default_timeout", 21600)  # 6 hours timeout
> modparam("dialog", "db_mode", 2)
> modparam("dialog", "db_url",
> "mysql://opensips:opensipsrw@localhost/opensips") #
>
>
> *Load Balancer Script:*
> #
> # $Id: opensips_loadbalancer.m4 9723 2013-02-01 15:10:50Z bogdan_iancu $
> #
> # OpenSIPS loadbalancer script
> # by OpenSIPS Solutions 
> #
> # This script was generated via "make menuconfig", from
> #   the "Load Balancer" scenario.
> # You can enable / disable more features / functionalities by
> #   re-generating the scenario with different options.
> #
> # Please refer to the Core CookBook at:
> #  http://www.opensips.org/Resources/DocsCookbooks
> # for a explanation of possible statements, functions and parameters.
> #
>
>
> ### Global Parameters #
>
> debug=3
> log_stderror=no
> log_facility=LOG_LOCAL1
>
> fork=yes
> children=4
>
> /* uncomment the following lines to enable debugging */
> #debug=6
> #fork=no
> #log_stderror=yes
>
> /* uncomment the next line to enable the auto temporary blacklisting of
>not available destinations (default disabled) */
> #disable_dns_blacklist=no
>
> /* uncomment the next line to enable IPv6 lookup after IPv4 dns
>lookup failures (default disabled) */
> #dns_try_ipv6=yes
>
> /* comment the next line to enable the auto discovery of local aliases
>based on revers DNS on IPs */
> auto_aliases=no
>
>
> listen=udp:192.168.248.111:5060   # CUSTOMIZE ME
>
> disable_tcp=no
> listen=tcp:192.168.248.111:5060   # CUSTOMIZE ME
>
> disable_tls=yes
>
>
>
>
> ### Modules Section 
>
> #set module path
> mpath="/usr/local/opensips/lib64/opensips/modules/"
>
>
>
>  SIGNALING module
> loadmodule "signaling.so"
>
>  StateLess module
> loadmodule "sl.so"
>
>  Transaction Module
> loadmodule "tm.so"
> 

Re: [OpenSIPS-Users] Load Balancer - Delay in clearing dialogs

2016-08-17 Thread Bogdan-Andrei Iancu

Hi Chandan,

Could you check what is the status of the calls (see the "State" field) 
? I guess the call are listed in state 5 (terminated) - and this is the 
reason why you do not see them as counted by LB.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 16.08.2016 12:47, Chandan PR wrote:

Hi Guys,

Opendsips Version : 1.9.x

We have configured the load balancer with 8 ports.

When the calls are ongoing, the lb_list shows the load balancer is 
running full.


root@Dev-Chandan-Opensips-LB:/usr/local/opensips/sbin# ./opensipsctl 
fifo lb_list
Destination:: sip:192.168.248.62:5060  
id=152 group=1 enabled=yes auto-re=on

Resource:: channel max=4 load=4
Destination:: sip:192.168.248.64:5060  
id=153 group=1 enabled=yes auto-re=on

Resource:: channel max=4 load=4

When I check the dialog_list, I see some older dialogs which are yet 
to be cleared.


root@Dev-Chandan-Opensips-LB:/usr/local/opensips/sbin# ./opensipsctl 
fifo dlg_list | grep "callid"

callid:: 14713396610041471339775929_ZTLT_931
callid:: 14713396610151471339775929_ZTLT_937
callid:: 14713396610221471339775929_ZTLT_942
callid:: 14713396610081471339775929_ZTLT_933
callid:: 14713396610181471339775929_ZTLT_939
callid:: 14713396610191471339775929_ZTLT_940
callid:: 14713396610131471339775929_ZTLT_936
callid:: 14713396610031471339775929_ZTLT_930
callid:: 14713396610061471339775929_ZTLT_932
callid:: 14713396610161471339775929_ZTLT_938
callid:: 14713396610271471339775929_ZTLT_945
callid:: 14713396610371471339775929_ZTLT_951
callid:: 14713396610101471339775929_ZTLT_934
callid:: 14713396610311471339775929_ZTLT_947
callid:: 14713396610211471339775929_ZTLT_941
callid:: 14713396610241471339775929_ZTLT_943
callid:: 14713396610341471339775929_ZTLT_949
callid:: 14713396610011471339775929_ZTLT_929
callid:: 14713396610111471339775929_ZTLT_935
root@Dev-Chandan-Opensips-LB:/usr/local/opensips/sbin# ./opensipsctl 
fifo dlg_list | grep "callid" | wc -l

13
root@Dev-Chandan-Opensips-LB:/usr/local/opensips/sbin#

*Even when the lb_list shows the load as 0, I see some dialogs present 
and getting cleared after around 10-12 seconds.*


What would be the impact of this delay in clearing the dialogs? Can 
this lead to lot many calls rejected with "Destination Full" (We are 
experiencing this issue in our production, where a huge number of 
calls rejected)?


Is there any way to reduce this delay or clear the dialogs immediately?

*_Dialog Module Settings:_*
 DIALOG module
loadmodule "dialog.so"
modparam("dialog", "dlg_match_mode", 1)
modparam("dialog", "default_timeout", 21600)  # 6 hours timeout
modparam("dialog", "db_mode", 2)
modparam("dialog", "db_url",
"mysql://opensips:opensipsrw@localhost/opensips") #


*_Load Balancer Script:_*
#
# $Id: opensips_loadbalancer.m4 9723 2013-02-01 15:10:50Z bogdan_iancu $
#
# OpenSIPS loadbalancer script
# by OpenSIPS Solutions >

#
# This script was generated via "make menuconfig", from
#   the "Load Balancer" scenario.
# You can enable / disable more features / functionalities by
#   re-generating the scenario with different options.
#
# Please refer to the Core CookBook at:
# http://www.opensips.org/Resources/DocsCookbooks
# for a explanation of possible statements, functions and parameters.
#


### Global Parameters #

debug=3
log_stderror=no
log_facility=LOG_LOCAL1

fork=yes
children=4

/* uncomment the following lines to enable debugging */
#debug=6
#fork=no
#log_stderror=yes

/* uncomment the next line to enable the auto temporary blacklisting of
   not available destinations (default disabled) */
#disable_dns_blacklist=no

/* uncomment the next line to enable IPv6 lookup after IPv4 dns
   lookup failures (default disabled) */
#dns_try_ipv6=yes

/* comment the next line to enable the auto discovery of local aliases
   based on revers DNS on IPs */
auto_aliases=no


listen=udp:192.168.248.111:5060    # 
CUSTOMIZE ME


disable_tcp=no
listen=tcp:192.168.248.111:5060    # 
CUSTOMIZE ME


disable_tls=yes




### Modules Section 

#set module path
mpath="/usr/local/opensips/lib64/opensips/modules/"



 SIGNALING module
loadmodule "signaling.so"

 StateLess module
loadmodule "sl.so"

 Transaction Module
loadmodule "tm.so"
modparam("tm", "fr_timer", 30)
modparam("tm", "fr_inv_timer", 120)
modparam("tm", "restart_fr_on_each_reply", 0)
modparam("tm", "onreply_avp_mode", 1)

 Record Route Module
loadmodule "rr.so"
/* do not append from tag to the RR (no need for this script) */
modparam("rr", "append_fromtag", 0)

 MAX ForWarD module
loadmodule "maxfwd.so"

 SIP MSG OPerationS module
loadmodule "sipmsgops.so"

 FIFO Management Interface
loadmodule "mi_fifo.so"
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
modparam("mi_fifo", "fifo_mode", 0666)

Re: [OpenSIPS-Users] Load Balancer

2015-06-29 Thread Matt Broad
Hi Bogdan,

thanks for the reply.
The issue was that the Opensips box could not contact the FS box using the
FS external IP address. I have solved the issue by making some changes to
the firewall.  I have added a loop back (?) so that the Opensips box can
contact the FS box using it's external IP address, and all works fine now.
I didn't post an update just incase someone had an alternative/better
solution.

thanks
Matt

On 29 June 2015 at 10:34, Bogdan-Andrei Iancu bog...@opensips.org wrote:

  Hi Matt,

 There is something bogus in your setup. If FS is advertising the public
 IP, why is it not able to receive traffic on that IP (the ACK from
 OpenSIPS). You need to make a consistent setup in there in terms of used
 and routable IPs.

 Now, the 200 OK (to INVITE) is sent by FS via the external or internal IP ?

 Regards,

 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developerhttp://www.opensips-solutions.com

 On 24.06.2015 17:40, Matt Broad wrote:

 Hi,

   I have the following setup (the IP addresses are made up but should
 give an indication):

  1 x opensips server with load balancer module - IP 192.168.0.1
 2 x freeswitch servers - IP 192.168.0.2  192.168.0.3

  All 3 servers have seperate external IP address routing to their
 internal IP via our firewall:
 217.0.0.1 routed to 192.168.0.1 (Opensips)
 217.0.0.2 routed to 192.168.0.2 (FS1)
 217.0.0.3 routed to 192.168.0.3 (FS2)

  I have the load_balancer table with the following details:

  id,  | group_id, |  dst_uri,| resources,  |
 probe_mode, | description
 '1',  |  '1', |  'sip:192.168.0.2:5080',  |   'pstn=10', |
'2',   |  'FS1'
 '2',  |  '1', |  'sip:192.168.0.3:5080',  |   'vm=1', |
   '2',   |  'FS2'


  Now the initial invite goes through the usual steps, as shown below, but
 the issue arises when the ACK comes back from the SIP provider.  Opensips
 is trying to forward the packet to the Freeswitch external IP address
 rather than the internal IP.  This is due, I think, to the Contact details
 in the 200 response from Freeswitch containing the Freeswitch external IP.
 Is there a way of having Opensips take the external IP and route to the
 internal IP instead?  Any help/suggestions would be much appreciated.



No. Time
  Source Destination Protocol Length Info  42 5.827674
  SIP Provider OpenSips Internal SIP/SDP 873 Request: INVITE
 sip:test@Opensips External |   43 5.828043
  OpenSips Internal SIP Provider SIP 397 Status: 100 Giving a try |   44
 5.828159
  OpenSips Internal Freeswitch Internal SIP/SDP 1039 Request: INVITE
 sip:test@Opensips External |   45 5.828605
  Freeswitch Internal OpenSips Internal SIP 588 Status: 100 Trying |   46
 5.832171
  Freeswitch Internal OpenSips Internal SIP/SDP 1221 Status: 200 OK |   54
 5.833451
  OpenSips Internal SIP Provider SIP/SDP 1132 Status: 200 OK |   55
 5.836739
  SIP Provider OpenSips Internal SIP 522 Request: ACK sip:test@Freeswitch
 External:5080;transport=udp |   61 5.838075
  OpenSips Internal Freeswitch External SIP 545 Request: ACK
 sip:test@Freeswitch External:5080;transport=udp |   70 6.33254
  Freeswitch Internal OpenSips Internal SIP/SDP 1221 Status: 200 OK |   71
 6.33265
  OpenSips Internal SIP Provider SIP/SDP 1132 Status: 200 OK |   80
 7.332536
  Freeswitch Internal OpenSips Internal SIP/SDP 1221 Status: 200 OK |   81
 7.332666
  OpenSips Internal SIP Provider SIP/SDP 1132 Status: 200 OK |   86
 9.332576
  Freeswitch Internal OpenSips Internal SIP/SDP 1221 Status: 200 OK |   87
 9.332712
  OpenSips Internal SIP Provider SIP/SDP 1132 Status: 200 OK |   136
 13.331858
  Freeswitch Internal OpenSips Internal SIP/SDP 1221 Status: 200 OK |   152
 16.938621
  SIP Provider OpenSips Internal SIP 553 Request: BYE sip:test@Freeswitch
 External:5080;transport=udp |   158 16.939786
  OpenSips Internal Freeswitch External SIP 577 Request: BYE
 sip:test@Freeswitch External:5080;transport=udp |   160 17.33247
  Freeswitch Internal OpenSips Internal SIP/SDP 1221 Status: 200 OK |   161
 17.37482
  OpenSips Internal Freeswitch External SIP 577 Request: BYE
 sip:test@Freeswitch External:5080;transport=udp |   163 17.937941
  SIP Provider OpenSips Internal SIP 553 Request: BYE sip:test@Freeswitch
 External:5080;transport=udp |   166 18.375894
  OpenSips Internal Freeswitch External SIP 577 Request: BYE
 sip:test@Freeswitch External:5080;transport=udp |   170 18.776373
  OpenSips Internal SIP Provider SIP 415 Status: 408 Request Timeout |
 178 21.332616
  Freeswitch Internal OpenSips Internal SIP/SDP 1221 Status: 200 OK |   222
 25.333161
  Freeswitch Internal OpenSips Internal SIP/SDP 1221 Status: 200 OK |   257
 29.333884
  Freeswitch Internal OpenSips Internal SIP/SDP 1221 Status: 200 OK |   283
 33.334482
  Freeswitch Internal OpenSips Internal SIP/SDP 1221 Status: 200 OK |   306
 37.335049
  Freeswitch Internal OpenSips Internal SIP/SDP 1221 Status: 200 OK |



 ___
 

Re: [OpenSIPS-Users] Load Balancer

2015-06-29 Thread Bogdan-Andrei Iancu

Hi Matt,

There is something bogus in your setup. If FS is advertising the public 
IP, why is it not able to receive traffic on that IP (the ACK from 
OpenSIPS). You need to make a consistent setup in there in terms of used 
and routable IPs.


Now, the 200 OK (to INVITE) is sent by FS via the external or internal IP ?

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 24.06.2015 17:40, Matt Broad wrote:

Hi,

I have the following setup (the IP addresses are made up but should 
give an indication):


1 x opensips server with load balancer module - IP 192.168.0.1
2 x freeswitch servers - IP 192.168.0.2  192.168.0.3

All 3 servers have seperate external IP address routing to their 
internal IP via our firewall:

217.0.0.1 routed to 192.168.0.1 (Opensips)
217.0.0.2 routed to 192.168.0.2 (FS1)
217.0.0.3 routed to 192.168.0.3 (FS2)

I have the load_balancer table with the following details:

id,  | group_id, |  dst_uri,  | resources,  | 
probe_mode, | description
'1',  |  '1', |  'sip:192.168.0.2:5080 
http://192.168.0.2:5080',  |   'pstn=10', |  '2',   |   
   'FS1'
'2',  |  '1', |  'sip:192.168.0.3:5080 
http://192.168.0.3:5080',  |   'vm=1', | '2',   |   
   'FS2'



Now the initial invite goes through the usual steps, as shown below, 
but the issue arises when the ACK comes back from the SIP provider.  
Opensips is trying to forward the packet to the Freeswitch external IP 
address rather than the internal IP.  This is due, I think, to the 
Contact details in the 200 response from Freeswitch containing the 
Freeswitch external IP.
Is there a way of having Opensips take the external IP and route to 
the internal IP instead?  Any help/suggestions would be much appreciated.




No. Time
Source  Destination ProtocolLength  Info
42  5.827674
	SIP Provider 	OpenSips Internal 	SIP/SDP 	873 	Request: INVITE 
sip:test@Opensips External |

43  5.828043
OpenSips Internal   SIP ProviderSIP 397 Status: 100 
Giving a try |
44  5.828159
	OpenSips Internal 	Freeswitch Internal 	SIP/SDP 	1039 	Request: 
INVITE sip:test@Opensips External |

45  5.828605
Freeswitch Internal OpenSips Internal   SIP 588 Status: 
100 Trying |
46  5.832171
Freeswitch Internal OpenSips Internal   SIP/SDP 1221
Status: 200 OK |
54  5.833451
OpenSips Internal   SIP ProviderSIP/SDP 1132Status: 
200 OK |
55  5.836739
	SIP Provider 	OpenSips Internal 	SIP 	522 	Request: ACK 
sip:test@Freeswitch External:5080;transport=udp |

61  5.838075
	OpenSips Internal 	Freeswitch External 	SIP 	545 	Request: ACK 
sip:test@Freeswitch External:5080;transport=udp |

70  6.33254 
Freeswitch Internal OpenSips Internal   SIP/SDP 1221
Status: 200 OK |
71  6.33265 
OpenSips Internal   SIP ProviderSIP/SDP 1132Status: 
200 OK |
80  7.332536
Freeswitch Internal OpenSips Internal   SIP/SDP 1221
Status: 200 OK |
81  7.332666
OpenSips Internal   SIP ProviderSIP/SDP 1132Status: 
200 OK |
86  9.332576
Freeswitch Internal OpenSips Internal   SIP/SDP 1221
Status: 200 OK |
87  9.332712
OpenSips Internal   SIP ProviderSIP/SDP 1132Status: 
200 OK |
136 13.331858   
Freeswitch Internal OpenSips Internal   SIP/SDP 1221
Status: 200 OK |
152 16.938621   
	SIP Provider 	OpenSips Internal 	SIP 	553 	Request: BYE 
sip:test@Freeswitch External:5080;transport=udp |

158 16.939786   
	OpenSips Internal 	Freeswitch External 	SIP 	577 	Request: BYE 
sip:test@Freeswitch External:5080;transport=udp |

160 17.33247
Freeswitch Internal OpenSips Internal   SIP/SDP 1221
Status: 200 OK |
161 17.37482
	OpenSips Internal 	Freeswitch External 	SIP 	577 	Request: BYE 
sip:test@Freeswitch External:5080;transport=udp |

163 17.937941   
	SIP Provider 	OpenSips Internal 	SIP 	553 	Request: BYE 
sip:test@Freeswitch External:5080;transport=udp |

166 18.375894   
	OpenSips Internal 	Freeswitch External 	SIP 	577 	Request: BYE 
sip:test@Freeswitch External:5080;transport=udp |

170 18.776373   
OpenSips Internal   SIP ProviderSIP 415 Status: 408 
Request Timeout |
178 21.332616   
Freeswitch Internal OpenSips Internal   SIP/SDP 1221
Status: 200 OK |
222 25.333161   
Freeswitch Internal OpenSips Internal   SIP/SDP 1221
Status: 200 OK |
257 29.333884   
Freeswitch Internal OpenSips Internal

Re: [OpenSIPS-Users] load balancer

2015-01-22 Thread Matt Broad
Thanks for the reply Bogdan-Andrei,

I will give that a go and see if it helps :)


thanks
Matt

On 19 January 2015 at 18:28, Bogdan-Andrei Iancu bog...@opensips.org
wrote:

  Hello Matt,

 In OpenSIPS you need to use the onreply route to get access to those 200
 OK replies (from FreeSwitch). In there use
 fix_nated_sdp(2,FS_public_ip) to rewrite the IP in the SDP:

 http://www.opensips.org/html/docs/modules/1.11.x/nathelper.html#id293864

 Regards,

 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developerhttp://www.opensips-solutions.com

 On 19.01.2015 17:54, Matt Broad wrote:

 Hi,


  I was looking for some guidance on using the load balancer in a NAT
 environment.

  I have the following setup (the IP addresses are made up but should give
 an indication):

  1 x opensips server with load balancer module - IP 192.168.0.1
  2 x freeswitch servers - IP 192.168.0.2  192.168.0.3

  All 3 servers have seperate external IP address routing to their
 internal IP via our firewall:
 217.0.0.1 routed to 192.168.0.1 (Opensips)
 217.0.0.2 routed to 192.168.0.2 (FS1)
  217.0.0.3 routed to 192.168.0.3 (FS2)

  I have the load_balancer table with the following details:

  id,  | group_id, |  dst_uri,| resources,  |
 probe_mode, | description
 '1',  |  '1', |  'sip:192.168.0.2:5080',  |   'pstn=10', |
'2',   |  'FS1'
 '2',  |  '1', |  'sip:192.168.0.3:5080',  |   'vm=1', |
   '2',   |  'FS2'


  The call flow is:

  SIP Provider -- 217.0.0.1 Opensips -- 192.168.0.2/3

  The issue is, that when the 200 ok response is sent to the SIP provider,
 the Freeswitch server's internal IP is being sent in the SDP connection
 information (c).  This causes the ACK response from the SIP Provider to
 fail to be sent correctly.

  With the calls routed directly to the FS servers (removing opensips from
 the flow), the calls work fine.

  Any help would be much appreciated :)


  thanks


 ___
 Users mailing 
 listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] load balancer

2015-01-19 Thread Bogdan-Andrei Iancu

Hello Matt,

In OpenSIPS you need to use the onreply route to get access to those 200 
OK replies (from FreeSwitch). In there use 
fix_nated_sdp(2,FS_public_ip) to rewrite the IP in the SDP:

http://www.opensips.org/html/docs/modules/1.11.x/nathelper.html#id293864

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 19.01.2015 17:54, Matt Broad wrote:

Hi,


I was looking for some guidance on using the load balancer in a NAT 
environment.


I have the following setup (the IP addresses are made up but should 
give an indication):


1 x opensips server with load balancer module - IP 192.168.0.1
2 x freeswitch servers - IP 192.168.0.2  192.168.0.3

All 3 servers have seperate external IP address routing to their 
internal IP via our firewall:

217.0.0.1 routed to 192.168.0.1 (Opensips)
217.0.0.2 routed to 192.168.0.2 (FS1)
217.0.0.3 routed to 192.168.0.3 (FS2)

I have the load_balancer table with the following details:

id,  | group_id, |  dst_uri,| resources, 
 | probe_mode, | description
'1',  |  '1', |  'sip:192.168.0.2:5080 
http://192.168.0.2:5080/',  |   'pstn=10', |  '2',   |   
   'FS1'
'2',  |  '1', |  'sip:192.168.0.3:5080 
http://192.168.0.3:5080/',  |   'vm=1', | '2',   |   
   'FS2'



The call flow is:

SIP Provider -- 217.0.0.1 Opensips -- 192.168.0.2/3 
http://192.168.0.2/3


The issue is, that when the 200 ok response is sent to the SIP 
provider, the Freeswitch server's internal IP is being sent in the SDP 
connection information (c).  This causes the ACK response from the SIP 
Provider to fail to be sent correctly.


With the calls routed directly to the FS servers (removing opensips 
from the flow), the calls work fine.


Any help would be much appreciated :)


thanks


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer Group ID with AVP variable

2014-12-09 Thread campusvtv

Hello,

theoretically you can use a variable (OpenSIPs 1.11.X):

grp- group id for the destinations; the destination may be grouped in 
several groups you can you for different scenarios; this can be a number 
or a variable containing a numerical value.


Are you sure $avp(GroupID) contain a numerical value?

If $avp(GroupID) contain a numerical value, try to assign to a different 
variable before invoking load_balance function:


$var(a)=$avp(GroupID)

then

load_balance($var(a),PSTN)


Regards

El 09/12/2014 10:18, bluerain escribió:

Is it possible to use avp variable instead?  I've tried, it seems not
working, I have to put some numeric value for it to work.  Or is my syntax
wrong somewhere?

load_balance($avp(GroupID),PSTN)



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Load-Balancer-Group-ID-with-AVP-variable-tp7594642.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer Group ID with AVP variable

2014-12-09 Thread bluerain
Oh yes, I figured out, I just forgot to remove the thread.  It seems the
database data type matters in this case.  If that field in the DB table is
varchar (I am using MSSQL) avp variable under load balancer module will not
work.  You have to use one of the interger data type in order for this to
work.

But thank you!



--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Load-Balancer-Group-ID-with-AVP-variable-tp7594642p7594645.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer setup

2014-10-31 Thread Matt Broad
Hi Kenny,

thanks for the reply.  For some reason this is only just showing in my
email so sorry for the delayed response.

Could you explain how you would do this is asterisk please? This may help
in me solving the issue :)



thanks
Matt

On 23 October 2014 21:40, Kenny Watson kwat...@geniusppt.com wrote:

  Hi Matt,

 The SDP is being generated by freeswitch and you would need to make it
 think that when its sending to kamailio, that kamailio  is an external host
 so freeswitch uses its public IP address in the SDP  that it is then
 forwarded on directly to the carrier.

  I've never used freeswitch but thats roughly what you'd do with asterisk.

 Thanks
 Kenny Watson


   --
 *From:* users-boun...@lists.opensips.org [users-boun...@lists.opensips.org]
 on behalf of matt [m...@supportedbusiness.com]
 *Sent:* 22 October 2014 08:42
 *To:* users@lists.opensips.org
 *Subject:* [OpenSIPS-Users] Load balancer setup

   Hi,


  I was looking for some guidance on using the load balancer in a NAT
 environment.

  I have the following setup (the IP addresses are made up but should give
 an indication):

  1 x opensips server with load balancer module - IP 192.168.0.1
  2 x freeswitch servers - IP 192.168.0.2  192.168.0.3

  All 3 servers have seperate external IP address routing to their
 internal IP via our firewall:
 217.0.0.1 routed to 192.168.0.1 (Opensips)
 217.0.0.2 routed to 192.168.0.2 (FS1)
  217.0.0.3 routed to 192.168.0.3 (FS2)

  I have the load_balancer table with the following details:

  id,  | group_id, |  dst_uri,| resources,  |
 probe_mode, | description
 '1',  |  '1', |  'sip:192.168.0.2:5080',  |   'pstn=10', |
'2',   |  'FS1'
 '2',  |  '1', |  'sip:192.168.0.3:5080',  |   'vm=1', |
   '2',   |  'FS2'


  The call flow is:

  SIP Provider -- 217.0.0.1 Opensips -- 192.168.0.2/3

  The issue is, that when the 200 ok response is sent to the SIP provider,
 the Freeswitch server's internal IP is being sent in the SDP connection
 information (c).  This causes the ACK response from the SIP Provider to
 fail to be sent correctly.

  With the calls routed directly to the FS servers (removing opensips from
 the flow), the calls work fine.

  Any help would be much appreciated :)


  thanks
 Matt

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer setup

2014-10-30 Thread Kenny Watson
Hi Matt,

The SDP is being generated by freeswitch and you would need to make it think 
that when its sending to kamailio, that kamailio  is an external host so 
freeswitch uses its public IP address in the SDP  that it is then forwarded on 
directly to the carrier.

I've never used freeswitch but thats roughly what you'd do with asterisk.

Thanks
Kenny Watson



From: users-boun...@lists.opensips.org [users-boun...@lists.opensips.org] on 
behalf of matt [m...@supportedbusiness.com]
Sent: 22 October 2014 08:42
To: users@lists.opensips.org
Subject: [OpenSIPS-Users] Load balancer setup

Hi,


I was looking for some guidance on using the load balancer in a NAT environment.

I have the following setup (the IP addresses are made up but should give an 
indication):

1 x opensips server with load balancer module - IP 192.168.0.1
2 x freeswitch servers - IP 192.168.0.2  192.168.0.3

All 3 servers have seperate external IP address routing to their internal IP 
via our firewall:
217.0.0.1 routed to 192.168.0.1 (Opensips)
217.0.0.2 routed to 192.168.0.2 (FS1)
217.0.0.3 routed to 192.168.0.3 (FS2)

I have the load_balancer table with the following details:

id,  | group_id, |  dst_uri,| resources,  | 
probe_mode, | description
'1',  |  '1', |  'sip:192.168.0.2:5080http://192.168.0.2:5080',  |   
'pstn=10', |  '2',   |  'FS1'
'2',  |  '1', |  'sip:192.168.0.3:5080http://192.168.0.3:5080',  |   
'vm=1', | '2',   |  'FS2'


The call flow is:

SIP Provider -- 217.0.0.1 Opensips -- 192.168.0.2/3http://192.168.0.2/3

The issue is, that when the 200 ok response is sent to the SIP provider, the 
Freeswitch server's internal IP is being sent in the SDP connection information 
(c).  This causes the ACK response from the SIP Provider to fail to be sent 
correctly.

With the calls routed directly to the FS servers (removing opensips from the 
flow), the calls work fine.

Any help would be much appreciated :)


thanks
Matt
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer setup

2014-10-29 Thread Matt Broad
Hi,

just seeing if anyone had any ideas?

thanks
Matt

On 22 October 2014 08:42, matt m...@supportedbusiness.com wrote:

 Hi,


 I was looking for some guidance on using the load balancer in a NAT
 environment.

 I have the following setup (the IP addresses are made up but should give
 an indication):

 1 x opensips server with load balancer module - IP 192.168.0.1
 2 x freeswitch servers - IP 192.168.0.2  192.168.0.3

 All 3 servers have seperate external IP address routing to their internal
 IP via our firewall:
 217.0.0.1 routed to 192.168.0.1 (Opensips)
 217.0.0.2 routed to 192.168.0.2 (FS1)
 217.0.0.3 routed to 192.168.0.3 (FS2)

 I have the load_balancer table with the following details:

 id,  | group_id, |  dst_uri,| resources,  |
 probe_mode, | description
 '1',  |  '1', |  'sip:192.168.0.2:5080',  |   'pstn=10', |
'2',   |  'FS1'
 '2',  |  '1', |  'sip:192.168.0.3:5080',  |   'vm=1', |
   '2',   |  'FS2'


 The call flow is:

 SIP Provider -- 217.0.0.1 Opensips -- 192.168.0.2/3

 The issue is, that when the 200 ok response is sent to the SIP provider,
 the Freeswitch server's internal IP is being sent in the SDP connection
 information (c).  This causes the ACK response from the SIP Provider to
 fail to be sent correctly.

 With the calls routed directly to the FS servers (removing opensips from
 the flow), the calls work fine.

 Any help would be much appreciated :)


 thanks
 Matt

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer problem

2014-08-27 Thread Anshuman S Rawat
Hi,

 

Yes, load_balance() returned false. But I found the problem. I had probing
on and '200' for OPTIONS was the only measurement for success. Fixed that
and it worked.

 

Thanks for responding.

 

Anshuman

 

 

From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org] 
Sent: Tuesday, August 26, 2014 10:44 PM
To: OpenSIPS users mailling list; ara...@3clogic.com
Subject: Re: [OpenSIPS-Users] Load balancer problem

 

Hi,

By failing you mean the load_balance function returns false in script ?

Could you post the output of: 

opensipsctl fifo lb_list


Regards,



Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 26.08.2014 15:04, Anshuman S Rawat wrote:

Hi,

 

I am trying to use the load_balancer module for load balancing requests
between 2 OpenSIPS instances but my load_balance() function is failing for
reasons I couldn't figure out.

 

My load balancer table looks like this.

 

++--+-+---++
-+

| id | group_id | dst_uri | resources | probe_mode |
description |

++--+-+---++
-+

|  1 |1 | sip:192.168.1.18:6606   | vm=1000   |  2 |
|

|  2 |1 | sip:192.168.1.15:3300 | vm=1000   |  2 |
|

++--+-+---++
-+

 

Loaded modules:

loadmodule db_mysql.so

loadmodule sl.so

loadmodule tm.so

loadmodule rr.so

loadmodule maxfwd.so

loadmodule usrloc.so

loadmodule signaling.so

loadmodule registrar.so

loadmodule textops.so

loadmodule mi_fifo.so

loadmodule xlog.so

loadmodule nathelper.so

loadmodule lcr.so

loadmodule dialog.so

loadmodule siptrace.so

#loadmodule uac.so

loadmodule path.so

loadmodule load_balancer.so

loadmodule auth.so

loadmodule auth_db.so

loadmodule msilo.so

 

 

Module specific parameters:

 

# -- load balancer --

modparam(load_balancer, db_url,
mysql://user:password@localhost/opensips)

modparam(load_balancer, db_table, load_balancer)

modparam(load_balancer, probing_interval, 30)

 

 

 

Syslog contains the following on startup:

 

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]: NOTICE:core:main:
version: opensips 1.6.0-notls (x86_64/linux)

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]: INFO:core:main:
using 128 Mb shared memory

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]: INFO:core:main:
using 16 Mb private memory per process

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]: INFO:sl:mod_init:
Initializing StateLess engine

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]: INFO:tm:mod_init:
TM - initializing...

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]:
INFO:maxfwd:mod_init: initializing...

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]:
INFO:usrloc:ul_init_locks: locks array size 512

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]:
NOTICE:signaling:mod_init: initializing module ...

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]:
INFO:registrar:mod_init: initializing...

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]:
INFO:textops:mod_init: initializing...

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]:
INFO:xlog:mod_init: initializing...

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]:
INFO:dialog:mod_init: Dialog module - initializing

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]:
INFO:siptrace:mod_init: initializing...

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]:
INFO:path:mod_init: initializing...

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]:
INFO:load_balancer:mod_init: Load-Balancer module - initializing

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]:
INFO:auth:mod_init: initializing...

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]:
INFO:auth_db:mod_init: initializing...

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]:
INFO:core:probe_max_receive_buffer: using a UDP receive buffer of 512 kb

 

 

load_balance() is called from main route the following way-

 

if (load_balance(1,vm))

{

xlog(L_NOTICE, Loadbalancer: route:method ($rm)
r-uri ($ru) : Contact : $ct  :callID $ci: destination: $du\n);

t_on_failure(3);

t_on_reply(1);

t_relay();

}

else

{

xlog(L_NOTICE, Loadbalancer: route:method ($rm)
r-uri ($ru) : Contact : $ct  :callID $ci: FAILED $retcode\n);

t_reply(500, Service unavailable);

}

 

 

The function always fails and I couldn't figure out why.

What am I doing wrong?

 

Thanks,

Anshuman

 






___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org

Re: [OpenSIPS-Users] Load balancer problem

2014-08-26 Thread Bogdan-Andrei Iancu

Hi,

By failing you mean the load_balance function returns false in script ?

Could you post the output of:

opensipsctl fifo lb_list


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 26.08.2014 15:04, Anshuman S Rawat wrote:


Hi,

I am trying to use the load_balancer module for load balancing 
requests between 2 OpenSIPS instances but my load_balance() function 
is failing for reasons I couldn't figure out.


My load balancer table looks like this.

++--+-+---++-+

| id | group_id | dst_uri | resources | probe_mode | description |

++--+-+---++-+

|  1 |1 | sip:192.168.1.18:6606   | vm=1000 |  2 
| |


|  2 |1 | sip:192.168.1.15:3300 | vm=1000 |  2 
| |


++--+-+---++-+

Loaded modules:

loadmodule db_mysql.so

loadmodule sl.so

loadmodule tm.so

loadmodule rr.so

loadmodule maxfwd.so

loadmodule usrloc.so

loadmodule signaling.so

loadmodule registrar.so

loadmodule textops.so

loadmodule mi_fifo.so

loadmodule xlog.so

loadmodule nathelper.so

loadmodule lcr.so

loadmodule dialog.so

loadmodule siptrace.so

#loadmodule uac.so

loadmodule path.so

loadmodule load_balancer.so

loadmodule auth.so

loadmodule auth_db.so

loadmodule msilo.so

Module specific parameters:

# -- load balancer --

modparam(load_balancer, db_url, 
mysql://user:password@localhost/opensips)


modparam(load_balancer, db_table, load_balancer)

modparam(load_balancer, probing_interval, 30)

Syslog contains the following on startup:

Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]: 
NOTICE:core:main: version: opensips 1.6.0-notls (x86_64/linux)


Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]: 
INFO:core:main: using 128 Mb shared memory


Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]: 
INFO:core:main: using 16 Mb private memory per process


Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]: 
INFO:sl:mod_init: Initializing StateLess engine


Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]: 
INFO:tm:mod_init: TM - initializing...


Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]: 
INFO:maxfwd:mod_init: initializing...


Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]: 
INFO:usrloc:ul_init_locks: locks array size 512


Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]: 
NOTICE:signaling:mod_init: initializing module ...


Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]: 
INFO:registrar:mod_init: initializing...


Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]: 
INFO:textops:mod_init: initializing...


Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]: 
INFO:xlog:mod_init: initializing...


Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]: 
INFO:dialog:mod_init: Dialog module - initializing


Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]: 
INFO:siptrace:mod_init: initializing...


Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]: 
INFO:path:mod_init: initializing...


Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]: 
INFO:load_balancer:mod_init: Load-Balancer module - initializing


Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]: 
INFO:auth:mod_init: initializing...


Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]: 
INFO:auth_db:mod_init: initializing...


Aug 26 07:58:23 tatatest2 /usr/local/sbin/opensips[19419]: 
INFO:core:probe_max_receive_buffer: using a UDP receive buffer of 512 kb


load_balance() is called from main route the following way-

if (load_balance(1,vm))

{

xlog(L_NOTICE, Loadbalancer: route:method ($rm) r-uri ($ru) : 
Contact : $ct  :callID $ci: destination: $du\n);


t_on_failure(3);

t_on_reply(1);

t_relay();

}

else

{

xlog(L_NOTICE, Loadbalancer: route:method ($rm) r-uri ($ru) : 
Contact : $ct  :callID $ci: FAILED $retcode\n);


t_reply(500, Service unavailable);

}

The function always fails and I couldn't figure out why.

What am I doing wrong?

Thanks,

Anshuman



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer module for REGISTER as well as INVITE?

2013-03-20 Thread Bogdan-Andrei Iancu
Your script has a bit of a brutal approach on the routing :) , also it 
seems to contain really old syntax or functions - in current versions 
things can be done in a much simpler way ;).


See my previous email.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 03/19/2013 08:15 PM, Tuomas Kaikkonen wrote:


This is a cleaned up opensips.m4 script for all my OpenSIPs servers. 
The following are m4 macros defined in a create opensips cfg script:



[] STRIPPED


Tuomas Kaikkonen

Software Developer | Twisted Pair Solutions

3131 Elliott Ave, Suite 200, Seattle, WA 98121

Tel: (206) 812-0732

*From:*Tuomas Kaikkonen
*Sent:* Tuesday, March 19, 2013 10:43 AM
*To:* 'Bogdan-Andrei Iancu'; OpenSIPS users mailling list
*Subject:* RE: [OpenSIPS-Users] Load Balancer module for REGISTER as 
well as INVITE?


Bogdan,

What I am trying to do is this:  Have two or more OpenSIPs servers 
with each having their own rtpproxy server. The database is shared 
over ssh tunnel so it looks to each server as they are using a local 
database. The goal is to make the service scalable so that we can add 
more OpenSIPs hosts as the need comes. Also we want to have the system 
detect if a server has failed and not direct calls/registers to that 
server. All the servers are in a cloud system (which does not provide 
Multicast, only Unicast), and they will have both public IP and 
internal IP associated with them. The problem with the shared database 
is that the location table has the socket column storing the Internal 
IP of the OpenSIPs server who did the REGISTER of the SIP client with. 
I need to relay all INVITE/BYE/CANCEL requests via that server. I have 
no UDP load balancer to balance the SIP requests, and having the RTP 
Proxy proxy all audio packets is an extra burden to the design.  Our 
clients register with only one SIP server, there is no configuration 
to register with a primary and secondary SIP proxy.


What we worry about is putting one OpenSIPs server acting as a load 
balancer or dispatcher, is that we'd be then again dependent on one 
OpenSIPs server. That dispatching / load balancing OpenSIPs server 
should be also backed up by a fail over server. I've looked into some, 
mostly academic, papers on how they did their load balancing and fail 
over.


Tuomas Kaikkonen

Software Developer | Twisted Pair Solutions

3131 Elliott Ave, Suite 200, Seattle, WA 98121

Tel: (206) 812-0732

*From:*Bogdan-Andrei Iancu [mailto:bog...@opensips.org] 
mailto:[mailto:bog...@opensips.org]

*Sent:* Tuesday, March 19, 2013 8:01 AM
*To:* OpenSIPS users mailling list
*Cc:* Tuomas Kaikkonen
*Subject:* Re: [OpenSIPS-Users] Load Balancer module for REGISTER as 
well as INVITE?


Hi Tuomas,

The LB modules is only for CALLs - it understands by +1 load only a 
call. You cannot use it for REGISTERsAnyhow REGISTERs and INVITEs 
are as apples and onions :)...so you cannot put them in the same basket.


if you could provide more details on what you are trying to achieve, 
maybe I can advice you on the best balancing option (like maybe using 
dispatcher module)


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 03/18/2013 07:56 PM, Tuomas Kaikkonen wrote:

Can the Load Balancer module be configured to balance REGISTERs as 
well as the INVITES so that the above mentioned setup would work? OR 
is the Load Balancer module just useful for balancing RTP Proxy / 
media server resources for INVITEs?


I'm new to the Load Balancer module of OpenSIPs. I am running OpenSIPs 
stable branch 1.7 -- just by looking examples from the documentation 
it looks like INVITE load balancing is supported.


Tuomas Kaikkonen

  
  
___

Users mailing list
Users@lists.opensips.org  mailto:Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer module for REGISTER as well as INVITE?

2013-03-20 Thread Bogdan-Andrei Iancu

Hi Tuomas,

In your script, I would try to handle the case when a back server (a 
destination in dispatcher) is down and re-route to the other available 
destination - use failure route with the ds_next_dst() in order to do 
serial forking in case of failure.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 03/20/2013 01:48 AM, Tuomas Kaikkonen wrote:


Trying dispatcher:

mysql select * from dispatcher;

++---+---+---++---+-+

| id | setid | destination   | flags | weight 
| attrs | description |


++---+---+---++---+-+

|  1 | 1 | sip:WWW.WWW.WWW.WWW:5060;transport=udp  | 0 |  
1 |   | |


|  2 | 1 | sip:XXX.XXX.XXX.XXX:5060;transport=udp | 0 |  1 
|   | |


++---+---+---++---+-+

The WWW and XXX are IP addresses in my actual database, just scrubbing 
them for posting to this mailing group.


My opensips.cfg route for the dispatching opensips is this:

route{

if ( !mf_process_maxfwd_header(10) )

{

send_reply(483,To Many Hops);

exit;

};

if ( !ds_select_dst(1, 0) ) {

send_reply(500,Unable to route);

exit;

}

t_relay();

}

The database is shared by the three opensips servers. When I try to 
register my client with the SIP domain as the IP address of the 
dispatching OpenSIPs  server as the SIP proxy on the client, the 
registration request times out. I do NOT see the destination OpenSIPs 
servers getting the REGISTER at all.


I see in tcpdump the client's register is received, then the 
dispatching OpenSIPs sends it to one of the two OpenSIPs servers 
configured in the dispatcher table, but when it is sending them the IP 
packets Source IP is marked as 192.168.1.1  -- which is NOT the 
internal or public IP address of this system. Somehow the OpenSIPs 
dispatcher will overwrite the source IP with 192.168.1.1 -- is there 
a configuration that I should have to make it use its advertised_address?


Tuomas Kaikkonen

Software Developer | Twisted Pair Solutions

3131 Elliott Ave, Suite 200, Seattle, WA 98121

Tel: (206) 812-0732

*From:*users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] *On Behalf Of *Tuomas Kaikkonen

*Sent:* Tuesday, March 19, 2013 10:43 AM
*To:* Bogdan-Andrei Iancu; OpenSIPS users mailling list
*Subject:* Re: [OpenSIPS-Users] Load Balancer module for REGISTER as 
well as INVITE?


Bogdan,

What I am trying to do is this:  Have two or more OpenSIPs servers 
with each having their own rtpproxy server. The database is shared 
over ssh tunnel so it looks to each server as they are using a local 
database. The goal is to make the service scalable so that we can add 
more OpenSIPs hosts as the need comes. Also we want to have the system 
detect if a server has failed and not direct calls/registers to that 
server. All the servers are in a cloud system (which does not provide 
Multicast, only Unicast), and they will have both public IP and 
internal IP associated with them. The problem with the shared database 
is that the location table has the socket column storing the Internal 
IP of the OpenSIPs server who did the REGISTER of the SIP client with. 
I need to relay all INVITE/BYE/CANCEL requests via that server. I have 
no UDP load balancer to balance the SIP requests, and having the RTP 
Proxy proxy all audio packets is an extra burden to the design.  Our 
clients register with only one SIP server, there is no configuration 
to register with a primary and secondary SIP proxy.


What we worry about is putting one OpenSIPs server acting as a load 
balancer or dispatcher, is that we'd be then again dependent on one 
OpenSIPs server. That dispatching / load balancing OpenSIPs server 
should be also backed up by a fail over server. I've looked into some, 
mostly academic, papers on how they did their load balancing and fail 
over.


Tuomas Kaikkonen

Software Developer | Twisted Pair Solutions

3131 Elliott Ave, Suite 200, Seattle, WA 98121

Tel: (206) 812-0732

*From:*Bogdan-Andrei Iancu [mailto:bog...@opensips.org] 
mailto:[mailto:bog...@opensips.org]

*Sent:* Tuesday, March 19, 2013 8:01 AM
*To:* OpenSIPS users mailling list
*Cc:* Tuomas Kaikkonen
*Subject:* Re: [OpenSIPS-Users] Load Balancer module for REGISTER as 
well as INVITE?


Hi Tuomas,

The LB modules is only for CALLs - it understands by +1 load only a 
call. You cannot use it for REGISTERsAnyhow REGISTERs and INVITEs 
are as apples and onions :)...so you cannot put them in the same basket.


if you could provide more details on what you are trying to achieve, 
maybe I can advice you on the best balancing option (like maybe using 
dispatcher

Re: [OpenSIPS-Users] Load Balancer module for REGISTER as well as INVITE?

2013-03-20 Thread Tuomas Kaikkonen
Yes, I really wanted to use variables for doing the forwarding, but that method 
only accepts literal strings, so I had to do this in m4 script. Really crude as 
you say. We're looking into doing the simple active-standby failover first. 
Doing scalable Client NAT traversable, RTP Proxying, shared database solution 
is a long stretch.

Tuomas Kaikkonen
Software Developer | Twisted Pair Solutions
3131 Elliott Ave, Suite 200, Seattle, WA 98121
Tel: (206) 812-0732

From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org]
Sent: Wednesday, March 20, 2013 5:51 AM
To: Tuomas Kaikkonen
Cc: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Load Balancer module for REGISTER as well as 
INVITE?

Your script has a bit of a brutal approach on the routing :) , also it seems to 
contain really old syntax or functions - in current versions things can be done 
in a much simpler way ;).

See my previous email.

Regards,



Bogdan-Andrei Iancu

OpenSIPS Founder and Developer

http://www.opensips-solutions.com

On 03/19/2013 08:15 PM, Tuomas Kaikkonen wrote:
This is a cleaned up opensips.m4 script for all my OpenSIPs servers. The 
following are m4 macros defined in a create opensips cfg script:

[] STRIPPED



Tuomas Kaikkonen
Software Developer | Twisted Pair Solutions
3131 Elliott Ave, Suite 200, Seattle, WA 98121
Tel: (206) 812-0732

From: Tuomas Kaikkonen
Sent: Tuesday, March 19, 2013 10:43 AM
To: 'Bogdan-Andrei Iancu'; OpenSIPS users mailling list
Subject: RE: [OpenSIPS-Users] Load Balancer module for REGISTER as well as 
INVITE?

Bogdan,

What I am trying to do is this:  Have two or more OpenSIPs servers with each 
having their own rtpproxy server. The database is shared over ssh tunnel so it 
looks to each server as they are using a local database. The goal is to make 
the service scalable so that we can add more OpenSIPs hosts as the need comes. 
Also we want to have the system detect if a server has failed and not direct 
calls/registers to that server. All the servers are in a cloud system (which 
does not provide Multicast, only Unicast), and they will have both public IP 
and internal IP associated with them. The problem with the shared database is 
that the location table has the socket column storing the Internal IP of the 
OpenSIPs server who did the REGISTER of the SIP client with. I need to relay 
all INVITE/BYE/CANCEL requests via that server. I have no UDP load balancer to 
balance the SIP requests, and having the RTP Proxy proxy all audio packets is 
an extra burden to the design.  Our clients register with only one SIP server, 
there is no configuration to register with a primary and secondary SIP proxy.

What we worry about is putting one OpenSIPs server acting as a load balancer or 
dispatcher, is that we'd be then again dependent on one OpenSIPs server. That 
dispatching / load balancing OpenSIPs server should be also backed up by a fail 
over server. I've looked into some, mostly academic, papers on how they did 
their load balancing and fail over.

Tuomas Kaikkonen
Software Developer | Twisted Pair Solutions
3131 Elliott Ave, Suite 200, Seattle, WA 98121
Tel: (206) 812-0732

From: Bogdan-Andrei Iancu 
[mailto:bog...@opensips.org]mailto:[mailto:bog...@opensips.org]
Sent: Tuesday, March 19, 2013 8:01 AM
To: OpenSIPS users mailling list
Cc: Tuomas Kaikkonen
Subject: Re: [OpenSIPS-Users] Load Balancer module for REGISTER as well as 
INVITE?

Hi Tuomas,

The LB modules is only for CALLs - it understands by +1 load only a call. You 
cannot use it for REGISTERsAnyhow REGISTERs and INVITEs are as apples and 
onions :)...so you cannot put them in the same basket.

if you could provide more details on what you are trying to achieve, maybe I 
can advice you on the best balancing option (like maybe using dispatcher module)

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer

http://www.opensips-solutions.com

On 03/18/2013 07:56 PM, Tuomas Kaikkonen wrote:
Can the Load Balancer module be configured to balance REGISTERs as well as the 
INVITES so that the above mentioned setup would work? OR is the Load Balancer 
module just useful for balancing RTP Proxy / media server resources for INVITEs?

I'm new to the Load Balancer module of OpenSIPs. I am running OpenSIPs stable 
branch 1.7 - just by looking examples from the documentation it looks like 
INVITE load balancing is supported.

Tuomas Kaikkonen






___

Users mailing list

Users@lists.opensips.orgmailto:Users@lists.opensips.org

http://lists.opensips.org/cgi-bin/mailman/listinfo/users
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer module for REGISTER as well as INVITE?

2013-03-19 Thread Muhammad Shahzad
Load balancer depends on SIP address only for routing, so just about any
SIP server and just about any SIP method, you can use this module for load
balancing. However, you need to plan carefully how on-net calls and
presence will work in such an architecture!

Thank you.


On Mon, Mar 18, 2013 at 5:56 PM, Tuomas Kaikkonen 
tuomas.kaikko...@twistpair.com wrote:

 Can the Load Balancer module be configured to balance REGISTERs as well as
 the INVITES so that the above mentioned setup would work? OR is the Load
 Balancer module just useful for balancing RTP Proxy / media server
 resources for INVITEs?

 ** **

 I’m new to the Load Balancer module of OpenSIPs. I am running OpenSIPs
 stable branch 1.7 – just by looking examples from the documentation it
 looks like INVITE load balancing is supported.

 ** **

 Tuomas Kaikkonen

 ** **

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users




-- 
Mit freundlichen Grüßen
Muhammad Shahzad
---
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: shari_78...@hotmail.com
Email: shaherya...@googlemail.com
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer module for REGISTER as well as INVITE?

2013-03-19 Thread Bogdan-Andrei Iancu

Hi Tuomas,

The LB modules is only for CALLs - it understands by +1 load only a 
call. You cannot use it for REGISTERsAnyhow REGISTERs and INVITEs 
are as apples and onions :)...so you cannot put them in the same basket.


if you could provide more details on what you are trying to achieve, 
maybe I can advice you on the best balancing option (like maybe using 
dispatcher module)


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 03/18/2013 07:56 PM, Tuomas Kaikkonen wrote:


Can the Load Balancer module be configured to balance REGISTERs as 
well as the INVITES so that the above mentioned setup would work? OR 
is the Load Balancer module just useful for balancing RTP Proxy / 
media server resources for INVITEs?


I'm new to the Load Balancer module of OpenSIPs. I am running OpenSIPs 
stable branch 1.7 -- just by looking examples from the documentation 
it looks like INVITE load balancing is supported.


Tuomas Kaikkonen


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer module for REGISTER as well as INVITE?

2013-03-19 Thread Tuomas Kaikkonen
Bogdan,

What I am trying to do is this:  Have two or more OpenSIPs servers with each 
having their own rtpproxy server. The database is shared over ssh tunnel so it 
looks to each server as they are using a local database. The goal is to make 
the service scalable so that we can add more OpenSIPs hosts as the need comes. 
Also we want to have the system detect if a server has failed and not direct 
calls/registers to that server. All the servers are in a cloud system (which 
does not provide Multicast, only Unicast), and they will have both public IP 
and internal IP associated with them. The problem with the shared database is 
that the location table has the socket column storing the Internal IP of the 
OpenSIPs server who did the REGISTER of the SIP client with. I need to relay 
all INVITE/BYE/CANCEL requests via that server. I have no UDP load balancer to 
balance the SIP requests, and having the RTP Proxy proxy all audio packets is 
an extra burden to the design.  Our clients register with only one SIP server, 
there is no configuration to register with a primary and secondary SIP proxy.

What we worry about is putting one OpenSIPs server acting as a load balancer or 
dispatcher, is that we'd be then again dependent on one OpenSIPs server. That 
dispatching / load balancing OpenSIPs server should be also backed up by a fail 
over server. I've looked into some, mostly academic, papers on how they did 
their load balancing and fail over.

Tuomas Kaikkonen
Software Developer | Twisted Pair Solutions
3131 Elliott Ave, Suite 200, Seattle, WA 98121
Tel: (206) 812-0732

From: Bogdan-Andrei Iancu [mailto:bog...@opensips.org]
Sent: Tuesday, March 19, 2013 8:01 AM
To: OpenSIPS users mailling list
Cc: Tuomas Kaikkonen
Subject: Re: [OpenSIPS-Users] Load Balancer module for REGISTER as well as 
INVITE?

Hi Tuomas,

The LB modules is only for CALLs - it understands by +1 load only a call. You 
cannot use it for REGISTERsAnyhow REGISTERs and INVITEs are as apples and 
onions :)...so you cannot put them in the same basket.

if you could provide more details on what you are trying to achieve, maybe I 
can advice you on the best balancing option (like maybe using dispatcher module)

Regards,


Bogdan-Andrei Iancu

OpenSIPS Founder and Developer

http://www.opensips-solutions.com

On 03/18/2013 07:56 PM, Tuomas Kaikkonen wrote:
Can the Load Balancer module be configured to balance REGISTERs as well as the 
INVITES so that the above mentioned setup would work? OR is the Load Balancer 
module just useful for balancing RTP Proxy / media server resources for INVITEs?

I'm new to the Load Balancer module of OpenSIPs. I am running OpenSIPs stable 
branch 1.7 - just by looking examples from the documentation it looks like 
INVITE load balancing is supported.

Tuomas Kaikkonen






___

Users mailing list

Users@lists.opensips.orgmailto:Users@lists.opensips.org

http://lists.opensips.org/cgi-bin/mailman/listinfo/users
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer module for REGISTER as well as INVITE?

2013-03-19 Thread Tuomas Kaikkonen
Trying dispatcher:


mysql select * from dispatcher;
++---+---+---++---+-+
| id | setid | destination   | flags | weight | attrs | 
description |
++---+---+---++---+-+
|  1 | 1 | sip:WWW.WWW.WWW.WWW:5060;transport=udp  | 0 |  1 |   
| |
|  2 | 1 | sip:XXX.XXX.XXX.XXX:5060;transport=udp | 0 |  1 |   
| |
++---+---+---++---+-+

The WWW and XXX are IP addresses in my actual database, just scrubbing them for 
posting to this mailing group.

My opensips.cfg route for the dispatching opensips is this:

route{
if ( !mf_process_maxfwd_header(10) )
{
send_reply(483,To Many Hops);
exit;
};

if ( !ds_select_dst(1, 0) ) {
send_reply(500,Unable to route);
exit;
}

t_relay();
}


The database is shared by the three opensips servers. When I try to register my 
client with the SIP domain as the IP address of the dispatching OpenSIPs  
server as the SIP proxy on the client, the registration request times out. I do 
NOT see the destination OpenSIPs servers getting the REGISTER at all.

I see in tcpdump the client's register is received, then the dispatching 
OpenSIPs sends it to one of the two OpenSIPs servers configured in the 
dispatcher table, but when it is sending them the IP packets Source IP is 
marked as 192.168.1.1  -- which is NOT the internal or public IP address of 
this system. Somehow the OpenSIPs dispatcher will overwrite the source IP with 
192.168.1.1 - is there a configuration that I should have to make it use its 
advertised_address?





Tuomas Kaikkonen
Software Developer | Twisted Pair Solutions
3131 Elliott Ave, Suite 200, Seattle, WA 98121
Tel: (206) 812-0732

From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Tuomas Kaikkonen
Sent: Tuesday, March 19, 2013 10:43 AM
To: Bogdan-Andrei Iancu; OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Load Balancer module for REGISTER as well as 
INVITE?

Bogdan,

What I am trying to do is this:  Have two or more OpenSIPs servers with each 
having their own rtpproxy server. The database is shared over ssh tunnel so it 
looks to each server as they are using a local database. The goal is to make 
the service scalable so that we can add more OpenSIPs hosts as the need comes. 
Also we want to have the system detect if a server has failed and not direct 
calls/registers to that server. All the servers are in a cloud system (which 
does not provide Multicast, only Unicast), and they will have both public IP 
and internal IP associated with them. The problem with the shared database is 
that the location table has the socket column storing the Internal IP of the 
OpenSIPs server who did the REGISTER of the SIP client with. I need to relay 
all INVITE/BYE/CANCEL requests via that server. I have no UDP load balancer to 
balance the SIP requests, and having the RTP Proxy proxy all audio packets is 
an extra burden to the design.  Our clients register with only one SIP server, 
there is no configuration to register with a primary and secondary SIP proxy.

What we worry about is putting one OpenSIPs server acting as a load balancer or 
dispatcher, is that we'd be then again dependent on one OpenSIPs server. That 
dispatching / load balancing OpenSIPs server should be also backed up by a fail 
over server. I've looked into some, mostly academic, papers on how they did 
their load balancing and fail over.

Tuomas Kaikkonen
Software Developer | Twisted Pair Solutions
3131 Elliott Ave, Suite 200, Seattle, WA 98121
Tel: (206) 812-0732

From: Bogdan-Andrei Iancu 
[mailto:bog...@opensips.org]mailto:[mailto:bog...@opensips.org]
Sent: Tuesday, March 19, 2013 8:01 AM
To: OpenSIPS users mailling list
Cc: Tuomas Kaikkonen
Subject: Re: [OpenSIPS-Users] Load Balancer module for REGISTER as well as 
INVITE?

Hi Tuomas,

The LB modules is only for CALLs - it understands by +1 load only a call. You 
cannot use it for REGISTERsAnyhow REGISTERs and INVITEs are as apples and 
onions :)...so you cannot put them in the same basket.

if you could provide more details on what you are trying to achieve, maybe I 
can advice you on the best balancing option (like maybe using dispatcher module)

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer

http://www.opensips-solutions.com

On 03/18/2013 07:56 PM, Tuomas Kaikkonen wrote:
Can the Load Balancer module be configured to balance REGISTERs as well as the 
INVITES so that the above mentioned setup would work? OR is the Load Balancer 
module just useful for balancing RTP Proxy / media server resources for INVITEs?

I'm new to the Load Balancer module of OpenSIPs. I am running OpenSIPs

Re: [OpenSIPS-Users] Load Balancer module for REGISTER as well as INVITE?

2013-03-19 Thread Tuomas Kaikkonen
The dispatcher works now. I had forgot some iptables NAT rules from previous 
testing, and had to flush all my iptables NAT rules. The source IP is now 
correct.

Tuomas Kaikkonen
Software Developer | Twisted Pair Solutions
3131 Elliott Ave, Suite 200, Seattle, WA 98121
Tel: (206) 812-0732

From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Tuomas Kaikkonen
Sent: Tuesday, March 19, 2013 4:49 PM
To: OpenSIPS users mailling list; Bogdan-Andrei Iancu
Subject: Re: [OpenSIPS-Users] Load Balancer module for REGISTER as well as 
INVITE?

Trying dispatcher:


mysql select * from dispatcher;
++---+---+---++---+-+
| id | setid | destination   | flags | weight | attrs | 
description |
++---+---+---++---+-+
|  1 | 1 | sip:WWW.WWW.WWW.WWW:5060;transport=udp  | 0 |  1 |   
| |
|  2 | 1 | sip:XXX.XXX.XXX.XXX:5060;transport=udp | 0 |  1 |   
| |
++---+---+---++---+-+

The WWW and XXX are IP addresses in my actual database, just scrubbing them for 
posting to this mailing group.

My opensips.cfg route for the dispatching opensips is this:

route{
if ( !mf_process_maxfwd_header(10) )
{
send_reply(483,To Many Hops);
exit;
};

if ( !ds_select_dst(1, 0) ) {
send_reply(500,Unable to route);
exit;
}

t_relay();
}


The database is shared by the three opensips servers. When I try to register my 
client with the SIP domain as the IP address of the dispatching OpenSIPs  
server as the SIP proxy on the client, the registration request times out. I do 
NOT see the destination OpenSIPs servers getting the REGISTER at all.

I see in tcpdump the client's register is received, then the dispatching 
OpenSIPs sends it to one of the two OpenSIPs servers configured in the 
dispatcher table, but when it is sending them the IP packets Source IP is 
marked as 192.168.1.1  -- which is NOT the internal or public IP address of 
this system. Somehow the OpenSIPs dispatcher will overwrite the source IP with 
192.168.1.1 - is there a configuration that I should have to make it use its 
advertised_address?





Tuomas Kaikkonen
Software Developer | Twisted Pair Solutions
3131 Elliott Ave, Suite 200, Seattle, WA 98121
Tel: (206) 812-0732

From: users-boun...@lists.opensips.orgmailto:users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org]mailto:[mailto:users-boun...@lists.opensips.org]
 On Behalf Of Tuomas Kaikkonen
Sent: Tuesday, March 19, 2013 10:43 AM
To: Bogdan-Andrei Iancu; OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Load Balancer module for REGISTER as well as 
INVITE?

Bogdan,

What I am trying to do is this:  Have two or more OpenSIPs servers with each 
having their own rtpproxy server. The database is shared over ssh tunnel so it 
looks to each server as they are using a local database. The goal is to make 
the service scalable so that we can add more OpenSIPs hosts as the need comes. 
Also we want to have the system detect if a server has failed and not direct 
calls/registers to that server. All the servers are in a cloud system (which 
does not provide Multicast, only Unicast), and they will have both public IP 
and internal IP associated with them. The problem with the shared database is 
that the location table has the socket column storing the Internal IP of the 
OpenSIPs server who did the REGISTER of the SIP client with. I need to relay 
all INVITE/BYE/CANCEL requests via that server. I have no UDP load balancer to 
balance the SIP requests, and having the RTP Proxy proxy all audio packets is 
an extra burden to the design.  Our clients register with only one SIP server, 
there is no configuration to register with a primary and secondary SIP proxy.

What we worry about is putting one OpenSIPs server acting as a load balancer or 
dispatcher, is that we'd be then again dependent on one OpenSIPs server. That 
dispatching / load balancing OpenSIPs server should be also backed up by a fail 
over server. I've looked into some, mostly academic, papers on how they did 
their load balancing and fail over.

Tuomas Kaikkonen
Software Developer | Twisted Pair Solutions
3131 Elliott Ave, Suite 200, Seattle, WA 98121
Tel: (206) 812-0732

From: Bogdan-Andrei Iancu 
[mailto:bog...@opensips.org]mailto:[mailto:bog...@opensips.org]
Sent: Tuesday, March 19, 2013 8:01 AM
To: OpenSIPS users mailling list
Cc: Tuomas Kaikkonen
Subject: Re: [OpenSIPS-Users] Load Balancer module for REGISTER as well as 
INVITE?

Hi Tuomas,

The LB modules is only for CALLs - it understands by +1 load only a call. You 
cannot use it for REGISTERsAnyhow REGISTERs and INVITEs are as apples

Re: [OpenSIPS-Users] Load Balancer Issue

2012-11-21 Thread Bogdan-Andrei Iancu

Nilanjan,

The caller script is broken - in ACK, is should be ROUTE hdrs where you 
have the RECORD-ROUTE ones :) .ACK should look like:


U 2012/11/01 11:19:02.006514 X.X.X.23:5080 - X.X.X.206:5060
ACK sip:X.X.X.5:5070;transport=UDP SIP/2.0.
Route: 
sip:X.X.X.206;lr;ftag=31168SIPpTag001;did=0ec.de85e9a,sip:X.X.X.8;lr.

Via: SIP/2.0/UDP X.X.X.23:5080;branch=z9hG4bK-31168-1-5.
From: sipp sip:sipp@X.X.X.23:5080;tag=31168SIPpTag001.
To: sut sip:service@X.X.X.5:5070;tag=30500SIPpTag011.
Call-ID: 1-31168@X.X.X.23.
CSeq: 1 ACK.
Contact: sip:sipp@X.X.X.23:5080.
Max-Forwards: 70.
Subject: Performance Test.
Content-Length: 0.

I guess it is an err in your sipp scenario.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 11/09/2012 07:24 PM, Nilanjan Banerjee wrote:

Hi Bogdan,

  Thanks for your reply. The answer to both your questions is yes. 
Sample of OK and ACK at the caller as follows:


#
U 2012/11/01 11:19:02.006375 X.X.X.206:5060 - X.X.X.23:5080
SIP/2.0 200 OK.
Record-Route: sip:X.X.X.8;lr, 
sip:X.X.X.206;lr;ftag=31168SIPpTag001;did=0ec.de85e9a.

Via: SIP/2.0/UDP X.X.X.23:5080;branch=z9hG4bK-31168-1-0.
From: sipp sip:sipp@X.X.X.23:5080;tag=31168SIPpTag001.
To: sut sip:service@X.X.X.5:5070;tag=30500SIPpTag011.
Call-ID: 1-31168@X.X.X.23.
CSeq: 1 INVITE.
Contact: sip:X.X.X.5:5070;transport=UDP.
Content-Type: application/sdp.
Content-Length:   137.
.
v=0.
o=user1 53655765 2353687637 IN IP4 X.X.X.5.
s=-.
c=IN IP4 X.X.X.5.
t=0 0.
m=audio 6000 RTP/AVP 0.
a=rtpmap:0 PCMU/8000.

#
U 2012/11/01 11:19:02.006514 X.X.X.23:5080 - X.X.X.206:5060
ACK sip:X.X.X.5:5070;transport=UDP SIP/2.0.
Record-Route: 
sip:X.X.X.206;lr;ftag=31168SIPpTag001;did=0ec.de85e9a,sip:X.X.X.8;lr.

Via: SIP/2.0/UDP X.X.X.23:5080;branch=z9hG4bK-31168-1-5.
From: sipp sip:sipp@X.X.X.23:5080;tag=31168SIPpTag001.
To: sut sip:service@X.X.X.5:5070;tag=30500SIPpTag011.
Call-ID: 1-31168@X.X.X.23.
CSeq: 1 ACK.
Contact: sip:sipp@X.X.X.23:5080.
Max-Forwards: 70.
Subject: Performance Test.
Content-Length: 0.
.

Thanks,
Nilanjan.

On Fri, Nov 9, 2012 at 10:29 PM, Bogdan-Andrei Iancu 
bog...@opensips.org mailto:bog...@opensips.org wrote:


Hi Nilanjan,

Check in the trace if :
1) the 200 OK getting back to the caller has 2 RR headers (one
from Proxy and one from LB).

2) the ACK from caller (before LB) has 2 Route headers, one
pointing to LB, next to Proxy.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 11/09/2012 05:01 PM, Nilanjan Banerjee wrote:

Hi Bogdan,

  Thanks a lot for your suggestion and sorry for the delay in
getting back with this...I tried the following configuration as
you have suggested for the Load Balancer and the Proxy:

__
Load Balancer:
__

route{
if (!mf_process_maxfwd_header(3)) {
sl_send_reply(483,looping);
exit;
}

if (!has_totag()) {
# initial request
record_route();
} else {
# sequential request - obey Route indication
loose_route();
t_relay();
exit;
}

# detect resources and do load balancing

 load_balance(1,sc);

# LB function returns negative if no suitable destination
(for requested resources) is found,
# or if all destinations are full
if ($retcode0) {
 sl_send_reply(500,Service full);
 exit;
}

xlog(Selected destination is: $du\n);

# send it out
if (!t_relay()) {
sl_reply_error();
}
}

__
Proxy
__

route{

if (!has_totag()) {
# initial request
record_route();
} else {
# sequential request - obey Route indication
loose_route();
}

if (!t_relay()) {
 #   xlog(L_ERR,sl_reply_error\n);
sl_reply_error();
}

}

However, I am still getting the same error - basically the ACK
and the BYE messages are skipping the Proxy and the response to
the BYE is sent to the Proxy. Here are the sample ACK and BYE for
the following setup I am using:

X.X.X.23:5080 -- X.X.X.206:5060 -- X.X.X.8:5060 -- X.X.X.5:5070
(sipp UAC)   -- (Load Balancer) --  (Proxy) --
(sipp UAS)

#
U 2012/11/01 11:19:22.901990 X.X.X.206:5060 - X.X.X.5:5070
ACK sip:X.X.X.5:5070;transport=UDP SIP/2.0.
Record-Route:
sip:X.X.X.206;lr;ftag=31168SIPpTag005;did=9d.087b203,sip:X.X.X.8;lr.
Via: SIP/2.0/UDP X.X.X.206;branch=z9hG4bK0112.20fe162.2.
Via: SIP/2.0/UDP X.X.X.23:5080;branch=z9hG4bK-31168-5-5.
From: sipp 

Re: [OpenSIPS-Users] Load Balancer between two OpenSIPs server. Redis Cluster [HOWTO]

2012-11-12 Thread Vlad Paiu

Hello,

Very nice tutorial, thank you.

Important to note that you can use other backends as well, such as 
Cassandra in 1.8, or for the future release 1.9 you'll also be able to 
use CouchBase or MongoDB in a similar fashion.


Best Regards,

Vlad Paiu
OpenSIPS Developer
http://www.opensips-solutions.com


On 11/10/2012 02:13 PM, Bakko wrote:

Hello list,

I written the first draft about Load Balancer between two Opensips 
Servers in a Redis Cluster.


I'm sorry if the HowTo is in Spanish, but my English is not very good.

http://www.voztovoice.org/?q=node/585 
http://www.voztovoice.org/?q=node/585


Thank you Bogdan for your help and sorry if my mails arrive directly 
to your private e-mail. I thought I was writing to the list.


Regards


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer Issue

2012-11-10 Thread Nilanjan Banerjee
Hi Bogdan,

  You were spot on. Fixed the ROUTE headers for ACK and BYE in the sipp
scenario and everything just worked perfectly. Thanks a lot for bearing
with me with your continued support.  Much appreciate it.

Nilanjan.

On Fri, Nov 9, 2012 at 11:07 PM, Bogdan-Andrei Iancu bog...@opensips.orgwrote:

 **
 Nilanjan,

 The caller script is broken - in ACK, is should be ROUTE hdrs where you
 have the RECORD-ROUTE ones :) .ACK should look like:


 U 2012/11/01 11:19:02.006514 X.X.X.23:5080 - X.X.X.206:5060
 ACK sip:X.X.X.5:5070;transport=UDP SIP/2.0.
 Route:  sip:X.X.X.206;lr;ftag=31168SIPpTag001;did=0ec.de85e9a,
 sip:X.X.X.8;lr.
 Via: SIP/2.0/UDP X.X.X.23:5080;branch=z9hG4bK-31168-1-5.
 From: sipp sip:sipp@X.X.X.23:5080;tag=31168SIPpTag001.
 To: sut sip:service@X.X.X.5:5070;tag=30500SIPpTag011.
 Call-ID: 1-31168@X.X.X.23.
 CSeq: 1 ACK.
 Contact: sip:sipp@X.X.X.23:5080.
 Max-Forwards: 70.
 Subject: Performance Test.
 Content-Length: 0.

 I guess it is an err in your sipp scenario.

 Regards,

 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developerhttp://www.opensips-solutions.com


 On 11/09/2012 07:24 PM, Nilanjan Banerjee wrote:

 Hi Bogdan,

   Thanks for your reply. The answer to both your questions is yes. Sample
 of OK and ACK at the caller as follows:

 #
 U 2012/11/01 11:19:02.006375 X.X.X.206:5060 - X.X.X.23:5080
 SIP/2.0 200 OK.
 Record-Route: sip:X.X.X.8;lr,
 sip:X.X.X.206;lr;ftag=31168SIPpTag001;did=0ec.de85e9a.
 Via: SIP/2.0/UDP X.X.X.23:5080;branch=z9hG4bK-31168-1-0.
 From: sipp sip:sipp@X.X.X.23:5080;tag=31168SIPpTag001.
 To: sut sip:service@X.X.X.5:5070;tag=30500SIPpTag011.
 Call-ID: 1-31168@X.X.X.23.
 CSeq: 1 INVITE.
 Contact: sip:X.X.X.5:5070;transport=UDP.
 Content-Type: application/sdp.
 Content-Length:   137.
 .
 v=0.
 o=user1 53655765 2353687637 IN IP4 X.X.X.5.
 s=-.
 c=IN IP4 X.X.X.5.
 t=0 0.
 m=audio 6000 RTP/AVP 0.
 a=rtpmap:0 PCMU/8000.

 #
 U 2012/11/01 11:19:02.006514 X.X.X.23:5080 - X.X.X.206:5060
 ACK sip:X.X.X.5:5070;transport=UDP SIP/2.0.
 Record-Route:  sip:X.X.X.206;lr;ftag=31168SIPpTag001;did=0ec.de85e9a,
 sip:X.X.X.8;lr.
 Via: SIP/2.0/UDP X.X.X.23:5080;branch=z9hG4bK-31168-1-5.
 From: sipp sip:sipp@X.X.X.23:5080;tag=31168SIPpTag001.
 To: sut sip:service@X.X.X.5:5070;tag=30500SIPpTag011.
 Call-ID: 1-31168@X.X.X.23.
 CSeq: 1 ACK.
 Contact: sip:sipp@X.X.X.23:5080.
 Max-Forwards: 70.
 Subject: Performance Test.
 Content-Length: 0.
 .

 Thanks,
 Nilanjan.

 On Fri, Nov 9, 2012 at 10:29 PM, Bogdan-Andrei Iancu 
 bog...@opensips.orgwrote:

  Hi Nilanjan,

 Check in the trace if :
 1) the 200 OK getting back to the caller has 2 RR headers (one from Proxy
 and one from LB).

 2) the ACK from caller (before LB) has 2 Route headers, one pointing to
 LB, next to Proxy.

 Regards,

 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developerhttp://www.opensips-solutions.com


   On 11/09/2012 05:01 PM, Nilanjan Banerjee wrote:

 Hi Bogdan,

   Thanks a lot for your suggestion and sorry for the delay in getting
 back with this...I tried the following configuration as you have suggested
 for the Load Balancer and the Proxy:

 __
 Load Balancer:
 __

 route{
 if (!mf_process_maxfwd_header(3)) {
 sl_send_reply(483,looping);
 exit;
 }

 if (!has_totag()) {
 # initial request
 record_route();
 } else {
 # sequential request - obey Route indication
 loose_route();
 t_relay();
 exit;
 }

 # detect resources and do load balancing

  load_balance(1,sc);

 # LB function returns negative if no suitable destination (for
 requested resources) is found,
 # or if all destinations are full
 if ($retcode0) {
  sl_send_reply(500,Service full);
  exit;
 }

 xlog(Selected destination is: $du\n);

 # send it out
 if (!t_relay()) {
 sl_reply_error();
 }
 }

 __
 Proxy
 __

 route{

 if (!has_totag()) {
 # initial request
 record_route();
 } else {
 # sequential request - obey Route indication
 loose_route();
 }

 if (!t_relay()) {
  #   xlog(L_ERR,sl_reply_error\n);
 sl_reply_error();
 }

 }

 However, I am still getting the same error - basically the ACK and the
 BYE messages are skipping the Proxy and the response to the BYE is sent to
 the Proxy. Here are the sample ACK and BYE for the following setup I am
 using:

 X.X.X.23:5080 -- X.X.X.206:5060 -- X.X.X.8:5060 -- X.X.X.5:5070
 (sipp UAC)   -- (Load Balancer) --  (Proxy) -- (sipp UAS)

 #
 U 2012/11/01 11:19:22.901990 X.X.X.206:5060 - X.X.X.5:5070
 ACK sip:X.X.X.5:5070;transport=UDP SIP/2.0.
 Record-Route:  sip:X.X.X.206;lr;ftag=31168SIPpTag005;did=9d.087b203,
 sip:X.X.X.8;lr.
 Via: SIP/2.0/UDP 

Re: [OpenSIPS-Users] Load Balancer Issue

2012-11-09 Thread Nilanjan Banerjee
Hi Bogdan,

  Thanks a lot for your suggestion and sorry for the delay in getting back
with this...I tried the following configuration as you have suggested for
the Load Balancer and the Proxy:

__
Load Balancer:
__

route{
if (!mf_process_maxfwd_header(3)) {
sl_send_reply(483,looping);
exit;
}

if (!has_totag()) {
# initial request
record_route();
} else {
# sequential request - obey Route indication
loose_route();
t_relay();
exit;
}

# detect resources and do load balancing

 load_balance(1,sc);

# LB function returns negative if no suitable destination (for
requested resources) is found,
# or if all destinations are full
if ($retcode0) {
 sl_send_reply(500,Service full);
 exit;
}

xlog(Selected destination is: $du\n);

# send it out
if (!t_relay()) {
sl_reply_error();
}
}

__
Proxy
__

route{

if (!has_totag()) {
# initial request
record_route();
} else {
# sequential request - obey Route indication
loose_route();
}

if (!t_relay()) {
 #   xlog(L_ERR,sl_reply_error\n);
sl_reply_error();
}

}

However, I am still getting the same error - basically the ACK and the BYE
messages are skipping the Proxy and the response to the BYE is sent to the
Proxy. Here are the sample ACK and BYE for the following setup I am using:

X.X.X.23:5080 -- X.X.X.206:5060 -- X.X.X.8:5060 -- X.X.X.5:5070
(sipp UAC)   -- (Load Balancer) --  (Proxy) -- (sipp UAS)

#
U 2012/11/01 11:19:22.901990 X.X.X.206:5060 - X.X.X.5:5070
ACK sip:X.X.X.5:5070;transport=UDP SIP/2.0.
Record-Route:
sip:X.X.X.206;lr;ftag=31168SIPpTag005;did=9d.087b203,sip:X.X.X.8;lr.
Via: SIP/2.0/UDP X.X.X.206;branch=z9hG4bK0112.20fe162.2.
Via: SIP/2.0/UDP X.X.X.23:5080;branch=z9hG4bK-31168-5-5.
From: sipp sip:sipp@X.X.X.23:5080;tag=31168SIPpTag005.
To: sut sip:service@X.X.X.5:5070;tag=30500SIPpTag015.
Call-ID: 5-31168@X.X.X.23.
CSeq: 1 ACK.
Contact: sip:sipp@X.X.X.23:5080.
Max-Forwards: 69.
Subject: Performance Test.
Content-Length: 0.
.

#
U 2012/11/01 11:19:22.934118 X.X.X.23:5080 - X.X.X.206:5060
BYE sip:X.X.X.5:5070;transport=UDP SIP/2.0.
Record-Route:
sip:X.X.X.206;lr;ftag=31168SIPpTag001;did=0ec.de85e9a,sip:X.X.X.8;lr.
Via: SIP/2.0/UDP X.X.X.23:5080;branch=z9hG4bK-31168-1-7.
From: sipp sip:sipp@X.X.X.23:5080;tag=31168SIPpTag001.
To: sut sip:service@X.X.X.5:5070;tag=30500SIPpTag011.
Call-ID: 1-31168@X.X.X.23.
CSeq: 2 BYE.
Contact: sip:sipp@X.X.X.23:5080.
Max-Forwards: 70.
Subject: Performance Test.
Content-Length: 0.
.

Looks like the loose routing for the messages after the initial requests is
not happening properly according to the Record-Route header. Not sure, if I
am doing things right in the client side while introducing the Record-Route
header - hence attaching the modified sipp uac and uas I am using.

Would greatly appreciate your time and help if you could please throw some
light into this matter.

Thanks,
Nil.


On Thu, Oct 25, 2012 at 7:30 PM, Bogdan-Andrei Iancu bog...@opensips.orgwrote:

 **
 Hi Nil,

 Seems the problem is in the proxy, where you do not do RR at all.

 Try

 

 Proxy:
 

 route{

 if (!has_totag()) {
 # initial request
 record_route();
 } else {
 # sequential request - obey Route indication
 loose_route();
 }

 if (!t_relay()) {
  #   xlog(L_ERR,sl_reply_error\n);
 sl_reply_error();
 }
 }


 Regards,

 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developerhttp://www.opensips-solutions.com


 On 10/22/2012 02:25 PM, Nilanjan Banerjee wrote:

 Thanks Bogdan for taking time to respond to my post. I think you have
 guessed it right, I am using the sample routing script given in the Load
 Balancer (LB) tutorial and that is most likely sending the ACK and BYE
 messages directly to Client 2 bypassing the Proxy. The routing code
 snippets I am using at the LB and the Proxy are shown below. Could you
 please tell me what's going wrong over here? I am using record route
 support at both the clients. Alternatively if you could please tell me what
 should go in the routing blocks of the LB and the Proxy so that all the
 messages go through the LB and the Proxy then that will be of immense help
 too.

 Regards,
 Nil.

 

 Load Balancer:
 

 route{
 if (!mf_process_maxfwd_header(3)) {
 sl_send_reply(483,looping);
 exit;
 }

 if (!has_totag()) {
 # initial request
 record_route();
 } else {
 # sequential 

Re: [OpenSIPS-Users] Load Balancer Issue

2012-11-09 Thread Bogdan-Andrei Iancu

Hi Nilanjan,

Check in the trace if :
1) the 200 OK getting back to the caller has 2 RR headers (one from 
Proxy and one from LB).


2) the ACK from caller (before LB) has 2 Route headers, one pointing to 
LB, next to Proxy.


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 11/09/2012 05:01 PM, Nilanjan Banerjee wrote:

Hi Bogdan,

  Thanks a lot for your suggestion and sorry for the delay in getting 
back with this...I tried the following configuration as you have 
suggested for the Load Balancer and the Proxy:


__
Load Balancer:
__

route{
if (!mf_process_maxfwd_header(3)) {
sl_send_reply(483,looping);
exit;
}

if (!has_totag()) {
# initial request
record_route();
} else {
# sequential request - obey Route indication
loose_route();
t_relay();
exit;
}

# detect resources and do load balancing

 load_balance(1,sc);

# LB function returns negative if no suitable destination (for 
requested resources) is found,

# or if all destinations are full
if ($retcode0) {
 sl_send_reply(500,Service full);
 exit;
}

xlog(Selected destination is: $du\n);

# send it out
if (!t_relay()) {
sl_reply_error();
}
}

__
Proxy
__

route{

if (!has_totag()) {
# initial request
record_route();
} else {
# sequential request - obey Route indication
loose_route();
}

if (!t_relay()) {
 #   xlog(L_ERR,sl_reply_error\n);
sl_reply_error();
}

}

However, I am still getting the same error - basically the ACK and the 
BYE messages are skipping the Proxy and the response to the BYE is 
sent to the Proxy. Here are the sample ACK and BYE for the following 
setup I am using:


X.X.X.23:5080 -- X.X.X.206:5060 -- X.X.X.8:5060 -- X.X.X.5:5070
(sipp UAC)   -- (Load Balancer) --  (Proxy) -- (sipp UAS)

#
U 2012/11/01 11:19:22.901990 X.X.X.206:5060 - X.X.X.5:5070
ACK sip:X.X.X.5:5070;transport=UDP SIP/2.0.
Record-Route: 
sip:X.X.X.206;lr;ftag=31168SIPpTag005;did=9d.087b203,sip:X.X.X.8;lr.

Via: SIP/2.0/UDP X.X.X.206;branch=z9hG4bK0112.20fe162.2.
Via: SIP/2.0/UDP X.X.X.23:5080;branch=z9hG4bK-31168-5-5.
From: sipp sip:sipp@X.X.X.23:5080;tag=31168SIPpTag005.
To: sut sip:service@X.X.X.5:5070;tag=30500SIPpTag015.
Call-ID: 5-31168@X.X.X.23.
CSeq: 1 ACK.
Contact: sip:sipp@X.X.X.23:5080.
Max-Forwards: 69.
Subject: Performance Test.
Content-Length: 0.
.

#
U 2012/11/01 11:19:22.934118 X.X.X.23:5080 - X.X.X.206:5060
BYE sip:X.X.X.5:5070;transport=UDP SIP/2.0.
Record-Route: 
sip:X.X.X.206;lr;ftag=31168SIPpTag001;did=0ec.de85e9a,sip:X.X.X.8;lr.

Via: SIP/2.0/UDP X.X.X.23:5080;branch=z9hG4bK-31168-1-7.
From: sipp sip:sipp@X.X.X.23:5080;tag=31168SIPpTag001.
To: sut sip:service@X.X.X.5:5070;tag=30500SIPpTag011.
Call-ID: 1-31168@X.X.X.23.
CSeq: 2 BYE.
Contact: sip:sipp@X.X.X.23:5080.
Max-Forwards: 70.
Subject: Performance Test.
Content-Length: 0.
.

Looks like the loose routing for the messages after the initial 
requests is not happening properly according to the Record-Route 
header. Not sure, if I am doing things right in the client side while 
introducing the Record-Route header - hence attaching the modified 
sipp uac and uas I am using.


Would greatly appreciate your time and help if you could please throw 
some light into this matter.


Thanks,
Nil.


On Thu, Oct 25, 2012 at 7:30 PM, Bogdan-Andrei Iancu 
bog...@opensips.org mailto:bog...@opensips.org wrote:


Hi Nil,

Seems the problem is in the proxy, where you do not do RR at all.

Try



Proxy:


route{

if (!has_totag()) {
# initial request
record_route();
} else {
# sequential request - obey Route indication
loose_route();
}

if (!t_relay()) {
 #   xlog(L_ERR,sl_reply_error\n);
sl_reply_error();
}
}


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 10/22/2012 02:25 PM, Nilanjan Banerjee wrote:

Thanks Bogdan for taking time to respond to my post. I think you
have guessed it right, I am using the sample routing script given
in the Load Balancer (LB) tutorial and that is most likely
sending the ACK and BYE messages directly to Client 2 bypassing
the Proxy. The routing code snippets I am using at the LB and the
Proxy are shown below. Could you please tell me what's going
wrong over here? I am using record route support at both the
clients. Alternatively if you could 

Re: [OpenSIPS-Users] Load Balancer Issue

2012-11-09 Thread Nilanjan Banerjee
Hi Bogdan,

  Thanks for your reply. The answer to both your questions is yes. Sample
of OK and ACK at the caller as follows:

#
U 2012/11/01 11:19:02.006375 X.X.X.206:5060 - X.X.X.23:5080
SIP/2.0 200 OK.
Record-Route: sip:X.X.X.8;lr,
sip:X.X.X.206;lr;ftag=31168SIPpTag001;did=0ec.de85e9a.
Via: SIP/2.0/UDP X.X.X.23:5080;branch=z9hG4bK-31168-1-0.
From: sipp sip:sipp@X.X.X.23:5080;tag=31168SIPpTag001.
To: sut sip:service@X.X.X.5:5070;tag=30500SIPpTag011.
Call-ID: 1-31168@X.X.X.23.
CSeq: 1 INVITE.
Contact: sip:X.X.X.5:5070;transport=UDP.
Content-Type: application/sdp.
Content-Length:   137.
.
v=0.
o=user1 53655765 2353687637 IN IP4 X.X.X.5.
s=-.
c=IN IP4 X.X.X.5.
t=0 0.
m=audio 6000 RTP/AVP 0.
a=rtpmap:0 PCMU/8000.

#
U 2012/11/01 11:19:02.006514 X.X.X.23:5080 - X.X.X.206:5060
ACK sip:X.X.X.5:5070;transport=UDP SIP/2.0.
Record-Route:
sip:X.X.X.206;lr;ftag=31168SIPpTag001;did=0ec.de85e9a,sip:X.X.X.8;lr.
Via: SIP/2.0/UDP X.X.X.23:5080;branch=z9hG4bK-31168-1-5.
From: sipp sip:sipp@X.X.X.23:5080;tag=31168SIPpTag001.
To: sut sip:service@X.X.X.5:5070;tag=30500SIPpTag011.
Call-ID: 1-31168@X.X.X.23.
CSeq: 1 ACK.
Contact: sip:sipp@X.X.X.23:5080.
Max-Forwards: 70.
Subject: Performance Test.
Content-Length: 0.
.

Thanks,
Nilanjan.

On Fri, Nov 9, 2012 at 10:29 PM, Bogdan-Andrei Iancu bog...@opensips.orgwrote:

 **
 Hi Nilanjan,

 Check in the trace if :
 1) the 200 OK getting back to the caller has 2 RR headers (one from Proxy
 and one from LB).

 2) the ACK from caller (before LB) has 2 Route headers, one pointing to
 LB, next to Proxy.

 Regards,

 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developerhttp://www.opensips-solutions.com


 On 11/09/2012 05:01 PM, Nilanjan Banerjee wrote:

 Hi Bogdan,

   Thanks a lot for your suggestion and sorry for the delay in getting back
 with this...I tried the following configuration as you have suggested for
 the Load Balancer and the Proxy:

 __
 Load Balancer:
 __

 route{
 if (!mf_process_maxfwd_header(3)) {
 sl_send_reply(483,looping);
 exit;
 }

 if (!has_totag()) {
 # initial request
 record_route();
 } else {
 # sequential request - obey Route indication
 loose_route();
 t_relay();
 exit;
 }

 # detect resources and do load balancing

  load_balance(1,sc);

 # LB function returns negative if no suitable destination (for
 requested resources) is found,
 # or if all destinations are full
 if ($retcode0) {
  sl_send_reply(500,Service full);
  exit;
 }

 xlog(Selected destination is: $du\n);

 # send it out
 if (!t_relay()) {
 sl_reply_error();
 }
 }

 __
 Proxy
 __

 route{

 if (!has_totag()) {
 # initial request
 record_route();
 } else {
 # sequential request - obey Route indication
 loose_route();
 }

 if (!t_relay()) {
  #   xlog(L_ERR,sl_reply_error\n);
 sl_reply_error();
 }

 }

 However, I am still getting the same error - basically the ACK and the BYE
 messages are skipping the Proxy and the response to the BYE is sent to the
 Proxy. Here are the sample ACK and BYE for the following setup I am using:

 X.X.X.23:5080 -- X.X.X.206:5060 -- X.X.X.8:5060 -- X.X.X.5:5070
 (sipp UAC)   -- (Load Balancer) --  (Proxy) -- (sipp UAS)

 #
 U 2012/11/01 11:19:22.901990 X.X.X.206:5060 - X.X.X.5:5070
 ACK sip:X.X.X.5:5070;transport=UDP SIP/2.0.
 Record-Route:  sip:X.X.X.206;lr;ftag=31168SIPpTag005;did=9d.087b203,
 sip:X.X.X.8;lr.
 Via: SIP/2.0/UDP X.X.X.206;branch=z9hG4bK0112.20fe162.2.
 Via: SIP/2.0/UDP X.X.X.23:5080;branch=z9hG4bK-31168-5-5.
 From: sipp sip:sipp@X.X.X.23:5080;tag=31168SIPpTag005.
 To: sut sip:service@X.X.X.5:5070;tag=30500SIPpTag015.
 Call-ID: 5-31168@X.X.X.23.
 CSeq: 1 ACK.
 Contact: sip:sipp@X.X.X.23:5080.
 Max-Forwards: 69.
 Subject: Performance Test.
 Content-Length: 0.
 .

 #
 U 2012/11/01 11:19:22.934118 X.X.X.23:5080 - X.X.X.206:5060
 BYE sip:X.X.X.5:5070;transport=UDP SIP/2.0.
 Record-Route:  sip:X.X.X.206;lr;ftag=31168SIPpTag001;did=0ec.de85e9a,
 sip:X.X.X.8;lr.
 Via: SIP/2.0/UDP X.X.X.23:5080;branch=z9hG4bK-31168-1-7.
 From: sipp sip:sipp@X.X.X.23:5080;tag=31168SIPpTag001.
 To: sut sip:service@X.X.X.5:5070;tag=30500SIPpTag011.
 Call-ID: 1-31168@X.X.X.23.
 CSeq: 2 BYE.
 Contact: sip:sipp@X.X.X.23:5080.
 Max-Forwards: 70.
 Subject: Performance Test.
 Content-Length: 0.
 .

 Looks like the loose routing for the messages after the initial requests
 is not happening properly according to the Record-Route header. Not sure,
 if I am doing things right in the client side while introducing the
 Record-Route header - hence attaching the modified sipp uac and uas I am
 using.

 Would greatly appreciate your 

Re: [OpenSIPS-Users] Load Balancer Issue

2012-10-25 Thread Bogdan-Andrei Iancu

Hi Nil,

Seems the problem is in the proxy, where you do not do RR at all.

Try



Proxy:


route{
if (!has_totag()) {
# initial request
record_route();
} else {
# sequential request - obey Route indication
loose_route();
}

if (!t_relay()) {
 #   xlog(L_ERR,sl_reply_error\n);
sl_reply_error();
}
}


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 10/22/2012 02:25 PM, Nilanjan Banerjee wrote:
Thanks Bogdan for taking time to respond to my post. I think you have 
guessed it right, I am using the sample routing script given in the 
Load Balancer (LB) tutorial and that is most likely sending the ACK 
and BYE messages directly to Client 2 bypassing the Proxy. The routing 
code snippets I am using at the LB and the Proxy are shown below. 
Could you please tell me what's going wrong over here? I am using 
record route support at both the clients. Alternatively if you could 
please tell me what should go in the routing blocks of the LB and the 
Proxy so that all the messages go through the LB and the Proxy then 
that will be of immense help too.


Regards,
Nil.



Load Balancer:


route{
if (!mf_process_maxfwd_header(3)) {
sl_send_reply(483,looping);
exit;
}

if (!has_totag()) {
# initial request
record_route();
} else {
# sequential request - obey Route indication
loose_route();
t_relay();
exit;
}

# detect resources and do balancing

 load_balance(1,sc);


# LB function returns negative if no suitable destination (for 
requested resources) is found,

# or if all destinations are full
if ($retcode0) {
 sl_send_reply(500,Service full);
 exit;
}

xlog(Selected destination is: $du\n);

# send it out
if (!t_relay()) {
sl_reply_error();
}
}



Proxy:


route{
record_route();
if (!t_relay()) {
 #   xlog(L_ERR,sl_reply_error\n);
sl_reply_error();
}
}


On Sun, Oct 21, 2012 at 7:39 PM, Bogdan-Andrei Iancu 
bog...@opensips.org mailto:bog...@opensips.org wrote:


Hi Nil,

I wild guess is you are not correctly do loose_route on the LB,
so instead of following the Route (to OpenSIPS Proxy), it goes
directly to end destination in RURI (Client 2).

Of course, I assume that all parties (LB + Proxy) do
record_route() for the call, right ?

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 10/21/2012 10:09 AM, Nilanjan Banerjee wrote:

Hello,

  I am trying to build the following setup using OpenSIPS load
balancer and the proxy functionality:

Client 1 (sipp)  OpenSIPS Load Balancer  OpenSIPS
Proxy  Client 2 (sipp)

At the client ends I am using the following commands:

Client 1: sipp -sn uac -rsa [Load Balancer Address] [Client 2
Address]

Client 2: sipp -sn uas

The Load Balancer is configured with a destination as the
OpenSIPS Proxy and the Proxy is configured to simply forward the
SIP messages based on IP address (using only forward(); in the
routing block).

Now everything (INVITE, OK and ACK messages) works fine except
the BYE messages that are getting forwarded by the Load Balancer
directly to Client 2 unlike the INVITE, OK and ACK messages that
traverse the Proxy. Client 2 however, sends the OK to the BYE to
the OpenSIPS Proxy. Since the BYE messages do not traverse the
Proxy, the OK to the BYE messages are getting retransmitted
repeatedly by Client 2 and the sessions are not getting
terminated properly. How do I make the BYE messages to go through
the Proxy or the OK message sent directly to the Load Balancer so
that the retransmissions do not happen and the sessions get
terminated properly?

[NB: When the Load Balancer is taken out of the loop and the
Proxy configuration is kept the same, all the SIP messages
traverses the Proxy and everything works fine i.e., the BYE and
the OKs to the BYEs are handled properly and sessions get
terminated properly.]

Would greatly appreciate any help in this matter. Thanks in advance.

Nil.


___
Users mailing list
Users@lists.opensips.org  mailto:Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer Issue

2012-10-22 Thread Nilanjan Banerjee
Thanks Bogdan for taking time to respond to my post. I think you have
guessed it right, I am using the sample routing script given in the Load
Balancer (LB) tutorial and that is most likely sending the ACK and BYE
messages directly to Client 2 bypassing the Proxy. The routing code
snippets I am using at the LB and the Proxy are shown below. Could you
please tell me what's going wrong over here? I am using record route
support at both the clients. Alternatively if you could please tell me what
should go in the routing blocks of the LB and the Proxy so that all the
messages go through the LB and the Proxy then that will be of immense help
too.

Regards,
Nil.



Load Balancer:


route{
if (!mf_process_maxfwd_header(3)) {
sl_send_reply(483,looping);
exit;
}

if (!has_totag()) {
# initial request
record_route();
} else {
# sequential request - obey Route indication
loose_route();
t_relay();
exit;
}

# detect resources and do balancing

 load_balance(1,sc);


# LB function returns negative if no suitable destination (for
requested resources) is found,
# or if all destinations are full
if ($retcode0) {
 sl_send_reply(500,Service full);
 exit;
}

xlog(Selected destination is: $du\n);

# send it out
if (!t_relay()) {
sl_reply_error();
}
}



Proxy:


route{
record_route();
if (!t_relay()) {
 #   xlog(L_ERR,sl_reply_error\n);
sl_reply_error();
}
}


On Sun, Oct 21, 2012 at 7:39 PM, Bogdan-Andrei Iancu bog...@opensips.orgwrote:

 **
 Hi Nil,

 I wild guess is you are not correctly do loose_route on the LB, so
 instead of following the Route (to OpenSIPS Proxy), it goes directly to end
 destination in RURI (Client 2).

 Of course, I assume that all parties (LB + Proxy) do record_route() for
 the call, right ?

 Regards,

 Bogdan-Andrei Iancu
 OpenSIPS Founder and Developerhttp://www.opensips-solutions.com


 On 10/21/2012 10:09 AM, Nilanjan Banerjee wrote:

 Hello,

   I am trying to build the following setup using OpenSIPS load balancer
 and the proxy functionality:

 Client 1 (sipp)  OpenSIPS Load Balancer  OpenSIPS Proxy 
 Client 2 (sipp)

 At the client ends I am using the following commands:

 Client 1: sipp -sn uac -rsa [Load Balancer Address] [Client 2 Address]

 Client 2: sipp -sn uas

 The Load Balancer is configured with a destination as the OpenSIPS Proxy
 and the Proxy is configured to simply forward the SIP messages based on IP
 address (using only forward(); in the routing block).

 Now everything (INVITE, OK and ACK messages) works fine except the BYE
 messages that are getting forwarded by the Load Balancer directly to Client
 2 unlike the INVITE, OK and ACK messages that traverse the Proxy. Client 2
 however, sends the OK to the BYE to the OpenSIPS Proxy. Since the BYE
 messages do not traverse the Proxy, the OK to the BYE messages are getting
 retransmitted repeatedly by Client 2 and the sessions are not getting
 terminated properly. How do I make the BYE messages to go through the Proxy
 or the OK message sent directly to the Load Balancer so that the
 retransmissions do not happen and the sessions get terminated properly?

 [NB: When the Load Balancer is taken out of the loop and the Proxy
 configuration is kept the same, all the SIP messages traverses the Proxy
 and everything works fine i.e., the BYE and the OKs to the BYEs are handled
 properly and sessions get terminated properly.]

 Would greatly appreciate any help in this matter. Thanks in advance.

 Nil.


 ___
 Users mailing 
 listUsers@lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer Issue

2012-10-21 Thread Bogdan-Andrei Iancu

Hi Nil,

I wild guess is you are not correctly do loose_route on the LB, so 
instead of following the Route (to OpenSIPS Proxy), it goes directly to 
end destination in RURI (Client 2).


Of course, I assume that all parties (LB + Proxy) do record_route() for 
the call, right ?


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 10/21/2012 10:09 AM, Nilanjan Banerjee wrote:

Hello,

  I am trying to build the following setup using OpenSIPS load 
balancer and the proxy functionality:


Client 1 (sipp)  OpenSIPS Load Balancer  OpenSIPS Proxy 
 Client 2 (sipp)


At the client ends I am using the following commands:

Client 1: sipp -sn uac -rsa [Load Balancer Address] [Client 2 Address]

Client 2: sipp -sn uas

The Load Balancer is configured with a destination as the OpenSIPS 
Proxy and the Proxy is configured to simply forward the SIP messages 
based on IP address (using only forward(); in the routing block).


Now everything (INVITE, OK and ACK messages) works fine except the BYE 
messages that are getting forwarded by the Load Balancer directly to 
Client 2 unlike the INVITE, OK and ACK messages that traverse the 
Proxy. Client 2 however, sends the OK to the BYE to the OpenSIPS 
Proxy. Since the BYE messages do not traverse the Proxy, the OK to the 
BYE messages are getting retransmitted repeatedly by Client 2 and the 
sessions are not getting terminated properly. How do I make the BYE 
messages to go through the Proxy or the OK message sent directly to 
the Load Balancer so that the retransmissions do not happen and the 
sessions get terminated properly?


[NB: When the Load Balancer is taken out of the loop and the Proxy 
configuration is kept the same, all the SIP messages traverses the 
Proxy and everything works fine i.e., the BYE and the OKs to the BYEs 
are handled properly and sessions get terminated properly.]


Would greatly appreciate any help in this matter. Thanks in advance.

Nil.


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer

2012-03-29 Thread Faisal Rehman
Hi Miha,

It seems that you have given the wrong path of the OpenSIPS modules directory 
in your opensips.cfg file. Please check it again.
 
Regards,


Faisal Rehman





 From: Miha m...@softnet.si
To: OpenSIPS users mailling list users@lists.opensips.org 
Sent: Thursday, March 29, 2012 2:40 PM
Subject: [OpenSIPS-Users] Load balancer
 

Hi,

I installed and configured opensips. Now I fould like to use as
  loadbalancer between Freeswitchs.

I have fallow tutorial as is written on
  http://www.opensips.org/index.php?n=Resources.DocsTutLoadbalancing.

Why modules are can not be loaded if when I was having default
  config all modules were loaded successfully?

After I restart opensips server I get this errors.

Thanks!
MIha

[root@localhost phpmyadmin]# service opensips restart 
   
Stopping opensips:
  [FAILED]
Not starting : invalid configuration file!

Mar 29 11:37:13 [28444] ERROR:core:sr_load_module: could not open
  module modules/maxfwd/maxfwd.so: modules/maxfwd/maxfwd.so:
  cannot open shared object file: No such file or directory
Mar 29 11:37:13 [28444] CRITICAL:core:yyerror: parse error in
  config file, line 22, column 13-14: failed to load module
Mar 29 11:37:13 [28444] ERROR:core:sr_load_module: could not open
  module modules/sl/sl.so: modules/sl/sl.so: cannot open
  shared object file: No such file or directory
Mar 29 11:37:13 [28444] CRITICAL:core:yyerror: parse error in
  config file, line 23, column 13-14: failed to load module
Mar 29 11:37:13 [28444] ERROR:core:sr_load_module: could not open
  module modules/db_mysql/db_mysql.so:
  modules/db_mysql/db_mysql.so: cannot open shared object file: No
  such file or directory
Mar 29 11:37:13 [28444] CRITICAL:core:yyerror: parse error in
  config file, line 24, column 13-14: failed to load module
Mar 29 11:37:13 [28444] ERROR:core:sr_load_module: could not open
  module modules/tm/tm.so: modules/tm/tm.so: cannot open
  shared object file: No such file or directory
Mar 29 11:37:13 [28444] CRITICAL:core:yyerror: parse error in
  config file, line 25, column 13-14: failed to load module
Mar 29 11:37:13 [28444] ERROR:core:sr_load_module: could not open
  module modules/xlog/xlog.so: modules/xlog/xlog.so: cannot
  open shared object file: No such file or directory
Mar 29 11:37:13 [28444] CRITICAL:core:yyerror: parse error in
  config file, line 26, column 13-14: failed to load module
Mar 29 11:37:13 [28444] ERROR:core:sr_load_module: could not open
  module modules/uri/uri.so: modules/uri/uri.so: cannot open
  shared object file: No such file or directory
Mar 29 11:37:13 [28444] CRITICAL:core:yyerror: parse error in
  config file, line 27, column 13-14: failed to load module
Mar 29 11:37:13 [28444] ERROR:core:sr_load_module: could not open
  module modules/rr/rr.so: modules/rr/rr.so: cannot open
  shared object file: No such file or directory
Mar 29 11:37:13 [28444] CRITICAL:core:yyerror: parse error in
  config file, line 28, column 13-14: failed to load module
Mar 29 11:37:13 [28444] ERROR:core:sr_load_module: could not open
  module modules/dialog/dialog.so: modules/dialog/dialog.so:
  cannot open shared object file: No such file or directory
Mar 29 11:37:13 [28444] CRITICAL:core:yyerror: parse error in
  config file, line 29, column 13-14: failed to load module
Mar 29 11:37:13 [28444] ERROR:core:sr_load_module: could not open
  module modules/mi_fifo/mi_fifo.so:
  modules/mi_fifo/mi_fifo.so: cannot open shared object file: No
  such file or directory
Mar 29 11:37:13 [28444] CRITICAL:core:yyerror: parse error in
  config file, line 30, column 13-14: failed to load module
Mar 29 11:37:13 [28444] ERROR:core:sr_load_module: could not open
  module modules/mi_xmlrpc/mi_xmlrpc.so:
  modules/mi_xmlrpc/mi_xmlrpc.so: cannot open shared object file: No
  such file or directory
Mar 29 11:37:13 [28444] CRITICAL:core:yyerror: parse error in
  config file, line 31, column 13-14: failed to load module
Mar 29 11:37:13 [28444] ERROR:core:sr_load_module: could not open
  module modules/signaling/signaling.so:
  modules/signaling/signaling.so: cannot open shared object file: No
  such file or directory
Mar 29 11:37:13 [28444] CRITICAL:core:yyerror: parse error in
  config file, line 32, column 13-14: failed to load module
Mar 29 11:37:13 [28444] ERROR:core:sr_load_module: could not open
  module modules/textops/textops.so:
  modules/textops/textops.so: cannot open shared object file: No
  such file or directory
Mar 29 11:37:13 [28444] CRITICAL:core:yyerror: parse error in
  config file, line 33, column 13-14: failed to load module
Mar 29 11:37:13 [28444] ERROR:core:sr_load_module: could not open
  module modules/load_balancer/load_balancer.so:
  modules/load_balancer/load_balancer.so: cannot 

Re: [OpenSIPS-Users] Load balancer

2012-03-29 Thread Miha

On 3/29/2012 11:48 AM, Faisal Rehman wrote:

Hi Miha,

It seems that you have given the wrong path of the OpenSIPS modules 
directory in your opensips.cfg file. Please check it again.

Regards,

Faisal Rehman



*From:* Miha m...@softnet.si
*To:* OpenSIPS users mailling list users@lists.opensips.org
*Sent:* Thursday, March 29, 2012 2:40 PM
*Subject:* [OpenSIPS-Users] Load balancer

Hi,

I installed and configured opensips. Now I fould like to use as 
loadbalancer between Freeswitchs.


I have fallow tutorial as is written on 
http://www.opensips.org/index.php?n=Resources.DocsTutLoadbalancing.


Why modules are can not be loaded if when I was having default config 
all modules were loaded successfully?


After I restart opensips server I get this errors.

Thanks!
MIha

[root@localhost phpmyadmin]# service opensips restart
Stopping opensips: [FAILED]
Not starting : invalid configuration file!

Mar 29 11:37:13 [28444] ERROR:core:sr_load_module: could not open 
module modules/maxfwd/maxfwd.so: modules/maxfwd/maxfwd.so: cannot 
open shared object file: No such file or directory
Mar 29 11:37:13 [28444] CRITICAL:core:yyerror: parse error in config 
file, line 22, column 13-14: failed to load module
Mar 29 11:37:13 [28444] ERROR:core:sr_load_module: could not open 
module modules/sl/sl.so: modules/sl/sl.so: cannot open shared object 
file: No such file or directory
Mar 29 11:37:13 [28444] CRITICAL:core:yyerror: parse error in config 
file, line 23, column 13-14: failed to load module
Mar 29 11:37:13 [28444] ERROR:core:sr_load_module: could not open 
module modules/db_mysql/db_mysql.so: modules/db_mysql/db_mysql.so: 
cannot open shared object file: No such file or directory
Mar 29 11:37:13 [28444] CRITICAL:core:yyerror: parse error in config 
file, line 24, column 13-14: failed to load module
Mar 29 11:37:13 [28444] ERROR:core:sr_load_module: could not open 
module modules/tm/tm.so: modules/tm/tm.so: cannot open shared object 
file: No such file or directory
Mar 29 11:37:13 [28444] CRITICAL:core:yyerror: parse error in config 
file, line 25, column 13-14: failed to load module
Mar 29 11:37:13 [28444] ERROR:core:sr_load_module: could not open 
module modules/xlog/xlog.so: modules/xlog/xlog.so: cannot open 
shared object file: No such file or directory
Mar 29 11:37:13 [28444] CRITICAL:core:yyerror: parse error in config 
file, line 26, column 13-14: failed to load module
Mar 29 11:37:13 [28444] ERROR:core:sr_load_module: could not open 
module modules/uri/uri.so: modules/uri/uri.so: cannot open shared 
object file: No such file or directory
Mar 29 11:37:13 [28444] CRITICAL:core:yyerror: parse error in config 
file, line 27, column 13-14: failed to load module
Mar 29 11:37:13 [28444] ERROR:core:sr_load_module: could not open 
module modules/rr/rr.so: modules/rr/rr.so: cannot open shared object 
file: No such file or directory
Mar 29 11:37:13 [28444] CRITICAL:core:yyerror: parse error in config 
file, line 28, column 13-14: failed to load module
Mar 29 11:37:13 [28444] ERROR:core:sr_load_module: could not open 
module modules/dialog/dialog.so: modules/dialog/dialog.so: cannot 
open shared object file: No such file or directory
Mar 29 11:37:13 [28444] CRITICAL:core:yyerror: parse error in config 
file, line 29, column 13-14: failed to load module
Mar 29 11:37:13 [28444] ERROR:core:sr_load_module: could not open 
module modules/mi_fifo/mi_fifo.so: modules/mi_fifo/mi_fifo.so: 
cannot open shared object file: No such file or directory
Mar 29 11:37:13 [28444] CRITICAL:core:yyerror: parse error in config 
file, line 30, column 13-14: failed to load module
Mar 29 11:37:13 [28444] ERROR:core:sr_load_module: could not open 
module modules/mi_xmlrpc/mi_xmlrpc.so: 
modules/mi_xmlrpc/mi_xmlrpc.so: cannot open shared object file: No 
such file or directory
Mar 29 11:37:13 [28444] CRITICAL:core:yyerror: parse error in config 
file, line 31, column 13-14: failed to load module
Mar 29 11:37:13 [28444] ERROR:core:sr_load_module: could not open 
module modules/signaling/signaling.so: 
modules/signaling/signaling.so: cannot open shared object file: No 
such file or directory
Mar 29 11:37:13 [28444] CRITICAL:core:yyerror: parse error in config 
file, line 32, column 13-14: failed to load module
Mar 29 11:37:13 [28444] ERROR:core:sr_load_module: could not open 
module modules/textops/textops.so: modules/textops/textops.so: 
cannot open shared object file: No such file or directory
Mar 29 11:37:13 [28444] CRITICAL:core:yyerror: parse error in config 
file, line 33, column 13-14: failed to load module
Mar 29 11:37:13 [28444] ERROR:core:sr_load_module: could not open 
module modules/load_balancer/load_balancer.so: 
modules/load_balancer/load_balancer.so: cannot open shared object 
file: No such file or directory
Mar 29 11:37:13 [28444] CRITICAL:core:yyerror: parse error in config 
file, line 34, column 13-14: failed to load module

Re: [OpenSIPS-Users] Load balancer not able to send the calls to second sip server

2011-06-27 Thread Tushar Jain
Hi Robert,

Thanks for looking into my problem, here I am pasting my opensips.cfg file-





### Global Parameters #

debug=6
log_stderror=no
log_facility=LOG_LOCAL0

fork=yes
children=4

port=5060

listen=udp:x.x.x.x:5060

### Modules Section 

mpath=//lib/opensips/modules/

loadmodule db_mysql.so
loadmodule signaling.so
loadmodule sl.so
loadmodule tm.so
loadmodule rr.so
loadmodule maxfwd.so
loadmodule usrloc.so
loadmodule registrar.so
loadmodule textops.so
loadmodule mi_fifo.so
loadmodule uri.so
loadmodule xlog.so
loadmodule acc.so
loadmodule siptrace.so
loadmodule auth.so
loadmodule auth_db.so
loadmodule alias_db.so
loadmodule domain.so
loadmodule permissions.so
loadmodule group.so
loadmodule drouting.so
loadmodule avpops.so
loadmodule dialplan.so
loadmodule aaa_radius.so
loadmodule dialog.so
loadmodule load_balancer.so

#-- avpops params -
modparam(avpops, db_url, mysql://opensips:opensipsrw@localhost
/opensips)
modparam(avpops, avp_table, usr_preferences)

#-- load the dpid field to a pseudo-variable $avp(s:dpid) --
modparam(auth_db, load_credentials, $avp(s:rpid)=rpid
;$avp(s:countrycode)=contrycode;$avp(s:areacode)=areacode)
modparam(dialplan, db_url,mysql://opensips:opensipsrw@localhost
/opensips)

## attribute of the matched line will be store in the $avp(s:dest)
modparam(dialplan, attrs_pvar, $avp(s:dest))



# - drouting params -
#modparam(drouting, sort_order, 0)
modparam(drouting, use_domain, 1)
modparam(drouting,db_url, mysql://opensips:opensipsrw@localhost
/opensips)
modparam(drouting, probing_interval, 60)
modparam(drouting, probing_from, sip:pinger@x.x.x.x)
modparam(drouting, probing_method, OPTIONS)
modparam(drouting, probing_reply_codes, 501, 403, 404)

# - Group 
#modparam(permissions, db_mode, 1)
modparam(group,db_url,mysql://opensips:opensipsrw@localhost/opensips)

# - Permissions 
#modparam(permissions, db_mode, 1)
modparam(permissions,db_url,mysql://opensips:opensipsrw@localhost
/opensips)

# - mi_fifo params -
modparam(mi_fifo, fifo_name, /tmp/opensips_fifo)
modparam(mi_fifo, fifo_mode, 0666)


modparam(dialog, dlg_flag, 13)
modparam(dialog, db_mode, 1)
modparam(dialog, db_url, mysql://opensips:opensipsrw@localhost
/opensips)
modparam(dialog, timeout_avp, $avp(i:30))
modparam(dialog, default_timeout, 3600)

# - rr params -
# add value to ;lr param to cope with most of the UAs
modparam(rr, enable_full_lr, 1)
# do not append from tag to the RR (no need for this script)
modparam(rr, append_fromtag, 0)


# - Load Balancer -
modparam(load_balancer, db_url,mysql://opensips:opensipsrw@localhost
/opensips)
modparam(load_balancer, probing_interval, 60)
modparam(load_balancer, probing_method, INFO)
modparam(load_balancer, probing_from, sip:1000@x.x.x.x)
modparam(load_balancer, db_table, load_balancer)
modparam(load_balancer, probing_reply_codes, 501, 403, 404)

# - registrar params -
/* uncomment the next line not to allow more than 10 contacts per AOR */
#modparam(registrar, max_contacts, 10)


# - usrloc params -

modparam(usrloc, db_mode,   0)

/* uncomment the following lines if you want to enable DB persistency
   for location entries */
modparam(usrloc, db_mode,   2)
modparam(usrloc, db_url, mysql://opensips:opensipsrw@localhost
/opensips)


# - uri params -
modparam(uri, use_uri_table, 0)


# - acc params -
/* what sepcial events should be accounted ? */
modparam(acc, early_media, 0)
modparam(acc, report_ack, 0)
modparam(acc, report_cancels, 0)
modparam(acc, detect_direction, 0)
modparam(acc, failed_transaction_flag, 1)
modparam(acc, log_level, 1)
modparam(acc, log_flag, 1)
modparam(acc, log_missed_flag, 1)
modparam(acc, db_flag, 1)
modparam(acc, db_missed_flag, 2)
modparam(acc, aaa_url, radius:/etc/radiusclient-ng/radiusclient.conf)
# Point the configuration file
modparam(acc, service_type, 15) # Set the service_type to 15
modparam(acc, aaa_flag, 1)
modparam(acc, aaa_missed_flag, 1)
modparam(acc, aaa_extra,   via=$hdr(Via[*]); \
   Digest-User-Name=$Au; \
   Calling-Station-Id=$from; \
   Called-Station-Id=$to; \
   Sip-Translated-Request-URI=$ru; \
   Sip-RPid=$avp(s:rpid); \
   Source-IP=$avp(s:source_ip); \
   Source-Port=$avp(s:source_port); \
   SIP-Proxy-IP=$avp(s:sip_proxy_ip); \
   Canonical-URI=$avp(s:can_uri); \
   Divert-Reason=$avp(s:divert_reason);
\
   User-Agent=$hdr(user-agent); \
   Contact=$hdr(contact); \
   Event=$hdr(event); \

Re: [OpenSIPS-Users] Load balancer not able to send the calls to second sip server

2011-06-27 Thread Tushar Jain
HI Robert,

Here I forwarding the OPensips LB table content,it may help-

mysql select * from load_balancer;
++--+---+---++-+
| id | group_id | dst_uri | resources |
probe_mode | description |
+++---+---+---+-+
|  1 |2| sip:OpenSIPs@x.x.x.1  | sip=5 |  2
  | SW#1|
|  2 |2| sip:OpenSIPs@x.x.x.2  | sip=4 |  2
  | SW#2|
++--+---+---++-+
2 rows in set (0.00 sec)


Regards
Tushar




On Mon, Jun 13, 2011 at 7:40 AM, Tushar Jain tusshar.j...@gmail.com wrote:

 Hi Robert,

 Thanks for looking into my problem, here I am pasting my opensips.cfg file-

 



 ### Global Parameters #

 debug=6
 log_stderror=no
 log_facility=LOG_LOCAL0

 fork=yes
 children=4

 port=5060

 listen=udp:x.x.x.x:5060

 ### Modules Section 

 mpath=//lib/opensips/modules/

 loadmodule db_mysql.so
 loadmodule signaling.so
 loadmodule sl.so
 loadmodule tm.so
 loadmodule rr.so
 loadmodule maxfwd.so
 loadmodule usrloc.so
 loadmodule registrar.so
 loadmodule textops.so
 loadmodule mi_fifo.so
 loadmodule uri.so
 loadmodule xlog.so
 loadmodule acc.so
 loadmodule siptrace.so
 loadmodule auth.so
 loadmodule auth_db.so
 loadmodule alias_db.so
 loadmodule domain.so
 loadmodule permissions.so
 loadmodule group.so
 loadmodule drouting.so
 loadmodule avpops.so
 loadmodule dialplan.so
 loadmodule aaa_radius.so
 loadmodule dialog.so
 loadmodule load_balancer.so

 #-- avpops params -
 modparam(avpops, db_url, mysql://opensips:opensipsrw@localhost
 /opensips)
 modparam(avpops, avp_table, usr_preferences)

 #-- load the dpid field to a pseudo-variable $avp(s:dpid) --
 modparam(auth_db, load_credentials, $avp(s:rpid)=rpid
 ;$avp(s:countrycode)=contrycode;$avp(s:areacode)=areacode)
 modparam(dialplan, db_url,mysql://opensips:opensipsrw@localhost
 /opensips)

 ## attribute of the matched line will be store in the $avp(s:dest)
 modparam(dialplan, attrs_pvar, $avp(s:dest))



 # - drouting params -
 #modparam(drouting, sort_order, 0)
 modparam(drouting, use_domain, 1)
 modparam(drouting,db_url, mysql://opensips:opensipsrw@localhost
 /opensips)
 modparam(drouting, probing_interval, 60)
 modparam(drouting, probing_from, sip:pinger@x.x.x.x)
 modparam(drouting, probing_method, OPTIONS)
 modparam(drouting, probing_reply_codes, 501, 403, 404)

 # - Group 
 #modparam(permissions, db_mode, 1)
 modparam(group,db_url,mysql://opensips:opensipsrw@localhost
 /opensips)

 # - Permissions 
 #modparam(permissions, db_mode, 1)
 modparam(permissions,db_url,mysql://opensips:opensipsrw@localhost
 /opensips)

 # - mi_fifo params -
 modparam(mi_fifo, fifo_name, /tmp/opensips_fifo)
 modparam(mi_fifo, fifo_mode, 0666)


 modparam(dialog, dlg_flag, 13)
 modparam(dialog, db_mode, 1)
 modparam(dialog, db_url, mysql://opensips:opensipsrw@localhost
 /opensips)
 modparam(dialog, timeout_avp, $avp(i:30))
 modparam(dialog, default_timeout, 3600)

 # - rr params -
 # add value to ;lr param to cope with most of the UAs
 modparam(rr, enable_full_lr, 1)
 # do not append from tag to the RR (no need for this script)
 modparam(rr, append_fromtag, 0)


 # - Load Balancer -
 modparam(load_balancer, db_url,mysql://opensips:opensipsrw@localhost
 /opensips)
 modparam(load_balancer, probing_interval, 60)
 modparam(load_balancer, probing_method, INFO)
 modparam(load_balancer, probing_from, sip:1000@x.x.x.x)
 modparam(load_balancer, db_table, load_balancer)
 modparam(load_balancer, probing_reply_codes, 501, 403, 404)

 # - registrar params -
 /* uncomment the next line not to allow more than 10 contacts per AOR */
 #modparam(registrar, max_contacts, 10)


 # - usrloc params -

 modparam(usrloc, db_mode,   0)

 /* uncomment the following lines if you want to enable DB persistency
for location entries */
 modparam(usrloc, db_mode,   2)
 modparam(usrloc, db_url, mysql://opensips:opensipsrw@localhost
 /opensips)


 # - uri params -
 modparam(uri, use_uri_table, 0)


 # - acc params -
 /* what sepcial events should be accounted ? */
 modparam(acc, early_media, 0)
 modparam(acc, report_ack, 0)
 modparam(acc, report_cancels, 0)
 modparam(acc, detect_direction, 0)
 modparam(acc, failed_transaction_flag, 1)
 modparam(acc, log_level, 1)
 modparam(acc, log_flag, 1)
 modparam(acc, log_missed_flag, 1)
 modparam(acc, db_flag, 1)
 modparam(acc, db_missed_flag, 2)
 modparam(acc, aaa_url, radius:/etc/radiusclient-ng/radiusclient.conf)
 # Point the configuration file
 modparam(acc, service_type, 15) # Set the service_type to 15
 modparam(acc, aaa_flag, 1)
 modparam(acc, aaa_missed_flag, 1)
 modparam(acc, 

Re: [OpenSIPS-Users] Load balancer not able to send the calls to second sip server

2011-06-13 Thread Tushar Jain
Hi,

I tried to debug, and found that after some calls resources for both the sip
servers are to be 0 (selected for LB set with free=0 (max=0)) though max
resource should be 5 and 4 respectively  as set in database

mysql select * from load_balancer;
++--+---+---++-+
| id | group_id | dst_uri | resources |
probe_mode | description |
+++---+---+---+-+
|  1 |2| sip:OpenSIPs@x.x.x.1  | sip=5 |  2
  | SW#1|
|  2 |2| sip:OpenSIPs@x.x.x.2  | sip=4 |  2
  | SW#2|
++--+---+---++-+
2 rows in set (0.00 sec)

Logs of a call when the user get service full message-
--

Jun 13 13:19:39 opensips /sbin/opensips[28951]:
DBG:load_balancer:do_load_balance: found requested (0) resource sip

Jun 13 13:19:39 opensips /sbin/opensips[28951]: DBG:dialog:build_new_dlg:
new dialog 0xaf3a30e0
(c=b572b37109405e2cZTQ4M2IyNWE0MDhmNjIwZTJlNzdiYTJiZjA5NWM3Yzc.,f=sip:1000@x.x.x.x
,t=sip:12127773456@OpenSIPs,ft=654b3f0e) on hash 2221

Jun 13 13:19:39 opensips /sbin/opensips[28951]: DBG:core:parse_headers:
flags=

Jun 13 13:19:39 opensips /sbin/opensips[28951]: DBG:dialog:init_leg_info:
route_set , contact sip:1000@x.x.x.x:62516, cseq 1 and bind_addr
udp:x.x.x.x:5060

Jun 13 13:19:39 opensips /sbin/opensips[28951]: DBG:dialog:dlg_add_leg_info:
set leg 0 for 0xaf3a30e0: tag=654b3f0e rcseq=1

Jun 13 13:19:39 opensips /sbin/opensips[28951]: DBG:dialog:link_dlg: ref dlg
0xaf3a30e0 with 3 - 3

Jun 13 13:19:39 opensips /sbin/opensips[28951]: DBG:rr:add_rr_param: adding
(;did=da8.8b87f721) 0x81b5c24

Jun 13 13:19:39 opensips /sbin/opensips[28951]:
DBG:load_balancer:do_load_balance: destination sip:OpenSIPs@x.x.x.1
selected for LB set with free=0 (max=0)

Jun 13 13:19:39 opensips /sbin/opensips[28951]:
DBG:load_balancer:do_load_balance: destination sip:OpenSIPs@x.x.x.2
selected for LB set with free=0 (max=0)

Jun 13 13:19:39 opensips /sbin/opensips[28951]:
DBG:load_balancer:do_load_balance: no destination found

Jun 13 13:19:39 opensips /sbin/opensips[28951]: DBG:core:comp_scriptvar: int
26 : -2 / 0

Please let me know how to make the LB work effectively
-- 
Regards

Tushar Jain


two roads diverged in a wood, and I - I took the one less traveled by, and
that has made all the difference

--Robert Frost 
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer not able to send the calls to second sip server

2011-06-12 Thread Robert Thomas
Can you please share your opensips.cfg file

On Sun, Jun 12, 2011 at 10:20 AM, Tushar Jain tusshar.j...@gmail.comwrote:

 I am trying to make opensips's load balancer work with 2 sip server(voip
 switch). load balancer module was able to locate the sip servers and their
 resources but as soon as resources of the first voip server exhausts I start
 getting error call failed service full and opensips start connecting calls
 again only after restarting the services of opensips.

 I tried to go through the logs and found a error that load balancer is not
 able to create dialog. I tried to look for this error without any success.

 ERROR:load_balancer:do_load_balance: failed to create dialog


 Please help me in making my load balancer work properly.
 --
 Thanks  Regards

 Tushar Jain


 two roads diverged in a wood, and I - I took the one less traveled by, and
 that has made all the difference

 --Robert Frost 

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users




-- 
Robert
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer not able to send the calls to second sip server

2011-06-12 Thread Tushar Jain
Hi Robert,

Thanks for looking into my problem, here I am pasting my opensips.cfg file-


### Global Parameters #

debug=6
log_stderror=no
log_facility=LOG_LOCAL0

fork=yes
children=4

port=5060

listen=udp:x.x.x.x:5060

### Modules Section 

mpath=//lib/opensips/modules/

loadmodule db_mysql.so
loadmodule signaling.so
loadmodule sl.so
loadmodule tm.so
loadmodule rr.so
loadmodule maxfwd.so
loadmodule usrloc.so
loadmodule registrar.so
loadmodule textops.so
loadmodule mi_fifo.so
loadmodule uri.so
loadmodule xlog.so
loadmodule acc.so
loadmodule siptrace.so
loadmodule auth.so
loadmodule auth_db.so
loadmodule alias_db.so
loadmodule domain.so
loadmodule permissions.so
loadmodule group.so
loadmodule drouting.so
loadmodule avpops.so
loadmodule dialplan.so
loadmodule aaa_radius.so
loadmodule dialog.so
loadmodule load_balancer.so

#-- avpops params -
modparam(avpops, db_url, mysql://opensips:opensipsrw@localhost
/opensips)
modparam(avpops, avp_table, usr_preferences)

#-- load the dpid field to a pseudo-variable $avp(s:dpid) --
modparam(auth_db, load_credentials, $avp(s:rpid)=rpid
;$avp(s:countrycode)=contrycode;$avp(s:areacode)=areacode)
modparam(dialplan, db_url,mysql://opensips:opensipsrw@localhost
/opensips)

## attribute of the matched line will be store in the $avp(s:dest)
modparam(dialplan, attrs_pvar, $avp(s:dest))

# - drouting params -
#modparam(drouting, sort_order, 0)
modparam(drouting, use_domain, 1)
modparam(drouting,db_url, mysql://opensips:opensipsrw@localhost
/opensips)
modparam(drouting, probing_interval, 60)
modparam(drouting, probing_from, sip:pinger@x.x.x.x)
modparam(drouting, probing_method, OPTIONS)
modparam(drouting, probing_reply_codes, 501, 403, 404)

# - Group 
modparam(group,db_url,mysql://opensips:opensipsrw@localhost/opensips)

# - mi_fifo params -
modparam(mi_fifo, fifo_name, /tmp/opensips_fifo)
modparam(mi_fifo, fifo_mode, 0666)
modparam(dialog, dlg_flag, 13)
modparam(dialog, db_mode, 1)
modparam(dialog, db_url, mysql://opensips:opensipsrw@localhost
/opensips)
modparam(dialog, timeout_avp, $avp(i:30))
modparam(dialog, default_timeout, 3600)


# - Load Balancer -
modparam(load_balancer, db_url,mysql://opensips:opensipsrw@localhost
/opensips)
modparam(load_balancer, probing_interval, 60)
modparam(load_balancer, probing_method, INFO)
modparam(load_balancer, probing_from, sip:1000@x.x.x.x)
modparam(load_balancer, db_table, load_balancer)
modparam(load_balancer, probing_reply_codes, 501, 403, 404)

# - registrar params -
/* uncomment the next line not to allow more than 10 contacts per AOR */
#modparam(registrar, max_contacts, 10)


# - usrloc params -

modparam(usrloc, db_mode,   0)

/* uncomment the following lines if you want to enable DB persistency
   for location entries */
modparam(usrloc, db_mode,   2)
modparam(usrloc, db_url, mysql://opensips:opensipsrw@localhost
/opensips)


# - uri params -
modparam(uri, use_uri_table, 0)


# - acc params -
/* what sepcial events should be accounted ? */
modparam(acc, early_media, 0)
modparam(acc, report_ack, 0)
modparam(acc, report_cancels, 0)
modparam(acc, detect_direction, 0)
modparam(acc, failed_transaction_flag, 1)
modparam(acc, log_level, 1)
modparam(acc, log_flag, 1)
modparam(acc, log_missed_flag, 1)
modparam(acc, db_flag, 1)
modparam(acc, db_missed_flag, 2)
modparam(acc, aaa_url, radius:/etc/radiusclient-ng/radiusclient.conf)
# Point the configuration file
modparam(acc, service_type, 15) # Set the service_type to 15
modparam(acc, aaa_flag, 1)
modparam(acc, aaa_missed_flag, 1)

# - auth_db params -
/* uncomment the following lines if you want to enable the DB based
   authentication */

modparam(auth_db, calculate_ha1, yes)
modparam(auth_db, password_column, password)

modparam(auth_db, db_url,mysql://opensips:opensipsrw@localhost
/opensips)
modparam(auth_db, load_credentials, )

### Routing Logic 

# main request routing logic

route{

setflag(22);
sip_trace();

if (!mf_process_maxfwd_header(10)) {
sl_send_reply(483,Too Many Hops);
exit;
}

# Sequential requests section #

if (has_totag()) {
# sequential request withing a dialog should
# take the path determined by record-routing
if (loose_route()) {
if (is_method(BYE)) {
setflag(1); # do accounting ...
setflag(3); # ... even if the transaction fails
} else if (is_method(INVITE)) {
# even if in most of the cases is useless, do RR for
# re-INVITEs alos, as some buggy clients do change route set
# during the dialog.
record_route();
}
# route it out to whatever destination was set by loose_route()
# in $du (destination URI).
route(1);
} else {
if ( is_method(ACK) ) {
if ( t_check_trans() ) {
t_relay();
exit;
} else {
exit;
}
}
sl_send_reply(404,Not here);
}
exit;
}


# initial requests section #

# CANCEL processing
if (is_method(CANCEL))
{
if (t_check_trans())
t_relay();
exit;

Re: [OpenSIPS-Users] Load Balancer Failing on search_body - Looks okay?

2011-04-14 Thread Alan Frisch
Bogdan,

That is correct... however, I replaced the search_body with
codec_exists and seems to be fine for now.  Perhaps over this weekend,
I'll run some tests with the old config and see what pops up in the
logs.

AF

On Wed, Apr 13, 2011 at 9:58 AM, Bogdan-Andrei Iancu
bog...@opensips.org wrote:
 Hi Alan,

 So if I understand correctly, the load_balance() function fails and you send
 the 503 from the script ? if so, do you get anything relevant in logs (about
 the failure)? try to set debug=6 to get more info (not recommended if a
 production system).

 Regards,
 Bogdan

 On 04/11/2011 05:22 AM, Alan Frisch wrote:

 For some odd reason my OpenSIPs load_balancer module seems to fail
 with certain clients.  Works fine with Asterisk and some other
 servers, but have had the occasional client get a 503 returned to it.
 In this case, it's a SIP application for an Android phone... I get a
 bug - cannot find request resource in dst in my logs.

 Relevant OpenSIPs code is below.  I'm searching for PCMU and PCMA, for
 some reason the tutorial uses search_body with G711 but you never
 see G711 in SDP, AFAIK.

 if (!search_body([Pp][Cc][Mm][Uu])  !search_body([Pp][Cc][Mm][Aa]))
 {
                 if (!load_balance(1,transc;pstn,1))
                 {
                         t_reply(503, Circuit Unavailable - TP);
                         exit;
                 }
         } else {
                 if (!load_balance(1,pstn,1))
                 {
                         t_reply(503, Circuit Unavailable - P);
                         exit;
                 }
         }
 }

 The incoming SDP is:

 v=0
 o=- 3511475179 3511475179 IN IP4 99.28.22.29
 s=pjmedia
 c=IN IP4 99.228.252.229
 t=0 0
 a=X-nat:8
 m=audio 4000 RTP/AVP 0 8 18 101
 a=rtcp:4001 IN IP4 99.28.22.29
 a=rtpmap:0 PCMU/8000
 a=rtpmap:8 PCMA/8000
 a=rtpmap:18 G729/8000
 a=fmtp:18 annexb=no
 a=sendrecv
 a=rtpmap:101 telephone-event/8000
 a=fmtp:101 0-15


 My LB list looks like this:

 Destination:: sip:x.x.x.10:5060 id=1 group=1 enabled=yes auto-re=on
         Resource:: pstn max=30 load=5
         Resource:: transc max=30 load=1
 Destination:: sip:x.x.x.11:5060 id=10 group=1 enabled=yes auto-re=on
         Resource:: pstn max=40 load=7
         Resource:: transc max=40 load=2

 The destination machines in the LB list are not loaded down but the
 call falls down to the second part (since no transcoding is needed)
 but then fails totally.  Is there a way to find out what resource it
 is trying to look for?

 Any help is appreciated!

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users



 --
 Bogdan-Andrei Iancu
 OpenSIPS eBootcamp - 2nd of May 2011
 OpenSIPS solutions and know-how


 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer Failing on search_body - Looks okay?

2011-04-13 Thread Bogdan-Andrei Iancu

Hi Alan,

So if I understand correctly, the load_balance() function fails and you 
send the 503 from the script ? if so, do you get anything relevant in 
logs (about the failure)? try to set debug=6 to get more info (not 
recommended if a production system).


Regards,
Bogdan

On 04/11/2011 05:22 AM, Alan Frisch wrote:

For some odd reason my OpenSIPs load_balancer module seems to fail
with certain clients.  Works fine with Asterisk and some other
servers, but have had the occasional client get a 503 returned to it.
In this case, it's a SIP application for an Android phone... I get a
bug - cannot find request resource in dst in my logs.

Relevant OpenSIPs code is below.  I'm searching for PCMU and PCMA, for
some reason the tutorial uses search_body with G711 but you never
see G711 in SDP, AFAIK.

if (!search_body([Pp][Cc][Mm][Uu])  !search_body([Pp][Cc][Mm][Aa])) {
 if (!load_balance(1,transc;pstn,1))
 {
 t_reply(503, Circuit Unavailable - TP);
 exit;
 }
 } else {
 if (!load_balance(1,pstn,1))
 {
 t_reply(503, Circuit Unavailable - P);
 exit;
 }
 }
}

The incoming SDP is:

v=0
o=- 3511475179 3511475179 IN IP4 99.28.22.29
s=pjmedia
c=IN IP4 99.228.252.229
t=0 0
a=X-nat:8
m=audio 4000 RTP/AVP 0 8 18 101
a=rtcp:4001 IN IP4 99.28.22.29
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=sendrecv
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15


My LB list looks like this:

Destination:: sip:x.x.x.10:5060 id=1 group=1 enabled=yes auto-re=on
 Resource:: pstn max=30 load=5
 Resource:: transc max=30 load=1
Destination:: sip:x.x.x.11:5060 id=10 group=1 enabled=yes auto-re=on
 Resource:: pstn max=40 load=7
 Resource:: transc max=40 load=2

The destination machines in the LB list are not loaded down but the
call falls down to the second part (since no transcoding is needed)
but then fails totally.  Is there a way to find out what resource it
is trying to look for?

Any help is appreciated!

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




--
Bogdan-Andrei Iancu
OpenSIPS eBootcamp - 2nd of May 2011
OpenSIPS solutions and know-how


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer Failing on search_body - Looks okay?

2011-04-10 Thread Alan Frisch
FYI I mashed up the IPs in the SDP for privacy reasons... so that's why 
they look weird. :)


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer probing from incorrect interface

2010-12-01 Thread Bill W.
Hey Bogdan,

Thanks so much for your help.  For the benefit of the group, I
eventually came up with a work-around for this.

I use the following in opensips.cfg
listen=udp:probe-internal:5090
listen=udp:probe-external:5090

Then in the hosts file on machine A I put:
10.0.10.1 probe-internal
66.180.205.11 probe-external

And on machine B I put:
10.0.10.2 probe-internal
66.180.205.12 probe-external

So when opensips fails over from A to B, it picks up the new probing-IP
from the hosts file. Then the probes from the default IP as selected by
the kernel routing table work correctly, as they are coming from a port
other than 5060.

Hope this helps,
Bill

On 11/24/10 6:10 AM, Bogdan-Andrei Iancu wrote:
 Bill W. wrote:
 Hello Bogdan,

 Okay I've been researching this more.  I am not a programmer, but it
 looks like get_out_socket and find_si in forward.c and socket_info.c are
 just comparing ip addresses, and when opensips is trying to probe an
 interface on the same machine, but is not bound to that IP, then source
 IP address selection fails.

 The challenge is that my instance of opensips is an HA service between
 two machines, so I cannot simply specify IPs to listen on in
 opensips.cfg because the source IPs I need to probe from will change
 depending on which machine opensips is running on.
   
 That is not possible - you cannot change at runtime the interfaces
 opensips works with - you cannot make it to listen on a newly added
 interface, you cannot make it stop using an already configured interface.
 
 Each time you change the interfaces on the server, if you need to
 restart opensips.
 
 It looks like the solution to make this work with the existing
 get_out_socket code is to be able to specify interface aliases in the
 listen= directive.

 If I could do something like this:
 listen=udp:eth0:5090# for probing eth0 IP alias
 listen=udp:eth0.0:5090# for probing eth0:0 IP alias
 listen=udp:eth1.1:5090# for probing eth1:1 IP alias

 Then opensips could pick the appropriate IP from the interface/alias on
 the machine where it is running.

 If that's too complex, then the brute-force method would be to allow
 this:
 listen=udp:*:5090# for probing
   
 
 to be honest, never tried something like that - let me know if it works
 for you
 
 Regards,
 Bogdan
 I can't simply use the port= directive because I've got other services
 running on 5060.

 Thoughts? Thanks!
 Bill



 On 11/12/10 8:27 PM, Bill W wrote:
  
 Hi Bogdan,

 Thanks so much for explaining how interface selection works.

 Unfortunately the other interfaces all have daemons listening on port
 5060 and are in production and I can't simply reallocate IPs.

 So for the error messages below, is the problem that opensips is trying
 to send out a packet on the automatically selected IP but since port
 5060 is occupied on that address, the socket is failing?

 If so, is it possible to specify a different source port so the packet
 will go out?


 Thanks,
 Bill
 

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

   
 
 

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer probing from incorrect interface

2010-11-24 Thread Bogdan-Andrei Iancu

Hi Bill,

hmm...that's a tough one as, again, the kernel, when routing to 
destination 10.0.10.1 seas as alternatives both .2 and .3 local 
interfaces, but for whatever reason (kernel specific), .3 is used 
(default ? first configured?)...


And how the auto detection is done in opensips, you cannot simply do 
like: detect .3 - it is not used by opensips - detect next one, .2 - 
is used by opensips, let's go for it.


maybe switching on .3 on a different port 5070 will do th trick.

Regards,
Bogdan

Bill W wrote:

Hi Bogdan,

Thanks so much for explaining how interface selection works.

Unfortunately the other interfaces all have daemons listening on port 
5060 and are in production and I can't simply reallocate IPs.


So for the error messages below, is the problem that opensips is 
trying to send out a packet on the automatically selected IP but since 
port 5060 is occupied on that address, the socket is failing?


If so, is it possible to specify a different source port so the packet 
will go out?



Thanks,
Bill



On 11/12/2010 5:43 AM, Bogdan-Andrei Iancu wrote:

Hi Bill,

I was strictly speaking about the mhomed=1 case. Opensips doing
detection (based on default IP routing rules from kernel) sees that it
should use first available interface (as returned by kernel)..it cannot
simply pick up all possible and see which one is also listening on.

in your case, if 10.0.10.2 and 10.0.10.3 doing the same, but 10.0.10.3
is used by default by kernel for reaching 10.0.10.xx network, simply use
10.0.10.3 for opensips also.

Regards,
Bogdan

Bill W wrote:

Hey Bogdan,

I think we're confusing two issues.

The first issue was when mhomed=0, it was trying to options ping the
internal interface with an external IP, which clearly won't work, as
you described below.

The second issue is when I set mhomed=1, opensips is cannot options
ping anything at all because it's trying to bind to an IP that doesn't
belong to opensips.

For example:
DBG:tm:t_uac: next_hop=sip:10.0.10.1
DBG:core:mk_proxy: doing DNS lookup...
ERROR:core:get_out_socket: -- detected IP 10.0.10.2,proto=1
ERROR:tm:uri2sock: no corresponding socket for af 2
ERROR:tm:t_uac: no socket found
ERROR:load_balancer:lb_do_probing: probing failed

10.0.10.1 is on another machine
10.0.10.2 is on this machine
10.0.10.3 is on this machine, and allocated to opensips via listen=

Opensips should be binding to 10.0.1.3 which is specified in the
listen= directive, not 10.0.10.2, which is another IP on the box but
is not allocated to opensips.

Summary:
With mhomed=1 opensips is detecting the correct interface to ping
from, but it is selecting an IP on that interface that is not
specified in the listen= directives.

Hopefully I explained the behavior clearly.

Thanks,
Bill.





On 11/11/2010 11:39 AM, Bogdan-Andrei Iancu wrote:

It looks to me more like a misconfiguration on network level for the
machine ...Opensips tries to detect the interface with the default 
route
to the destination IP (the info id provided by kernel)..So if the 
kernel

sees 66.180.205.11 as default interface for reaching a private
IP.does look sane to me :)

Regards,
Bogdan

Bill W wrote:

Ahhh, I see what's going on.

Opensips is trying to probe from a different IP on that interface
instead of the IP alias opensips bound to.

For example, on the public interface I have IP 66.180.205.11
Then I have an IP alias of 66.180.205.3 on that same interface:
eth0 66.180.205.11 freeswitch:5060
eth0:0 66.180.205.3 opensips:5060

DBG:tm:t_uac: next_hop=sip:66.180.205.11
DBG:core:mk_proxy: doing DNS lookup...
ERROR:core:get_out_socket: -- detected IP 66.180.205.11,proto=1
ERROR:core:get_out_socket: no socket found
ERROR:tm:uri2sock: no corresponding socket for af 2
ERROR:tm:t_uac: no socket found
ERROR:load_balancer:lb_do_probing: probing failed

It's not getting the IP from the listen= directive but from an
interface probe, which is getting the wrong IP.


On 11/11/2010 6:29 AM, Bogdan-Andrei Iancu wrote:

Hi Bill,

could you try the attached patch along mhomed option? the patch will
simply print what is the IP opensips is trying to use for the 
outgoing

probes

Regards,
Bogdan

Bill W wrote:

Hey Bogdan,

Yes, I have 3 listen= lines; two with public IPs and one with a
private IP.

When I remove the mhomed=1 then things work as intended except for
the
probing. I can proxy traffic correctly on all interfaces.

When I enable mhomed=1, then I get the errors below.

Thanks,
Bill


On 11/10/2010 5:38 AM, Bogdan-Andrei Iancu wrote:

Hi Bill,

is your opensips actually listening (configured as listener in
.cfg) on
a interface in the private network (where the probing needs to be
done) ??

Regards,
Bogdan

Bill W wrote:

Hey Bogdan,

I enabled the mhomed=1 parameter, and now I'm getting a bunch of
errors in the logs.

ERROR:tm:t_uac: no socket found
ERROR:load_balancer:lb_do_probing: probing failed
ERROR:core:get_out_socket: no socket found
ERROR:tm:uri2sock: no corresponding socket for af 2

Thoughts?


Re: [OpenSIPS-Users] Load balancer probing from incorrect interface

2010-11-24 Thread Bogdan-Andrei Iancu

Bill W. wrote:

Hello Bogdan,

Okay I've been researching this more.  I am not a programmer, but it
looks like get_out_socket and find_si in forward.c and socket_info.c are
just comparing ip addresses, and when opensips is trying to probe an
interface on the same machine, but is not bound to that IP, then source
IP address selection fails.

The challenge is that my instance of opensips is an HA service between
two machines, so I cannot simply specify IPs to listen on in
opensips.cfg because the source IPs I need to probe from will change
depending on which machine opensips is running on.
  
That is not possible - you cannot change at runtime the interfaces 
opensips works with - you cannot make it to listen on a newly added 
interface, you cannot make it stop using an already configured interface.


Each time you change the interfaces on the server, if you need to 
restart opensips.



It looks like the solution to make this work with the existing
get_out_socket code is to be able to specify interface aliases in the
listen= directive.

If I could do something like this:
listen=udp:eth0:5090# for probing eth0 IP alias
listen=udp:eth0.0:5090  # for probing eth0:0 IP alias
listen=udp:eth1.1:5090  # for probing eth1:1 IP alias

Then opensips could pick the appropriate IP from the interface/alias on
the machine where it is running.

If that's too complex, then the brute-force method would be to allow this:
listen=udp:*:5090   # for probing
  


to be honest, never tried something like that - let me know if it works 
for you


Regards,
Bogdan

I can't simply use the port= directive because I've got other services
running on 5060.

Thoughts? Thanks!
Bill



On 11/12/10 8:27 PM, Bill W wrote:
  

Hi Bogdan,

Thanks so much for explaining how interface selection works.

Unfortunately the other interfaces all have daemons listening on port
5060 and are in production and I can't simply reallocate IPs.

So for the error messages below, is the problem that opensips is trying
to send out a packet on the automatically selected IP but since port
5060 is occupied on that address, the socket is failing?

If so, is it possible to specify a different source port so the packet
will go out?


Thanks,
Bill



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

  



--
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
www.voice-system.ro


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer probing from incorrect interface

2010-11-22 Thread Bill W.
Hello Bogdan,

Okay I've been researching this more.  I am not a programmer, but it
looks like get_out_socket and find_si in forward.c and socket_info.c are
just comparing ip addresses, and when opensips is trying to probe an
interface on the same machine, but is not bound to that IP, then source
IP address selection fails.

The challenge is that my instance of opensips is an HA service between
two machines, so I cannot simply specify IPs to listen on in
opensips.cfg because the source IPs I need to probe from will change
depending on which machine opensips is running on.

It looks like the solution to make this work with the existing
get_out_socket code is to be able to specify interface aliases in the
listen= directive.

If I could do something like this:
listen=udp:eth0:5090# for probing eth0 IP alias
listen=udp:eth0.0:5090  # for probing eth0:0 IP alias
listen=udp:eth1.1:5090  # for probing eth1:1 IP alias

Then opensips could pick the appropriate IP from the interface/alias on
the machine where it is running.

If that's too complex, then the brute-force method would be to allow this:
listen=udp:*:5090   # for probing

I can't simply use the port= directive because I've got other services
running on 5060.

Thoughts? Thanks!
Bill



On 11/12/10 8:27 PM, Bill W wrote:
 Hi Bogdan,
 
 Thanks so much for explaining how interface selection works.
 
 Unfortunately the other interfaces all have daemons listening on port
 5060 and are in production and I can't simply reallocate IPs.
 
 So for the error messages below, is the problem that opensips is trying
 to send out a packet on the automatically selected IP but since port
 5060 is occupied on that address, the socket is failing?
 
 If so, is it possible to specify a different source port so the packet
 will go out?
 
 
 Thanks,
 Bill

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer probe _mode=1 bug?

2010-11-14 Thread Bogdan-Andrei Iancu

Hi Bill,

Perfect! I backported the fix to 1.6 also.

Thanks and regards,
Bogdan

Bill W wrote:

Hey Bogdan,

Looks like your patch is working.  My probe interval was set to  15 
seconds, but I increased it to 60 for testing.


The disabling, probing, and re-enabling appear to be working correctly now.

Thanks so much!

Bill


On 11/8/2010 7:24 AM, Bogdan-Andrei Iancu wrote:
  

Hi Bill,

What is the probing interval you configured ?
http://www.opensips.org/html/docs/modules/1.6.x/load_balancer.html#id250040

Could you test the attached patch ? (same as revision 7356 on trunk).

Regards,
Bogdan

Bill W. wrote:


Hello Bogdan,

This is how I mark the destination down:

failure_route[1] {
if (t_check_status((408)|(5[0-9][0-9]))) {
lb_disable();
if (load_balance(1,sip,1)) {
t_on_failure(1);
t_relay();
} else {
t_reply(503, Service Unavailable);
}
}
}


opensipsctl fifo lb_list shows: enabled=no auto-re=on

I do not see any probes from opensips when probe_mode in the database
is set to 1 which should probe the destination when it's marked down.
When probe_mode is set to 2, and opensips probes continuously,
it works fine.

The docs say: (1) - probing only when the destination is in disabled
mode (disabling via MI command will competely stop the probing also).
The destination will be automatically re-enabled when the probing will
succeed next time;

So when I disable via lb_disable(), it is acting like I did it from the
MI, and disabling the probing too.

Thoughts?

Thanks,
Bill

On 8/1/10 1:14 PM, Bogdan-Andrei Iancu wrote:
  

Hi Bill,

How do you mark down the destination (MI ?) and what state are you
setting ?

Also, after marking it down, do you see any new pings being sent to
that destination?

Something was changed during rev 6653:
http://opensips.svn.sourceforge.net/opensips/?rev=6653view=rev

But the new code seams ok for me - the LB_DST_STAT_NOEN_FLAG flag is
set when disabling the destination via MI and with this flag set, no
more pings are sent.

Regards,
Bogdan

Bill W wrote:


Hello Bogdan,

I'm experiencing the same problem as I did before, with the load
balancer not re-enabling a device marked down.

If I go into the database and set probe_mode = 2, it re-enables the
device.

I'm currently running opensips 1.6.2-tls (x86_64/linux)

Did the patch get reverted?

Thanks!
Bill

Bogdan-Andrei Iancu wrote:
  

Super! I uploaded the fix on SVN.

Thanks and regards,
Bogdan

Bill W wrote:


Hey Bogdan,

It looks like that fixed it. Thanks so much!

Bill


Bogdan-Andrei Iancu wrote:
  

Hi Bill,

Could you please try the attached patch? It seams that there was
an issue with the the probing values in the code. Let me know if
the patch does solves your problem and I will upload it on SVN.

Regards,
Bogdan



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

  

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

  

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

  



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

  



--
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
15 - 19 November 2010, Edison, New Jersey, USA
www.voice-system.ro


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer probing from incorrect interface

2010-11-14 Thread Bogdan-Andrei Iancu

Hi Bill,

is your opensips actually listening (configured as listener in .cfg) on 
a interface in the private network (where the probing needs to be done) ??


Regards,
Bogdan

Bill W wrote:

Hey Bogdan,

I enabled the mhomed=1 parameter, and now I'm getting a bunch of errors 
in the logs.


ERROR:tm:t_uac: no socket found
ERROR:load_balancer:lb_do_probing: probing failed
ERROR:core:get_out_socket: no socket found
ERROR:tm:uri2sock: no corresponding socket for af 2

Thoughts?

Bill


On 11/8/2010 6:05 AM, Bogdan-Andrei Iancu wrote:
  

Hi Bill,

as you have a multi interface system, have you tried to enable the
mhomed global parameter?
 http://www.opensips.org/Resources/DocsCoreFcn16#toc60

Regards,
Bogdan

Bill W. wrote:


As an update, the load balancer probe appears to use the ip address
specified by the first listen= directive.

If I list the public IP first, then the probe tries to talk to the
internal IP from the external interface IP.


On 11/7/10 6:18 PM, Bill W. wrote:

  

Hello everyone,

I've got an opensips-1.6.3-tls installation using multiple interfaces
and load balancing.

My internal interface  is rfc1918 space and my external interface has
public IPs.
listen=udp:10.0.10.3:5060
listen=udp:66.180.205.3:5060


I have the following load_balancer configuration:
  id | group_id |  dst_uri  | probe_mode
+--+---+
   1 |1 | sip:66.180.205.11 |  2
   2 |1 | sip:66.180.205.12 |  2
   3 |2 | sip:10.0.10.1 |  2
   4 |2 | sip:10.0.10.2 |  2


What's happening is that the load balancer is trying to probe the public
IPs from the private interface IP (and failing of course).

tcpdump output on internal interface:
18:13:26.471734 IP 10.0.10.3.5060  66.180.205.11.5060: SIP, length:
18:13:28.473802 IP 10.0.10.3.5060  66.180.205.11.5060: SIP, length:


Thoughts?

Thanks,
Bill

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


  



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

  



--
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
15 - 19 November 2010, Edison, New Jersey, USA
www.voice-system.ro


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer probing from incorrect interface

2010-11-12 Thread Bogdan-Andrei Iancu

Hi Bill,

I was strictly speaking about the mhomed=1 case.  Opensips doing 
detection (based on default IP routing rules from kernel) sees that it 
should use first available interface (as returned by kernel)..it cannot 
simply pick up all possible and see which one is also listening on.


in your case, if 10.0.10.2  and 10.0.10.3 doing the same, but 10.0.10.3 
is used by default by kernel for reaching 10.0.10.xx network, simply use 
10.0.10.3 for opensips also.


Regards,
Bogdan

Bill W wrote:

Hey Bogdan,

I think we're confusing two issues.

The first issue was when mhomed=0, it was trying to options ping the 
internal interface with an external IP, which clearly won't work, as 
you described below.


The second issue is when I set mhomed=1, opensips is cannot options 
ping anything at all because it's trying to bind to an IP that doesn't 
belong to opensips.


For example:
DBG:tm:t_uac: next_hop=sip:10.0.10.1
DBG:core:mk_proxy: doing DNS lookup...
ERROR:core:get_out_socket: -- detected IP 10.0.10.2,proto=1
ERROR:tm:uri2sock: no corresponding socket for af 2
ERROR:tm:t_uac: no socket found
ERROR:load_balancer:lb_do_probing: probing failed

10.0.10.1 is on another machine
10.0.10.2 is on this machine
10.0.10.3 is on this machine, and allocated to opensips via listen=

Opensips should be binding to 10.0.1.3 which is specified in the 
listen= directive, not 10.0.10.2, which is another IP on the box but 
is not allocated to opensips.


Summary:
With mhomed=1 opensips is detecting the correct interface to ping 
from, but it is selecting an IP on that interface that is not 
specified in the listen= directives.


Hopefully I explained the behavior clearly.

Thanks,
Bill.





On 11/11/2010 11:39 AM, Bogdan-Andrei Iancu wrote:

It looks to me more like a misconfiguration on network level for the
machine ...Opensips tries to detect the interface with the default route
to the destination IP (the info id provided by kernel)..So if the kernel
sees 66.180.205.11 as default interface for reaching a private
IP.does look sane to me :)

Regards,
Bogdan

Bill W wrote:

Ahhh, I see what's going on.

Opensips is trying to probe from a different IP on that interface
instead of the IP alias opensips bound to.

For example, on the public interface I have IP 66.180.205.11
Then I have an IP alias of 66.180.205.3 on that same interface:
eth0 66.180.205.11 freeswitch:5060
eth0:0 66.180.205.3 opensips:5060

DBG:tm:t_uac: next_hop=sip:66.180.205.11
DBG:core:mk_proxy: doing DNS lookup...
ERROR:core:get_out_socket: -- detected IP 66.180.205.11,proto=1
ERROR:core:get_out_socket: no socket found
ERROR:tm:uri2sock: no corresponding socket for af 2
ERROR:tm:t_uac: no socket found
ERROR:load_balancer:lb_do_probing: probing failed

It's not getting the IP from the listen= directive but from an
interface probe, which is getting the wrong IP.


On 11/11/2010 6:29 AM, Bogdan-Andrei Iancu wrote:

Hi Bill,

could you try the attached patch along mhomed option? the patch will
simply print what is the IP opensips is trying to use for the outgoing
probes

Regards,
Bogdan

Bill W wrote:

Hey Bogdan,

Yes, I have 3 listen= lines; two with public IPs and one with a
private IP.

When I remove the mhomed=1 then things work as intended except for 
the

probing. I can proxy traffic correctly on all interfaces.

When I enable mhomed=1, then I get the errors below.

Thanks,
Bill


On 11/10/2010 5:38 AM, Bogdan-Andrei Iancu wrote:

Hi Bill,

is your opensips actually listening (configured as listener in
.cfg) on
a interface in the private network (where the probing needs to be
done) ??

Regards,
Bogdan

Bill W wrote:

Hey Bogdan,

I enabled the mhomed=1 parameter, and now I'm getting a bunch of
errors in the logs.

ERROR:tm:t_uac: no socket found
ERROR:load_balancer:lb_do_probing: probing failed
ERROR:core:get_out_socket: no socket found
ERROR:tm:uri2sock: no corresponding socket for af 2

Thoughts?

Bill


On 11/8/2010 6:05 AM, Bogdan-Andrei Iancu wrote:

Hi Bill,

as you have a multi interface system, have you tried to enable the
mhomed global parameter?
http://www.opensips.org/Resources/DocsCoreFcn16#toc60

Regards,
Bogdan

Bill W. wrote:
As an update, the load balancer probe appears to use the ip 
address

specified by the first listen= directive.

If I list the public IP first, then the probe tries to talk to 
the

internal IP from the external interface IP.


On 11/7/10 6:18 PM, Bill W. wrote:


Hello everyone,

I've got an opensips-1.6.3-tls installation using multiple
interfaces
and load balancing.

My internal interface is rfc1918 space and my external
interface has
public IPs.
listen=udp:10.0.10.3:5060
listen=udp:66.180.205.3:5060


I have the following load_balancer configuration:
id | group_id | dst_uri | probe_mode
+--+---+
1 | 1 | sip:66.180.205.11 | 2
2 | 1 | sip:66.180.205.12 | 2
3 | 2 | sip:10.0.10.1 | 2
4 | 2 | sip:10.0.10.2 | 2


What's happening is that the load balancer is trying to 

Re: [OpenSIPS-Users] Load balancer probing from incorrect interface

2010-11-12 Thread Bill W

Hi Bogdan,

Thanks so much for explaining how interface selection works.

Unfortunately the other interfaces all have daemons listening on port 
5060 and are in production and I can't simply reallocate IPs.


So for the error messages below, is the problem that opensips is trying 
to send out a packet on the automatically selected IP but since port 
5060 is occupied on that address, the socket is failing?


If so, is it possible to specify a different source port so the packet 
will go out?



Thanks,
Bill



On 11/12/2010 5:43 AM, Bogdan-Andrei Iancu wrote:

Hi Bill,

I was strictly speaking about the mhomed=1 case. Opensips doing
detection (based on default IP routing rules from kernel) sees that it
should use first available interface (as returned by kernel)..it cannot
simply pick up all possible and see which one is also listening on.

in your case, if 10.0.10.2 and 10.0.10.3 doing the same, but 10.0.10.3
is used by default by kernel for reaching 10.0.10.xx network, simply use
10.0.10.3 for opensips also.

Regards,
Bogdan

Bill W wrote:

Hey Bogdan,

I think we're confusing two issues.

The first issue was when mhomed=0, it was trying to options ping the
internal interface with an external IP, which clearly won't work, as
you described below.

The second issue is when I set mhomed=1, opensips is cannot options
ping anything at all because it's trying to bind to an IP that doesn't
belong to opensips.

For example:
DBG:tm:t_uac: next_hop=sip:10.0.10.1
DBG:core:mk_proxy: doing DNS lookup...
ERROR:core:get_out_socket: -- detected IP 10.0.10.2,proto=1
ERROR:tm:uri2sock: no corresponding socket for af 2
ERROR:tm:t_uac: no socket found
ERROR:load_balancer:lb_do_probing: probing failed

10.0.10.1 is on another machine
10.0.10.2 is on this machine
10.0.10.3 is on this machine, and allocated to opensips via listen=

Opensips should be binding to 10.0.1.3 which is specified in the
listen= directive, not 10.0.10.2, which is another IP on the box but
is not allocated to opensips.

Summary:
With mhomed=1 opensips is detecting the correct interface to ping
from, but it is selecting an IP on that interface that is not
specified in the listen= directives.

Hopefully I explained the behavior clearly.

Thanks,
Bill.





On 11/11/2010 11:39 AM, Bogdan-Andrei Iancu wrote:

It looks to me more like a misconfiguration on network level for the
machine ...Opensips tries to detect the interface with the default route
to the destination IP (the info id provided by kernel)..So if the kernel
sees 66.180.205.11 as default interface for reaching a private
IP.does look sane to me :)

Regards,
Bogdan

Bill W wrote:

Ahhh, I see what's going on.

Opensips is trying to probe from a different IP on that interface
instead of the IP alias opensips bound to.

For example, on the public interface I have IP 66.180.205.11
Then I have an IP alias of 66.180.205.3 on that same interface:
eth0 66.180.205.11 freeswitch:5060
eth0:0 66.180.205.3 opensips:5060

DBG:tm:t_uac: next_hop=sip:66.180.205.11
DBG:core:mk_proxy: doing DNS lookup...
ERROR:core:get_out_socket: -- detected IP 66.180.205.11,proto=1
ERROR:core:get_out_socket: no socket found
ERROR:tm:uri2sock: no corresponding socket for af 2
ERROR:tm:t_uac: no socket found
ERROR:load_balancer:lb_do_probing: probing failed

It's not getting the IP from the listen= directive but from an
interface probe, which is getting the wrong IP.


On 11/11/2010 6:29 AM, Bogdan-Andrei Iancu wrote:

Hi Bill,

could you try the attached patch along mhomed option? the patch will
simply print what is the IP opensips is trying to use for the outgoing
probes

Regards,
Bogdan

Bill W wrote:

Hey Bogdan,

Yes, I have 3 listen= lines; two with public IPs and one with a
private IP.

When I remove the mhomed=1 then things work as intended except for
the
probing. I can proxy traffic correctly on all interfaces.

When I enable mhomed=1, then I get the errors below.

Thanks,
Bill


On 11/10/2010 5:38 AM, Bogdan-Andrei Iancu wrote:

Hi Bill,

is your opensips actually listening (configured as listener in
.cfg) on
a interface in the private network (where the probing needs to be
done) ??

Regards,
Bogdan

Bill W wrote:

Hey Bogdan,

I enabled the mhomed=1 parameter, and now I'm getting a bunch of
errors in the logs.

ERROR:tm:t_uac: no socket found
ERROR:load_balancer:lb_do_probing: probing failed
ERROR:core:get_out_socket: no socket found
ERROR:tm:uri2sock: no corresponding socket for af 2

Thoughts?

Bill


On 11/8/2010 6:05 AM, Bogdan-Andrei Iancu wrote:

Hi Bill,

as you have a multi interface system, have you tried to enable the
mhomed global parameter?
http://www.opensips.org/Resources/DocsCoreFcn16#toc60

Regards,
Bogdan

Bill W. wrote:

As an update, the load balancer probe appears to use the ip
address
specified by the first listen= directive.

If I list the public IP first, then the probe tries to talk to
the
internal IP from the external interface IP.


On 11/7/10 6:18 PM, Bill W. wrote:


Hello everyone,


Re: [OpenSIPS-Users] Load balancer probing from incorrect interface

2010-11-11 Thread Bogdan-Andrei Iancu

Hi Bill,

could you try the attached patch along mhomed option? the patch will 
simply print what is the IP opensips is trying to use for the outgoing 
probes


Regards,
Bogdan

Bill W wrote:

Hey Bogdan,

Yes, I have 3 listen= lines; two with public IPs and one with a 
private IP.


When I remove the mhomed=1 then things work as intended except for the 
probing.  I can proxy traffic correctly on all interfaces.


When I enable mhomed=1, then I get the errors below.

Thanks,
Bill


On 11/10/2010 5:38 AM, Bogdan-Andrei Iancu wrote:

Hi Bill,

is your opensips actually listening (configured as listener in .cfg) on
a interface in the private network (where the probing needs to be 
done) ??


Regards,
Bogdan

Bill W wrote:

Hey Bogdan,

I enabled the mhomed=1 parameter, and now I'm getting a bunch of
errors in the logs.

ERROR:tm:t_uac: no socket found
ERROR:load_balancer:lb_do_probing: probing failed
ERROR:core:get_out_socket: no socket found
ERROR:tm:uri2sock: no corresponding socket for af 2

Thoughts?

Bill


On 11/8/2010 6:05 AM, Bogdan-Andrei Iancu wrote:

Hi Bill,

as you have a multi interface system, have you tried to enable the
mhomed global parameter?
http://www.opensips.org/Resources/DocsCoreFcn16#toc60

Regards,
Bogdan

Bill W. wrote:

As an update, the load balancer probe appears to use the ip address
specified by the first listen= directive.

If I list the public IP first, then the probe tries to talk to the
internal IP from the external interface IP.


On 11/7/10 6:18 PM, Bill W. wrote:


Hello everyone,

I've got an opensips-1.6.3-tls installation using multiple 
interfaces

and load balancing.

My internal interface is rfc1918 space and my external interface has
public IPs.
listen=udp:10.0.10.3:5060
listen=udp:66.180.205.3:5060


I have the following load_balancer configuration:
id | group_id | dst_uri | probe_mode
+--+---+
1 | 1 | sip:66.180.205.11 | 2
2 | 1 | sip:66.180.205.12 | 2
3 | 2 | sip:10.0.10.1 | 2
4 | 2 | sip:10.0.10.2 | 2


What's happening is that the load balancer is trying to probe the
public
IPs from the private interface IP (and failing of course).

tcpdump output on internal interface:
18:13:26.471734 IP 10.0.10.3.5060 66.180.205.11.5060: SIP, length:
18:13:28.473802 IP 10.0.10.3.5060 66.180.205.11.5060: SIP, length:


Thoughts?




--
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
15 - 19 November 2010, Edison, New Jersey, USA
www.voice-system.ro

Index: forward.c
===
--- forward.c	(revision 7362)
+++ forward.c	(working copy)
@@ -166,7 +166,10 @@
 	}
 	su2ip_addr(ip, from);
 	si=find_si(ip, 0, proto);
-	if (si==0) goto error;
+	if (si==0) {
+		LM_ERR(-- detected IP %s,proto=%d\n,ip_addr2a(ip),proto);
+		goto error;
+	}
 	close(temp_sock);
 	LM_DBG(socket determined: %p\n, si );
 	return si;
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer probing from incorrect interface

2010-11-11 Thread Bill W

Hey Bogdan,

I think we're confusing two issues.

The first issue was when mhomed=0, it was trying to options ping the 
internal interface with an external IP, which clearly won't work, as you 
described below.


The second issue is when I set mhomed=1, opensips is cannot options ping 
anything at all because it's trying to bind to an IP that doesn't belong 
to opensips.


For example:
DBG:tm:t_uac: next_hop=sip:10.0.10.1
DBG:core:mk_proxy: doing DNS lookup...
ERROR:core:get_out_socket: -- detected IP 10.0.10.2,proto=1
ERROR:tm:uri2sock: no corresponding socket for af 2
ERROR:tm:t_uac: no socket found
ERROR:load_balancer:lb_do_probing: probing failed

10.0.10.1 is on another machine
10.0.10.2 is on this machine
10.0.10.3 is on this machine, and allocated to opensips via listen=

Opensips should be binding to 10.0.1.3 which is specified in the listen= 
directive, not 10.0.10.2, which is another IP on the box but is not 
allocated to opensips.


Summary:
With mhomed=1 opensips is detecting the correct interface to ping from, 
but it is selecting an IP on that interface that is not specified in the 
listen= directives.


Hopefully I explained the behavior clearly.

Thanks,
Bill.





On 11/11/2010 11:39 AM, Bogdan-Andrei Iancu wrote:

It looks to me more like a misconfiguration on network level for the
machine ...Opensips tries to detect the interface with the default route
to the destination IP (the info id provided by kernel)..So if the kernel
sees 66.180.205.11 as default interface for reaching a private
IP.does look sane to me :)

Regards,
Bogdan

Bill W wrote:

Ahhh, I see what's going on.

Opensips is trying to probe from a different IP on that interface
instead of the IP alias opensips bound to.

For example, on the public interface I have IP 66.180.205.11
Then I have an IP alias of 66.180.205.3 on that same interface:
eth0 66.180.205.11 freeswitch:5060
eth0:0 66.180.205.3 opensips:5060

DBG:tm:t_uac: next_hop=sip:66.180.205.11
DBG:core:mk_proxy: doing DNS lookup...
ERROR:core:get_out_socket: -- detected IP 66.180.205.11,proto=1
ERROR:core:get_out_socket: no socket found
ERROR:tm:uri2sock: no corresponding socket for af 2
ERROR:tm:t_uac: no socket found
ERROR:load_balancer:lb_do_probing: probing failed

It's not getting the IP from the listen= directive but from an
interface probe, which is getting the wrong IP.


On 11/11/2010 6:29 AM, Bogdan-Andrei Iancu wrote:

Hi Bill,

could you try the attached patch along mhomed option? the patch will
simply print what is the IP opensips is trying to use for the outgoing
probes

Regards,
Bogdan

Bill W wrote:

Hey Bogdan,

Yes, I have 3 listen= lines; two with public IPs and one with a
private IP.

When I remove the mhomed=1 then things work as intended except for the
probing. I can proxy traffic correctly on all interfaces.

When I enable mhomed=1, then I get the errors below.

Thanks,
Bill


On 11/10/2010 5:38 AM, Bogdan-Andrei Iancu wrote:

Hi Bill,

is your opensips actually listening (configured as listener in
.cfg) on
a interface in the private network (where the probing needs to be
done) ??

Regards,
Bogdan

Bill W wrote:

Hey Bogdan,

I enabled the mhomed=1 parameter, and now I'm getting a bunch of
errors in the logs.

ERROR:tm:t_uac: no socket found
ERROR:load_balancer:lb_do_probing: probing failed
ERROR:core:get_out_socket: no socket found
ERROR:tm:uri2sock: no corresponding socket for af 2

Thoughts?

Bill


On 11/8/2010 6:05 AM, Bogdan-Andrei Iancu wrote:

Hi Bill,

as you have a multi interface system, have you tried to enable the
mhomed global parameter?
http://www.opensips.org/Resources/DocsCoreFcn16#toc60

Regards,
Bogdan

Bill W. wrote:

As an update, the load balancer probe appears to use the ip address
specified by the first listen= directive.

If I list the public IP first, then the probe tries to talk to the
internal IP from the external interface IP.


On 11/7/10 6:18 PM, Bill W. wrote:


Hello everyone,

I've got an opensips-1.6.3-tls installation using multiple
interfaces
and load balancing.

My internal interface is rfc1918 space and my external
interface has
public IPs.
listen=udp:10.0.10.3:5060
listen=udp:66.180.205.3:5060


I have the following load_balancer configuration:
id | group_id | dst_uri | probe_mode
+--+---+
1 | 1 | sip:66.180.205.11 | 2
2 | 1 | sip:66.180.205.12 | 2
3 | 2 | sip:10.0.10.1 | 2
4 | 2 | sip:10.0.10.2 | 2


What's happening is that the load balancer is trying to probe the
public
IPs from the private interface IP (and failing of course).

tcpdump output on internal interface:
18:13:26.471734 IP 10.0.10.3.5060 66.180.205.11.5060: SIP,
length:
18:13:28.473802 IP 10.0.10.3.5060 66.180.205.11.5060: SIP,
length:


Thoughts?






___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org

Re: [OpenSIPS-Users] Load balancer probing from incorrect interface

2010-11-10 Thread Bill W

Hey Bogdan,

Yes, I have 3 listen= lines; two with public IPs and one with a private IP.

When I remove the mhomed=1 then things work as intended except for the 
probing.  I can proxy traffic correctly on all interfaces.


When I enable mhomed=1, then I get the errors below.

Thanks,
Bill


On 11/10/2010 5:38 AM, Bogdan-Andrei Iancu wrote:

Hi Bill,

is your opensips actually listening (configured as listener in .cfg) on
a interface in the private network (where the probing needs to be done) ??

Regards,
Bogdan

Bill W wrote:

Hey Bogdan,

I enabled the mhomed=1 parameter, and now I'm getting a bunch of
errors in the logs.

ERROR:tm:t_uac: no socket found
ERROR:load_balancer:lb_do_probing: probing failed
ERROR:core:get_out_socket: no socket found
ERROR:tm:uri2sock: no corresponding socket for af 2

Thoughts?

Bill


On 11/8/2010 6:05 AM, Bogdan-Andrei Iancu wrote:

Hi Bill,

as you have a multi interface system, have you tried to enable the
mhomed global parameter?
http://www.opensips.org/Resources/DocsCoreFcn16#toc60

Regards,
Bogdan

Bill W. wrote:

As an update, the load balancer probe appears to use the ip address
specified by the first listen= directive.

If I list the public IP first, then the probe tries to talk to the
internal IP from the external interface IP.


On 11/7/10 6:18 PM, Bill W. wrote:


Hello everyone,

I've got an opensips-1.6.3-tls installation using multiple interfaces
and load balancing.

My internal interface is rfc1918 space and my external interface has
public IPs.
listen=udp:10.0.10.3:5060
listen=udp:66.180.205.3:5060


I have the following load_balancer configuration:
id | group_id | dst_uri | probe_mode
+--+---+
1 | 1 | sip:66.180.205.11 | 2
2 | 1 | sip:66.180.205.12 | 2
3 | 2 | sip:10.0.10.1 | 2
4 | 2 | sip:10.0.10.2 | 2


What's happening is that the load balancer is trying to probe the
public
IPs from the private interface IP (and failing of course).

tcpdump output on internal interface:
18:13:26.471734 IP 10.0.10.3.5060 66.180.205.11.5060: SIP, length:
18:13:28.473802 IP 10.0.10.3.5060 66.180.205.11.5060: SIP, length:


Thoughts?

Thanks,
Bill

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users






___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer probing from incorrect interface

2010-11-08 Thread Bogdan-Andrei Iancu
Hi Bill,

as you have a multi interface system, have you tried to enable the 
mhomed global parameter?
http://www.opensips.org/Resources/DocsCoreFcn16#toc60

Regards,
Bogdan

Bill W. wrote:
 As an update, the load balancer probe appears to use the ip address
 specified by the first listen= directive.

 If I list the public IP first, then the probe tries to talk to the
 internal IP from the external interface IP.


 On 11/7/10 6:18 PM, Bill W. wrote:
   
 Hello everyone,

 I've got an opensips-1.6.3-tls installation using multiple interfaces
 and load balancing.

 My internal interface  is rfc1918 space and my external interface has
 public IPs.
 listen=udp:10.0.10.3:5060
 listen=udp:66.180.205.3:5060


 I have the following load_balancer configuration:
  id | group_id |  dst_uri  | probe_mode
 +--+---+
   1 |1 | sip:66.180.205.11 |  2
   2 |1 | sip:66.180.205.12 |  2
   3 |2 | sip:10.0.10.1 |  2
   4 |2 | sip:10.0.10.2 |  2


 What's happening is that the load balancer is trying to probe the public
 IPs from the private interface IP (and failing of course).

 tcpdump output on internal interface:
 18:13:26.471734 IP 10.0.10.3.5060  66.180.205.11.5060: SIP, length:
 18:13:28.473802 IP 10.0.10.3.5060  66.180.205.11.5060: SIP, length:


 Thoughts?

 Thanks,
 Bill

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

   


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
15 - 19 November 2010, Edison, New Jersey, USA
www.voice-system.ro


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer probe _mode=1 bug?

2010-11-08 Thread Bogdan-Andrei Iancu

Hi Bill,

What is the probing interval you configured ?
  
http://www.opensips.org/html/docs/modules/1.6.x/load_balancer.html#id250040


Could you test the attached patch ? (same as revision 7356 on trunk).

Regards,
Bogdan

Bill W. wrote:

Hello Bogdan,

This is how I mark the destination down:

failure_route[1] {
if (t_check_status((408)|(5[0-9][0-9]))) {
lb_disable();
if (load_balance(1,sip,1)) {
t_on_failure(1);
t_relay();
} else {
t_reply(503, Service Unavailable);
}
}
}


opensipsctl fifo lb_list shows:  enabled=no auto-re=on

I do not see any probes from opensips when  probe_mode in the database
is set to 1 which should probe the destination when it's marked down.
 When probe_mode is set to 2, and opensips probes continuously,
it works fine.

The docs say: (1) - probing only when the destination is in disabled
mode (disabling via MI command will competely stop the probing also).
The destination will be automatically re-enabled when the probing will
succeed next time;

So when I disable via lb_disable(), it is acting like I did it from the
MI, and disabling the probing too.

Thoughts?

Thanks,
Bill

On 8/1/10 1:14 PM, Bogdan-Andrei Iancu wrote:
  

Hi Bill,

How do you mark down the destination (MI ?) and what state are you setting ?

Also, after marking it down, do you see any new pings being sent to that 
destination?


Something was changed during rev 6653:
http://opensips.svn.sourceforge.net/opensips/?rev=6653view=rev

But the new code seams ok for me - the LB_DST_STAT_NOEN_FLAG flag is set 
when disabling the destination via MI and with this flag set, no more 
pings are sent.


Regards,
Bogdan

Bill W wrote:


Hello Bogdan,

I'm experiencing the same problem as I did before, with the load 
balancer not re-enabling a device marked down.


If I go into the database and set probe_mode = 2, it re-enables the device.

I'm currently running opensips 1.6.2-tls (x86_64/linux)

Did the patch get reverted?

Thanks!
Bill

Bogdan-Andrei Iancu wrote:
  
  

Super! I uploaded the fix on SVN.

Thanks and regards,
Bogdan

Bill W wrote:



Hey Bogdan,

It looks like that fixed it.  Thanks so much!

Bill


Bogdan-Andrei Iancu wrote:
  
  
  

Hi Bill,

Could you please try the attached patch? It seams that there was an 
issue with the the probing values in the code. Let me know if the patch 
does solves your problem and I will upload it on SVN.


Regards,
Bogdan





___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

  
  
  



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

  
  



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

  



--
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
15 - 19 November 2010, Edison, New Jersey, USA
www.voice-system.ro

Index: modules/load_balancer/lb_prober.c
===
--- modules/load_balancer/lb_prober.c	(revision 7351)
+++ modules/load_balancer/lb_prober.c	(working copy)
@@ -67,7 +67,7 @@
 		/* dst requires probing ? */
 		if ( dst-flagsLB_DST_STAT_NOEN_FLAG
 			|| !( (dst-flagsLB_DST_PING_PERM_FLAG)  ||  /*permanent probing*/
-	( dst-flagsLB_DST_PING_DSBL_FLAG
+	( !(dst-flagsLB_DST_PING_DSBL_FLAG)
 	 dst-flagsLB_DST_STAT_DSBL_FLAG  /*probing on disable*/
 	)
 )
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer probe _mode=1 bug?

2010-11-08 Thread Bill W
Hey Bogdan,

Looks like your patch is working.  My probe interval was set to  15 
seconds, but I increased it to 60 for testing.

The disabling, probing, and re-enabling appear to be working correctly now.

Thanks so much!

Bill


On 11/8/2010 7:24 AM, Bogdan-Andrei Iancu wrote:
 Hi Bill,

 What is the probing interval you configured ?
 http://www.opensips.org/html/docs/modules/1.6.x/load_balancer.html#id250040

 Could you test the attached patch ? (same as revision 7356 on trunk).

 Regards,
 Bogdan

 Bill W. wrote:
 Hello Bogdan,

 This is how I mark the destination down:

 failure_route[1] {
 if (t_check_status((408)|(5[0-9][0-9]))) {
 lb_disable();
 if (load_balance(1,sip,1)) {
 t_on_failure(1);
 t_relay();
 } else {
 t_reply(503, Service Unavailable);
 }
 }
 }


 opensipsctl fifo lb_list shows: enabled=no auto-re=on

 I do not see any probes from opensips when probe_mode in the database
 is set to 1 which should probe the destination when it's marked down.
 When probe_mode is set to 2, and opensips probes continuously,
 it works fine.

 The docs say: (1) - probing only when the destination is in disabled
 mode (disabling via MI command will competely stop the probing also).
 The destination will be automatically re-enabled when the probing will
 succeed next time;

 So when I disable via lb_disable(), it is acting like I did it from the
 MI, and disabling the probing too.

 Thoughts?

 Thanks,
 Bill

 On 8/1/10 1:14 PM, Bogdan-Andrei Iancu wrote:
 Hi Bill,

 How do you mark down the destination (MI ?) and what state are you
 setting ?

 Also, after marking it down, do you see any new pings being sent to
 that destination?

 Something was changed during rev 6653:
 http://opensips.svn.sourceforge.net/opensips/?rev=6653view=rev

 But the new code seams ok for me - the LB_DST_STAT_NOEN_FLAG flag is
 set when disabling the destination via MI and with this flag set, no
 more pings are sent.

 Regards,
 Bogdan

 Bill W wrote:
 Hello Bogdan,

 I'm experiencing the same problem as I did before, with the load
 balancer not re-enabling a device marked down.

 If I go into the database and set probe_mode = 2, it re-enables the
 device.

 I'm currently running opensips 1.6.2-tls (x86_64/linux)

 Did the patch get reverted?

 Thanks!
 Bill

 Bogdan-Andrei Iancu wrote:
 Super! I uploaded the fix on SVN.

 Thanks and regards,
 Bogdan

 Bill W wrote:
 Hey Bogdan,

 It looks like that fixed it. Thanks so much!

 Bill


 Bogdan-Andrei Iancu wrote:
 Hi Bill,

 Could you please try the attached patch? It seams that there was
 an issue with the the probing values in the code. Let me know if
 the patch does solves your problem and I will upload it on SVN.

 Regards,
 Bogdan

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users





 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer probing from incorrect interface

2010-11-08 Thread Bill W
Hey Bogdan,

I enabled the mhomed=1 parameter, and now I'm getting a bunch of errors 
in the logs.

ERROR:tm:t_uac: no socket found
ERROR:load_balancer:lb_do_probing: probing failed
ERROR:core:get_out_socket: no socket found
ERROR:tm:uri2sock: no corresponding socket for af 2

Thoughts?

Bill


On 11/8/2010 6:05 AM, Bogdan-Andrei Iancu wrote:
 Hi Bill,

 as you have a multi interface system, have you tried to enable the
 mhomed global parameter?
  http://www.opensips.org/Resources/DocsCoreFcn16#toc60

 Regards,
 Bogdan

 Bill W. wrote:
 As an update, the load balancer probe appears to use the ip address
 specified by the first listen= directive.

 If I list the public IP first, then the probe tries to talk to the
 internal IP from the external interface IP.


 On 11/7/10 6:18 PM, Bill W. wrote:

 Hello everyone,

 I've got an opensips-1.6.3-tls installation using multiple interfaces
 and load balancing.

 My internal interface  is rfc1918 space and my external interface has
 public IPs.
 listen=udp:10.0.10.3:5060
 listen=udp:66.180.205.3:5060


 I have the following load_balancer configuration:
   id | group_id |  dst_uri  | probe_mode
 +--+---+
1 |1 | sip:66.180.205.11 |  2
2 |1 | sip:66.180.205.12 |  2
3 |2 | sip:10.0.10.1 |  2
4 |2 | sip:10.0.10.2 |  2


 What's happening is that the load balancer is trying to probe the public
 IPs from the private interface IP (and failing of course).

 tcpdump output on internal interface:
 18:13:26.471734 IP 10.0.10.3.5060  66.180.205.11.5060: SIP, length:
 18:13:28.473802 IP 10.0.10.3.5060  66.180.205.11.5060: SIP, length:


 Thoughts?

 Thanks,
 Bill

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users





___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer probing from incorrect interface

2010-11-07 Thread Bill W.
As an update, the load balancer probe appears to use the ip address
specified by the first listen= directive.

If I list the public IP first, then the probe tries to talk to the
internal IP from the external interface IP.


On 11/7/10 6:18 PM, Bill W. wrote:
 Hello everyone,
 
 I've got an opensips-1.6.3-tls installation using multiple interfaces
 and load balancing.
 
 My internal interface  is rfc1918 space and my external interface has
 public IPs.
 listen=udp:10.0.10.3:5060
 listen=udp:66.180.205.3:5060
 
 
 I have the following load_balancer configuration:
  id | group_id |  dst_uri  | probe_mode
 +--+---+
   1 |1 | sip:66.180.205.11 |  2
   2 |1 | sip:66.180.205.12 |  2
   3 |2 | sip:10.0.10.1 |  2
   4 |2 | sip:10.0.10.2 |  2
 
 
 What's happening is that the load balancer is trying to probe the public
 IPs from the private interface IP (and failing of course).
 
 tcpdump output on internal interface:
 18:13:26.471734 IP 10.0.10.3.5060  66.180.205.11.5060: SIP, length:
 18:13:28.473802 IP 10.0.10.3.5060  66.180.205.11.5060: SIP, length:
 
 
 Thoughts?
 
 Thanks,
 Bill
 
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer probe _mode=1 bug?

2010-11-07 Thread Bill W.
Hello Bogdan,

This is how I mark the destination down:

failure_route[1] {
if (t_check_status((408)|(5[0-9][0-9]))) {
lb_disable();
if (load_balance(1,sip,1)) {
t_on_failure(1);
t_relay();
} else {
t_reply(503, Service Unavailable);
}
}
}


opensipsctl fifo lb_list shows:  enabled=no auto-re=on

I do not see any probes from opensips when  probe_mode in the database
is set to 1 which should probe the destination when it's marked down.
 When probe_mode is set to 2, and opensips probes continuously,
it works fine.

The docs say: (1) - probing only when the destination is in disabled
mode (disabling via MI command will competely stop the probing also).
The destination will be automatically re-enabled when the probing will
succeed next time;

So when I disable via lb_disable(), it is acting like I did it from the
MI, and disabling the probing too.

Thoughts?

Thanks,
Bill

On 8/1/10 1:14 PM, Bogdan-Andrei Iancu wrote:
 Hi Bill,
 
 How do you mark down the destination (MI ?) and what state are you setting ?
 
 Also, after marking it down, do you see any new pings being sent to that 
 destination?
 
 Something was changed during rev 6653:
 http://opensips.svn.sourceforge.net/opensips/?rev=6653view=rev
 
 But the new code seams ok for me - the LB_DST_STAT_NOEN_FLAG flag is set 
 when disabling the destination via MI and with this flag set, no more 
 pings are sent.
 
 Regards,
 Bogdan
 
 Bill W wrote:
 Hello Bogdan,

 I'm experiencing the same problem as I did before, with the load 
 balancer not re-enabling a device marked down.

 If I go into the database and set probe_mode = 2, it re-enables the device.

 I'm currently running opensips 1.6.2-tls (x86_64/linux)

 Did the patch get reverted?

 Thanks!
 Bill

 Bogdan-Andrei Iancu wrote:
   
 Super! I uploaded the fix on SVN.

 Thanks and regards,
 Bogdan

 Bill W wrote:
 
 Hey Bogdan,

 It looks like that fixed it.  Thanks so much!

 Bill


 Bogdan-Andrei Iancu wrote:
   
   
 Hi Bill,

 Could you please try the attached patch? It seams that there was an 
 issue with the the probing values in the code. Let me know if the patch 
 does solves your problem and I will upload it on SVN.

 Regards,
 Bogdan

 
 
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

   
   
 

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

   
 
 

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer retcode question on OpenSIPS 1.6.2

2010-08-19 Thread k1028

Thanks for your recommendation it work great :). 
-- 
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Load-balancer-retcode-question-on-OpenSIPS-1-6-2-tp5346088p5441869.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer retcode question on OpenSIPS 1.6.2

2010-08-01 Thread Bogdan-Andrei Iancu
Hi,

your code is not correct as the $retcode returns the ret code of the 
last executed instruction, including the if statement - to have a 
correct code, you need to save the $retcode value immediately after the 
call of load_balance() function

Most probably the 1 val you see is the true return code of the if 
code. Try:

if ( uri=~sip:92[1-9][0-...@.* ) {
load_balance(27,white);
$var(x) = $retcode;
} else if ( uri=~sip:3392[1-9][0-...@.* ) {
load_balance(27,grey); #
$var(x) = $retcode;
}
if ( $var(x)  0 ) {
sl_send_reply(500,Service full);
exit;
}


Regards,
Bogdan

k1028 wrote:
 I figured it out. 

 This work all the time
 if ( uri=~sip:92[1-9][0-...@.* ) {
 load_balance(27,white); 
 } else if ( uri=~sip:3392[1-9][0-...@.* ) {
 load_balance(27,grey); #
 }
 if ( $retcode  0 ) {
 sl_send_reply(500,Service full);
 exit;
 }

 This work sometime
 if ( uri=~sip:92[1-9][0-...@.* ) {
 load_balance(27,white); 
 } 
 if ( uri=~sip:3392[1-9][0-...@.* ) {
 load_balance(27,grey); #
 }
 if ( $retcode  0 ) {
 sl_send_reply(500,Service full);
 exit;
 }

   


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
20 - 24 September 2010, Frankfurt, Germany
www.voice-system.ro


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer

2010-08-01 Thread Bogdan-Andrei Iancu
Hi Rajib,

The state info kept by load balancer (the load and capacity of each 
destination) is memory only - there are no DB ops at runtime.

Regards,
Bogdan

Rajib Deka wrote:
 Hi All,

 I have a question on load balancer,

 I have a 20 trunk entry in load balancer table. Once a call comes, 
 will it check the available resources in all the trunks to find the 
 less loaded trunk? or will it have some stack   or memory table to 
 maintain the load info to make the search fast.

 Please explain me the info.

 -- 
 Rajib Deka
 Software Engineer
 Servion Global Solution
 Chennai, India

 Mobile No: + 91 91767 80669

 

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
   


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
20 - 24 September 2010, Frankfurt, Germany
www.voice-system.ro


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer probe _mode=1 bug?

2010-08-01 Thread Bogdan-Andrei Iancu
Hi Bill,

How do you mark down the destination (MI ?) and what state are you setting ?

Also, after marking it down, do you see any new pings being sent to that 
destination?

Something was changed during rev 6653:
http://opensips.svn.sourceforge.net/opensips/?rev=6653view=rev

But the new code seams ok for me - the LB_DST_STAT_NOEN_FLAG flag is set 
when disabling the destination via MI and with this flag set, no more 
pings are sent.

Regards,
Bogdan

Bill W wrote:
 Hello Bogdan,

 I'm experiencing the same problem as I did before, with the load 
 balancer not re-enabling a device marked down.

 If I go into the database and set probe_mode = 2, it re-enables the device.

 I'm currently running opensips 1.6.2-tls (x86_64/linux)

 Did the patch get reverted?

 Thanks!
 Bill

 Bogdan-Andrei Iancu wrote:
   
 Super! I uploaded the fix on SVN.

 Thanks and regards,
 Bogdan

 Bill W wrote:
 
 Hey Bogdan,

 It looks like that fixed it.  Thanks so much!

 Bill


 Bogdan-Andrei Iancu wrote:
   
   
 Hi Bill,

 Could you please try the attached patch? It seams that there was an 
 issue with the the probing values in the code. Let me know if the patch 
 does solves your problem and I will upload it on SVN.

 Regards,
 Bogdan

 
 
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

   
   
 

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

   


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
20 - 24 September 2010, Frankfurt, Germany
www.voice-system.ro


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer

2010-08-01 Thread Rajib Deka
Thanks Bogdan.
I know that OpenSIPS will store the state info in memory. My question is,
Suppose I have 100 trunks as destination in memory to load balance with
different state info, so  when a new call (INVITE) comes to OpenSIPS, will
OpenSIPS go through all the 100 trunk's state info to choose the least
loaded one or it has some efficient search algo that returns the less loaded
trunk. We are using 100+ trunk (duplicate entry) info to achieve some CPS
limit. So our main concern is the search time for OpenSIPS to choose a
trunk.

My another question, will 1 sec time interval in RATELIMIT lead to
performance issue?

regards
Rajib

On Sun, Aug 1, 2010 at 8:46 PM, Bogdan-Andrei Iancu
bog...@voice-system.rowrote:

 Hi Rajib,

 The state info kept by load balancer (the load and capacity of each
 destination) is memory only - there are no DB ops at runtime.

 Regards,
 Bogdan

 Rajib Deka wrote:
  Hi All,
 
  I have a question on load balancer,
 
  I have a 20 trunk entry in load balancer table. Once a call comes,
  will it check the available resources in all the trunks to find the
  less loaded trunk? or will it have some stack   or memory table to
  maintain the load info to make the search fast.
 
  Please explain me the info.
 
  --
  Rajib Deka
  Software Engineer
  Servion Global Solution
  Chennai, India
 
  Mobile No: + 91 91767 80669
 
  
 
  ___
  Users mailing list
  Users@lists.opensips.org
  http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 


 --
 Bogdan-Andrei Iancu
 OpenSIPS Bootcamp
 20 - 24 September 2010, Frankfurt, Germany
 www.voice-system.ro


 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users




-- 
Rajib Deka
Software Engineer
Servion Global Solution
Chennai, India

Mobile No: + 91 91767 80669
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer

2010-08-01 Thread Bogdan-Andrei Iancu
Hi Rajib,

the load of each trunk is calculated each time the load_balance() 
function is called - the load is a higly dynamic info and needs to be 
evaluated each time load balancing needs to be done. There is no way to 
cache/store any info related to previous less loaded trunk.

Anyhow 100+ trunks does not mean a lot ;)

Regards,
Bogdan

Rajib Deka wrote:
 Thanks Bogdan.
 I know that OpenSIPS will store the state info in memory. My question 
 is, Suppose I have 100 trunks as destination in memory to load balance 
 with different state info, so  when a new call (INVITE) comes to 
 OpenSIPS, will OpenSIPS go through all the 100 trunk's state info to 
 choose the least loaded one or it has some efficient search algo that 
 returns the less loaded trunk. We are using 100+ trunk (duplicate 
 entry) info to achieve some CPS limit. So our main concern is the 
 search time for OpenSIPS to choose a trunk.

 My another question, will 1 sec time interval in RATELIMIT lead to 
 performance issue?

 regards
 Rajib

 On Sun, Aug 1, 2010 at 8:46 PM, Bogdan-Andrei Iancu 
 bog...@voice-system.ro mailto:bog...@voice-system.ro wrote:

 Hi Rajib,

 The state info kept by load balancer (the load and capacity of each
 destination) is memory only - there are no DB ops at runtime.

 Regards,
 Bogdan

 Rajib Deka wrote:
  Hi All,
 
  I have a question on load balancer,
 
  I have a 20 trunk entry in load balancer table. Once a call comes,
  will it check the available resources in all the trunks to find the
  less loaded trunk? or will it have some stack   or memory table to
  maintain the load info to make the search fast.
 
  Please explain me the info.
 
  --
  Rajib Deka
  Software Engineer
  Servion Global Solution
  Chennai, India
 
  Mobile No: + 91 91767 80669
 
 
 
 
  ___
  Users mailing list
  Users@lists.opensips.org mailto:Users@lists.opensips.org
  http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 


 --
 Bogdan-Andrei Iancu
 OpenSIPS Bootcamp
 20 - 24 September 2010, Frankfurt, Germany
 www.voice-system.ro http://www.voice-system.ro


 ___
 Users mailing list
 Users@lists.opensips.org mailto:Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users




 -- 
 Rajib Deka
 Software Engineer
 Servion Global Solution
 Chennai, India

 Mobile No: + 91 91767 80669

 

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
   


-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
20 - 24 September 2010, Frankfurt, Germany
www.voice-system.ro


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer

2010-08-01 Thread Rajib Deka
Thanks a lot Bogdan.

My another question, will 1 sec time interval in RATELIMIT lead to
performance issue?

Regards
Rajib

On Sun, Aug 1, 2010 at 11:34 PM, Bogdan-Andrei Iancu bog...@voice-system.ro
 wrote:

 Hi Rajib,

 the load of each trunk is calculated each time the load_balance()
 function is called - the load is a higly dynamic info and needs to be
 evaluated each time load balancing needs to be done. There is no way to
 cache/store any info related to previous less loaded trunk.

 Anyhow 100+ trunks does not mean a lot ;)

 Regards,
 Bogdan

 Rajib Deka wrote:
  Thanks Bogdan.
  I know that OpenSIPS will store the state info in memory. My question
  is, Suppose I have 100 trunks as destination in memory to load balance
  with different state info, so  when a new call (INVITE) comes to
  OpenSIPS, will OpenSIPS go through all the 100 trunk's state info to
  choose the least loaded one or it has some efficient search algo that
  returns the less loaded trunk. We are using 100+ trunk (duplicate
  entry) info to achieve some CPS limit. So our main concern is the
  search time for OpenSIPS to choose a trunk.
 
  My another question, will 1 sec time interval in RATELIMIT lead to
  performance issue?
 
  regards
  Rajib
 
  On Sun, Aug 1, 2010 at 8:46 PM, Bogdan-Andrei Iancu
  bog...@voice-system.ro mailto:bog...@voice-system.ro wrote:
 
  Hi Rajib,
 
  The state info kept by load balancer (the load and capacity of each
  destination) is memory only - there are no DB ops at runtime.
 
  Regards,
  Bogdan
 
  Rajib Deka wrote:
   Hi All,
  
   I have a question on load balancer,
  
   I have a 20 trunk entry in load balancer table. Once a call comes,
   will it check the available resources in all the trunks to find the
   less loaded trunk? or will it have some stack   or memory table to
   maintain the load info to make the search fast.
  
   Please explain me the info.
  
   --
   Rajib Deka
   Software Engineer
   Servion Global Solution
   Chennai, India
  
   Mobile No: + 91 91767 80669
  
  
 
 
  
   ___
   Users mailing list
   Users@lists.opensips.org mailto:Users@lists.opensips.org
   http://lists.opensips.org/cgi-bin/mailman/listinfo/users
  
 
 
  --
  Bogdan-Andrei Iancu
  OpenSIPS Bootcamp
  20 - 24 September 2010, Frankfurt, Germany
  www.voice-system.ro http://www.voice-system.ro
 
 
  ___
  Users mailing list
  Users@lists.opensips.org mailto:Users@lists.opensips.org
  http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 
 
 
 
  --
  Rajib Deka
  Software Engineer
  Servion Global Solution
  Chennai, India
 
  Mobile No: + 91 91767 80669
 
  
 
  ___
  Users mailing list
  Users@lists.opensips.org
  http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 


 --
 Bogdan-Andrei Iancu
 OpenSIPS Bootcamp
 20 - 24 September 2010, Frankfurt, Germany
 www.voice-system.ro


 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users




-- 
Rajib Deka
Software Engineer
Servion Global Solution
Chennai, India

Mobile No: + 91 91767 80669
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer retcode question on OpenSIPS 1.6.2

2010-07-28 Thread k1028

I figured it out. 

This work all the time
if ( uri=~sip:92[1-9][0-...@.* ) {
load_balance(27,white); 
} else if ( uri=~sip:3392[1-9][0-...@.* ) {
load_balance(27,grey); #
}
if ( $retcode  0 ) {
sl_send_reply(500,Service full);
exit;
}

This work sometime
if ( uri=~sip:92[1-9][0-...@.* ) {
load_balance(27,white); 
} 
if ( uri=~sip:3392[1-9][0-...@.* ) {
load_balance(27,grey); #
}
if ( $retcode  0 ) {
sl_send_reply(500,Service full);
exit;
}

-- 
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Load-balancer-retcode-question-on-OpenSIPS-1-6-2-tp5346088p5346201.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer probe _mode=1 bug?

2010-07-27 Thread Bill W
Hello Bogdan,

I'm experiencing the same problem as I did before, with the load 
balancer not re-enabling a device marked down.

If I go into the database and set probe_mode = 2, it re-enables the device.

I'm currently running opensips 1.6.2-tls (x86_64/linux)

Did the patch get reverted?

Thanks!
Bill

Bogdan-Andrei Iancu wrote:
 Super! I uploaded the fix on SVN.
 
 Thanks and regards,
 Bogdan
 
 Bill W wrote:
 Hey Bogdan,

 It looks like that fixed it.  Thanks so much!

 Bill


 Bogdan-Andrei Iancu wrote:
   
 Hi Bill,

 Could you please try the attached patch? It seams that there was an 
 issue with the the probing values in the code. Let me know if the patch 
 does solves your problem and I will upload it on SVN.

 Regards,
 Bogdan

 
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

   
 
 

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load Balancer Issue

2010-03-09 Thread Bogdan-Andrei Iancu
Hi,

I see here 2 reports:
1) opensips dies - check the log files for error messages to see why 
opensips stopped
2) load not decreasing - this means the BYE is missing or is not 
properly processed by opensips, so it thinks the call is still on. If 
you see that the BYEs are passing through, you could enable debugging 
only for the loose_route() function (use set_debug() function) to see if 
the BYE matches or not. Also you can check via teh dlg_list MI 
function the state of the ongoing calls.

Regards,
Bogdan

Sathyanarayanan R wrote:

 We are using Opensips load balancer module to make outbound calls, 
 when we pump more than 30 CPS, load in the load balancer is not 
 decreased even after the call ends. Beyond certain point opensips 
 service stops with the error “Opensips dead but subsys locked”. How 
 this problem should be approached and solved?

 Regards,

 Sathya

 

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer probe _mode=1 bug?

2010-01-04 Thread Bill W
Hey Bogdan,

It looks like that fixed it.  Thanks so much!

Bill


Bogdan-Andrei Iancu wrote:
 Hi Bill,
 
 Could you please try the attached patch? It seams that there was an 
 issue with the the probing values in the code. Let me know if the patch 
 does solves your problem and I will upload it on SVN.
 
 Regards,
 Bogdan
 

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer probe _mode=1 bug?

2010-01-04 Thread Bogdan-Andrei Iancu
Super! I uploaded the fix on SVN.

Thanks and regards,
Bogdan

Bill W wrote:
 Hey Bogdan,

 It looks like that fixed it.  Thanks so much!

 Bill


 Bogdan-Andrei Iancu wrote:
   
 Hi Bill,

 Could you please try the attached patch? It seams that there was an 
 issue with the the probing values in the code. Let me know if the patch 
 does solves your problem and I will upload it on SVN.

 Regards,
 Bogdan

 

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer ORed resource types

2009-12-29 Thread Taner Sener
Hi Bogdan,

I run the scenario again with a few destinations: two 8002 destinations and
one 8003 destination. Here's my test analysis and trace of load_balancer
module in debug=6 (Full trace is bigger than 100k. I can try to send it but
it is rejected by maillist). I hope it will help us to see what is wrong
with my configuration.

* Call is received at 10:49:40: load balancer forwards INVITE to host
10.10.5.44. Host 10.10.5.44 returns 100 Trying but does not send 200 OK.
* At 10:49:44: tm timer detects that INVITE is not processed and cancels the
call. Then failure route is called and load_balancer tries to forward this
call to 10.10.6.50. Host 10.10.6.50 again sends 100 Trying but does not
send 200 OK.
* At 10.49.49: tm timer again detects that INVITE is not processed and
cancels the call. Failure procedure at this point returns  0 for 8002. So
load_balance(8003) is called. But a valid destination is not found.


Dec 22 10:49:40 arsipt1 /sbin/opensips[9141]:
DBG:load_balancer:do_load_balance: found requested (0) resource sip
Dec 22 10:49:40 arsipt1 /sbin/opensips[9141]:
DBG:load_balancer:do_load_balance: destination
sip:a...@10.10.5.44sip%3...@10.10.5.44
selected for LB set with free=1 (max=1)
Dec 22 10:49:40 arsipt1 /sbin/opensips[9141]:
DBG:load_balancer:do_load_balance: destination
sip:a...@10.10.6.50sip%3...@10.10.6.50
selected for LB set with free=1 (max=1)
Dec 22 10:49:44 arsipt1 /sbin/opensips[9146]: load_balancer: Request from
sip:5304556...@86.108.132.8 sip%3a5304556...@86.108.132.8 to
sip:8...@10.210.54.83:5060 failed. Re-balancing to 8002!
Dec 22 10:49:44 arsipt1 /sbin/opensips[9146]:
DBG:load_balancer:do_load_balance: found requested (0) resource sip
Dec 22 10:49:44 arsipt1 /sbin/opensips[9146]:
DBG:load_balancer:do_load_balance: destination
sip:a...@10.10.6.50sip%3...@10.10.6.50
selected for LB set with free=1 (max=1)
Dec 22 10:49:44 arsipt1 /sbin/opensips[9146]:
DBG:load_balancer:do_load_balance: failed to remove from profile
Dec 22 10:49:49 arsipt1 /sbin/opensips[9146]: load_balancer: Request from
sip:5304556...@86.108.132.8 sip%3a5304556...@86.108.132.8 to
sip:8...@10.210.54.83:5060 failed. Re-balancing to 8002!
Dec 22 10:49:49 arsipt1 /sbin/opensips[9146]:
DBG:load_balancer:do_load_balance: found requested (0) resource sip
Dec 22 10:49:49 arsipt1 /sbin/opensips[9146]:
DBG:load_balancer:do_load_balance: failed to remove from profile
Dec 22 10:49:49 arsipt1 /sbin/opensips[9146]:
DBG:load_balancer:do_load_balance: no destination found
Dec 22 10:49:49 arsipt1 /sbin/opensips[9146]: load_balancer: Insufficient
resource to balance request from
sip:5304556...@86.108.132.8sip%3a5304556...@86.108.132.8to
sip:8...@10.210.54.83:5060 . Re-balancing to route 4!
Dec 22 10:49:49 arsipt1 /sbin/opensips[9146]:
DBG:load_balancer:do_load_balance: found requested (0) resource sip
Dec 22 10:49:49 arsipt1 /sbin/opensips[9146]:
DBG:load_balancer:do_load_balance: failed to remove from profile
Dec 22 10:49:49 arsipt1 /sbin/opensips[9146]:
DBG:load_balancer:do_load_balance: no destination found
Dec 22 10:49:49 arsipt1 /sbin/opensips[9146]: load_balancer: Insufficient
resource to balance request from
sip:5304556...@86.108.132.8sip%3a5304556...@86.108.132.8to
sip:8...@10.210.54.83:5060 . Sending error!

Regards,
Taner

On Tue, Dec 22, 2009 at 10:18 AM, Bogdan-Andrei Iancu 
bog...@voice-system.ro wrote:

 Hi Taner,

 So, you have a call and you first try to do LB in group 8002 (in
 route[3]) and if failed, in group 8003.which does not work properly
 as you said...

 Can you run in debug=6 and post here the output related to the INVITE
 processing ?

 Regards,
 Bogdan

 Taner Sener wrote:
  Hi Bogdan,
 
  In my tests when all resources from group id 1 (with higher priority)
  are busy (or fail to accept call with some error) I'm calling
  load_balance for group id 2. Although there is available destinations
  on this group, return code from load_balance call is  0. So this is
  the point where I'm stuck.
 
  Any help appreciated.
 
  Here's my configuration.
 
  load_balancer table
  ---
 
 ++--+-+---++-+
  | id | group_id | dst_uri | resources | probe_mode |
  description |
 
 ++--+-+---++-+
  | 95 | 8002 | sip:a...@10.10.5.23 sip%3...@10.10.5.23 mailto:
 sip%3...@10.10.5.23 sip%253...@10.10.5.23   |
  sip=1 |  2 | |
  | 19 | 8002 | sip:a...@10.10.5.44 sip%3...@10.10.5.44 mailto:
 sip%3...@10.10.5.44 sip%253...@10.10.5.44   |
  sip=1 |  2 | |
  | 20 | 8003 | sip:a...@10.210.54.86 sip%3...@10.210.54.86 mailto:
 sip%3...@10.210.54.86 sip%253...@10.210.54.86 |
  sip=1 |  2 | |
  | 96 | 8002 | sip:a...@10.10.5.13 sip%3...@10.10.5.13 mailto:
 sip%3...@10.10.5.13 sip%253...@10.10.5.13   |
  sip=1 |  2 | |
  | 97 | 8002 | 

Re: [OpenSIPS-Users] Load balancer - releasing resources

2009-12-24 Thread Bogdan-Andrei Iancu
Hello Peter,

LB does not work for the redirect scenario, but only for a call through 
(proxy) scenario. Because OpenSIPS considers as load the number of 
ongoing calls, and into a redirect scenario, opensips cannot know how 
many ongoing call are.

Also, use all the time the stateful functions when using LB. LB 
mechanism is tied to dialogs which are tied to transactions. So replace 
the sl_send_reply() with t_reply() .

Regards,
Bogdan

Peter P GMX wrote:
 Hello,

 we use OpenSIPS as a load balancer in front of a Freeswitch cluster. We
 use the load_balancer module for load_balancing and redirecting requests
 to this 2 machines.
 For each machine we have defined a number of resources (e.g. 3000 for
 each server). After a while these resources are full, so the load
 balancer module does not balance any more.
 Here some extract from the routing:
 if ($si=~^xxx.xx.xxx.xxx) {
 # redirect external gateways to the right server
 load_balance(1,external);
 $ru = sip: + $rU + @ + $dd + : + $dp;
 sl_send_reply(302, redirect);
 exit;
 } else {
 } else {
 # load balance all registered phones through OpenSIPS
 load_balance(1,internal);
 
  }

 if (!t_relay()) {
 sl_reply_error();
 }

 My main question is: Does OpenSIPS automatically release the load
 balancer resources after a while? Or does it release when a SIP session
 is ended?
 We have now set the resources to 3 but we do not know for how
 long they may last.

 Best regards
 Peter

  

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer ORed resource types

2009-11-15 Thread Bogdan-Andrei Iancu
Hi Taner,

I would suggest a different approach - as from LB point of view you do 
not care too much if it VM or CONF - what is important is that each of 
your box has only on channel, so I would define a resource the number of 
channels each box can handle .

++--++-+
| id | group_id | dst_uri| resources   |
++--++-+

|  1 |  555 |  sip:serv...@host1.net mailto:sip%3aserv...@host1.net | 
channel=1   |
|  2 |  555 |  sip:serv...@host2.net mailto:sip%3aserv...@host2.net | 
channel=1   |

++--++-+


and do (when routing a VM or conference call) :
'load_balance(.., channel);'

Regards,
Bogdan


Taner Sener wrote:
 Hi,

 I'm using load balancer module on 1.6.0-notls (i386/linux) to balance 
 incoming sip calls to sip clients. The case is; my sip clients are 
 capable of serving multiple types of calls. But not in the same time 
 like in the definition vm=1;conf=1. Only one of them is available at 
 that moment. They can process either a vm call, either a conf call; 
 not one vm call and one conf call. Is there a way to define it?

 ++--++-+
 | id | group_id | dst_uri| resources   |
 ++--++-+

 |  1 |  555 |  sip:serv...@host1.net mailto:sip%3aserv...@host1.net | 
 vm=1; conf=1|
 |  2 |  555 |  sip:serv...@host2.net mailto:sip%3aserv...@host2.net | 
 vm=1; conf=1|

 ++--++-+
   
 Current 'resources' field of load_balancer table ANDs resource types 
 given with semi-colon and I when I invoke

 'load_balance(.., vm)'

 and

 'load_balance(.., conf)'

 second load balanced call receives busy and balancing fails there 
 because that client is serving to vm call. How can I configure 
 load_balanced module to select it right?

 Thanks,
 Taner
 

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
   


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer and Access control list

2009-10-19 Thread Peter P GMX
I tried this, but Freeswitch doesn't condider the SIP header here. In
the ACL it uses the real IP the request comes from.

Alex Massover schrieb:
 Do you have a hint how to do that?
 
 [Alex]

 append_hf(X-Original-IP: $si\r\n);

 something like this.

 BR,
 Alex.

   
 Best regards
 Peter

 Bogdan-Andrei Iancu schrieb:
 
 Hi Peter,

 Interesting - the LB was not designed to work via 3xx redirect model,
 even so, with some changes, it is possible to do it.

 On the other side, can you trick FS to look for the IP (used for
   
 ACLs)
 
 somewhere else than the net level (src IP) ? maybe you can configure
   
 LB
 
 to put the original SRC IP into a SIP header into the request.

 Regards,
 Bogdan

 Peter P GMX wrote:

   
 Hello,

 I am using OpenSIPS as a load balancer in front of Freeswitch by
 
 using
 
 the load balancer module.
 Scenario: All phones are registered at Freeswitch. Some gateways
 
 provide
 
 calls via registered accounts  and some external gateways are
 
 accepted
 
 by their IPs (access control list, ACL).

 When using OpenSIPS in front of Freeswitch I am losing the ACL
 
 feature
 
 for some external gateways, as from Freeswitch's perpective all
 
 calls
 
 are now coming from OpenSIPS.

 Does anybody know how to solve this ACL problem? Is there a way load
 balance by redirecting invites (302 Moved temporarily) to
 
 Freeswitch?
 
 Then the gateway will contact Freeswitch directly and ACLs will
 
 still apply.
 
 So is there any load balancing feature in OpenSIPS which uses
 
 redirects
 
 or do I have to implement it by myself? E.g. by a perl script which
 changes the redirect IP on every request (e.g. round robin).

 Best regards
 Peter




 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users



 
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


   
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 This mail was received via Mail-SeCure System.

 


 This mail was sent via Mail-SeCure System.



 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

   

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer and Access control list

2009-10-19 Thread Raúl Alexis Betancor Santana
Peter P GMX escribió:
 Hello,

 I tried the 302 redirect now in 2 different methods:
 $ru = sip:06912345...@yy.yyy.yyy.163:5062; # rewite complete
 contact address
 rewritehostport(yy.yyy.yyy.163:5062); # rewite host
 and port
 and then
 sl_send_reply(302, redirected);

 In all cases OpenSIPS sends back a 302 message with the new contact
 information yy.yyy.yyy.163.
 The originating UA then takes the contact information into consideration
 in the TO: header, however it still sends the message to the previous IP
 yy.yyy.yyy.165 (OpenSIPS again) instead of 163 (Freeswitch).

 I tried this with 2 SIP clients, they both behave the same.
 What am I doing wrong?

 Best regards
 Peter
   
If the UAC's are configured to ALWAYS use .165 as outbound proxy .. no 
matter what you try with the 302 ... that will not run.

Trying to do loadbalancing with 302 or any other 30X code it's an error, 
there will be lot of situations in witch it will not run.


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer and Access control list

2009-10-19 Thread Raúl Alexis Betancor Santana
Bogdan-Andrei Iancu escribió:
 Peter,

 You can add a header with whatever name, depends more on FS what kind of 
 header is able to use to take the src IP from.

 Regards,
 Bogdan
   
That will not run, FS as Asterisk, Yate and most of B2BUA/PBX outthere 
..takes socket IP for validating it's ACL, as OpensSIPS does with the 
permissions/group module, of couse with a proxy one can chage that 
behavoir ... but usually with FS/Asterisk/Whatever .. that's not possible.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer and Access control list

2009-10-19 Thread Bogdan-Andrei Iancu
Peter,

You can add a header with whatever name, depends more on FS what kind of 
header is able to use to take the src IP from.

Regards,
Bogdan

Peter P GMX wrote:
 I tried this, but Freeswitch doesn't condider the SIP header here. In
 the ACL it uses the real IP the request comes from.

 Alex Massover schrieb:
   
 Do you have a hint how to do that?
 
   
 [Alex]

 append_hf(X-Original-IP: $si\r\n);

 something like this.

 BR,
 Alex.

   
 
 Best regards
 Peter

 Bogdan-Andrei Iancu schrieb:
 
   
 Hi Peter,

 Interesting - the LB was not designed to work via 3xx redirect model,
 even so, with some changes, it is possible to do it.

 On the other side, can you trick FS to look for the IP (used for
   
 
 ACLs)
 
   
 somewhere else than the net level (src IP) ? maybe you can configure
   
 
 LB
 
   
 to put the original SRC IP into a SIP header into the request.

 Regards,
 Bogdan

 Peter P GMX wrote:

   
 
 Hello,

 I am using OpenSIPS as a load balancer in front of Freeswitch by
 
   
 using
 
   
 the load balancer module.
 Scenario: All phones are registered at Freeswitch. Some gateways
 
   
 provide
 
   
 calls via registered accounts  and some external gateways are
 
   
 accepted
 
   
 by their IPs (access control list, ACL).

 When using OpenSIPS in front of Freeswitch I am losing the ACL
 
   
 feature
 
   
 for some external gateways, as from Freeswitch's perpective all
 
   
 calls
 
   
 are now coming from OpenSIPS.

 Does anybody know how to solve this ACL problem? Is there a way load
 balance by redirecting invites (302 Moved temporarily) to
 
   
 Freeswitch?
 
   
 Then the gateway will contact Freeswitch directly and ACLs will
 
   
 still apply.
 
   
 So is there any load balancing feature in OpenSIPS which uses
 
   
 redirects
 
   
 or do I have to implement it by myself? E.g. by a perl script which
 changes the redirect IP on every request (e.g. round robin).

 Best regards
 Peter




 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users



 
   
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users


   
 
 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

 This mail was received via Mail-SeCure System.

 
   
 This mail was sent via Mail-SeCure System.



 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

   
 

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

   


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer and Access control list

2009-10-19 Thread Raúl Alexis Betancor Santana
Bogdan-Andrei Iancu escribió:
 So, in such a case, a real working solution will be to have opensips to 
 spoof the source IP of the outbound request? but this may really break 
 the transaction Only if the spoofing is done with skipping the VIA 
 insertion.

 Regards,
 Bogdan
   

Spoofing IP's is the worst solution, you could not asure that packages 
will arrive at the gw ... imagine there are firewalls between ... and 
lot of more problems.

 From my POV, if he need to go throught the proxy ... better to 
translate the acl validations to the proxy.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer and Access control list

2009-10-19 Thread Peter P GMX
I now implemented a solution in Freeswitch. I created a whitelist based
on defined external gateways and IPs of registered UAs.
Now only whitelisted IPs are routed inside Freeswitch.

I am looking forward to seeing the memcached implementation in the next
OpenSIPS release. That way I can share the whitelisted IPs quickly with
OpenSIPS and may block Invites in OpenSIPS based on a whitelist in
memcached. This is less CPU intensive.

Best regards
Peter


Raúl Alexis Betancor Santana schrieb:
 Bogdan-Andrei Iancu escribió:
   
 So, in such a case, a real working solution will be to have opensips to 
 spoof the source IP of the outbound request? but this may really break 
 the transaction Only if the spoofing is done with skipping the VIA 
 insertion.

 Regards,
 Bogdan
   
 

 Spoofing IP's is the worst solution, you could not asure that packages 
 will arrive at the gw ... imagine there are firewalls between ... and 
 lot of more problems.

  From my POV, if he need to go throught the proxy ... better to 
 translate the acl validations to the proxy.

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

   

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer and Access control list

2009-10-19 Thread Bogdan-Andrei Iancu
Raúl Alexis Betancor Santana wrote:
 Bogdan-Andrei Iancu escribió:
   
 So, in such a case, a real working solution will be to have opensips to 
 spoof the source IP of the outbound request? but this may really break 
 the transaction Only if the spoofing is done with skipping the VIA 
 insertion.

 Regards,
 Bogdan
   
 

 Spoofing IP's is the worst solution, you could not asure that packages 
 will arrive at the gw ... imagine there are firewalls between ... and 
 lot of more problems.

  From my POV, if he need to go throught the proxy ... better to 
 translate the acl validations to the proxy.
   
I agree with you, unfortunately not all devices are so flaxible as 
OpenSIPS so to be able to change the ACL validation. And this is the 
third time in the last weeks when this issue pops up :)

Regards,
Bogdan

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer and Access control list

2009-10-19 Thread Raúl Alexis Betancor Santana
On Monday 19 October 2009 23:04:30 Peter P GMX wrote:
 I now implemented a solution in Freeswitch. I created a whitelist based
 on defined external gateways and IPs of registered UAs.
 Now only whitelisted IPs are routed inside Freeswitch.

 I am looking forward to seeing the memcached implementation in the next
 OpenSIPS release. That way I can share the whitelisted IPs quickly with
 OpenSIPS and may block Invites in OpenSIPS based on a whitelist in
 memcached. This is less CPU intensive.

Buff ... so you like killing flyes with a bazokka ... ? ... well it's up to 
you.
But IMHO, it's easier, faster, cleaner and scales better, if you use 
allow_trusted() from the opensips.cfg and work with your whitelist from the 
proxy POV, it's just and advice ... you will sleep better ;-) 


-- 
Raúl Alexis Betancor Santana
Dimensión Virtual

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load balancer and Access control list

2009-10-19 Thread Bogdan-Andrei Iancu
Hi Peter,

yes, sharing the IP lists between FS and OpenSIPS may be a workable 
solution - you can share via DB (slower) or via memcached (faster) - 
memcached is available only in 1.6 release.

Regards,
Bogdan

Peter P GMX wrote:
 I now implemented a solution in Freeswitch. I created a whitelist based
 on defined external gateways and IPs of registered UAs.
 Now only whitelisted IPs are routed inside Freeswitch.

 I am looking forward to seeing the memcached implementation in the next
 OpenSIPS release. That way I can share the whitelisted IPs quickly with
 OpenSIPS and may block Invites in OpenSIPS based on a whitelist in
 memcached. This is less CPU intensive.

 Best regards
 Peter


 Raúl Alexis Betancor Santana schrieb:
   
 Bogdan-Andrei Iancu escribió:
   
 
 So, in such a case, a real working solution will be to have opensips to 
 spoof the source IP of the outbound request? but this may really break 
 the transaction Only if the spoofing is done with skipping the VIA 
 insertion.

 Regards,
 Bogdan
   
 
   
 Spoofing IP's is the worst solution, you could not asure that packages 
 will arrive at the gw ... imagine there are firewalls between ... and 
 lot of more problems.

  From my POV, if he need to go throught the proxy ... better to 
 translate the acl validations to the proxy.

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

   
 

 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users

   


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


  1   2   >