How to quickly move on to Dahdi channels when SIP provider fails?

Home » Asterisk Users » How to quickly move on to Dahdi channels when SIP provider fails?
Asterisk Users 7 Comments

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 ?

7 thoughts on - How to quickly move on to Dahdi channels when SIP provider fails?

  • Hi!

    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(),
    – SIPPEER(xxx:status),
    – CHANISAVAIL(),
    – 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).

    Philipp

  • 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
    work-around?

    Thanks

  • _____

    href=”mailto:asterisk-users-bounces@lists.digium.com”>asterisk-users-bounces@lists.digium.com
    [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Bruce B
    Sent: Wednesday, December 08, 2010 11:33 AM
    SIP provider fails?

    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
    work-around?

    #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.

  • 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
    like this:

    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.