[App_rpt-users] GPIO Timeouts

Barry g8sau at sidx.org.uk
Sun Jun 14 15:26:06 UTC 2015


At 15:53 14/06/2015, mike at midnighteng.com wrote:

>Barry,
>
>I wrote a little script to do what you want.
>
>macro you want to call to turn it off after the timer has elapsed.
Thanks...

The script works fine on its own I can run it on the UNIX Cmd Line> thats fine.
I dont think the cmd, ... is being executed from inside asterisk I have added
this to the rpt.conf

maybe I put the call in the wrong place.?


[functions28203]
1=ilink,1
2=ilink,2
3=ilink,3
4=ilink,4
5=macro,1
70=ilink,5
71=ilink,6
72=ilink,7
73=ilink,15
74=ilink,16
75=ilink,8

80=status,1
81=status,2

;
; Control GPIO Port 1 on URI FOB db25.Pin2
C90=cop,61,GPIO1=1 ; Turn on GPIO 1
C91=localplay,/var/lib/asterisk/sounds/enabled
C92=cop,61,GPIO1=0 ; Turn off GPIO 1
C93=localplay,/var/lib/asterisk/sounds/disabled
;
C94=cmd,/etc/asterisk/myscripts/macro-timer.sh
;
;
6=autopatchup,noct=1,farenddisconnect=1,dialtime=20000  ; Autopatch up
0=autopatchdn                           ; Autopatch down

;989=cop,4
980=status,3
99=cop,6

; Place command macros here

[macro28203]

1 = *C90*C91*C94#
2 = *C92*C93#

macro *51 will call *C90*C91*C94# and do the GPIO + Announce enabled + runs 
script
however the script does not run? when called.?

macro *52 will call the GPIO + Announce disabled and is called from the 
script correctly when run on the cmd line out side asterisk

Thoughts  Barry



>Timer is in seconds.
>
>
>...Let me know how it works for you.
>
>...mike/kb8jnm
>
>




More information about the App_rpt-users mailing list