Extension busy then direct to other extension

Good day,
I would appreciate any help, I have been searching the internet for a while now and cant get this right.
What im looking for is when an extension is called (100) and that extension is busy that the call be directed to the next extension (101). I can only get it right currently where it still rings 100 and then after the provided time it goes to the next extension. There are lost of post about similar things but they are for voice mail and seeing I am a bit new to asterisk so I have no idea where to do the change. All the phones are Snom 300’s.
I am using Asterisk 1.8 cert 7
CentOS 5
/etc/asterisk/extensions.conf -

exten => 100,1,Dial(SIP/100,13,jwWtT) exten => 100,n,Dial(SIP/101,15,jwWtT) exten => 100,n,Dial(SIP/102,19,jwWtT) exten => 100,n,PlayBack(vm-goodbye) exten => 100,n,Hangup()

Above is the code I have, it is basically the calls comes in and hits 100, I want it not to wait for those 13 seconds to transfer to 101 but when it sees its busy then it must go to 101 straight away.

Thank you

Problem lies downstream. Presumably the downstream system is returning 183 Progress intermediate status with an inband busy tone. You need to get it to respond with a 4xx or 6xx final status.

Hello.
If I understood you wright, I hope that one of possible solutions is Device State:
wiki.asterisk.org/wiki/display/AST/Device+State
voip-info.org/wiki/view/Aste … vice_State

Assuming that your devices have the same [names] (in sip.conf) as the corresponding extensions (though it’s not secure according to best practices, but still usually done):

[yourcontext]
exten => 100,1,GotoIf($[ "${DEVICE_STATE(SIP/100)}" = "NOT_INUSE" ]?dial100:101,1)
    same => n(dial100),Dial(SIP/100)

exten => 101,1,GotoIf($[ "${DEVICE_STATE(SIP/101)}" = "NOT_INUSE" ]?dial101:102,1)
    same => n(dial101),Dial(SIP/101)

exten => 102,1,GotoIf($[ "${DEVICE_STATE(SIP/102)}" = "NOT_INUSE" ]?dial102:100,1)
    same => n(dial102),Dial(SIP/102)

Maybe it’s not ideal, and there is a number of variants to optimise this dialplan; I haven’t tested it. But you can use it as a starting point.

Device state will work if the destination is directly connected. I’d be surprised if directly connected devices gave in band progress. I’d expect them to indicate ringing, not busy.

Thank you guys for the replies, I will be testing this today sometime and then give feedback

Thank you

Good day
Lexus45 this works 100% for what I want to do, thank you.

[quote]Hello.
If I understood you wright, I hope that one of possible solutions is Device State:
wiki.asterisk.org/wiki/display/AST/Device+State
voip-info.org/wiki/view/Aste … vice_State

Assuming that your devices have the same [names] (in sip.conf) as the corresponding extensions (though it’s not secure according to best practices, but still usually done):

[yourcontext]
exten => 100,1,GotoIf($[ "${DEVICE_STATE(SIP/100)}" = "NOT_INUSE" ]?dial100:101,1)
    same => n(dial100),Dial(SIP/100)

exten => 101,1,GotoIf($[ "${DEVICE_STATE(SIP/101)}" = "NOT_INUSE" ]?dial101:102,1)
    same => n(dial101),Dial(SIP/101)

exten => 102,1,GotoIf($[ "${DEVICE_STATE(SIP/102)}" = "NOT_INUSE" ]?dial102:100,1)
    same => n(dial102),Dial(SIP/102)

Maybe it’s not ideal, and there is a number of variants to optimise this dialplan; I haven’t tested it. But you can use it as a starting point.[/quote]

I only have more question if use this how would I then make it if 100 rings and its not busy then after say the 13 seconds its not answered it goes to the next extension.
Reason for this is say no one is manning this phone and with the code now it just rings forever.
What I did is:

[code]exten => 100,1(goon100),GotoIf($[ “${DEVICE_STATE(SIP/100)}” = “NOT_INUSE” ]?dial100:101,1)
same => n(dial100),Dial(SIP/100,8,jwWtT)

exten => 101,1(goon101),GotoIf($[ “${DEVICE_STATE(SIP/101)}” = “NOT_INUSE” ]?dial101:108,1)
same => n(dial101),Dial(SIP/101,8,jwWtT)

exten => 108,1(goon108),GotoIf($[ “${DEVICE_STATE(SIP/108)}” = “NOT_INUSE” ]?dial108:100,1)
same => n(dial108),Dial(SIP/108,8,jwWtT)

exten => 100,n,PlayBack(vm-goodbye)
exten => 100,n,Hangup()
[/code]

so it rings for 8 seconds and then I get the message goodbye and the phone hangs up.

Thank you