fallback to default extension

Home » Asterisk Users » fallback to default extension
Asterisk Users 9 Comments

Hi

I was asked by our development departement to setup asterisk in a
manner that if someone calls an extension in the department that was
was only configured, but a handset was never attached to it to fall
back to a default extension. For example: Someone calls extension
2408, but there’s no phone attached to 2408 it should fall back and
ring at 2400..

How do I setup asterisk to find out if there’s a phone attached to an
internal number if not ring another extension?

TIA
Paolo

9 thoughts on - fallback to default extension

  • Paolo

    You can use exten -> i This will catch any invalid extensions that are
    sent into a context. You could than route the flow as you see fit.

    Thanks

    Bryant

  • You might want to additionally inspect ${DIALSTATUS} to know more about why the first Dial() (to 2408, in your example) failed, and then use the ExecIf or GotoIf applications to take different actions.

    You might also try the function SIPPEER, again coupled with ExecIF or GotoIf.

  • Extension “i” only works for IVRs and other things like Background and WaitExten, it does not work to match incoming calls to an invalid extension.

  • Hey,

    I would also recommend to use SIPPEER and with that verify the status of said peer. Based on that status, make the dialling decision.
    If you want more help, contact me directly.

    Rennes Neps
    Elion Ettevõtted AS
    tel: +372 6402183
    mob: +372 56490388
    rennes.neps@elion.ee

  • H Andrew

    Your solution is the simplest I received and so I tried implementing
    it only to discover that it doesn’t work as expected…

    TIA
    Paolo

  • Check your Dial() options… “Verify your options to you dial syntax
    and any std-exten setups.”

  • Minor Correction
    Hi

    I’ve pretty much have it setup properly with the following:
    exten => _24XX,1,Dial(SIP/${EXTEN},30)
    exten => _24XX,n,GotoIf($${DIALSTATUS}”=”CHANUNAVAIL?noconn:conn)
    exten => _24XX,n(noconn),GotoIf($[“${EXTEN}”=”2400”]?conn:force)
    exten => _24XX,n(force),Dial(SIP/2400)
    exten => _24XX,n(conn),hangup()

    The only problem is that if 2400 rejects the call asterisk tries to
    call extension 2400 again…
    What am I doing wrong and how do I fix it?

    TIA
    Paolo

    On Wed, Mar 21, 2012 at 1:44 PM, Phil Frost wrote:
    wrote:
    why the first Dial() (to 2408, in your example) failed, and then use the
    ExecIf or GotoIf applications to take different actions.
    GotoIf.