some voip providers offer more than one server to register your asterisk to in case one goes down or is too busy, how does one take advantage of that?
am I right that I need to make a separate trunk to register to each of those IPs and then sort them in outbound route according to priority? with the first one at the top being utilized first…
suppose that is so, how does asterisk then determines the conditions that would warrrant sending calls by next trunk in the lineup? Is the only condition that a trunk has failed to register for calls to be sent out via the second choice?
specifically I am talking about VoipJet which give you choice of two East and two West coast servers to register to which I would like to take advantage of as fallback, also the main servers require balance greater than $20, when it falls bellow that one is supposed to use their ‘test’ server, suppose I have more than $20 ballance and use one of their prime servers and then the ballance falls bellow $20 at some point, would asterisk detect the ‘denied calls’ by VoipJet prime server and fall back on the their test server if that exist in outbound route as next choice? I am not sure how that goes, if when the ballance falls below that $20 ammount the prime server connection gets unregistered or what or if asterisk detects that calls are not accepted by that server and will use the next one in lineup - the test server trunk? Is there somebody here using VoipJet service with some practical experience in these things?
Yes, that’s correct.
I’m not entirely sure about this, but I think that’s right. I don’t know if it’s smart enough to take anything else into account, such as latency or anything like that.
thx for confirming my theory about needing a trunk for each server registration, I thought to check if I wouldn’t be doing something silly as I am new to all this
I edited my orig post adding some details about Voipjet, what is not clear to me then is if asterisk can detect when the ballance falls bellow required ammount and the prime server stops taking calls because of that, that is if the condition will then exist such that * will recognize that it should send calls via the ‘test’ server trunk
I suppose that depends how VoipJet implements the ballance limits, I doubt it would plain unregister the trunk when the ballance would fall bellow required level in which case it is not clear that * would route calls via the next server in linup (via their ‘test server’ that is)
I guess I should just set it up and let the ballance go bellow $20 and then examine CDR logs to see what happened, it is good I am not running production server (one is really supposed to be reseller of VOIP services with VoipJet)
of course, similar question then is what happens when my ballance bottoms out, that is reaches zero $s with VoipJet and even their Test server would stop taking calls, would asterisk then know to send the calls via the last trunk in the route that is registered to LesNet server?
/Edit: I made three trunks now nicely registered to VoipJet’s best servers and payed some $25 and will report here later on when the ballance falls bellow $20 what happened, that may be a long time though as i don’t use it much now that I have remote extensions for all my family and that elliminates most of long distance charges for me
For outbound calls to fail, it’s just if the call is rejected, host is unreachable/unresponsive/etc. Registration has nothing to do with outbound calls.
(Note that some providers screw this up, and return BUSY instead of an error code rejecting the call - in which case, the call stops there. This is really a provider issue, they need to return sane error codes.)
You only need registration for inbound calls, and when you have a non-static IP. Some providers allow you to enter your IP with them when signing up, and they will ALWAYS send calls to that IP - in this case, registration is not needed. However, in most cases, even if you do have an static IP, registration is preferred, for a number of reasons: - if you end up changing IPs, it’s easier to deal with; and it gives you feedback to help debugging.
that is interesting info, I expect that VoipJet will have done the call rejecting right given they catter to asterisk and IAX and that I will in time see my calls going out through their test server when the ballance drops below $20
I have dynamic IP and have DynDNS name address and when I was setting up DID info with Les.Net it seemed the dyndns name didn’t catch on, I tried to follow Nerd Vittle’s advice how to do it, in the end I chose ‘Registration’ and somehow it found my IP without me entering it there and my asterisk registered the trunk to LesNet DID and it is still registered even though my IP changed at least once since I signed up
I set up SIP trunk to connect to LesNet because that’s what Nerd Vittle advised but if I was doing it on my own I’d have chosen IAX, what’s the advantage of SIP trunk, perhaps it makes it possible to have more telephony perks that IAX doesn’t have?
since I was trying to set up remote extensions I am downright leary of SIP, possibly Aastra 480i’s can’t handle being set up as remote extension or I just don’t know what I am doing, of course I am talking then of double NAT traversal which is not the case with LesNet server I suppose
perhaps I don’t understand what Registration means, I thought in plain words it simply means that my asterisk knows IP address of LesNet server and it needs to know it either it is sending calls out (termination to PSTN) or receiving them (DID), you seem to imply that Registration is about something else
Your PBX is registration to LesNet telling it which IP to send incomming calls to.
Outgoing from your PBX is sent to the host: xxx.com statement in the trunk peer setup.
I see, my thinking was based on software IAX phone called DIAX which I used mostly before getting asterisk and that one was registered to VoipJet and it was solely for outgoing calls terminated to POTS
even now I have four trunks in asterisk, three to VoipJet and one to LesNet and they are all permanently registered, although only LesNet trunk has DID service, the other three trunks to Voipjet are all outbound termination
but I see that what you say makes sense too, when a call goes out, it includes my acct login details and once the call is completed, the stream gets dropped and that’s it, I suppose though it depends on the telephony provider whether it is permanent or temporary registration
however I have another question somewhat related and so I won’t make new thread, I have configured three asterisk servers identically with all extensions and trunks and now I am wondering if I can actually plug them in simultaneously at different location of course, the idea is to have fallback PBX for remote extensions to register to if the main one at my place should go offline
of course my IAX remote extensions dont allow for automatic secondary backup server registration, it would have to be done by hand editing registration of each extension but still the question is whether one can have more than one identical asterisk online with trunks registered for outbound and inbound calls with commercial telephony providers, I am not quite clear on that, especially when we are talking here of permanent registration that I have
thx for answers
What you are asking about is failover.
REAL providers offer this service to you.
You can “pull it off” with DNS but that would need you to do some work.
If you setup the boxes all on the net and try registration from more than one box the last one to register is where the call would go, so you would need to have the two backup boxes un-registered until the time comes for them to go on line.
Go get a trunk with vitelity.net if you want it easy.
You can use a FQDN with a short TTL for the DNS record for the server and then you will need to just change the IP address in the DNS record and have the “backup box” do a “amportal start” to register the trunks.
Hint: you can write a script to do this for you if you have control over a DNS server which supports DDNS for your DNS
and a way to monitor the uptime of the boxes.
3 asterisk servers with the same configuration, running at the same time == trouble…
The servers will register every 10 minutes to your provider, your outgoing calls will work but incomming will get to the server that registered latest.
thx to you both, particulary pnlarsson, gives me some insight into the problem which I didn’t realize that would crop up but suspected it vaguely
I think then the solution would be to have another *s sitting there with trunks ready configured but disabled and they could then be enabled in a jiffy when and if needed
its just that I have opportunity to place extra * in one location with cable internet with half decent upload that is not used much and I (that is remote extension users could fall back on that if my home * should go offline for some reason
speaking of remote extensions, I followed the guide on this site how to setup remote sip extensions http://www.freepbx.org/support/documentation/howtos/howto-setup-a-remote-sip-extension
but I failed miserably, perhaps the phones I try to make it work with are at fault, I have two Aastra’s 480i, wonder if there is some list of phones tested to work as remote extensions with asterisk, I use S100-FX IAX2 ATAs from X100P.com that work fine but if I could get some good SIP IP phones work instead it would be much better (perhaps I could even have intercom and paging btw remote extensions)