[asterisk-users] asterisk+heartbeat

Steve Totaro stotaro at totarotechnologies.com
Wed Oct 15 22:10:59 CDT 2008


So Redfone relies on http running?  That is almost as bad as using
ping.  HTTP could be up but Asterisk could have crapped out but ping
and HTTP could still be up.  I think the manager is the best way.

If your backup box has 10.10.10.3 hardcoded and up, you have an IP
conflict and I am surprised it works at all.

Just a thought, but how about you run a cron job on your backup that
connects to your primary Asterisk boxes' AMI and issues some benign
command and pings it.  If it works as expected, then all is well, if
it AMI doesn't reply, continue your cron to ping.  If no ping replies,
then proceed to bring up 10.10.10.3. on your secondary box  If ping
works but asterisk doesn't, you could continue your cron job to ssh
the primary box and disable the 10.10.10.3 NIC and then bring up the
10.10.10.3 NIC on the spare.

If this is for SIP, just use OpenSer, if for TDM, use Redfone.

Thanks,
Steve Totaro


On Wed, Oct 15, 2008 at 9:12 PM, Nhadie <nhadie at gmail.com> wrote:
> hi sir
>
> as mentioned i need to bind it on the secondary ip.
> coz if i bind it to 0.0.0.0, it's rejecting the call.
>
> i'm not sure if possible with heartbeat to execute a command after it
> takes over an IP. so i can reload asterisk on the failover server once
> it has the ip so i can bind asterisk to it.
>
> regards
> nhadie
>
> Edgar Guadamuz wrote:
>> Are you using bindaddr=0.0.0.0 <http://0.0.0.0> in sip.conf and iax.conf ??
>>
>>
>>
>>
>> On Wed, Oct 15, 2008 at 5:35 PM, Steve Totaro
>> <stotaro at totarotechnologies.com <mailto:stotaro at totarotechnologies.com>>
>> wrote:
>>
>>     I had an issue in 1.2.x that I am not sure ever got fixed but having
>>     two NICs on the same subnet did strange things.  Strange like one
>>     NIC would be used for outbound traffic and the other for inbound
>>     traffic.
>>
>>     Maybe someone knows why, if it was a bug, if it was fixed?
>>
>>     I could think of something creative but am drained right now and
>>     have to go buy some coax and connectors.
>>
>>     If nobody helps you by then, I will.
>>
>>     Thanks,
>>     Steve Totaro
>>
>>
>>     On Wed, Oct 15, 2008 at 3:39 PM, Gleim, Jason
>>     <jgleim at atsautomation.com <mailto:jgleim at atsautomation.com>> wrote:
>>
>>         How did you define the secondary IP address? Did you actually
>>         set that
>>         up in the network scripts and bind it to eth0 or did you just
>>         define it
>>         in /etc/ha.d/haresources? You should only have the virtual IP
>>         defined in
>>         haresources along with the primary server and what you want to do on
>>         node up/down.
>>
>>         My haresources file has a single line:
>>         ohasterisk01 10.191.32.31 <http://10.191.32.31/>
>>         MailTo::<user>@<domain>.com::Asterisk
>>         fonulator asterisk
>>
>>         We're obviously using the redFone FoneBRIDGE for our T1
>>         connection as
>>         you can see we're firing the fonulator script and then asterisk.
>>
>>         HTH!
>>
>>         Jason
>>
>>
>>          > -----Original Message-----
>>          > From: asterisk-users-bounces at lists.digium.com
>>         <mailto:asterisk-users-bounces at lists.digium.com>
>>         [mailto:asterisk-users- <mailto:asterisk-users->
>>          > bounces at lists.digium.com <mailto:bounces at lists.digium.com>]
>>         On Behalf Of Nhadie
>>          > Sent: Tuesday, October 14, 2008 12:47 PM
>>          > To: Asterisk Users Mailing List - Non-Commercial Discussion
>>          > Subject: [asterisk-users] asterisk+heartbeat
>>          >
>>          > Hi,
>>          >
>>          > I'm using heartbeat as a failover for my asterisk server.
>>          >
>>          > on the active server 1 i have
>>          >
>>          > 10.10.10.1 <http://10.10.10.1/> eth0
>>          > 10.10.10.3 <http://10.10.10.3/> secondary eth0
>>          >
>>          > asterisk listens to the secondary ip, so that if server 1 fails,
>>         server
>>          > 2 will then get that IP.
>>          >
>>          > so if server 1 fails, server 2 will have the IP
>>          >
>>          > 10.10.10.2 <http://10.10.10.2/> eth0
>>          > 10.10.10.3 <http://10.10.10.3/> secondary eth0
>>          >
>>          > problem is i have to bind asterisk to the secondary IP if
>>         dont, i cant
>>          > make calls. but if server 2 is inactive, asterisk does not
>>         run, as on
>>          > the config it is binded on the secondary ip.
>>          >
>>          > anyone uses heartbeat for failover? tia.
>>          >
>>          > regards,
>>          > nhadie
>>          >
>>
>>
>>
>>     _______________________________________________
>>     -- Bandwidth and Colocation Provided by http://www.api-digital.com
>>     <http://www.api-digital.com/> --
>>
>>     asterisk-users mailing list
>>     To UNSUBSCRIBE or update options visit:
>>       http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>



-- 
Thanks,
Steve Totaro
+18887771888 (Toll Free)
+12409381212 (Cell)
+12024369784 (Skype)



More information about the asterisk-users mailing list