asterisk-users-boun...@lists.digium.com wrote on 01/04/2016 08:55:40 AM:

> 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 am not sure if I completely understand what you are trying to do, but it 
sounds like you want to query the DEVICE_STATE function.

For instance, my customer service department has this thing against ever 
having their phone ring a call while they are already on a call, so for 
these special little snowflakes, I have  the following line:

same => n(voice),GotoIf($["${DEVICE_STATE(sip/${EXTEN})}" != 
"NOT_INUSE"]?voicebusy)

Basically, this little line looks at the extension and if it shows 
anything other than free (NOT_INUSE), it jumps to the voicebusy line in 
the dialplan. The voicebusy line just hits voicemail directly.

You can use this same idea to branch your logic and handle a variety of 
situations. In my case, I only want to actually perform the dial if the 
phone is currently not in use, so my logic was fairly simple.

See here for reference:
https://wiki.asterisk.org/wiki/display/AST/Device+State

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________
-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to