利用電話透過Asterisk 開家裡電鎖

利用電話撥到家中電話透過Asterisk,若CallerID 符合自己設定的Call Filter List時,則由Analog Port 3接電鎖中繼器送出"#"給中繼器後,將啟動電鎖開關,來開啟大門,經測試以此方式門口機不會咬線.




[call-filter-custom-0]
fullname = unlock
exten = s,1,Goto(CallFilter-${CDR(src)}|1)
exten = CallFilter-0912000000,1,Goto(voicemenu-custom-5|s|1)
exten = CallFilter-0912000001,1,Goto(voicemenu-custom-5|s|1)
exten = i,1,Goto(voicemenu-custom-6|s|1)

[voicemenu-custom-5]

comment = unlock
exten = s,1,dial(zap/3/ww#,60,G(hangdoorphone,hangupcall,1))

[hangdoorphone]
exten = hangupcall,1,wait(30)
exten = hangupcall,n,hangup

留言

這個網誌中的熱門文章

vim 的取代置換功能「s」

Wi-Fi Multimedia (WMM)

CoAP基礎