pigsinspace
New Member
- Joined
- Jan 16, 2010
- Messages
- 12
- Reaction score
- 1
ok code posted
change in from-internal-custom
exten => 1XX,1,Dial(SIP/${DIAL})
exten => _X.,1,Set(result=${CURL(http://MYPBX/hotel/checkuser.php?Ext=${CALLERID(num)})})
exten => _X.,2,NoOp(Results: ${result})
exten => _X.,3,GotoIf($["${result}" = "OK"]?OK)
exten => _X.,4,GotoIf($["${result}" = "KO"]?KO)
exten => _X.,5(OK),Goto(outbound-allroutes,${DIAL},1)
exten => _X.,6,Hangup()
exten => _X.,7(KO),DIAL(SIP/RECEPTION)
exten => _X.,8,Hangup()
here is the basic code. it goes right above the code in my last post
;lets guests call 911 without being checked in
exten => _911,1,Noop
exten => _911,n,System(mail -s "An EMERGENCY CALL from ${CALLERID(name)} placed at ${STRFTIME(${EPOCH},,%H:%M)}" [email protected] < /etc/asterisk/emergency.txt)
exten => _911,n,System(cp /etc/asterisk/emg-system/*.call /tmp/)
exten => _911,n,System(echo "\nSetVar: ROOM=${CALLERID(num)}\nCallerID: "911 CALL Room ${CALLERID(num)}" <911>" | tee -a /tmp/*.call)
exten => _911,n,System(mv /tmp/*.call /var/spool/asterisk/outgoing/)
exten => _911,n,Goto(outbound-allroutes,${EXTEN},1)
exten => _911,n,Hangup()
;lets guests call *71 without being checked in - Maid Present
exten => _*71,1,Noop
exten => _*71,n,System(mail -s "${CALLERID(name)} in progress at ${STRFTIME(${EPOCH},,%H:%M)}" [email protected] < /etc/asterisk/blank.txt)
exten => _*71,n,answer()
exten => _*71,n,Playback(/var/lib/asterisk/sounds/custom/in)
exten => _*71,n,Playback(/var/lib/asterisk/sounds/custom/room)
exten => _*71,n,Hangup()
;lets guests call *72 without being checked in -- Room Clean
exten => _*72,1,Noop
exten => _*72,n,System(mail -s "${CALLERID(name)} clean at ${STRFTIME(${EPOCH},,%H:%M)}" [email protected] < /etc/asterisk/blank.txt)
exten => _*72,n,System(cp /etc/asterisk/maid-status/*.call /tmp/)
exten => _*72,n,System(echo "\nSetVar: ROOM=${CALLERID(num)}\nCallerID: "${CALLERID(name)} Clean" <*72>" | tee -a /tmp/*.call)
exten => _*72,n,System(mv /tmp/*.call /var/spool/asterisk/outgoing/)
exten => _*72,n,Playback(/var/lib/asterisk/sounds/custom/room)
exten => _*72,n,Playback(/var/lib/asterisk/sounds/custom/clean)
exten => _*72,n,Hangup()
and at the bottom of the file put
[emg-call-file]
exten => 10,1,Answer()
exten => 10,n,Wait(1)
exten => 10,n,Playback(en/emergency)
exten => 10,n,Playback(en/call)
exten => 10,n,Playback(en/from)
exten => 10,n,Playback(en/ha/guest-room)
exten => 10,n,SayDigits(${ROOM})
exten => 10,n,Playback(custom/emg-message)
exten => 10,n,Playback(en/ha/guest-room)
exten => 10,n,SayDigits(${ROOM})
exten => 10,n,Wait(1)
exten => 10,n,Hangup()
[room-clean-file]
exten => 10,1,Answer()
exten => 10,n,Wait(1)
exten => 10,n,Playback(custom/room)
exten => 10,n,SayDigits(${ROOM})
exten => 10,n,Playback(custom/clean)
exten => 10,n,Wait(1)
exten => 10,n,Playback(custom/room)
exten => 10,n,SayDigits(${ROOM})
exten => 10,n,Playback(custom/clean)
exten => 10,n,Wait(1)
exten => 10,n,Hangup()
[check-out-file]
exten => 10,1,Answer()
exten => 10,n,Wait(1)
exten => 10,n,Playback(custom/room)
exten => 10,n,SayDigits(${ROOM})
exten => 10,n,Playback(custom/checked)
exten => 10,n,Playback(custom/out)
exten => 10,n,Wait(1)
exten => 10,n,Playback(custom/room)
exten => 10,n,SayDigits(${ROOM})
exten => 10,n,Playback(custom/checked)
exten => 10,n,Playback(custom/out)
exten => 10,n,Wait(1)
exten => 10,n,Hangup()
i also created a file named 600.call (extent ion 600 is our front desk phone. change to whatever you use)
at etc/asterisk/emg-system/
inside file
Channel: Local/600
MaxRetries: 5
RetryTime: 10
WaitTime: 45
Context: emg-call-file
Extension: 10
i also created another file named 600.call (extent ion 600 is our front desk phone. change to whatever you use)
at etc/asterisk/maid-status/
inside file
Channel: Local/600
MaxRetries: 0
RetryTime: 10
WaitTime: 9
Account:72
Context: room-clean-file
Extension: 10
i think you have to also find or create sound files to say "room", "clean" etc...
hope that made some sense. it basically uses the same method that wakeup calls uses to call the front desk to notifiy them of a cleaned room or 911 or guest checking out.
so each time the maid enters the room they dial *71. the front desk gets an email with a timestamp saying room xxx in progress
when they are done they dial *72 (aka RC for room clean). it sends another email but more importantly calls the front desk with caller ID stating room clean.
similar for 911.
Hummm
i think the type field is just a name. can be anything. i have one call longDistance
make sure to read all of this blog. there were a few tricks. but maybe it just does not work with the latest version of pbxinaflash. hard to say. i think the only thing i had to do to get it work on the freepbx distro is change the usernames and passwords. my notes on that i think are on page 4 of this blog.
i am still guessing it can not log into one of the databases
Kyle the original is still on github. our version is available on request
Whats the diff?
@johnny2000 @cyberco @kyle95wmHi. If anyone is interested still in this software I have been udating it a bit and adding features such as bill printing and sales tax
short description is at http://www.cyber-cottage.eu/?p=1714
Ian
Link up your team and customers Phone System Live Chat Video Conferencing
Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.
Check your inbox!
We’ve sent you an email. Click on the button in the email body to verify your email address – (if you can not find it, check your spam folder).
Upon verification you will be directed to the 3CX setup wizard.