[asterisk-users] Forwarding call if extension busy

jg webaccounts173 at jgoettgens.de
Mon Jan 4 09:25:18 CST 2016


> Hi and happy new year!
>
> My question:
>
> - two extensions: 1111 and 2222
> - an active call on 1111
> - incoming calls to 1111 should be forwarded to 1111 (call advice!) and 2222
>
> I know how can I forward an incoming call to more than an extension, but I have no idea how 
> can I get the information, that 1111 has already an active call...
>
> I think, I need something like:
>
> exten => _2222,1,Verbose(2,Incoming call for 2222 - [${CALLERID(num)}])
> exten => _2222,n,GotoIf( <what here?> ?busy)
> exten => _2222,n,Dial(SIP/2222,19,RcxX)
> exten => _2222,n,VoiceMail(2222,us)
> exten => _2222,n,Hangup
> exten => _2222(busy),n,Dial(SIP/2222&SIP/1111,19,RcxX)
> exten => _2222,n,VoiceMail(2222,us)
> exten => _2222,n,Hangup
>
> Well, the problem is the second line, of course...
>
> Of course the extension 2222 is NOT "really busy", since the phone can support more active 
> channels, but I hope I explained my problem...
>
> Any suggestion?
>
> Thanks
> Luca Bertoncello
> (lucabert at lucabert.de)
>
>
There may not be a general solution as the end points can accept more than a single call 
themselves as described by yourself, i.e. the phone may not be in a busy state unless the max. 
number of calls has been reached or a call has been actively rejected. In that case you might 
put another Dial just after the first Dial application. If there is still no answer, VoiceMail 
gets called.

You need to configure your phone to accept only a single call. Another approach would be to 
check from within Asterisk whether a particular endpoint has already active calls and Dial() as 
required, i.e. one would delete the phones with active calls from a given list. Since there is 
no real "busy" condition, this seems to be a cleaner approach.

At first you should be able to describe exactly which behavior you want.

jg



More information about the asterisk-users mailing list