auto redial when busy

Discussion in 'General' started by johnme, May 5, 2010.

  1. johnme

    Joined:
    Nov 28, 2008
    Messages:
    148
    Likes Received:
    0
    Hi

    I need something that i believe is very useful.

    When i call someone and the line is busy then with a press of a button or somethng??? asterisk should put me in hold and try every some seconds 2 or 3 to dial the last number.
    When the connection with the other party established then asterisk should stop the moh from my extension and connect me with the other party.
    If i hang up my phone then asterisk should stop redial the last number.

    Do you know anything that is similar with the above?

    Thanks
    John
     
  2. johnme

    Joined:
    Nov 28, 2008
    Messages:
    148
    Likes Received:
    0
    Hi

    I found this but i cant make it work!!!
    Can someone help?

    Campon for busy outgoing.

    Automatic redial
    From Cyber-cottage.co.uk
    Otherwise known as campon.

    It can be usefull sometimes to have number redialed till free, As can be done by a "mobile phone".

    To this end I have created a simple addition to the dial plan to do this and play the correct tones when a call fails with a reason,
    This works with SIP IAX and ISDN trunks.

    This is a new conf file called timeout.conf

    ;This file controls the action on timeout and invalid call handling
    ;
    ;
    [timeout]
    exten => s,1,Goto(s-${DIALSTATUS},1) ; This gets the dial status
    ;
    exten => s-NOANSWER,1,Playtones(congestion)
    exten => s-NOANSWER,n,wait(10)
    exten => s-NOANSWER,n,Hangup()
    ;
    exten => s-CHANUNAVAIL,1,Playtones(unobtainable)
    exten => s-CHANUNAVAIL,n,wait(10)
    exten => s-CHANUNAVAIL,n,Hangup()
    ;
    ; If a destination is busy the call may press 5 and the call will be queued
    exten => s-BUSY,1,Playtones(busy)
    exten => s-BUSY,n,Set(TIMEOUT(digit)=1)
    ;exten => s-BUSY,n,Set(TIMEOUT(response)=5)
    exten => s-BUSY,n,WaitExten(5)
    exten => s-BUSY,n,Set(redialtime=30)
    exten => s-BUSY,n,Goto(s-CAMPON,1) ; If users press 5 the call is requeuded
    exten => s-BUSY,n,Hangup()
    ;
    exten => s-CAMPON,1,NooP(${redial}) ;This is the number dialed
    exten => s-CAMPON,n,NooP(${cont}) ;This is the Context of the call
    exten => s-CAMPON,n,NooP(${redialtime})
    exten => s-CAMPON,n,waitmusiconhold(${redialtime})
    exten => s-CAMPON,n,Dial(Local/${redial}@${cont})
    ;
    exten => s-CONGESTION,1,Playtones(congestion)
    exten => s-CONGESTION,n,wait(10)
    exten => s-CONGESTION,n,Hangup()
    ;
    exten => 5,1,Noop(${EXTEN}
    exten => 5,n,Set(redialtime=15)
    exten => 5,n,Goto(s-CAMPON,1) ; If users press 5 the call is requeuded
    ;
    exten => _5.,1,Noop(${EXTEN}
    exten => _5.,n,Set(redialtime=${MATH(0${EXTEN:1}+10)})
    exten => _5.,n,Goto(s-CAMPON,1) ; If users press 5 the call is requeuded
    ;
    exten => i,1,Playtones(switching)
    exten => i,n,wait(10)
    exten => i,n,Hangup()
    ;
    exten => t,1,Playtones(switching)
    exten => t,n,wait(10)
    exten => t,n,Hangup()

    It is called from the extensions.conf in the following manner.

    ;Long distance context accessed through trunk
    exten => _90[1-2]XXXXXXXXX,1,Dial(${TRUNK1}/${EXTEN:${TRUNKMSD}})
    exten => _90[1-2]XXXXXXXXX,n,set(redial=${EXTEN})
    exten => _90[1-2]XXXXXXXXX,n,set(cont=${CONTEXT})
    exten => _90[1-2]XXXXXXXXX,n,Goto(timeout,s,1)

    I need some instructions for elastix 1.3-2

    Thanks
    John
     

Share This Page