Busy Call Return

Hello again!

… I’m still learning that stuff and I have to implement the busy call return function into our Asterisk test box.

This function is basically programmed through the dial plan; extensions.conf.

Here’s my Call Return, with the option of pressing 1 and it automatically dial the last called number. It worked great! …

[app-calltrace]
exten => *69,1,Goto(app-calltrace-perform,s,1)

[app-calltrace-perform]

exten => s,1,Answer
exten => s,2,Playback(last-num-to-call)
exten => s,3,Set(number=${DB(lastcaller/${CALLERID(number)})})
exten => s,4,SayDigits(${number})
exten => s,5,Playback(to-call-num-press)
exten => s,6,Playback(digits/1)
exten => s,7,Set(TIMEOUT(digit)=5)
exten => s,8,Set(TIMEOUT(response)=5)

exten => 1,1,Dial(Local/${number}@full)

exten => s-nonum,1,Playback(unidentified-no-callback)
exten => s-nonum,2,Hangup

exten => i,1,Playback(vm-goodbye)
exten => i,2,Hangup

exten => t,1,Playback(vm-goodbye)
exten => t,2,Hangup

But now I want to change it a bit in order to make a Busy Call Return. So when you dialed *66, it look the last number you’ve dial, dialed it for you, if it’s busy, it keeps trying for like 30 minutes without you even know it… When it rings, asterisk should ring the extension that dialed this number in order to connect him to his last dialed number…
It should not be to complicated since it’s pretty much the same thing as the Call Return that I programmed earlier, but can’t manage to make it work properly! …

If you know the answer, please raise you hand!! :smile: … I’m like… confuse… anyways, i’ll keep searching for the answer… If anyone wants to help, you’re more than welcome!
Thank’s to all!

Thx for sharing your script, I will certainely use it. But for your retry on busy, you could instead use the RetryDial Function.

RetryDial(announce[|context][|sleep][|loops]:Technology/resource[&Technology2/resource2…][|timeout][|options][|URL])

Take a look there : voip-info.org/wiki/view/Asterisk+cmd+Dial