Le 30/08/2016 à 15:56, D'Arcy J.M. Cain a écrit :
I have an extension that looks like this:
exten => 5555551111,1,Verbose(Door buzzer calling)
same => n,Dial(SIP/user1&SIP/user2&SIP/user3)
The idea is that any of the three users can answer the phone to let
someone in. The problem is that if, say, user2 unplugs his phone then
the call immediately goes to his voice mail and the other two do not
have the ability to open the door.
Is there any way to direct only to phones in a list that are currently
registered? I am sure that I can write a rather convoluted extension
to check for registrations and create a dial command but I am hoping
that there is an easier way so that I can create these types of
extensions for other clients easily as well as being able to add and
remove destinations quickly.
Something like
exten => 5555551111,1,Verbose(Door buzzer calling)
same => n,Set(toRing=)
same => n,ExecIf($["${DEVICE_STATE(SIP/user1)}" = "NOT IN
USE"]?Set(toRing=${toRing}&SIP/user1)
same => n,ExecIf($["${DEVICE_STATE(SIP/user2)}" = "NOT IN
USE"]?Set(toRing=${toRing}&SIP/user2)
same => n,ExecIf($["${DEVICE_STATE(SIP/user3)}" = "NOT IN
USE"]?Set(toRing=${toRing}&SIP/user3)
same => n,Dial(${toRing:1}) ;to remove the first &
would do the work
--
Daniel
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
http://www.asterisk.org/community/astricon-user-conference
New to Asterisk? Start here:
https://wiki.asterisk.org/wiki/display/AST/Getting+Started
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users