2010/12/8 Bruce B
> Hi Everyone,
> There are situations when internet connection is lost, SIP provider fails,
What do you mean by “SIP provider fails” ?
An outbound call returns “CONGESTION” though internet connection is up ?
There is nothing available out-of-the-box. You need to include your own IP & SIP tests in the
dialplan before dialing out to a SIP channel. Useful for this purpose are
– ping and host or wget,
– GROUP() and GROUP_COUNT(),
– dial timeouts and
– post-dial error handling (see DIALSTATUS and HANGUPCAUSE as well as Asterisk 1.8
with its ability to act directly upon the SIP response code).
Thanks for the input guys. I really appreciate all the input and I am sure
they work but I thought there would be a much better way to do this. Sounds
like patching things to me. Why doesn’t Asterisk take advantage of the
qualify values to make sure if the SIP connection is up or not? Shouldn’t
this become a native feature of the PBX rather than trying to do
[mailto:firstname.lastname@example.org] On Behalf Of Bruce B
Sent: Wednesday, December 08, 2010 11:33 AM
SIP provider fails?
#1 You’re probably right, but this should be a bounty or feature request.
Is the problem an Asterisk one or a sip-provider one? Do other PBX products
do this kind of failover internally?
#2 You get what you pay for.
Because Asterisk is a toolkit, not a ready-made PBX. This in fact gives you a lot more
freedom to handle things the way you want to handle them. Besides, CHANISAVAIL() is
really easy to use, takes less time than it took you to send your messags to this list. ;->
Yes, you can use qualify values, but that only works if qualify is on. If
you have a large number of SIP peers, the qualify option adds quite a bit
of extra traffic (if turned on on all of them), which can interfere with
normal call processing. If the qualify detects that the SIP host is too
lagged or not responding, you will get a DIALSTATUS of CHANUNAVAIL, with
the Dial quickly returning. There is no method of directly checking this
value from the dialplan, however.
Enable qualify on your SIP peers. Then configure your outbound dialplan
exten => outboundexten,1,Dial(SIP/…)
exten => outboundexten,n,Dial(DAHDI/…)
If the SIP is up, the call goes through on that Dial statement. When the
call is over and the people hangup, it will not continue down to the next
line. If it’s down (and the system knows this because of qualify), it will
fail and automatically roll to the next line. I’ve used this to setup
failover between DAHDI and SIP a few times.