I haven't done this, but.... Use the Linux high availability project's heartbeat software.... Configure both servers to watch the same IP.
T each of the incoming PSTN lines to dual x100p cards (one on each server) Configure one asterisk server to pick up the line on incoming calls a few seconds later than the other. Configure the dialplan to do something like this.... Check and see if the sip phone is available, if it is not we can presume the other asterisk server has taken over the ip and we send the call over to it through another dedicated network interface. Otherwise just send the call through to the sip phone. On the "backup" asterisk server we configure it in a similar manner. If it does receive the call (because the other asterisk server never answered the line) then it will check and see if the sip phone is available if so it send it off to it. If not it will presume the ip has been taken over by the other box and send the call over to it. Going the other way it will be similar... Configure both sip.conf to latch onto the shared IP between the two asterisk servers. When the sip phone generates a call it will automatically go to the current active asterisk switch. The asterisk switch will check if the Zap/? is available and send the call out if it is. If it is in alarm it will send the call to the other asterisk switch for routing out to the PSTN. Configure both servers identically as far as asterisk goes and write some script that will scp or rsync the /etc/asterisk directories and restart/reload asterisk after every time you make changes to the configs on both servers. Use NFS or SMB/CIFS to have only one /var/spool/asterisk/voicemail directory. And if I am not totally on crack, I think that will work. But gotta ask is it really worth doing all that for two PSTN lines? If it were a really important site like a hospital or 911 call center I could understand, but this is just your home! If it works let me know, need any help I would be happy to work on this with you (I think I could learn alot). ----- Original Message ----- From: "Ling C. Ho" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, November 07, 2003 4:41 PM Subject: Re: [Asterisk-Users] asterisk + dual phone lines + cisco + backup > Dragan Mickovic wrote: > > >I have couple of questions about the following. Currently I have 2 phone lines going > >into my house, and I would like to have both of those coming into asterisk. I also > >want to have a backup asterisk, so here are the main questions (I am knew to this so > >I apologize if I ask something stupid): > > > >- Is there a dual FXO card available from digium or do I need 2 x single FXO (if this is > > the case then I'll need 4, 2 more for the backup asterisk). > >- Since I want both asterisk boxes to have the same extensions, is there any internal > > procedures that do this, or maybe procedure for getting extensions from SQL? .. as a > > worst case I can always rsync the data :) > >- I have a cisco 1750 with 2FXO, is it possible to use it, has anybody done it, and if it > > can share some sample configs? > > > I have setup asterisk to work with a Csico 2600 with FXO using SIP, and > Xlite. > > My extension.conf is like this: > exten => _XXXXXXX,1,Dial(SIP/[EMAIL PROTECTED]) ; > "Please hold while..." > exten => _XXXXXXX,2,Playback(transfer,skip) ; "Please hold while..." > exten => _XXXXXXX,3,Macro(stdexten,43878,SIP/[EMAIL PROTECTED]) > ; (but skip if channel is not up) > > * 10.0.0.150 is the cisco box ip > * 10.0.0.249 is the ip for my asterisk box > * 43878 is my internal centrax extenstion > * we need to dial *9 to get outside line, this is being done at the Cisco > * 3878 is my softphone extension > > On my cisco: > ! > dial-peer voice 924 voip > incoming called-number 3878 > destination-pattern 3878 > session protocol sipv2 > session target sip-server > codec g711ulaw > ! > dial-peer voice 927 pots > destination-pattern ....... > port 1/1/1 > forward-digits all > prefix *9 > ! > sip-ua > sip-server ipv4:10.0.0.249 > > > I have a POTS dial peer setup on the cisco box to dial through the FXO > if I make a 7 digit calls from my softphone. > > Also, there is a VOIP dial peer to send incoming calls to my Asterisk box. > > Basically, I can call 7 digit numbers from my softphone (should be easy > to expand that to 10 digits), and it will call an outside number > directly for me. > If someone need to reach me, they call the number of one of the voice > line connected to the FXO card on the Cisco, get a dial-tone, then dial > and extension to ring my soft phone. I think you can configure the cisco > to directly route an incoming call to one of the voip destination, but I > don't have a set up ready to show. > > This is just a simple test I did a few weeks ago, doesn't cover a whole > lot, but it's possible to make use of the FXO card on the cisco if you > already have one. > > ... > ling > > > > >- Having both asterisk boxes using the same lines at the same time, is there anything that > > tells the box that it is primary (or backup) and if it should pickup the call (or not), > > and sample configs would be great. And in case if someone leaves voicemail, does it stay > > only on the primary asterisk, or does it get distributed on the backup as well? > >- any links about this would be great, and also info on asterisk implementation of MGCP. > > > >thanks > >micko > >_______________________________________________ > >Asterisk-Users mailing list > >[EMAIL PROTECTED] > >http://lists.digium.com/mailman/listinfo/asterisk-users > > > > > > > > _______________________________________________ > Asterisk-Users mailing list > [EMAIL PROTECTED] > http://lists.digium.com/mailman/listinfo/asterisk-users _______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users
