[asterisk-users] Multiple phones when one is unregistered

Administrator TOOTAI admin at tootai.net
Thu Sep 1 11:16:32 CDT 2016


Le 01/09/2016 à 17:27, D'Arcy J.M. Cain a écrit :
> On Thu, 1 Sep 2016 13:49:57 +0000 (UTC)
> tony at softins.co.uk (Tony Mountifield) wrote:
>>> What module am I missing?
>>
>> The ExecIf command is provided in the module app_exec, which is
>> usually located at /usr/lib/asterisk/modules/app_exec.so
>
> Yes, I see it.
>
>> Maybe you had turned off app_exec in the menuconfigi when building,
>> or maybe your modules.conf has a noload => app_exec.so
>
> The distributed modules.conf does not appear to mention it at all.  I
> don't need it now after all so I won't add it in until I can evaluate
> the security issues that it might bring with it.  It's hard to find
> documentation for it other than the actual source code.
>
> http://doxygen.asterisk.org/trunk/dc/d73/app__exec_8c-source.html
>

You can do it with GotoIf
exten => 5555551111,1,Verbose(Door buzzer calling)
same => n,Set(toRing=)
same => n,GotoIf($["${DEVICE_STATE(SIP/user1)}" != "NOT IN USE"]?User2)
same => n,Set(toRing=${toRing}&SIP/user1)
same => n(User2),GotoIf($["${DEVICE_STATE(SIP/user2)}" != "NOT IN 
USE"]?User3)
same => n,Set(toRing=${toRing}&SIP/user3)
same => n(User3),GotoIf($["${DEVICE_STATE(SIP/user3)}" != "NOT IN 
USE"]?Call)
same => n,Set(toRing=${toRing}&SIP/user3)
same => n(Call),GotoIf($["x${toRing}" = "x"]?NoPhoneToCall)
same => n,Dial(${toRing:1}) ;to remove the first &

-- 
Daniel



More information about the asterisk-users mailing list