Page 1 of 1

Trixbox users

Posted: Wed Dec 10, 2008 12:28 am
by Noel
Not sure if we have any Trixbox (voip) users here, but if so I coded a small 'script' to toggle device statuses of X10 units.

It's all done with the "tenHsServer" in combination of Homeseer, so this is a must!

When I dial *00 the Trixbox will ask for a two digit "house code".
After entering it, it will toggle the unit from on to off, or off to on. (you can enter it like 01 or 1 for housecode 1)

You will still need to set two things in the script.
(1) the URL / IP of your Homeseer server (in my case http://10.0.0.50)
(2) the house lettercode (in my case K)

Enter the code in the extensions_custom.conf under the [from-internal-custom] part.

Code: Select all

; start Domotica
exten => *00,1,Answer
exten => *00,n,Wait(1)
exten => *00,n,Playback(welcome)
exten => *00,n,Playback(please-enter-the&digits/2&digit&system&number)
exten => *00,n,Read(X10,beep,2)
exten => *00,n,Playback(one-moment-please)
exten => *00,n,StartMusicOnHold()
; // make sure your set the correct URL and house lettercode (K)
exten => *00,n,System(/usr/bin/curl -s "<b>http://10.0.0.50</b>/tenHsServer/tenHsServer.aspx?t=ab&f=ToggleDevice&d=<b>K</b>${X10}")
; make sure your set the correct URL and house lettercode (K) //
exten => *00,n,StopMusicOnHold()
exten => *00,n,SayDigits(${X10})
exten => *00,n,Playback(ha/set)
exten => *00,n,Wait(1)
exten => *00,n,Playback(goodbye)
exten => *00,n,Hangup
; End Domotica

Trixbox users

Posted: Wed Dec 10, 2008 12:53 am
by Snelvuur
or from outside, that you can also switch it. in my case i would find this handy to turn the router for instance on / off if your not at home and it seems locked up or something. Also note that if you want to use it from outside, just make a menu where it asks for your 4 digit code. Then if wrong pincode, just hangup. I think there are some examples for it.

i know rdnzl uses asterisk (or used too) some others aswell, i still have it at home (needs tweaking once i'am in my house) but still works.

btw, for playback, is that live created? if so with what?

// Erik (binkey.nl)

Trixbox users

Posted: Wed Dec 10, 2008 1:13 am
by Noel
Erik,

To make it work from the outside, you will need to setup an IVR (Digital Receptionist) with something like press 1 for domotica (and point it to the script), press 2 for voicemail etc. etc.
You will need to do this withing the Trixbox admin.
It can not be done with a simple script.

I'll have a look an see if a pincode can be added to the script.

re: playback
They are pre recorded .wav / .gsm files that come with Trixbox

Trixbox users

Posted: Wed Dec 10, 2008 1:39 am
by Snelvuur
ah, well i have a girl that talks for me.. (cepstral) makes it on the fly, i also creating a complete menu at some point, where you can choose different options (ask for weather, record a message, listen to music etc) all with options like 1,2,3,4 etc.. not that hard to do.

Dont like the trixbox though, since i would have to work with a distritbution they supply. Just installed asterisk on debian and works like a charm (although i did recompile it instead of a .deb package) since i had some strange hickups with my cisco phone. My cisco phone is ideal for conference call on speaker (7960 model)

// Erik (binkey.nl)

Trixbox users

Posted: Wed Dec 10, 2008 1:49 am
by Noel
The only reason that I use Trixbox is the web interface.
I installed it some time ago on the Eee box, and till now it's working great.

I might get a 3rd Eee box to play with, and if so, install asterisk the way it should be done (your way).

Trixbox users

Posted: Wed Dec 10, 2008 1:56 am
by Snelvuur
the only reason why i checked that (those images) was because of the web interfaces, i had most installed but most just didn't do anything i want. In the end just create a correct config file, after that you wont use it anymore anyway.. so no need for it. See (http://wiki.binkey.nl/Asterisk) for my installation. Just simple..

// Erik (binkey.nl)