[OpenSIPS-Users] OpenSIPs load balancer question

Peter Baines peter at pbaines.com
Tue Jan 13 10:02:55 CET 2015


Hi Mohammad,

In the load_balance mysql table you've defined your resources as sip and
pstn but in the script you are telling opensips to load balance with
another resource "channels".

Try changing line 227 of your script to this:

                if ( load_balance("1","pstn") ) {

Regards,

Peter
On 12 Jan 2015 16:21, "Mohammad Sajedi" <
mohammad.sajedi at overturenetworks.com> wrote:

>  Hi Bogdan,
>
>
>
> I have created three servers, and connected them in the following topology:
>
>
>
>
>
> SIPp (10.241.88.34/27) ------------ (10.241.88.36/27) OpenSIPs (
> 10.241.88.68/27) ------------------- (10.241.88.67/27) Asterisk
>
>
>
>
>
>
> On OpenSIPs
>
> Have added  à opensips_loadbalancer_2015-1-8_11\:43\:20.cfg   file (see
> attached)
>
> And changed the UDP listen line to:
>
> listen=udp:10.241.88.36:5060   # CUSTOMIZE ME
>
>
>
> Also Added the following to MySQL
>
> mysql -uopensips -popensipsrw opensips -e "INSERT INTO load_balancer
> VALUES(1,1,'sip:10.241.88.66:5060','pstn=500;sip=500',2,'');"
>
>
>
>
>
> On Asterisk, added the following to the Asterisk configuration files:
>
> /etc/asterisk/extensions.conf
>
> [sipp]
> exten => 2005,1,Answer
> exten => 2005,2,SetMusicOnHold(default)
> exten => 2005,3,WaitMusicOnHold(20)
> exten => 2005,4,Hangup
>
>
>
> /etc/asterisk/sip.conf
>
> [sipp]
> type=friend
> context=sipp
> host=dynamic
> port=6000
> user=sipp
> canreinvite=no
> disallow=all
> allow=ulaw
>
>
>
>
>
> On SIPp, issued:
>
> ./sipp -sn uac -d 20000 -s 2005 10.241.88.36  -l 30
>
>
>
>
>
>
>
> The SIP packets are coming out of (10.241.88.68/27) OpenSIPs interface
> with destination IP address of 10.241.88.36.
>
> How can I configure OpenSIPs such that OpenSIPs changes the destination IP
> address to 10.241.88.66?
>
>
>
> Thanks
>
> Mohammad
>
>
> This email and attachments may contain privileged or confidential
> information intended only for the addressee(s) indicated. The sender does
> not waive any of its rights, privileges or protections respecting this
> information. If you are not the named addressee, an employee, or agent
> responsible for sending this message to the named addressee (or this
> message was received by mistake), you are not authorized to read, print,
> retain, copy or disseminate this message or any part of it. If received in
> error, please notify us immediately by e-mail, discard any paper copies and
> delete all electronic files of the email.
>
> Computer viruses can be transmitted via email. The recipient should check
> this email and any attachments for viruses. Email transmission cannot be
> guaranteed to be secured or error-free as information could be intercepted,
> corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.
> The sender accepts no liability for any damage caused by any transmitted
> viruses or errors or omissions in the contents of this message.
>
> Overture Networks, Inc. 637 Davis Drive, Morrisville, NC USA 27560
> www.overturenetworks.com
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20150113/7629f0f1/attachment-0001.htm>


More information about the Users mailing list