How to setup Redundant configuration and Dns Srv Records

Discussions about using SIP Sorcery on your own computer/server
Post Reply
jvwelzen
Posts: 716
Joined: Thu Sep 11, 2008 1:56 pm

How to setup Redundant configuration and Dns Srv Records

Post by jvwelzen » Sun Feb 21, 2010 3:24 pm

Hi Aaron

Do you have any tips how to setup a Redundant configuration and Dns Srv Records

I think I succeeded to get the srv records working

_sip._udp.huizenwireless.nl. 3600 IN SRV 1 100 5060 sip2.huizenwireless.nl.
_sip._udp.huizenwireless.nl. 3600 IN SRV 1 100 5060 sip1.huizenwireless.nl.
huizenwireless.nl. 3600 IN NS ns1.satserver.nl.
huizenwireless.nl. 3600 IN NS ns2.satserver.nl.
huizenwireless.nl. 3600 IN NS ns3.satserver.nl.

But now how to setup a Redundant Configuration

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Post by Aaron » Sun Feb 21, 2010 10:02 pm

It's a fairly major undertaking, it's taken me over 2 years to get a redundant configuration to a reasonable level of reliability. Do you have two different physical servers you are planning on using?

Regards,

Aaron

jvwelzen
Posts: 716
Joined: Thu Sep 11, 2008 1:56 pm

Post by jvwelzen » Mon Feb 22, 2010 7:42 pm

yes the idea was to install and configure 2 sipsorcery servers on 2 public ip addresses

sip1 and sip2

will one mysql db be enough or do we need to upgrade to ms azure or something

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Post by Aaron » Tue Feb 23, 2010 6:49 am

Are you going to use Amazon's EC2 for your servers? I could create a public image with a similar configuration to sipsorcery.com.

As to the database configuration it all depends on what you're trying to achieve. By using a dual SIP server deployment it would probably be safe to assume you want to remove any single points of failure. Using a single MySQL database instance will mean you still have one. SQL Azure is an option to overcome that and in fact is the only hosted database service offering I know of that does so.

And of course to be thinking about all of the above means you're considering incurring a similar level of administrative effort and cost as sipsorcery.com and that's not something to undertake lightly.

Regards,

Aaron

jvwelzen
Posts: 716
Joined: Thu Sep 11, 2008 1:56 pm

Post by jvwelzen » Tue Feb 23, 2010 1:09 pm

Aaron wrote:Are you going to use Amazon's EC2 for your servers? I could create a public image with a similar configuration to sipsorcery.com.

As to the database configuration it all depends on what you're trying to achieve. By using a dual SIP server deployment it would probably be safe to assume you want to remove any single points of failure. Using a single MySQL database instance will mean you still have one. SQL Azure is an option to overcome that and in fact is the only hosted database service offering I know of that does so.

And of course to be thinking about all of the above means you're considering incurring a similar level of administrative effort and cost as sipsorcery.com and that's not something to undertake lightly.

Regards,

Aaron
No it's not going to be on the amazon servers

I have a dutch satelite provider that has a backbone in the netherlands and one in england that I wanted to use

My mysql is using a 99% uptime so that is pretty stable

Would it be possible to have a redundent sql setup also

http://dev.mysql.com/tech-resources/art ... rvers.html

I only wanted a backup sipsorcery server just in case the first one goes down

jvwelzen
Posts: 716
Joined: Thu Sep 11, 2008 1:56 pm

Re: How to setup Redundant configuration and Dns Srv Records

Post by jvwelzen » Sat Apr 09, 2011 7:35 am

Hi Aaron

Today a friend of my had giving me access to a second server so I can try to get a backup system running

The server is running and a have a softphone client registrered

the first server is running on 62.145.xx.xx

and the second server is on 62.32.xx.xx

and still 1 Mysql database

the domain in the database is huizenwireless.nl

and the alias list is local;sip.huizenwireless.nl;sip.huizenwireless.nl:5060;62.145.xx.xx;62.145.xx.xx:5060;62.32.xx.xx;62.32.xx.xx:5060

but when I make a call on the new server I get a logon failure

Code: Select all

DialPlan 07:35:49:421 : AppServerCore INVITE received, uri=sip:102@sip.huizenwireless.nl, cseq=1.
DialPlan 07:35:49:515 : Call not authenticated for 31357110469@huizenwireless.nl, responding with Unauthorised.
DialPlan 07:35:49:593 : AppServerCore INVITE received, uri=sip:102@sip.huizenwireless.nl, cseq=2.
DialPlan 07:35:49:687 31357110469: New call from udp:80.101.205.98:61066 successfully authenticated by digest.
DialPlan 07:35:49:687 : Call Manager processing new call on thread sipcallmanager-processcalls-2 for INVITE to sip:102@sip.huizenwireless.nl.
DialPlan 07:35:49:906 31357110469: Using dialplan Out for Out call to sip:102@sip.huizenwireless.nl.
DialPlan 07:35:50:000 31357110469: There was an exception executing your dial plan script: Logon failure: unknown user name or bad password
DialPlan 07:35:50:000 : Exception on user 31357110469's dial plan script (System.ComponentModel.Win32Exception). Logon failure: unknown user name or bad password
DialPlan 07:35:50:000 31357110469: Dialplan cleanup for 31357110469.
DialPlan 07:35:50:281 31357110469: Dial plan execution completed without answering and had an execution error message of Dial plan exception.
DialPlan 07:35:50:281 31357110469: UAS call failed with a response status of 500 and Dial plan exception.
DialPlan 07:35:50:281 : Dial plan finished for 31357110469, gc memory=6937688, physical memory=79400960, running script count=1.
any idea and maybe some tips for a redundent setup

I other question sould it be possible to setup dns srv for stun server also

Thanks in advance


EDIT

I think the dns srv is working because two siemens client are registered on the backup server when the first server is turned off but when both servers are running it's a bit of a jojo losing registrations a lot even when the prio is higer for the second server

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Re: How to setup Redundant configuration and Dns Srv Records

Post by Aaron » Sat Apr 09, 2011 10:56 am

Do you use sys.DBRead or sys.DBWrite in your dialplan? The error messages below look like you might not have updated the UserDataDBConnStr setting in your sipsorcery-appsvr.exe.config file.

Code: Select all

DialPlan 07:35:50:000 31357110469: There was an exception executing your dial plan script: Logon failure: unknown user name or bad password
DialPlan 07:35:50:000 : Exception on user 31357110469's dial plan script (System.ComponentModel.Win32Exception). Logon failure: unknown user name or bad password
As for setting up a redundant SIP system. It's very tricky. When the sipsorcery system used two separate Amazon EC2 instances and relied on SRV records I found that if the primary server went down about half the SIP clients would drop off. That means only about 50% of SIP user agents support SRV records which makes them a bit pointless as a redundancy mechanism.

jvwelzen
Posts: 716
Joined: Thu Sep 11, 2008 1:56 pm

Re: How to setup Redundant configuration and Dns Srv Records

Post by jvwelzen » Sat Apr 09, 2011 11:35 am

Aaron wrote:Do you use sys.DBRead or sys.DBWrite in your dialplan? The error messages below look like you might not have updated the UserDataDBConnStr setting in your sipsorcery-appsvr.exe.config file.
It's a copy from the other server so the config file should be the same
As for setting up a redundant SIP system. It's very tricky. When the sipsorcery system used two separate Amazon EC2 instances and relied on SRV records I found that if the primary server went down about half the SIP clients would drop off. That means only about 50% of SIP user agents support SRV records which makes them a bit pointless as a redundancy mechanism.
Yes I noticed that too

Maybe I need to write a script that monitors the servers and then automaticly updates the dns server or something

EDIT :

I think I know what to do

Installing Microsoft .NET Framework 3.5 Service Pack 1 and .NET Framework 3.5 Family Update for .NET versions 2.0 through 3.5 (KB951847)

I forgot to install service pack 1 for .Net Framwork

EDIT :

Still no luck (Strange)

jvwelzen
Posts: 716
Joined: Thu Sep 11, 2008 1:56 pm

Re: How to setup Redundant configuration and Dns Srv Records

Post by jvwelzen » Sat Apr 09, 2011 12:52 pm

could it be something to do with windows server 2003 standard edition

the other machine was windows xp

jvwelzen
Posts: 716
Joined: Thu Sep 11, 2008 1:56 pm

Re: How to setup Redundant configuration and Dns Srv Records

Post by jvwelzen » Sat Apr 09, 2011 4:15 pm

found it

<DialPlanEngineImpersonationUsername value="Administrator" />
<DialPlanEngineImpersonationPassword value="password" />

needs to be set to an account from the local machine

where I prevoius tought is was the admin account from sipsorcery

Post Reply