7 ways of opening a door

Who am I?

Tom De Moor

@ctl_alt_dieliet

Belgium


Developer

Twitter-app for the Digium phones
LDAP-addressbook for the Digium phones

Find them on http://www.asteriskexchange.com

Examples

Find them at: http://www.controlaltdieliet.be/astricon2015/

A doorphone


The AsteriskPBX is everywhere. It is all around us. Even now, in this very room. You can see it when you look out your window or when you turn on your television. You can feel it when you go to work…
Sip-device
Listens to DTMF

Thanks


Demo 1

Just press the button

Demo 1

exten=> example1,1,Noop("Example1")
same=>n,Playback(welcome)
same=>n,Dial(SIP/digiumd40,30,m)
same=>n,Hangup()

Demo 2
Forget the receptionist

ODBC

same=>n(start),set(tries=$[${tries}+1])
same=>n,read(id,enter_account,4,1,15)
same=>n,read(password,enter-password,4,1,15)
same=>n,set(pass=${ODBC_CHECKPASS(${id},${password})})
same=>n,GotoIf(${pass}?sendDTMF:error)
same=>n(sendDTMF),set(result=OK)
same=>n,set(ODBC_CHECKPASS()=${id},${result}))
same=>n,Goto(open_the_door,doorphone_open,1)
same=>n(hangup),Hangup()
same=>n(error),set(result=${password})
same=>n,set(ODBC_CHECKPASS()=${id},${result}))
same=>n,GotoIf($[${tries}>3]?hangup:start)

Demo 3
I want to make a call

You can call me at +32 9 277 84 40

Demo 4
I can't speak
But I can text

Someone willing to receive/send a textmessage? Your number will be displayed!

Chan_dongle outgoing message

same=>n,Playback(wait-moment)
same=>n,DongleSendSMS(dongle0,+32490642561,"There is someone at the door. Send 'Ok' to open the door, or 'Go away'?",1440,yes)
same=>n(hangup),Hangup()

Chan_dongle incoming message

exten => sms,1,Verbose(Incoming SMS from ${CALLERID(num)} )
same=>n,set(message=${BASE64_DECODE(${SMS_BASE64})})
same=>n,set(ODBC_CHECKPASS()=${CALLERID(num)},${message}))
same => n,GotoIf($["${message}" = "Ok"]?openthedoor,1)
same=>n,GotoIf($["${message}"="Go away"]?doorphone_close,1)

same=>n,System(echo '${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)} - ${DONGLENAME} - ${CALLERID(num)}: ${BASE64_DECODE(${SMS_BASE64})}' >> /var/log/asterisk/sms.txt)
same=>n,Hangup()

Demo 5
Are you connected?
Using XMPP

XMPP

same => n,JabberSend(asteriskjabber,tom@localhost,Knock knock, there is someone at the door! Press 1 to open the pod bay doors. Press 2 for Sorry Dave, I' cant do that.)

same => n,Set(JabberResponse=${JABBER_RECEIVE(asteriskjabber,tom@localhost)})
same => n,GotoIf($["${JabberResponse}" = "1"]?openthedoor)
same => n,GotoIf($["${JabberResponse}" = "2"]?sorry)

Demo 6
Do we have an app for that?

Screen Digium phone

Demo 7
WebRTC

WebRTC-app

Questions?

Remember the examples are at:
http://www.controlaltdieliet.be/astricon2015/