[asterisk-users] Multiple phones when one is unregistered

Administrator TOOTAI admin at tootai.net
Tue Aug 30 11:29:55 CDT 2016


Le 30/08/2016 à 18:05, D'Arcy J.M. Cain a écrit :
> On Tue, 30 Aug 2016 17:56:35 +0200
> Administrator TOOTAI <admin at tootai.net> wrote:
>> 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
>
> That looks good and is easy to add and delete from the list.  I will
> give this a try one night this week.  Not sure what that last line
> would do if all of the phones are off but if they are the buzzer won't
> be answered anyway.

Don't execute the Dial cmd if ${toRing} is empty ;-)
  ...
  same => n,ExecIf($["x${toRing}" != "x"]?Dial(${toRing:1})) ;to remove 
the first &

-- 
Daniel



More information about the asterisk-users mailing list